求改lingo程序,用sets:endsetsmin=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;@gin(x11);@gin(x21);@gin(x31);@gin(x41);@gin(x51
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 15:24:20
求改lingo程序,用sets:endsetsmin=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;@gin(x11);@gin(x21);@gin(x31);@gin(x41);@gin(x51
求改lingo程序,用sets:endsets
min=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));
2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;
@gin(x11);
@gin(x21);
@gin(x31);
@gin(x41);
@gin(x51);
@gin(x61);
@gin(x71);
@gin(x12);
@gin(x22);
@gin(x32);
@gin(x42);
@gin(x52);
@gin(x62);
@gin(x72);
end
求改lingo程序,用sets:endsetsmin=1020*2-(48.7*(x11+x12)+52.0*(x21+x22)+61.3*(x31+x32)+72.0*(x41+x42)+48.7*(x51+x52)+52.0*(x61+x62)+64.0*(x71+x72));2*x11+3*x21+x31+0.5*x41+4*x51+2*x61+x71=0;x72>=0;@gin(x11);@gin(x21);@gin(x31);@gin(x41);@gin(x51
sets:
r/1..7/:d1,d2,d3;
c/1..2/:;
link(r,c):x;
endsets
data:
d1= 48.7 52.0 61.3 72.0 48.7 52.0 64.0;
d2= 2 3 1 0.5 4 2 1;
d3= 8 7 9 6 6 4 8;
enddata
min=1020*2-@sum(link(i,j):d1(i)*x(i,j));
@for(c(j):@sum(r(i):d2(i)*x(i,j))