这是lingo程序为什么运行不起呢?希望你们能回答下谢谢!model:sets:year/1..10/:y;rate/1..4/:m;jiangjin/1/:s;endsetsdata:m=0.01584 0.018 0.02016 0.02232;enddatamax=s(1);@for(year(i)|i#le#3:y(i)*(1+i*m(i))=s(1));y(4)*(1+0.02016*3)*(1+0
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 17:13:05
这是lingo程序为什么运行不起呢?希望你们能回答下谢谢!model:sets:year/1..10/:y;rate/1..4/:m;jiangjin/1/:s;endsetsdata:m=0.01584 0.018 0.02016 0.02232;enddatamax=s(1);@for(year(i)|i#le#3:y(i)*(1+i*m(i))=s(1));y(4)*(1+0.02016*3)*(1+0
这是lingo程序为什么运行不起呢?希望你们能回答下谢谢!
model:
sets:
year/1..10/:y;
rate/1..4/:m;
jiangjin/1/:s;
endsets
data:
m=0.01584 0.018 0.02016 0.02232;
enddata
max=s(1);
@for(year(i)|i#le#3:y(i)*(1+i*m(i))=s(1));
y(4)*(1+0.02016*3)*(1+0.01584)=s(1);
@for(year(i)|i #ge# 6 #and# i #le# 10 #and# (i-5)*(@floor(i/5)))#ne#0:(y(i)*(1.1116)^(@floor(i/5)))*(1/y(i-5*(@floor(i/5)))=1);
@for(year(i)|(i-5*(@floor(i/5)))#eq# 0 #and# i #ne# 10:y(i)*(1.1116)^(@floor(i/5))=s(1));
@sum(year(i):y(i))=100;
y(10)*(1.1116)^2=s(1)+100;
这俩张
这是lingo程序为什么运行不起呢?希望你们能回答下谢谢!model:sets:year/1..10/:y;rate/1..4/:m;jiangjin/1/:s;endsetsdata:m=0.01584 0.018 0.02016 0.02232;enddatamax=s(1);@for(year(i)|i#le#3:y(i)*(1+i*m(i))=s(1));y(4)*(1+0.02016*3)*(1+0
该说的我都说了你没看见?
改成这样语法上就没问题了 至于具体是否满足你题目的要求你要自己检查
model:
sets:
year/1..10/:y,s;
rate/1..4/:m;
endsets
data:
m=0.01584 0.018 0.02016 0.02232;
enddata
max=s(10);
@for(year(i)|i#le#3:y(i)*(1+i*m(i))=s(i));
y(4)*(1+0.02016*3)*(1+0.01584)=s(10);
@for(year(i)|i #ge# 6 #and# i #le# 10 #and# (i-5*(@floor(i/5)))#ne#0:(y(i)*(1.1116)^(@floor(i/5)))*(1/y(i-5*(@floor(i/5))))=1);
@for(year(i)|(i-5*(@floor(i/5)))#eq# 0 #and# i #ne# 10:y(i)*(1.1116)^(@floor(i/5))=s(i));
@sum(year(i):y(i))=100;
y(10)*(1.1116)^2=s(10)+100;