I did it just like Safar proposed. Thank you all!!

On Tue, May 17, 2011 at 10:02 PM, Safar Yarali wrote:

## Hi,

This equation can be modeled as follows:

set i /0*8/*

j /17/

k /1*2/;

alias (jj,j);

parameter g(k);

variable h(i,j,k);

Equations Equ(i,j,jj,k);

Equ(i,j,jj,k)$((ord(j) GE 2)And(ord(jj) EQ ord(j)-1))…h(i,j,k) =L= h(i,jj,k) + g(k);

On Tue, May 17, 2011 at 8:12 PM, Federico Perea wrote:

Hi all!

I have the following:

set i /0*8/;*

set j /17/;

set k /1*2/;

parameter g(k);

variable h(i,j,k);

I want to write an equation that says something like:

h(i,j,k) <= h(i,j-1,k) + g(k);

and I don’t know how to write the ‘j-1’ of the second member of the equation. Any idea??

Thank you in advance!

Fede

SaYa

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.