Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted: Update for MOI #180

Closed
odow opened this issue Aug 1, 2018 · 3 comments
Closed

Help Wanted: Update for MOI #180

odow opened this issue Aug 1, 2018 · 3 comments

Comments

@odow
Copy link
Member

odow commented Aug 1, 2018

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:

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.

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

@IssamT
Copy link
Contributor

IssamT commented Aug 2, 2018

I'm already used to LQOI and cplex C interface, so I think it shouldn't take me much, at least for a first PR to get ILPs supported.

@mlubin
Copy link
Member

mlubin commented Oct 10, 2018

Ok to close this?

@odow
Copy link
Member Author

odow commented Oct 11, 2018

Thanks to @IssamT, this is closed by #181, #183, and #184.

@odow odow closed this as completed Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants