[Top][All Lists]

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

Re: [Help-glpk] Model min() or max() function

From: Michael Hennebry
Subject: Re: [Help-glpk] Model min() or max() function
Date: Tue, 20 Aug 2013 23:21:44 -0500 (CDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Tue, 20 Aug 2013, Patrik Dufresne wrote:

  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+ + ..

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   address@hidden
"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

reply via email to

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