I am having problems figuring out how to do time series equations in

GAMS.

How would you write this equation properly?

You have your time:

SETS

N samples / 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 /;

You have your scalars:

SCALAR

D “-” / -3 /,

EV “-” / 1 /,

A “-” / 0 /,

B “-” / 0.5 /;

And your equations:

VARIABLES PE(N), CV, Z;

EQUATIONS POS_ERROR(N), OBJ;

POS_ERROR(N)… PE(N) =E= (N * EV) - (D + N * CV - N * N * A * CV);

OBJ… Z =E= SUM( N, B * PE(N) );

I keep getting errors for the N values in POS_ERROR???

\

Hi.

you can use SET’s elements directly in equations. you should use “” or functions like “ord”.

On Sat, Jun 11, 2011 at 8:01 PM, fstakem wrote:

I am having problems figuring out how to do time series equations in

GAMS.

How would you write this equation properly?

You have your time:

SETS

N samples / 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 /;

You have your scalars:

SCALAR

D “-” / -3 /,

EV “-” / 1 /,

A “-” / 0 /,

B “-” / 0.5 /;

And your equations:

VARIABLES PE(N), CV, Z;

EQUATIONS POS_ERROR(N), OBJ;

POS_ERROR(N)… PE(N) =E= (N * EV) - (D + N * CV - N * N * A * CV);

OBJ… Z =E= SUM( N, B * PE(N) );

I keep getting errors for the N values in POS_ERROR???

Babak Saleck Pay

M.Sc

Socio-Economic System Engineering

Group of Industrial Engineering

University of Tehran

Tehran,Iran

## WebRep

Overall rating

\

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.