[SCIP] Mulitply SCIP_Real by -1

Jakob Witzig witzig at zib.de
Fri Apr 21 10:35:42 CEST 2017


Hi Natalia,

have you checked the solution status of the LP by calling 
SCIPgetLPSolstat(scip)? What does the method return?

Cheers,
Jakob

On 21.04.2017 05:49, Natalia Perina wrote:
> Hi there,
>
> I am trying to multiply the result that I get from
>
> double x = SCIPgetDualsolLinear(scip, z_con(r)) or
>
> SCIP_Real x = SCIPgetDualsolLinear(scip, z_con(r))
>
> by -1 and add it it to an objective function. I understand that the 
> best way to do this would be to set a fixed variable to one and set 
> the value as the coefficient. But when everytime i mulitply by -1, I 
> get an absurdly large number that is not the actual value. I am very 
> confused as to why this is happening, seems that it should be simple.
>
> Thanks,
>
> Natalia
>
>
> -- 
> Natalia Perina
> Princeton University l 2017
> nperina at princeton.edu <mailto:nperina at princeton.edu>
> 202 360 9536
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-- 
Jakob Witzig

Zuse Institute Berlin (ZIB)

Division Mathematical Optimization and Scientific Information
Research Group Mathematical Optimization Methods

Takustrasse 7
14195 Berlin

Tel. : +49 (0)30 84185-416
Fax  : +49 (0)30 84185-269
email: witzig at zib.de

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


More information about the Scip mailing list