由于程序有点多,所以只粘贴了部分程序,一直报错invalid put:a syntax error has occurred.并且指针一直在那个for语句的@上。
model:
sets:
time/1..3/:t,sgaex,drexfa,tr,didpay,drnwfa;
scenario/1..9/:sp,s;!sp是s情景发生的概率;
plant/1,2/:p,ij,sum_e;
production/1..8/:pr;
resource(plant,production):e,c_tr,pr_co_uni;
asset(time,scenario):nts,rf,rm,fa,c,ra,inr,eq,stl,ltl,nopat,str,ltr,div,addre,cash,ta,exfa,nwfa,ca,cfp,nc,undc,niswc,ic,ccp,re,nis,nisfc,tl,wc,nos,mve,nltl,nstl,ebit;
endsets
data:
str=7.00 7.00 7.00 7.00 7.00 7.00 7.00 7.00 7.00
5.60 5.60 5.60 7.00 7.00 7.00 8.40 8.40 8.40
5.30 5.60 5.90 6.70 7.00 7.40 8.00 8.40 8.80 ;
tr=0.3 0.3 0.3;!the tax rate;
ltr=4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00
3.00 3.00 3.00 4.00 4.00 4.00 5.00 5.00 5.00
2.70 3.00 3.30 3.60 4.00 4.40 4.50 5.00 5.50 ;
enddata
@for(time(t1):@for(scenario(s1):nopat(t1,s1)=(ebit(t1,s1)-str(t1,s1)*stl(t1,s1)-ltr(t1,s1)*ltl(t1,s1))*(1-tr(t1))));!constraint.3;
model:
sets:
time/1..3/:t,sgaex,drexfa,tr,didpay,drnwfa;
scenario/1..9/:sp,s;!sp是s情景发生的概率;
plant/1,2/:p,ij,sum_e;
production/1..8/:pr;
resource(plant,production):e,c_tr,pr_co_uni;
asset(time,scenario):nts,rf,rm,fa,c,ra,inr,eq,stl,ltl,nopat,str,ltr,div,addre,cash,ta,exfa,nwfa,ca,cfp,nc,undc,niswc,ic,ccp,re,nis,nisfc,tl,wc,nos,mve,nltl,nstl,ebit;
endsets
data:
str=7.00 7.00 7.00 7.00 7.00 7.00 7.00 7.00 7.00
5.60 5.60 5.60 7.00 7.00 7.00 8.40 8.40 8.40
5.30 5.60 5.90 6.70 7.00 7.40 8.00 8.40 8.80 ;
tr=0.3 0.3 0.3;!the tax rate;
ltr=4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00 4.00
3.00 3.00 3.00 4.00 4.00 4.00 5.00 5.00 5.00
2.70 3.00 3.30 3.60 4.00 4.40 4.50 5.00 5.50 ;
enddata
@for(time(t1):@for(scenario(s1):nopat(t1,s1)=(ebit(t1,s1)-str(t1,s1)*stl(t1,s1)-ltr(t1,s1)*ltl(t1,s1))*(1-tr(t1))));!constraint.3;