Error with EMP Annotations - Stochastic Programming

Solver related questions
Post Reply
GabrielaIG
User
User
Posts: 1
Joined: 11 months ago

Error with EMP Annotations - Stochastic Programming

Post by GabrielaIG » 11 months ago

Hello everyone,

I am developing a mathematical model in GAMS for my master thesis using the multistage stochastic programming approach. For that I am using the EMP annotations as said in the GAMS website. However, I keep getting problems with the model because of this error:

=C*** Identifier or number expected, saw Ch = "/" Id = "" at line

Can anyone please help me with this? I cannot understand what is wrong with it

* EMP Annotations
File emp / '%emp.info%' /;
put emp '*problem %gams.i%'/;
$onput
*randvar dmd(m,i,'1') discrete 0.5 137131 0.35 157700 0.15 123418 /;
randvar dmd(m,i,'2') discrete 0.5 137131 0.35 157700 0.15 123418 /;
stage 1 x(m,a,io,id,'1') s(m,i,'1') ykt(i,'1') vTechProdOUT(m,g,i,'1') vTechRemanOUT(m,g,i,'1') q(a,io,id,'1') kt(a,io,'1') vCF('1') vNE('1') vDP('1') vRawMCost('1') vProductionCost('1') vRecovPCost('1')
vRemanufCost('1') vVarTranspCost('1') vHubVarCost('1') vContractedHubCost('1') vStockCost('1') vLabourCost('1') vLabourCostEnt('1') vLabourCostTech('1') vLabourCostTransp('1') eCF('1') eNE('1') eDP('1')
eRawMCost('1') eProductionCost('1') eRecovPCost('1') eRemanufCost('1') eVarTranspCost('1') eHubVarCost('1') eStockCost('1') eLabourCost('1') eLabourCostEnt('1') eLabourCostTech('1') eLabourCostTransp('1')
eEQ1(m,i,'1') eEQ2(m,i,'1') eEQ3(m,i,'1') eEQ4(m,i,'1') eEQ5(m,i,'1') eEQ6(m,i,'1') eEQ7(m,i,'1') eEQ8a(m,i,'1') eEQ9(m,i,'1') eEQ10(m,i,'1') eEQ11(m,i,'1') eEQ12(i,'1') eEQ13(i,'1') eEQ14(m,i,'1')
eEQ15(m,i,'1') eEQ16(i,'1') eEQ17(i,'1') eEQ22(m,i,'1') eEQ23(m,i,'1') eEQ24(a,i,i,'1') eEQ25(a,i,i,'1') eEQ26(a,i,i,'1') eEQ27(a,i,i,'1') eEQ28(a,i,i,'1') eEQ29(a,i,'1') eEQ30(a,i,'1')
eEQ34(m,i,g,'1') eEQ35(m,i,g,'1') eEQ36(m,i,g,'1') eEQ37(m,i,g,'1')
stage 2 x(m,a,io,id,'2') s(m,i,'2') ykt(i,'2') vTechProdOUT(m,g,i,'2') vTechRemanOUT(m,g,i,'2') q(a,io,id,'2') kt(a,io,'2') vCF('2') vNE('2') vDP('2') vRawMCost('2') vProductionCost('2') vRecovPCost('2')
vRemanufCost('2') vVarTranspCost('2') vHubVarCost('2') vContractedHubCost('2') vStockCost('2') vLabourCost('2') vLabourCostEnt('2') vLabourCostTech('2') vLabourCostTransp('2') eCFlast('2') eNE('2') eDP('2')
eRawMCost('2') eProductionCost('2') eRecovPCost('2') eRemanufCost('2') eVarTranspCost('2') eHubVarCost('2') eStockCost('2') eLabourCost('2') eLabourCostEnt('2') eLabourCostTech('2') eLabourCostTransp('2')
eEQ1a(m,i,'2') eEQ2(m,i,'2') eEQ3(m,i,'2') eEQ4a(m,i,'2') eEQ5(m,i,'2') eEQ6(m,i,'2') eEQ7(m,i,'2') eEQ8(m,i,'2') eEQ9(m,i,'2') eEQ10(m,i,'2') eEQ11(m,i,'2') eEQ12(i,'2') eEQ13(i,'2') eEQ14(m,i,'2')
eEQ15(m,i,'2') eEQ16(i,'2') eEQ17(i,'2') eEQ22(m,i,'2') eEQ23(m,i,'2') eEQ24(a,i,i,'2') eEQ25(a,i,i,'2') eEQ26(a,i,i,'2') eEQ27(a,i,i,'2') eEQ28(a,i,i,'2') eEQ29(a,i,'2') eEQ30(a,i,'2')
eEQ34(m,i,g,'2') eEQ35(m,i,g,'2') eEQ36(m,i,g,'2') eEQ37(m,i,g,'2') dmd(m,i,'2')
$offput
putclose emp;

Set sc scenario / s1*s300 /;
Parameter
s_dmd(sc,m,i,t)
s_x(sc,m,a,io,id,t)
s_s(sc,m,i,t)
s_ykt(sc,i,t)
s_vTechProdOUT(sc,m,g,i,t)
s_vTechRemanOUT(sc,m,g,i,t)
s_q(sc,a,io,id,t)
s_kt(sc,a,io,t)
s_vCF(sc,t)
s_vNE(sc,t)
s_vDP(sc,t)
s_vRawMCost(sc,t)
s_vProductionCost(sc,t)
s_vRecovPCost(sc,t)
s_vRemanufCost(sc,t)
s_vVarTranspCost(sc,t)
s_vHubVarCost(sc,t)
s_vContractedHubCost(sc,t)
s_vStockCost(sc,t)
s_vLabourCost(sc,t)
s_vLabourCostEnt(sc,t)
s_vLabourCostTech(sc,t)
s_vLabourCostTransp(sc,t)
s_rep(sc,*) / set.sc.prob 0 /;

Set dict / sc .scenario .''
dmd .randvar .s_dmd
x .level .s_x
s .level .s_s
ykt .level .s_ykt
vTechProdOUT .level .s_vTechProdOUT
vTechRemanOUT .level .s_vTechRemanOUT
q .level .s_q
kt .level .s_kt
vCF .level .s_vCF
vNE .level .s_vNE
vDP .level .s_vDP
vRawMCost .level .s_vRawMCost
vProductionCost .level .s_vProductionCost
vRecovPCost .level .s_vRecovPCost
vRemanufCost .level .s_vRemanufCost
vVarTranspCost .level .s_vVarTranspCost
vHubVarCost .level .s_vHubVarCost
vContractedHubCost .level .s_vContractedHubCost
vStockCost .level .s_vStockCost
vLabourCost .level .s_vLabourCost
vLabourCostEnt .level .s_vLabourCostEnt
vLabourCostTech .level .s_vLabourCostTech
vLabourCostTransp .level .s_vLabourCostTransp
'' .opt .s_rep /;

option emp=lindo;
solve Uncertainty max vNPV use EMP scenario dict;
display s_dmd, s_rep;

Thank you very much!

Post Reply