Hi there,

I got a problem with implementing my idea in GAMS.

It’s part of a unit commitment model.

The models solution is the optimal unit output in every quarter of an

hour.

The set for the quaterly timesteps is named set t.

Now I would like to sum up the quaterly output m(i,t) to an hourly

output.

For the hourly timesteps I am using a set named h (I do need a set for

the hours, since it will be uses in the objective function

My idea was that Iam using a dynamic set named oph(t,t1,i), where i is

the set for the units.

I tried to fill the dynmic set only with four consecutive timesteps:

oph(t,t1,i)$((ord(t1)(ord(t)-4)))=yes

And then sum up the four quaterly values and assignt them to the

hourly value ammount(i,h).

EQ(i,s) … ammount(i,h) =e= sum (oph(t,t1,i),m(i,t)) ;

Like when in each quarter of an hour the output is 2 the value for

ammount(1,1) should be 8.

Unfortunately it isn’t working and the equation is handling it for

example like this:

ammount(1,1)… - m(1,1) - 2*(m,2) - 3*m(3,3)

- 4
*m(1,4) - 4*m(1,5) - 4*m(1,6)…(and so on, he whole set t and not just

4 values)

- ammount(1,1) =E= 0

I suppose there is a problem with the ord command in the dynamic set,

since iam a very beginner with

the GAMS syntax.

A hint would make me very happy and would help me a lot. It’s

confusing when you don’t get forward,

allthough you know what you want to model, but you simply don’t get

behind the programming.

\