Hi, quick question, do setting lower / upper bound work different than a restriction?, is one more efficient than the other?
upper bound by setting it
a.up(t) = 50
upper bound by restriction
a(t) =L= 50
thanks
Hi, quick question, do setting lower / upper bound work different than a restriction?, is one more efficient than the other?
upper bound by setting it
a.up(t) = 50
upper bound by restriction
a(t) =L= 50
thanks
Pitters,
In most cases, the two items you mention (x.up = 50 or x =L= 50) are identical. For example, most LP solvers include a presolve step that converts singleton equations like x =L= 50 into the equivalent explicit upper bound. Usually it is best to just set the variable upper bound explicitly in GAMS.
There are some cases where there is a difference.
f… x =L= myLimit(tCurr);
you are done: the equation f is regenerated each time in the loop over t. In contrast, the explicit variable bound needs to go in the loop:
loop {t,
tCurr(t) = yes;
x.up = myLimit(tCurr);
solve m using nlp min z;
};
HTH,
-Steve