On Tue, 20 Aug 2013, Patrik Dufresne wrote:

Maximize
  max(a, b + c + d, e + f, g+ h + i)

Subject to
  a+b+c+d+e+f+g+h+i <= ..
  a + b + .. <= d + e+ + ..
  etc.

According to this this post, I need to use the big-M method to achieve the
expected behaviour. I understand the concept of big-M, but I can't figure
out how to use it.

To model
z=max{ x[j] : j in indices } :

    for j in indices :
        z >= x[j]
        b[j] binary
        if 1==b[j], z<=x[j]   // needs little-M method, z-x[j] must have bound
    SUM b[j] == 1
    j in indices

--
Michael   [email protected]
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword."  --  Lily

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to