[Scip] use of SCIPgetDualsolLinear(scip, cons)

Gerald Gamrath gamrath at zib.de
Fri Mar 6 10:19:35 CET 2015


Dear Veronica,

equality constraints should be fine.

Can you check which constraints are in the LP and which not (and in 
particular that there are no additional cuts in the LP). For a linear 
constraint, you get the information by getting the row via 
SCIPgetRowLinear() and then calling SCIProwIsInLP().

Additionally, you could send me the log of your run, perhaps I can see 
something in there (best with printing statistics in the end).

Best,
Gerald

Am 05.03.2015 um 12:25 schrieb Veronica Dal Sasso:
> Good morning and thank you for the reply.
> 1) yes, it is solved to optimality
> 2) I have only linear constraints, but some of them are equality 
> constraints. Can this be a problem?
> 3) actually, SCIPgetNConss(scip) and SCIPgetNLPRows() are different. 
> In particular, in my test instance they are different both if I use 
> presolve (SCIPgetNConss(scip) = SCIPgetNLPRows() +3) and if I disable 
> it (SCIPgetNConss(scip) = SCIPgetNLPRows() +1)
>
> Always for the test instance, at the end, the dual LP objective is 
> twice the primal objective.
> Thanks for your help,
> Veronica
>
> 2015-03-04 19:18 GMT+01:00 Gerald Gamrath <gamrath at zib.de 
> <mailto:gamrath at zib.de>>:
>
>     Dear Veronica,
>
>     sorry for the late reply, but we were quite busy in the last weeks.
>
>     Your understanding of the dual variables is correct, they should
>     lead to the same objective value as the primal LP solution (at
>     least of the LP was solved to optimality). Actually, the dual LP
>     solution should even be dual feasible.
>
>     Could you please check:
>     1) that the LP was solved to optimality (SCIPgetLPSolstat() ==
>     SCIP_LPSOLSTAT_OPTIMAL)
>     2) check that you have only linear constraints and that those have
>     only one side (SCIPgetRhsLinear() is infinity or
>     SCIPgetLhsLinear() is -infinity)
>     3) make sure that there are no additional rows
>     (SCIPgetNConss(scip) == SCIPgetNLPRows())
>
>     How big is the difference between the primal and the dual LP
>     objective that you computed?
>
>     Best,
>     Gerald
>
>     Am 19.02.2015 um 11:13 schrieb Veronica Dal Sasso:
>>     Good morning,
>>     thank you for your reply but no, my variables are simply
>>     non-negative.
>>     Best regards,
>>     Veronica Dal Sasso
>>
>>     2015-02-18 16:49 GMT+01:00 Ambros Gleixner <gleixner at zib.de
>>     <mailto:gleixner at zib.de>>:
>>
>>         Hi Veronica,
>>
>>         If you have nonzero bounds on your variables then you need to
>>         consider their reduced costs.  Might that be the case?
>>
>>         Best regards,
>>         Ambros
>>
>>
>>         Am 18.02.2015 um 16:25 schrieb Veronica Dal Sasso:
>>
>>             Hello everyone.
>>             I'm not sure about the use of the function
>>             SCIPgetDualsolLinear().  I'm
>>             trying to solve a linear program using column generation,
>>             and at each
>>             iteration I get the values of the dual variables using
>>             SCIPgetDualsolLinear(scip, cons). I expect these dual
>>             variables to be
>>             the ones that satisfy the complementary slackness
>>             conditions and that,
>>             if I compute the dual objective function, give the same
>>             value as for the
>>             primal objective function but gives an unfeasible
>>             solution to the dual
>>             problem. Instead, I find that the dual optimal objective
>>             function has
>>             not the same value. Is it possible that I misunderstood
>>             the meaning of
>>             SCIPgetDualsolLinear() or simply I'm making some sort of
>>             error that I
>>             haven't found yet in the computing of the dual objective
>>             function's value?
>>             Thank you in advance,
>>             Veronica Dal Sasso
>>
>>
>>             _______________________________________________
>>             Scip mailing list
>>             Scip at zib.de <mailto:Scip at zib.de>
>>             http://listserv.zib.de/mailman/listinfo/scip
>>
>>
>>         -- 
>>         ______________________________________________________________
>>         Ambros M. Gleixner
>>         Zuse Institute Berlin - TU Berlin - Berlin Mathematical School
>>         http://www.zib.de/gleixner
>>         _______________________________________________
>>         Scip mailing list
>>         Scip at zib.de <mailto:Scip at zib.de>
>>         http://listserv.zib.de/mailman/listinfo/scip
>>
>>
>>
>>
>>     _______________________________________________
>>     Scip mailing list
>>     Scip at zib.de  <mailto:Scip at zib.de>
>>     http://listserv.zib.de/mailman/listinfo/scip
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20150306/12577926/attachment.html>


More information about the Scip mailing list