help-glpk
[Top][All Lists]
Advanced

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

RE: [Help-glpk] Index i = -M, 0 ~~~(Decrementing) how to implement in t


From: Noli.Sicad
Subject: RE: [Help-glpk] Index i = -M, 0 ~~~(Decrementing) how to implement in this MathProg
Date: Wed, 20 Oct 2004 11:21:07 +1000

Answering my own posting, I tried find it last night in AMPL book.

It is actually easy to implement this:

i in M..0 by -1

The above works, it decrements by -1 in MathProg. However, I don't know
yet to have a negative (-) in M. Anyway, it is just a subscripting
thing.

Noli


~~~~
Subject: RE: [Help-glpk] Index i = -M,0 ~~~(Decrementing) how to
implement in this MathProg

It should read:

Sorry, it is j not k.

~~~~~
Sorry it k not j

Subject to Area:
 Summation (subscript j) in Xij + Win = Ai, i= -M,0 

Do syntax like this, works?

sum (i in -M, j in J)


~~~~~
I have a problem, i.e. constraint that requires index i decrementing
from -M to O, instead of usual incrementing by 1. How do AMPL/MathProg
decrement? How do we implement this in MathProg?

~~~~~
It goes this way (This is not a ampl/mathprog syntax)

Subject to Area:
 Summation (subscript k) in Xij + Win = Ai, i= -M,0 

Where: Ai = number of hectares present in period 1 that were regenerated
in period i, i= -M, 0 (hectares in each age-class).
~~~~~~

Thanks in advance.

Regards, Noli





reply via email to

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