I am trying to implement the following, and I am getting a syntax error.

subject to ST_Cost {i in GENERATORS, t in TIME}:

if t == 1 then

C_SU[i, t] >= GenData['K', i] * (I[i, t] - GenData['INI', i]);

else

{

C_SU[i, t] >= GenData['K', i] * (I[i, t] - I[i, t-1]);

}

;

I have also tried the following with no success:

subject to ST_Cost {i in GENERATORS, t in TIME}:

t == 1 **==>** C_SU[i, t] **>=** GenData['K', i] * (I[i, t] - GenData['INI', i]) **else **C_SU[i, t] >= GenData['K', i] * (I[i, t] - I[i, t-1]);

Does anyone have any pointers?

--

You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.

To unsubscribe from this group and stop receiving emails from it, send an email to

[hidden email].

To post to this group, send email to

[hidden email].

Visit this group at

https://groups.google.com/group/ampl.

For more options, visit

https://groups.google.com/d/optout.