[Cbc] Strictly positive costs in minimization problem?

Michal Kaut mail at michalkaut.net
Thu May 10 08:25:01 EDT 2012


Hello,

just to be sure I understand correctly:
You have the variable /*c*/, defined as /*c = (a-b)*/, and you want its cost in
the objective function to be /*K c*/ for /*c>0*/ and zero for /*c<0*/?
This would be easy, just define a/non-negative/ variable /*d*/ with /*d >= a -
b*/, and add /*K d*/ to the objective. (And, if you do not need /*c*/ anywhere
else in the model, remove it from the model).
This will work as long as /*K d*/ is minized in the objective.

Or do mean something else?

Regards,
Michal


On 10.05.2012 13:39, Jakob Helbrink wrote:
> Hello,
>
> I am working with a relatively large minimization problem where the number of
> variables are 100.000-200.000. Since the computational time gets reduced
> significantly without integer variables(approx. 1/3 of the variables were
> initially integers) I am trying to formulate this without using integer
> variables. 
>
> In order to formulate the LP without integers I have introduced another
> variable *c*. The variables are linked mathematically as:
>
> *(a-b) = c*, /where (a, b) are both continuous variables(in theory -inf< (a,
> b) < inf.)  /
>
> However, in the objective function the cost of /*c */is /strictly/ positive,
> meaning that the cost(penalty) should not be able to take negative values. In
> other words, I would like to "cap" the cost to be strictly positive or equal
> to zero. 
> What I would like to achieve would be to disregard this cost in the solver if
> its negative. 
> Any ideas?
>
> Hopefully I managed to describe the problem in an graspable way, if not let me
> know and I'll give it another try. 
>
> Regards,
> Jakob
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20120510/0a640382/attachment.html>


More information about the Cbc mailing list