help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] How can I define bounds for a two dimensional variable e


From: Michael Hennebry
Subject: Re: [Help-glpk] How can I define bounds for a two dimensional variable easily?
Date: Tue, 24 Jan 2012 14:14:40 -0600 (CST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Tue, 24 Jan 2012, Raketenschnitzel wrote:

The specialty about this is the easy form of  the constraint: one column its
always the same number. Like that:

              power1       power2       power3  ....
january     c1              c2             c3
february    c1              c2             c3
...

Is there an easy way to declare such a constraint in one line, or do I
really have to make a table with an entry for each row and column?

I forget the exact syntax, but you can do something like this:

C[powers] = (c1, c2, c3)
V[powers, months]

V[p, m] <= C[p]  for p in powers, m in months

--
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]