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

set start solution in gurobi solver

parent 347eddd6
Pipeline #6066 failed with stages
in 7 minutes and 28 seconds
......@@ -361,6 +361,12 @@ solve_two_phase(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