这是lingo程序为什么运行不起呢?希望你们能回答下谢谢!

1个回答

  • 该说的我都说了你没看见?

    改成这样语法上就没问题了 至于具体是否满足你题目的要求你要自己检查

    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;