Commit 6f9a8cad authored by Max Lyon's avatar Max Lyon

set a start solution for Gurobi

parent 2ddf01b9
Pipeline #5915 failed with stages
in 6 minutes and 21 seconds
......@@ -125,6 +125,12 @@ solve(NProblemInterface* _problem,
case 2 : vars.push_back( model.addVar(-GRB_INFINITY, GRB_INFINITY, 0.0, GRB_BINARY ) ); break;
}
// set start
std::vector<double> start(vars.size());
_problem->initial_x(start.data());
for (int i = 0; i < _problem->n_unknowns(); ++i)
vars[i].set(GRB_DoubleAttr_Start, start[i]);
// Integrate new variables
model.update();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment