model:sets:year/1..5/:demand,new,nature,gouxie;gou/1..8/:pay,xie;link(year,gou):c;endsetsdata:demand=150,160,170,80,90;nature=46.15,41.55,37.12,32.81,28.61;pay=5,7,5,4,6,5,5,3;xie=25,36,32,15,31,28,22,12;enddatamin=@sum( link(i,j):c(i,j)*pay(j) );@su
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 15:00:38
model:sets:year/1..5/:demand,new,nature,gouxie;gou/1..8/:pay,xie;link(year,gou):c;endsetsdata:demand=150,160,170,80,90;nature=46.15,41.55,37.12,32.81,28.61;pay=5,7,5,4,6,5,5,3;xie=25,36,32,15,31,28,22,12;enddatamin=@sum( link(i,j):c(i,j)*pay(j) );@su
model:
sets:
year/1..5/:demand,new,nature,gouxie;
gou/1..8/:pay,xie;
link(year,gou):c;
endsets
data:
demand=150,160,170,80,90;
nature=46.15,41.55,37.12,32.81,28.61;
pay=5,7,5,4,6,5,5,3;
xie=25,36,32,15,31,28,22,12;
enddata
min=@sum( link(i,j):c(i,j)*pay(j) );
@sum(year(i)|i#lt#4:new(i))=139; new(4)=0;new(5)=0;
@for(year:@gin(new); );
这个约束怎么不满足?;
@for(year(i):gouxie(i)+nature(i)>demand(i));
gouxie(1)=@sum( link(i,j):c(1,j)*xie(j) );
@for(year(i)|i#gt#1:gouxie(i)=gouxie(i-1)*0.9+@sum(gou(j):c(i,j)*xie(j)));
new(1)+@sum(gou(j):pay(j)*c(1,j))
model:sets:year/1..5/:demand,new,nature,gouxie;gou/1..8/:pay,xie;link(year,gou):c;endsetsdata:demand=150,160,170,80,90;nature=46.15,41.55,37.12,32.81,28.61;pay=5,7,5,4,6,5,5,3;xie=25,36,32,15,31,28,22,12;enddatamin=@sum( link(i,j):c(i,j)*pay(j) );@su
自己带进去算 满足