This model optimizes the choice of technology at a future point in time by matching technologies per plant in the steel industry.
However, the solution is skewed by the constraints (Corner Solution). Only A technology is selected at a given plant.
The reason is that when a new technology is applied in year t, it seems to choose the year t-1 technology without recognizing it.
Do you know how to solve this problem?
And if you have experience with a similar model, what other constraints should I add?
My code below is similar with https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_mexss.html those example.
=================================================================
Set
i ‘all steel plants’ / 118 ‘All Korea steel plants’/
j(i) ‘existing steel plants’ / 117 ‘Existing Korea steel plants’/
c ‘commodities’ / Iron_ore ‘Feedstock - t/t steel’
Scrap ‘Feedstock - t/t steel’
Met_coal ‘Feedstock - t/t steel’
Coke ‘Fuel - GJ/t steel’
Thermal_coal ‘Fuel - GJ/t steel’
BF_gas ‘Fuel - GJ/t steel’
COG ‘Fuel - GJ/t steel’
BOF_gas ‘Fuel - GJ/t steel’
Natural_gas ‘Fuel - GJ/t steel’
Biomass ‘Fuel - GJ/t steel’
Biomethane ‘Fuel - GJ/t steel’
Hydrogen ‘Fuel - GJ/t steel’
Electricity ‘Purchased energy - GJ/t steel’
Steam ‘Purchased energy - GJ/t steel’
BF_slag ‘Other - kg/t steel’
CO2 ‘Other - tCO2/t steel’
Steel ‘t steel’/
cf(c) ‘final product’ / Steel /
cr(c) ‘raw materials’ / Iron_ore, Scrap, Met_coal, Coke, Thermal_coal, BF_gas, COG, BOF_gas,
Natural_gas, Biomass, Biomethane, Hydrogen, Electricity, Steam, BF_slag, CO2/
cl(c) ‘raw materials limitation’ /Scrap/
co2(c) ‘co2 emission’ / CO2 /
m ‘production techs’ / steel-tech1 ‘steel production: tech 1(Avg BF_BOF)’
steel-tech2 ‘steel production: tech 2(BAT BF_BOF)’
steel-tech3 ‘steel production: tech 3(BAT BF_BOF_bio PCI)’
steel-tech4 ‘steel production: tech 4(BAT BF_BOF_H2 PCI)’
steel-tech5 ‘steel production: tech 5(BAT BF_BOF+CCUS)’
steel-tech6 ‘steel production: tech 6(BAT BF_BOF+CCU)’
steel-tech7 ‘steel production: tech 7(BAT BF_BOF+BECCUS)’
steel-tech8 ‘steel production: tech 8(EAF)’
steel-tech9 ‘steel production: tech 9(DRI-EAF)’
steel-tech10 ‘steel production: tech 10(DRI-EAF_50% green H2)’
steel-tech11 ‘steel production: tech 11(DRI-EAF_50% bio-CH4)’
steel-tech12 ‘steel production: tech 12(DRI-EAF+CCUS)’
steel-tech13 ‘steel production: tech 13(DRI-EAF_100% green H2)’
steel-tech14 ‘steel production: tech 14(DRI-Melt+BOF)’
steel-tech15 ‘steel production: tech 15(DRI-Melt+BOF+CCUS)’
steel-tech16 ‘steel production: tech 16(DRI-Melt+BOF_100% zero-C H2)’
steel-tech17 ‘steel production: tech 17(smelting reduction)’
steel-tech18 ‘steel production: tech 18(smelting reduction+CCUS)’
steel-tech19 ‘steel production: tech 19(Electrowinning-EAF)’
steel-tech20 ‘steel production: tech 20(Electrolyzer-EAF)’/
t ‘expansion time periods’ / 2020*2050 /;
Alias (t,tau), (i,ip);
Scalar
baseyear ‘base year’ / 2020 /;
Parameter
cyear(t) ‘current year’
ts(t,tau) ‘time summation matrix’;
cyear(t) = baseyear + ord(t) - 1 ;
ts(t,tau)$(ord(tau) <= ord(t)) = 1;
Table a(c,m) ‘tech input-output coefficients’
$ondelim
$include tech_input_output.csv
$offDelim
;
Table k(m,i) ‘initial production tech capacitiy of each plants (t steel/y)’
$ondelim
$include initial_capacity.csv
$offDelim
;
Table d(cf,t) ‘production projection - demand (t steel/y)’
$ondelim
$include demand.csv
$offDelim
;
Table scrap(cl,t) ‘scrap availablility - world (t/y)’
$ondelim
$include scrap_available.csv
$offDelim
;
Table capex(m,t) ‘capex ($/t steel capacity)’
$ondelim
$include investcost.csv
$offDelim
;
Table opex(m,t) ‘fixed opex ($/t steel capacity)’
$ondelim
$include opercost.csv
$offDelim
;
Table mcost(cr,t) ‘raw material cost ($/t…)’
$ondelim
$include raw_cost.csv
$offDelim
;
Parameter
zeta ‘life of productive unit (years)’
rho ‘discount rate’
sigma ‘capital recovery factor’
delta(t) ‘discount factor’;
zeta = 20;
rho = .04;
sigma = rho/(1-(1+rho)(-zeta));
delta(t) = (1+rho)(baseyear-cyear(t));
$sTitle Model Definition
Variable
z(m,i,t) ‘tech-production level(t steel/y)’
h(m,i,t) ‘capacity expansion(t steel/y)’
de(m,i,t) ‘capacity delete(t steel/y)’
cp(m,i,t) ‘current tech capacity(t steel/y)’
phi ‘total cost (discounted)()'
phikap(t) 'capex cost ()’
phiopx(t) ‘fixed opex cost ()'
phipsi(t) 'raw material cost()’;
Positive Variable z, h;
Negative Variable de;
Equation
ccc(m,i,t) ‘accounting: current tech - plant capacity’
cc(m,i,t) ‘steel capacity - actual production constraint… 0.9 max efficiency’
ccdl(m,i,t) ‘capacity delete constraint: steel plants’
cc2(j,t) ‘capacity expansion constraint: existing steel plants < 1.5times expansion’
cc3(cl,t) ‘Scrap availability constraint’
mr(cf,t) ‘market requirements - demand’
obj ‘accounting: total discounted cost’
akap(t) ‘accounting: capex cost’
aopx(t) ‘accounting: fixed opex cost’
apsi(t) ‘accounting: variable cost - raw materials’;
ccc(m,i,t)… cp(m,i,t) =e= k(m,i) + sum(tau$ts(t,tau), h(m,i,tau)+de(m,i,tau));
cc(m,i,t)… z(m,i,t) =l= cp(m,i,t)*0.9;
ccdl(m,i,t)… (-1)*de(m,i,t) =l= cp(m,i,t);
cc2(j,t)… sum(m,cp(m,j,t)) =l= 1.5*sum(m,k(m,j));
cc3(cl,t)… sum((m,i),(-1)*a(‘Scrap’,m)*z(m,i,t)) =l= scrap(cl,t);
mr(cf,t)… sum((m,i), a(‘steel’, m)*z(m,i,t)) =g= d(cf,t);
obj… phi =e= sum(t, delta(t)*(phikap(t) + phiopx(t) + phipsi(t)));
akap(t)… phikap(t) =e= sum((m,i), capex(m,t)* h(m,i,t));
aopx(t)… phiopx(t) =e= sum((m,i), opex(m,t)*(cp(m,i,t)));
apsi(t)… phipsi(t) =e= sum((cr,i),(-1)*mcost(cr,t)*sum(m,a(cr,m)*z(m,i,t)));
Model korsteel ‘dynamic steel problem’ / all /;
solve korsteel minimizing phi using lp;