[Coin-discuss] Set objective coefficients

Laszlo Ladanyi ladanyi at us.ibm.com
Thu Jun 29 13:04:06 EDT 2006


Hi Heesu,

It's doable, but I would strongly advise against it. If you change the obj
coeff on the fly then you can kiss good-bye to all the bound assumptions, the
optimality of the LP solution, and who knows what else... The worst among the
"what else" is that the change you make will affect only the local LP solver
process and won't make its way to the TM, So the next time you see to same
variable in a different node you'll have to do the change once again. Keeping
track of all the changes across process search tree nodes would be a
nightmare.

The correct way to achive what you want is to create a new variable with a
different objective and add that to the formulation (if you want to exclude
the original one then set its upper bound to 0, that is carried to the
descendants of the search tree node).

If you *really* want to change the obj value, email me and I'll try to dig up
what data you must change to maintain consistency, but I must emphasize that
you'll be in deep, uncharted waters and I'm not sure whether it is possible.

--Laci

On Thu, 29 Jun 2006, Heesu Hwang wrote:

> 
> Hi, all.
> 
> I wonder if we can change the objective coefficients once generated variables
> are inserted into the problem matrix.
> I tried XX_var.set_obj(), but "const BCP_vec<BCP_var*>& vars" contains constant
> BCP_var's and doesn't allow to do that.
> Could you give me any tips for changing objective coefficients?
> 
> Thanks,
> 
> Heesu Hwang.
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
> 




More information about the Coin-discuss mailing list