Hi folks,
I met one problem when I run my unit commitment code. From the result
report, we can find that some generators are not on, but it’s so
strange that I find all binary variables u(g,t) remained 1. This does
not make sense since we know that in this case some binary variables
should be 0.
So, I’m wondering if some one can help me out of this problem. I will
appreciate it very much for your warm help.
I post the codes below. Please feel free to contact me.
Thank you in advance.
John
\
- Test
Sets
t hourly time period /13/
g number of generator /13/
head /low, upp,
c,su/;
Scalar BC average cost of biogas in dollars per liter /
0.1/;
Parameters
PL(t) hourly load demand in kW
/1 30
2 110
3 70/
Table Gen(g, head) generator sets data
Low Upp C su
1 0 24 10 10
2 0 25 8 20
3 10 45 5 30;
Variables
P(g,t) generator output in time t in kW
u(g,t) unit status ON or OFF
Tf total cost of biogas consumption
Pbatt(t) battery hourly state of charge in kW
v(g,t) start up variable;
Binary variable u;
P.up(g,t) = Gen(g,“upp”);
P.lo(g,t) = Gen(g,“low”);
Pbatt.lo(t) = 0;
Pbatt.up(t) = 50;
v.up(g,t) = 1;
v.lo(g,t) = 0;
Equations
TBC total hourly biogas consumption cost
GenLow(g,t) generator output lower bound
GenUpp(g,t) generator output upper bound
SU(g,t) generatot start up equation
SysCon(t) system energy balance constraint;
TBC… Tf =e= sum((g,t), BC*Gen(g,“c”)*P(g,t)
+v(g,t)*Gen(g,“su”));
GenLow(g,t)… P.lo(g,t) =e= Gen(g,“low”)*u(g,t);
GenUpp(g,t)… P.up(g,t) =e= Gen(g,“upp”)*u(g,t);
SU(g,t)… v(g,t) =g= u(g,t)-u(g,t-1);
SysCon(t)… sum(g, P(g,t))-PL(t)+Pbatt(t) =e= 0;
model MOO /all/;
solve MOO using mip minimizing Tf;
\