JSCIPOpt icon indicating copy to clipboard operation
JSCIPOpt copied to clipboard

Is there any function to set the initial value for the Integer Linear Programming (ILP) problem?

Open HuangGuanSteve opened this issue 3 years ago • 2 comments

To solve a very complicated ILP problem, I have to use a greedy method to work out an initial value set. How can I apply this initial value set to the Solver? Thank you for your help.

HuangGuanSteve avatar Apr 20 '22 10:04 HuangGuanSteve

You can add one or more starting points using something like this:

    Variable[] vars = …;
    double[] startPoint = …;
    Solution startSolution = scip.createSol();
    scip.setSolVals(startSolution, vars, startPoint);
    scip.addSolFree(startSolution);

but be warned that SCIP will do nothing with your solution if it is not feasible (at least to the tolerance).

kkofler avatar Apr 20 '22 10:04 kkofler

You can add one or more starting points using something like this:

    Variable[] vars = …;
    double[] startPoint = …;
    Solution startSolution = scip.createSol();
    scip.setSolVals(startSolution, vars, startPoint);
    scip.addSolFree(startSolution);

but be warned that SCIP will do nothing with your solution if it is not feasible (at least to the tolerance).

It's my honour to get your support. Thank you.

The initial value is calculated by a greedy method that fully obeys the constraints. I can guarantee its feasibility. I will try your suggestion first.

HuangGuanSteve avatar Apr 20 '22 11:04 HuangGuanSteve