[Scip] Best dual sol

Gerald Gamrath gamrath at zib.de
Tue Apr 9 12:09:44 MEST 2013


Dear Ahmad,

you can use SCIPgetSolVal() (see
http://scip.zib.de/doc/html/scip_8h.shtml#adbd8d051e9c1b3f2d84be42fb140c112)
to get the value of a variable in a solution. If you don't provide a
solution, but use NULL as the second parameter, you get the value of the
current node's relaxation, i.e., the LP solution or the pseudo solution
(in case the LP was not solved, you can check this via
SCIPgetLPSolstat(scip), which should be SCIP_LPSOLSTAT_OPTIMAL). For
getting the values of all variables at once, see SCIPgetSolVals().

This gives you the values for the LP solution at the current node, based
on which you can then perform your branching. Probably, it's even better
to use the current LP solution for that instead of the global best LP
solution, because the latter might even be infeasible in your current node.

Best,
Gerald


On 09.04.2013 08:26, Ahmad Moradi wrote:
> Dear Ambros,
>
> Can I use SCIPlpiGetsol() ?
>
> bests, Ahmad
>
> On Mon, Apr 8, 2013 at 8:56 PM, Ahmad Moradi <ahmad.moradi at gmail.com
> <mailto:ahmad.moradi at gmail.com>> wrote:
>
>     On 04/08/2013 08:01 PM, Ambros Gleixner wrote:
>
>         Dear Ahmad,
>
>         no, this information is currently not available in SCIP and I
>         am not
>         sure this would be possible since the open nodes, one of which
>         has the
>         best dual bound, are not solved and have no LP solution
>         available.  So
>         it looks to me like you would need to solve the LPs of the
>         children
>         after branching before continuing with node selection.  Is
>         this what you
>         intended?
>
>         Best regards,
>
>         Ambros
>
>
>
>
>
>         Am 08.04.2013 17:30, schrieb Ahmad Moradi:
>
>             Dear all,
>
>             Does SCIP maintain an lp solution whose objective function
>             is the
>             current best dual bound during branching. If so how I
>             could access the
>             lp solution.
>
>             Bests, Ahmad
>             _______________________________________________
>             Scip mailing list
>             Scip at zib.de <mailto:Scip at zib.de>
>             http://listserv.zib.de/mailman/listinfo/scip
>
>     Dear Abmbros,
>
>     Thanks for you email.
>
>     In my problem I have to route flows on single paths
>     (non-bifuricated). So I would test adding constraints that force
>     using single paths to a node of the BB tree while branching. I was
>     wondering whether I could have access to variables value of the
>     best lp sol to possibly add better constraints.
>
>     Bests, Ahmad
>
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20130409/6e91a1d9/attachment.html


More information about the Scip mailing list