> Is it possible to capture constraints of the form > max(a,b) - min(c,d) > X or max(e,f) - min(g,h) > Y > > in glpk?
Non-linear constraints are not allowed in glpk. However, you can reformulate them using binary variables. Let f(t) = (if t < 0 then 0 else t). Then, obviously, max(p,q) = p + f(q - p) min(p,q) = p - f(p - q) Assuming that t_min <= t <= t_max the function f(t) can be modeled as follows: t = t1 + t2 f = t2 (1 - z) * t_min <= t1 <= 0 0 <= t2 <= z * t_max where z is a binary variable (z = 0 means that t_min <= t <= 0 and z = 1 means that 0 <= t <= t_max). _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
