lingo模型定义出错问题model:sets: center/1..3/:

发布时间:2021-03-10 07:15:42

lingo模型定义出错问题model: sets:  center/1..3/:u;  addr/1..7/:v; w(center,addr):x,y;endsets data: y=36 24 49 21 81 72 4530 20 56 24 99 88 5536 24 63 27 90 80 50 ;[email protected]

网友回答

model:
sets: center/1..3/:u;
addr/1..7/:v;
w(center,addr):x,y;
endsets
data: y= 36 24 49 21 81 72 45
30 20 56 24 99 88 55
36 24 63 27 90 80 50 ;
enddata
[email protected](w:x*y);
@sum(addr(j):x(1,j))=3;
@sum(addr(j):x(2,j))=2;
@sum(addr(j):x(3,j))=2;
@for(addr(j):@sum(center(i):x(i,j))=1);
@for(w:@bin(x));end结果: Global optimal solution found. Objective value: 329.0000 Objective bound: 329.0000 Infeasibilities: 0.000000 Extended solver steps: 0 Total solver iterations: 0 Variable Value Reduced Cost U( 1) 0.000000 0.000000 U( 2) 0.000000 0.000000 U( 3) 0.000000 0.000000
以上问题属网友观点,不代表本站立场,仅供参考!