You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no immediate plans to update CPLEX.jl for MOI, so I thought I would lay out the upgrade path for someone who needs CPLEX.jl for the new version of JuMP. It shouldn't be too much work.
The easiest way to wrap CPLEX.jl is to use LinQuadOptInterface.jl (LQOI).
For most functions, it is simply a case of matching up the LQOI function to an existing CPLEX function. For example, the LQOI function add_variables! could be wrapped like:
function LQOI.add_variables!(model::Optimizer, number_to_add::Int)
add_vars!(model.inner, fill(0.0, number_to_add), fill(-Inf, number_to_add),
fill(Inf, number_to_add))
end
In order to guide the implementation, please take a look at the Gurobi, GLPK, and Xpress wrappers.
I have no immediate plans to update CPLEX.jl for MOI, so I thought I would lay out the upgrade path for someone who needs CPLEX.jl for the new version of JuMP. It shouldn't be too much work.
The easiest way to wrap CPLEX.jl is to use LinQuadOptInterface.jl (LQOI).
LQOI provides an interface that is close to the functions required by CPLEX.jl:
https://github.com/JuliaOpt/LinQuadOptInterface.jl/blob/master/src/solver_interface.jl
For most functions, it is simply a case of matching up the LQOI function to an existing CPLEX function. For example, the LQOI function
add_variables!
could be wrapped like:In order to guide the implementation, please take a look at the Gurobi, GLPK, and Xpress wrappers.
Gurobi
Here is
src/MOIWrapper.jl
for Gurobi:https://github.com/JuliaOpt/Gurobi.jl/blob/master/src/MOIWrapper.jl
and the
test/MOIWrapper.jl
:https://github.com/JuliaOpt/Gurobi.jl/blob/master/test/MOIWrapper.jl
GLPK
Here is
src/MOIWrapper.jl
for GLPK:https://github.com/JuliaOpt/GLPK.jl/blob/master/src/MOIWrapper.jl
and the
test/MOIWrapper.jl
:https://github.com/JuliaOpt/GLPK.jl/blob/master/test/MOIWrapper.jl
Clp
jump-dev/Clp.jl#27
Xpress
Here is
src/MOIWrapper.jl
for Xpress:https://github.com/JuliaOpt/Xpress.jl/blob/master/src/MOIWrapper.jl
and the
test/MOIWrapper.jl
:https://github.com/JuliaOpt/Xpress.jl/blob/master/test/MOIWrapper.jl
The text was updated successfully, but these errors were encountered: