Infes solution - Unit Commitment

Solver related questions
Post Reply
rpereira57
User
User
Posts: 5
Joined: 6 years ago

Infes solution - Unit Commitment

Post by rpereira57 »

Hello guys, here is my code for a uc problem:

Code: Select all

sets
time periods of time for generation /1*16/
gen generators /1*5/
Alias (time,al_time);

table gendata(gen,*) generator parameters
*                           fixed    variable   start up
*                           cost     cost       cost
         pmin     pmax      A        B          C           D     E     F
1        50       110       40       9          220         25    7     5
2        80       240       55       5          500         20    6     4
3        70       140       90       8          350         40    5     2
4        50       130       60       6          290         30    4     2
5        20       45        30       12         110         80    0.5   0.5

table pdata(time,*) data for each period
*        Demand  Wind
         D       R
2        450     80
3        420     105
4        370     120
5        440     90
6        450     50
7        400     75
8        500     35
9        530     75
10       510     20
11       470     80
12       480     70
13       450     30
14       410     85
15       390     40
16       440     25

variables
z overall cost - objective variable
z_1 (time)    ;
Positive Variables
p(gen,time) output power of generators;

binary variables
v(gen,time) is equal to 1 if generator is on for that period
x(gen,time) is equal to 1 if generator started up
y(gen,time) is equal to 1 if generator is started-up for period time
s(gen,time) is equal to 1 if generator is shut down in period time;


v.fx(gen,"1")=1;

v.fx("1","2")=1;
v.fx("1","2")=1;
v.fx("1","3")=1;
v.fx("1","4")=1;
v.fx("1","5")=1;
v.fx("1","6")=1;

v.fx("4","2")=1;
v.fx("4","3")=1;
v.fx("4","4")=1;

v.fx("5","2")=1;
v.fx("5","3")=1;
v.fx("5","4")=1;
v.fx("5","5")=1;


v.fx("2","2")=0;
v.fx("2","3")=0;
v.fx("2","4")=0;

v.fx("3","2")=0;
v.fx("3","3")=0;


Parameter wind(time);

wind(time)$(ord(time) GT 1) = pdata(time,"R")$(pdata(time,"R") le pdata(time,"D")*0.2) + pdata(time,"D")*0.2$(pdata(time,"R") gt pdata(time,"D")*0.2) ;

equations
cost objective function
cost_1 (time)
Start_up(gen,time)
pmax(gen,time) maximum output power
pmin(gen,time) minimum output power
load(time) load balance equation
enforceminuptime(gen,time)   min up time
enforcemindowntime(gen,time) min down time
Rampdown(gen,time)
statusofplant(gen,time)
*onoff(gen,time)
Rampup(gen,time);


load(time)$(ord(time) GT 1) .. sum(gen,p(gen,time))=e= pdata(time,"D") - wind(time);
Rampup(gen,time)$(ord(time) GT 1).. p(gen,time)-p(gen,time-1)=l=gendata(gen,"D");
Rampdown(gen,time)$(ord(time) GT 1).. p(gen,time-1)-p(gen,time)=l=gendata(gen,"D");
cost .. z =e= sum((gen,time), gendata(gen,"A")*v(gen,time)+gendata(gen,"B")*p(gen,time)+gendata(gen,"C")*x(gen,time));
cost_1 (time)..  z_1 (time) =e=  sum(gen, gendata(gen,"A")*v(gen,time)+gendata(gen,"B")*p(gen,time)+gendata(gen,"C")*x(gen,time));
Start_up(gen,time).. x(gen,time)=e=v(gen,time)-v(gen,time-1);
*onoff(gen,time)$(ord(time) GT 1).. y(gen,time) - s(gen,time) =E= v(gen,time) - v(gen,time-1);
pmax(gen,time)$(ord(time) GT 1) .. p(gen,time)=l=gendata(gen,"pmax")*v(gen,time);
pmin(gen,time)$(ord(time) GT 1) .. p(gen,time)=g=gendata(gen,"pmin")*v(gen,time);
enforceminuptime(gen,time) .. v(gen,time) =g= sum(al_time$[ORD(al_time)<=ORD(time) and ORD(al_time)>(ORD(time)- gendata(gen,"E"))],y(gen,al_time));
enforcemindowntime(gen,time) .. 1 - v(gen,time) =g= sum(al_time$[ORD(al_time)<=ORD(time) and ORD(al_time)>(ORD(time)- gendata(gen,"F"))],s(gen,al_time));
statusofplant(gen,time) .. v(gen,time) =e= v(gen,time-1)$[ORD(time)>1]+y(gen,time)-s(gen,time);


model uc /all/;
uc.optcr=0.001;

solve uc using mip minimizing z;

display z.l, p.l,x.l,z_1.l,y.l,s.l;
I am getting a lot of "INFES" beside my load equation... how can I solve it? I saw something about relaxation of the constraints, but I reckon it is very simple to use such an advanced feature.

thanks
kx545
User
User
Posts: 1
Joined: 5 years ago

Re: Infes solution - Unit Commitment

Post by kx545 »

Hi priera, i am a student taking the same model at the same university can you help me with the past paper solutions your response is highly appreciated.
Post Reply