wrong solution
Posted: Thu Mar 04, 2021 10:58 am
Hello !!!
I have modeled this problem and solved this on GAMS but solution I am getting is not correct. Can anyone check my code and tell me where I am wrong...
$eolcom #
$title MSW sim1
$offupper
$onecho >inputsim1.txt
set=i rng=sets!B3:B4 rDim=1
set=j rng=sets!D3:D6 rDim=1
par=price rng=SP!B3:D7 rDim=1 cDim=1
par=OM rng=omcost!B3:D7 rDim=1 cDim=1
$offecho
$CALL GDXXRW.EXE inputsim1.xlsx @inputsim1.txt
$GDXIN inputsim1.gdx
sets i no of alternatives
j no of stage
$LOAD i j
parameters OM(j,i) operating and maintenence cost of alternative i at stage j
price(j,i);
$LOAD OM price
binary variables y(j,i) ;
positive variables F(j,i);
Variables z, s, oandm;
Equations profit, sales, OMcost, c1;
profit.. z=e=s-oandm;
sales.. s=e=sum((j,i), price(j,i)*F(j,i));
OMcost.. oandm=e=sum((j,i), y(j,i)*OM(j,i)*F(j,i));
c1.. sum((j,i), y(j,i))=l=1;
model sim1 /all/;
solve sim1 maximize z using minlp;
display y.l, z.l, s.l;
I have modeled this problem and solved this on GAMS but solution I am getting is not correct. Can anyone check my code and tell me where I am wrong...
$eolcom #
$title MSW sim1
$offupper
$onecho >inputsim1.txt
set=i rng=sets!B3:B4 rDim=1
set=j rng=sets!D3:D6 rDim=1
par=price rng=SP!B3:D7 rDim=1 cDim=1
par=OM rng=omcost!B3:D7 rDim=1 cDim=1
$offecho
$CALL GDXXRW.EXE inputsim1.xlsx @inputsim1.txt
$GDXIN inputsim1.gdx
sets i no of alternatives
j no of stage
$LOAD i j
parameters OM(j,i) operating and maintenence cost of alternative i at stage j
price(j,i);
$LOAD OM price
binary variables y(j,i) ;
positive variables F(j,i);
Variables z, s, oandm;
Equations profit, sales, OMcost, c1;
profit.. z=e=s-oandm;
sales.. s=e=sum((j,i), price(j,i)*F(j,i));
OMcost.. oandm=e=sum((j,i), y(j,i)*OM(j,i)*F(j,i));
c1.. sum((j,i), y(j,i))=l=1;
model sim1 /all/;
solve sim1 maximize z using minlp;
display y.l, z.l, s.l;