hi friends,

i am trying to write one unit commitment program with use of GAMS,

for implementation of minimum up/down time constraint i have wrote

following

code in gams:

M_OFF_C1(i,t)(ord(t)0).. -1000*U(i,t)+(XOFF(i,t-1)-
T_off(i))*U(i,t)
=g= -1000;
M_ON_C1(i,t)(ord(t)0)… -1000*(1-U(i,t))+(XON(i,t-1)-

T_on(i))*(1-U

(i,t))=g= -1000;

where U(i,t) is binary variable for generation unit status, XOFF and

XON are

counters for calculating continuous off or on status time.

in order to updating XOFF and XON, after two above line in my program,

following code is used:

Xoff_C1(i,t)(ord(t)0).. XOFF(i,t)=e= XOFF(i,t-1)*(1-
U(i,t)) + (1-
U(i,t));
Xon_C1(i,t)(ord(t)0)… XON(i,t)=e= XON(i,t-1)*(U(i,t)) +

(U(i,t))

;

with above lines i want when U(i,t) is 1 , amount of XON increases to

XON+1

and XOFF should be reset to 0 and when U(i,t) is 0 , amount of XOFF

increases

to XOFF+1 and XON should be reset to 0.

but after running,this warning is seen:

“** an equation is inconsistent with other equations in the pre-

triangular

part of the model”

how i can implement min up/down constraints in Unit Commitment and

dispel

this warning,

best wishes for you.

\