Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OscaRCBLS.jl

Julia bindings for OscaR.cbls, a constraint-based local-search library. The package downloads the public OscaR 6.0.0-beta3 JAR and its Scala runtime during Pkg.build.

Java 21 or newer is required. On Julia 1.12, start Julia with JULIA_COPY_STACKS=1 as required by JavaCall.

using Pkg
Pkg.build("OscaRCBLS")

using OscaRCBLS

model = Model("example")
x = intvar(model, 2, 0, 10; name="x")
y = binaryvar(model, 1; name="y")
sum = x + y
close(model)

@assert value(sum) == 3
assign!(x, 7)
@assert value(sum) == 8

The raw JModel, JStore, JIntVariable, and JObjective JavaCall types are exported for functionality not yet covered by the Julia convenience API. When another package owns JVM initialization, call oscar_java_init(false) before JavaCall.init().

MathOptInterface and MathOptVRP

OscaRCBLS.Optimizer implements the MathOptVRP Permutation, Partition, PartitionPD, Capacity, TimeWindows, and CapacitatedTimeWindows sets. Internally, Permutation(n) uses the same sequence representation as a one-truck Partition(n, 1). Routes are backed by OscaR's VRS sequence representation and are returned through the usual MOI/JuMP result attributes. The current search backend is intended for the small reference instances in MathOptVRP.Tests.

OscaRCBLS.jl is licensed under the MIT License. The downloaded OscaR.cbls library is separately licensed under LGPL-3.0; see THIRD_PARTY_NOTICE.md.

About

Julia interface for OscaR.CBLS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages