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

Add access to dual solution (for LP problems) #135

Closed
wants to merge 5 commits into from
Closed

Conversation

rschwarz
Copy link
Collaborator

This requires that a lot of SCIP settings be disabled, so we should also provide some utilities around that (setting emphasis etc.).

@fserra
Copy link
Collaborator

fserra commented Oct 18, 2019

I wouldn't put effort into this. Accessing the dual solutions in SCIP is super buggy. Even if you disable everything. If I remember correctly if you add bounds as constraints SCIP will anyway remove them. Then SCIP tries to rebuild the dual multipliers from the lp solver, but it doesn't realize if there are repeated constraints and so it will assign the same multiplier to different constraints, which is just wrong.

@rschwarz
Copy link
Collaborator Author

I wouldn't put effort into this. Accessing the dual solutions in SCIP is super buggy.
Well, thanks for the warning 😭

I looked at PySCIPOpt/#136 and the related changes and thought that the problems are fixed now. In the Python code, there is a check for SCIP's version > 6.0, then use the SCIPgetDualSolVal and inside that function, there is special code for the "bound constraints".

So, most of the MOI tests about dual values actually pass. But those that fail, do so for different reasons. I think for one of them, the status changes: That is, with default settings, SCIP detects correctly that the problem is unbounded. But with presolve etc disabled, it says that it's optimal or something.

I have some interest in this beyond SCIP.jl, because I'd hoped to use this also in LITIC, but I guess we have to continue building an auxiliary LP just for the dual solution...

@fserra
Copy link
Collaborator

fserra commented Oct 18, 2019

yeah Matthias tried to fix it somehow, but I think that if you add constraints like x <= 1, x<=1, x<=1 then you should get something wrong. I can imagine that no test is that creative ;)

@rschwarz
Copy link
Collaborator Author

So, the proper solution is to extract the LP, and ask the LP solver directly?
Or better, to build the problem with the LP solver, so that SCIP does no presolve...

@fserra
Copy link
Collaborator

fserra commented Oct 18, 2019

build it with the lp so that scip has nothing to do with it ;)

@rschwarz rschwarz closed this Oct 19, 2019
@a12one
Copy link

a12one commented Apr 24, 2020

@fserra may I ask if this is an issue with scip or their default liner solver soplex? (I apologize if I am asking a question that implied from the conversation already), thank you very much!

@rschwarz
Copy link
Collaborator Author

The issue is with SCIP itself. If I understand it correctly, it can't even be fixed easily, because of the design based on generic constraints.

@fserra
Copy link
Collaborator

fserra commented Apr 24, 2020

I think that the problem is that SCIP does some presolving even if presolve is off

@a12one
Copy link

a12one commented Apr 24, 2020

@rschwarz @fserra thanks a lot for the explanation! cheers

@rschwarz rschwarz deleted the rs/dualsol branch December 1, 2020 19:34
@rschwarz rschwarz mentioned this pull request Mar 25, 2021
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

Successfully merging this pull request may close these issues.

3 participants