Argonne-National-Laboratory / DSP

An open-source parallel optimization solver for structured mixed-integer programming
Other
81 stars 24 forks source link

A common callback structure #133

Closed kibaekkim closed 2 years ago

kibaekkim commented 3 years ago

The current Benders implementation uses the SCIP constraint handler, which works like lazy constraints in CPLEX or GUROBI. You can find how it works in general: https://www.scipopt.org/doc-7.0.1/html/CONS.php SCIP is a very well-written code, and I suggest to check it out.

Back to DSP, the base class of our Benders constraint handler is implemented in src/Solver/Benders/SCIPconshdlrBenders.* which derives many classes of the form SCIPconshdlr*. In particular, the Benders cuts used in the dual decomposition is implemented in src/Solver/DualDecomp/SCIPconshdlrBendersDd.*.

As discussed in the meeting, we want to implement a common callback structure that can use SCIP, CPLEX, and GUROBI. I think this can be implemented in DspOsi class and its derivative for each solver. Please take a look at the code and give some thoughts about that.

kibaekkim commented 3 years ago

https://github.com/SCIP-Interfaces/SCIP.jl/issues/156#issuecomment-668090452

kibaekkim commented 3 years ago

We agreed to have an interface layer at DspOsi for lazy callback function, while having scip separately.

cheesecakeball commented 3 years ago

We want to add a common structure to set callback function and a wrapper for functions to add lazy cuts. Check how to add a common interface for user-defined callback functions.

cheesecakeball commented 3 years ago

Shall we also add callback functions in DspCInterface?

kibaekkim commented 3 years ago

Shall we also add callback functions in DspCInterface?

This is an interesting idea, but let's not add the functions at this moment. It needs much more thoughts for how users can use the functions.

cheesecakeball commented 3 years ago

Shall we also add callback functions in DspCInterface?

This is an interesting idea, but let's not add the functions at this moment. It needs much more thoughts for how users can use the functions.

OK. Then I will test this callback structure using benders decomposition.