请懂Lingo的人帮忙解释一下这段代码的意思,min=@sum(zijin:y*a)+@sum(yaoqiu(i):d(i)*0.5*@min(link(i,j):y(i)*k(i,j))); @for(zijin:@bin(y));sets:zijin/1..49/:y,a;yaoqiu/1..49/:d;link(build,require):k;endsetslink(zijin,yaoqiu):
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/13 03:57:37
请懂Lingo的人帮忙解释一下这段代码的意思,min=@sum(zijin:y*a)+@sum(yaoqiu(i):d(i)*0.5*@min(link(i,j):y(i)*k(i,j))); @for(zijin:@bin(y));sets:zijin/1..49/:y,a;yaoqiu/1..49/:d;link(build,require):k;endsetslink(zijin,yaoqiu):
请懂Lingo的人帮忙解释一下这段代码的意思,
min=@sum(zijin:y*a)+@sum(yaoqiu(i):d(i)*0.5*@min(link(i,j):y(i)*k(i,j))); @for(zijin:@bin(y));
sets:
zijin/1..49/:y,a;
yaoqiu/1..49/:d;
link(build,require):k;
endsets
link(zijin,yaoqiu):
请懂Lingo的人帮忙解释一下这段代码的意思,min=@sum(zijin:y*a)+@sum(yaoqiu(i):d(i)*0.5*@min(link(i,j):y(i)*k(i,j))); @for(zijin:@bin(y));sets:zijin/1..49/:y,a;yaoqiu/1..49/:d;link(build,require):k;endsetslink(zijin,yaoqiu):
第一句是目标函数 求最小值
有两部分 第一部分对zijin集里面的 y*a 求和 第二部分对yaoqiu集求和 求和的是d(i)*0.5*@min(link(i,j):y(i)*k(i,j))
其中@min(link(i,j):y(i)*k(i,j))写的有问题 最好应该是写@min(zijin(j):y(i)*k(i,j)) 是指对所有的y(i)*k(i,j)取最小值
第二句就是所有y为0-1变量