sets:num_i/1..16/;num_j/1..4/;link(num_i,num_j):c,x;endsetsMAX=@sum(link(i,j):c(i,j)*x(i,j));data:c=0.51059 0.55549 0.41665 0.44446 0.42006 0.56554 0.48421 0.42254 0.5581 0.51831 0.38919 0.45405 0.4632 0.58642 0.44015 0.4384 0.52204 0.49866 0.41991 0

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 02:40:20
sets:num_i/1..16/;num_j/1..4/;link(num_i,num_j):c,x;endsetsMAX=@sum(link(i,j):c(i,j)*x(i,j));data:c=

sets:num_i/1..16/;num_j/1..4/;link(num_i,num_j):c,x;endsetsMAX=@sum(link(i,j):c(i,j)*x(i,j));data:c=0.51059 0.55549 0.41665 0.44446 0.42006 0.56554 0.48421 0.42254 0.5581 0.51831 0.38919 0.45405 0.4632 0.58642 0.44015 0.4384 0.52204 0.49866 0.41991 0
sets:
num_i/1..16/;
num_j/1..4/;
link(num_i,num_j):c,x;
endsets
MAX=@sum(link(i,j):c(i,j)*x(i,j));
data:
c=
0.51059 0.55549 0.41665 0.44446
0.42006 0.56554 0.48421 0.42254
0.5581 0.51831 0.38919 0.45405
0.4632 0.58642 0.44015 0.4384
0.52204 0.49866 0.41991 0.44461
0.4198 0.46651 0.58812 0.50017
0.48207 0.5852 0.41732 0.44202
0.46958 0.48207 0.47732 0.44454
0.42533 0.46627 0.56142 0.48075
0.43622 0.44471 0.55223 0.47233
0.53199 0.38852 0.59874 0.61488
0.51427 0.51687 0.47473 0.51687
0.54222 0.45792 0.52291 0.57929
0.4446 0.42805 0.56645 0.49826
0.46857 0.59454 0.3987 0.41863
0.51342 0.49004 0.41129 0.43599
;
enddata
@for(num_j(j):@sum(link(i,j):x(i,j))>=1);
@for(num_i(i):@sum(link(i,j):x(i,j))>=0);
@for(num_j(j):@sum(link(i,j):x(i,j))

sets:num_i/1..16/;num_j/1..4/;link(num_i,num_j):c,x;endsetsMAX=@sum(link(i,j):c(i,j)*x(i,j));data:c=0.51059 0.55549 0.41665 0.44446 0.42006 0.56554 0.48421 0.42254 0.5581 0.51831 0.38919 0.45405 0.4632 0.58642 0.44015 0.4384 0.52204 0.49866 0.41991 0
可以直接运行的
结果如下:
Global optimal solution found at iteration: 10
Objective value: 4.673000

Variable Value Reduced Cost
C( 1, 1) 0.5105900 0.000000
C( 1, 2) 0.5554900 0.000000
C( 1, 3) 0.4166500 0.000000
C( 1, 4) 0.4444600 0.000000
C( 2, 1) 0.4200600 0.000000
C( 2, 2) 0.5655400 0.000000
C( 2, 3) 0.4842100 0.000000
C( 2, 4) 0.4225400 0.000000
C( 3, 1) 0.5581000 0.000000
C( 3, 2) 0.5183100 0.000000
C( 3, 3) 0.3891900 0.000000
C( 3, 4) 0.4540500 0.000000
C( 4, 1) 0.4632000 0.000000
C( 4, 2) 0.5864200 0.000000
C( 4, 3) 0.4401500 0.000000
C( 4, 4) 0.4384000 0.000000
C( 5, 1) 0.5220400 0.000000
C( 5, 2) 0.4986600 0.000000
C( 5, 3) 0.4199100 0.000000
C( 5, 4) 0.4446100 0.000000
C( 6, 1) 0.4198000 0.000000
C( 6, 2) 0.4665100 0.000000
C( 6, 3) 0.5881200 0.000000
C( 6, 4) 0.5001700 0.000000
C( 7, 1) 0.4820700 0.000000
C( 7, 2) 0.5852000 0.000000
C( 7, 3) 0.4173200 0.000000
C( 7, 4) 0.4420200 0.000000
C( 8, 1) 0.4695800 0.000000
C( 8, 2) 0.4820700 0.000000
C( 8, 3) 0.4773200 0.000000
C( 8, 4) 0.4445400 0.000000
C( 9, 1) 0.4253300 0.000000
C( 9, 2) 0.4662700 0.000000
C( 9, 3) 0.5614200 0.000000
C( 9, 4) 0.4807500 0.000000
C( 10, 1) 0.4362200 0.000000
C( 10, 2) 0.4447100 0.000000
C( 10, 3) 0.5522300 0.000000
C( 10, 4) 0.4723300 0.000000
C( 11, 1) 0.5319900 0.000000
C( 11, 2) 0.3885200 0.000000
C( 11, 3) 0.5987400 0.000000
C( 11, 4) 0.6148800 0.000000
C( 12, 1) 0.5142700 0.000000
C( 12, 2) 0.5168700 0.000000
C( 12, 3) 0.4747300 0.000000
C( 12, 4) 0.5168700 0.000000
C( 13, 1) 0.5422200 0.000000
C( 13, 2) 0.4579200 0.000000
C( 13, 3) 0.5229100 0.000000
C( 13, 4) 0.5792900 0.000000
C( 14, 1) 0.4446000 0.000000
C( 14, 2) 0.4280500 0.000000
C( 14, 3) 0.5664500 0.000000
C( 14, 4) 0.4982600 0.000000
C( 15, 1) 0.4685700 0.000000
C( 15, 2) 0.5945400 0.000000
C( 15, 3) 0.3987000 0.000000
C( 15, 4) 0.4186300 0.000000
C( 16, 1) 0.5134200 0.000000
C( 16, 2) 0.4900400 0.000000
C( 16, 3) 0.4112900 0.000000
C( 16, 4) 0.4359900 0.000000
X( 1, 1) 0.000000 -0.5105900
X( 1, 2) 0.000000 -0.5554900
X( 1, 3) 0.000000 -0.4166500
X( 1, 4) 0.000000 -0.4444600
X( 2, 1) 0.000000 -0.4200600
X( 2, 2) 0.000000 -0.5655400
X( 2, 3) 0.000000 -0.4842100
X( 2, 4) 0.000000 -0.4225400
X( 3, 1) 1.000000 -0.5581000
X( 3, 2) 0.000000 -0.5183100
X( 3, 3) 0.000000 -0.3891900
X( 3, 4) 0.000000 -0.4540500
X( 4, 1) 0.000000 -0.4632000
X( 4, 2) 1.000000 -0.5864200
X( 4, 3) 0.000000 -0.4401500
X( 4, 4) 0.000000 -0.4384000
X( 5, 1) 0.000000 -0.5220400
X( 5, 2) 0.000000 -0.4986600
X( 5, 3) 0.000000 -0.4199100
X( 5, 4) 0.000000 -0.4446100
X( 6, 1) 0.000000 -0.4198000
X( 6, 2) 0.000000 -0.4665100
X( 6, 3) 1.000000 -0.5881200
X( 6, 4) 0.000000 -0.5001700
X( 7, 1) 0.000000 -0.4820700
X( 7, 2) 1.000000 -0.5852000
X( 7, 3) 0.000000 -0.4173200
X( 7, 4) 0.000000 -0.4420200
X( 8, 1) 0.000000 -0.4695800
X( 8, 2) 0.000000 -0.4820700
X( 8, 3) 0.000000 -0.4773200
X( 8, 4) 0.000000 -0.4445400
X( 9, 1) 0.000000 -0.4253300
X( 9, 2) 0.000000 -0.4662700
X( 9, 3) 0.000000 -0.5614200
X( 9, 4) 0.000000 -0.4807500
X( 10, 1) 0.000000 -0.4362200
X( 10, 2) 0.000000 -0.4447100
X( 10, 3) 0.000000 -0.5522300
X( 10, 4) 0.000000 -0.4723300
X( 11, 1) 0.000000 -0.5319900
X( 11, 2) 0.000000 -0.3885200
X( 11, 3) 0.000000 -0.5987400
X( 11, 4) 1.000000 -0.6148800
X( 12, 1) 0.000000 -0.5142700
X( 12, 2) 0.000000 -0.5168700
X( 12, 3) 0.000000 -0.4747300
X( 12, 4) 0.000000 -0.5168700
X( 13, 1) 0.000000 -0.5422200
X( 13, 2) 0.000000 -0.4579200
X( 13, 3) 0.000000 -0.5229100
X( 13, 4) 1.000000 -0.5792900
X( 14, 1) 0.000000 -0.4446000
X( 14, 2) 0.000000 -0.4280500
X( 14, 3) 1.000000 -0.5664500
X( 14, 4) 0.000000 -0.4982600
X( 15, 1) 0.000000 -0.4685700
X( 15, 2) 1.000000 -0.5945400
X( 15, 3) 0.000000 -0.3987000
X( 15, 4) 0.000000 -0.4186300
X( 16, 1) 0.000000 -0.5134200
X( 16, 2) 0.000000 -0.4900400
X( 16, 3) 0.000000 -0.4112900
X( 16, 4) 0.000000 -0.4359900
Row Slack or Surplus Dual Price
1 4.673000 1.000000
2 0.000000 0.000000
3 2.000000 0.000000
4 1.000000 0.000000
5 1.000000 0.000000
6 0.000000 0.000000
7 0.000000 0.000000
8 1.000000 0.000000
9 1.000000 0.000000
10 0.000000 0.000000
11 1.000000 0.000000
12 1.000000 0.000000
13 0.000000 0.000000
14 0.000000 0.000000
15 0.000000 0.000000
16 1.000000 0.000000
17 0.000000 0.000000
18 1.000000 0.000000
19 1.000000 0.000000
20 1.000000 0.000000
21 0.000000 0.000000
22 2.000000 0.000000
23 0.000000 0.000000
24 1.000000 0.000000
25 1.000000 0.000000
26 1.000000 0.000000
27 1.000000 0.000000
28 0.000000 0.000000
29 0.000000 0.000000
30 1.000000 0.000000
31 0.000000 0.000000
32 0.000000 0.000000
33 1.000000 0.000000
34 1.000000 0.000000
35 1.000000 0.000000
36 0.000000 0.000000
37 1.000000 0.000000
38 0.000000 0.000000
39 0.000000 0.000000
40 0.000000 0.000000
41 1.000000 0.000000
42 0.000000 0.000000

没有错误 可以解出
最优目标值 4.673000
X( 1, 1) 0.000000 -0.5105900
X( 1, 2) 0.000000 -0.5554900
...

全部展开

没有错误 可以解出
最优目标值 4.673000
X( 1, 1) 0.000000 -0.5105900
X( 1, 2) 0.000000 -0.5554900
X( 1, 3) 0.000000 -0.4166500
X( 1, 4) 0.000000 -0.4444600
X( 2, 1) 0.000000 -0.4200600
X( 2, 2) 0.000000 -0.5655400
X( 2, 3) 0.000000 -0.4842100
X( 2, 4) 0.000000 -0.4225400
X( 3, 1) 1.000000 -0.5581000
X( 3, 2) 0.000000 -0.5183100
X( 3, 3) 0.000000 -0.3891900
X( 3, 4) 0.000000 -0.4540500
X( 4, 1) 0.000000 -0.4632000
X( 4, 2) 1.000000 -0.5864200
X( 4, 3) 0.000000 -0.4401500
X( 4, 4) 0.000000 -0.4384000
X( 5, 1) 0.000000 -0.5220400
X( 5, 2) 0.000000 -0.4986600
X( 5, 3) 0.000000 -0.4199100
X( 5, 4) 0.000000 -0.4446100
X( 6, 1) 0.000000 -0.4198000
X( 6, 2) 0.000000 -0.4665100
X( 6, 3) 1.000000 -0.5881200
X( 6, 4) 0.000000 -0.5001700
X( 7, 1) 0.000000 -0.4820700
X( 7, 2) 1.000000 -0.5852000
X( 7, 3) 0.000000 -0.4173200
X( 7, 4) 0.000000 -0.4420200
X( 8, 1) 0.000000 -0.4695800
X( 8, 2) 0.000000 -0.4820700
X( 8, 3) 0.000000 -0.4773200
X( 8, 4) 0.000000 -0.4445400
X( 9, 1) 0.000000 -0.4253300
X( 9, 2) 0.000000 -0.4662700
X( 9, 3) 0.000000 -0.5614200
X( 9, 4) 0.000000 -0.4807500
X( 10, 1) 0.000000 -0.4362200
X( 10, 2) 0.000000 -0.4447100
X( 10, 3) 0.000000 -0.5522300
X( 10, 4) 0.000000 -0.4723300
X( 11, 1) 0.000000 -0.5319900
X( 11, 2) 0.000000 -0.3885200
X( 11, 3) 0.000000 -0.5987400
X( 11, 4) 1.000000 -0.6148800
X( 12, 1) 0.000000 -0.5142700
X( 12, 2) 0.000000 -0.5168700
X( 12, 3) 0.000000 -0.4747300
X( 12, 4) 0.000000 -0.5168700
X( 13, 1) 0.000000 -0.5422200
X( 13, 2) 0.000000 -0.4579200
X( 13, 3) 0.000000 -0.5229100
X( 13, 4) 1.000000 -0.5792900
X( 14, 1) 0.000000 -0.4446000
X( 14, 2) 0.000000 -0.4280500
X( 14, 3) 1.000000 -0.5664500
X( 14, 4) 0.000000 -0.4982600
X( 15, 1) 0.000000 -0.4685700
X( 15, 2) 1.000000 -0.5945400
X( 15, 3) 0.000000 -0.3987000
X( 15, 4) 0.000000 -0.4186300
X( 16, 1) 0.000000 -0.5134200
X( 16, 2) 0.000000 -0.4900400
X( 16, 3) 0.000000 -0.4112900
X( 16, 4) 0.000000 -0.4359900

收起