|
From: | Patrik Dufresne |
Subject: | Re: [Help-glpk] Model min() or max() function |
Date: | Tue, 20 Aug 2013 18:02:38 -0400 |
Minimize
(c1 * x1) + (c2 * x2) + (c3 * x3) + (c4 * max(c1*x1, c2*x2, c3*x3))
subject to
#some arbitrary integer constraints:
x1 >= ...
x1 + 2*x2 <= ...
x3 >= ...
x1 + x3 == ...
Hello,I'm using glpk-java. I need to model a max() function similar to Excel.max(3, 5, 7, 1) = 7e.g.:a,b,c,d,e,f,g,h and i are binary variablesm is an integer variable [0..+infinity[m <= max(a, b + c + d, e + f, g+ h + i)Any suggestion?--Patrik Dufresne
[Prev in Thread] | Current Thread | [Next in Thread] |