2
$\begingroup$

We want to model our MILP problem with Google OR-Tools in .NET, and solve it using GUROBI (solver may change in the next 1-2 years). However, we couldn't find the correct syntax to call GUROBI.

https://developers.google.com/optimization says it is Solver solver = Solver.CreateSolver(solver_id);. There are examples of calling GLOP and SCIP, but not for GUROBI (or we failed to find). What we tried listed below, but solver returns null.

using Google.OrTools.LinearSolver;

Solver solver = Solver.CreateSolver("GUROBI");

Solver solver = Solver.CreateSolver("GUROBI_MIXED_INTEGER_PROGRAMMING");

Question 1: What is the correct way of calling GUROBI?

Question 2: Does OR-Tools allow using callbacks of GUROBI? If so, any source suggestions to refer? https://www.gurobi.com/documentation/9.1/refman/cb_codes.html

Thanks.

$\endgroup$

1 Answer 1

5
$\begingroup$
  1. the library needs to find the gurobi shared library before you can create the solver. You can set GUROBI_HOME to help.
  2. you can have callbacks, but only in c++. Look for or-tools/linear_solver/linear_solver.h. Search for callbacks.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.