help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Constraint maximize


From: Andrew Makhorin
Subject: Re: [Help-glpk] Constraint maximize
Date: Mon, 09 May 2011 20:31:16 +0400

On Mon, 2011-05-09 at 07:58 -0700, FUSL wrote:
> Hi,
> 
> We have to define a constraint T = Max(0, c - u) which returns 0 if c-u<=0
> or the value of |c-u| if c>u.
> We can't compile when we use this constraint: s.t. ret{k in K}: T[k] =
> Max(0, c[k] - u[k]).
> 
> How should we define this constraint, as Gusek doesn't allow us to use a Max
> function in a constraint?
> 
> 
> Thank you!!!

Please see:
http://en.wikibooks.org/wiki/GLPK/Modeling_tips




reply via email to

[Prev in Thread] Current Thread [Next in Thread]