Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HuangGuanSteve opened this issue Apr 20, 2022 · 2 comments

Comments

@HuangGuanSteve
Copy link

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.

@kkofler
Copy link
Collaborator

kkofler commented Apr 20, 2022

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).

@HuangGuanSteve
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants