How to do calculos with the results

Hi everyone.
I need to do some calculos with the results. I need to calculate the diifference between the LEVEL and the LOWER of my equation (Rest_4).
For example, I have the result below:

---- EQU Rest_4

LOWER LEVEL UPPER MARGINAL

term1.1 . . +INF .
term1.2 100.000 210.000 +INF .
term1.3 100.000 110.000 +INF .
term1.4 . . +INF .
term1.5 . . +INF .
term1.6 . . +INF .
term1.7 400.000 410.000 +INF .
term1.8 . . +INF .
term1.9 . . +INF .
term1.10 . . +INF .
term2.1 . . +INF .
term2.2 . . +INF .
term2.3 400.000 410.000 +INF .
term2.4 . 210.000 +INF .
term2.5 . . +INF .
term2.6 . . +INF .
term2.7 50.000 110.000 +INF .
term2.8 . . +INF .
term2.9 100.000 210.000 +INF .
term2.10 . . +INF .

I need to do the GAMS write in the .lst the table with:

LEVEL-LOWER
term1.2 110.000
term1.3 10.000
term1.7 10.000
term2.3 10.000
term2.4 210.000
term2.7 60.000
term2.9 110.000

Any suggestion?


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/_6-amfu2wR8J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

assuming Rest_4 is defined on indices (term,i) for instance.
Juste define :

parameter calc(term,i) ;
calc(term,i) = Rest_4.L(term,i) - Rest_4.LO(term,i);
display calc ;

This should do.
.L is the suffix for the level (of a constraint or variable), while .LO is the suffix for the lower bound.
cheers


Le mercredi 28 novembre 2012 21:10:40 UTC+1, Philipe Rocha a écrit :

Hi everyone.
I need to do some calculos with the results. I need to calculate the diifference between the LEVEL and the LOWER of my equation (Rest_4).
For example, I have the result below:

---- EQU Rest_4

LOWER LEVEL UPPER MARGINAL

term1.1 . . +INF .
term1.2 100.000 210.000 +INF .
term1.3 100.000 110.000 +INF .
term1.4 . . +INF .
term1.5 . . +INF .
term1.6 . . +INF .
term1.7 400.000 410.000 +INF .
term1.8 . . +INF .
term1.9 . . +INF .
term1.10 . . +INF .
term2.1 . . +INF .
term2.2 . . +INF .
term2.3 400.000 410.000 +INF .
term2.4 . 210.000 +INF .
term2.5 . . +INF .
term2.6 . . +INF .
term2.7 50.000 110.000 +INF .
term2.8 . . +INF .
term2.9 100.000 210.000 +INF .
term2.10 . . +INF .

I need to do the GAMS write in the .lst the table with:

LEVEL-LOWER
term1.2 110.000
term1.3 10.000
term1.7 10.000
term2.3 10.000
term2.4 210.000
term2.7 60.000
term2.9 110.000

Any suggestion?


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/v3UcSk4ttMQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thank you! Problem solved.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/SL9oi2fzvGoJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.