[Scip] Is it possible to change the coefficient of a variable in a SCIP_ROW?

michael.winkler@zib.de michael.winkler at zib.de
Mon Oct 11 22:56:49 MEST 2010


Hi,

you need to change the coefficient via SCIPaddVarToRow() even for setting
an old coefficient to zero. So you need to subtract the old value. SCIP
will replace the old coefficient with the sum of the old and the new
value, so in your example 3x - 3x will be replaced by 0  and 2x + x by 3x.

Best, Michael


> On Mon, October 11, 2010 3:36 pm, Stefan Heinz wrote:
>> Hi Nikolaj,
>>
>>
>>> In my branch, price and cut, the generation of a new variable could ask
>>>  for the change in coefficient for few variables in a SCIP_ROW (i.e.
>>> the cut would be stronger if reinterpreted in another way).
>>>
>>> Is it possible to change the coefficient of a variable in a SCIP_ROW?
>>>
>> Did you try to use the method SCIPaddVarToRow() adding the changes of
>> the
>>  coefficients?
>>
>> Stefan
>>
>>
> Hi Stefan,
>
> Thank you for your reply.
>
> If the new coefficient is different than 0, why not but if I want to
> remove the variable is there a way to do this other than to subtract the
> same amount of that variable? Will SCIP replace 3x - 3x by 0? and 2x + x
> by 3x?
>
> Have a good evening,
>
> Nikolaj
>
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list