优化具有二元变量的对称 MIP 的 Gurobi 模型 (PuLP)

如何解决优化具有二元变量的对称 MIP 的 Gurobi 模型 (PuLP)

简而言之;有没有可能更快地解决这个问题?

显然,原始链接解决方案的作者使用SAS在不到一个小时的时间内解决了问题。对我来说,使用 GUROBI 学术许可证在我的笔记本电脑上花了 3 个半小时。


我正在尝试进行整数线性规划。对于我的第一个项目,我想复制解决“8 soldiers lining up for the morning assembly”问题的结果。简而言之,它归结为:

设 P 是 8 个符号的所有排列的集合。让二元决策变量 xₐ 表示置换 a∈P 是否出现在解决方案中。对于 8⋅7⋅6=336 个三元组 t∈T 中的每一个,让 Pₜ⊂P 是包含该三元组的排列子集。问题是最大化:

The (sum of xₐ over all a∈P),subject to (sum of all xₐ across all a∈Pₜ)

我在通用代码中定义了排列(对于 N 个符号和 M-let,然后对于三元组,N=8 和 M=3。)

procedure SetPropertiesForPages(InputOptionWP: TInputOptionWizardPage; TextWP: TOutputMsgWizardPage; SelectDirWP: TInputDirWizardPage; InputQueryWP: TInputQueryWizardPage; Mode: String; AWordWrap: Boolean; AWidth,AHeight,ALeft,ATop: Integer);
begin
  case Lowercase(Mode) of
    'text':
      begin
         biLeftSideImage := CreateBitmapImage(TextWP,ExpandConstant('{tmp}\LefthandsideImg.bmp'),True,0);
         with TextWP do
           begin
             MsgLabel.WordWrap := AWordWrap;
             MsgLabel.Width := AWidth;
             MsgLabel.Height := AHeight;
             MsgLabel.Left := ALeft;
           end;   
      end;
    'inputoption1':
      begin
        biLeftSideImage := CreateBitmapImage(InputOptionWP,0);
        with InputOptionWP do
           begin
             SubCaptionLabel.WordWrap := AWordWrap;
             SubCaptionLabel.Width := AWidth;
             SubCaptionLabel.Left := ALeft;
             SubCaptionLabel.Top := ATop;
             CheckListBox.Width := AWidth;
             CheckListBox.Height := AHeight;
             CheckListBox.Left := ALeft;
             CheckListBox.Top := ATop + SubCaptionLabel.Height + ScaleY(20);
           end;   
      end;
    'inputoption2':
      begin
        biLeftSideImage := CreateBitmapImage(InputOptionWP,0);
        with InputOptionWP do
          begin
            SubCaptionLabel.WordWrap := AWordWrap;
            SubCaptionLabel.Width := AWidth;
            SubCaptionLabel.Height := 6 * AHeight + ScaleY(5);
            SubCaptionLabel.Left := ALeft;
            SubCaptionLabel.Top := ATop;
            CheckListBox.Width := AWidth;
            CheckListBox.Height := AHeight + ScaleY(40);
            CheckListBox.Left := ALeft;
            CheckListBox.Top := ATop + SubCaptionLabel.Height + ScaleY(5);  
          end; 
      end;
    'selectdir':
      begin
        biLeftSideImage := CreateBitmapImage(SelectDirWP,0);
        with SelectDirWP do
          begin
            Edits[0].ReadOnly := True;
            Edits[1].ReadOnly := True;
            Edits[0].Left := ALeft;
            Edits[1].Left := ALeft;
            Edits[0].Width := AWidth - ScaleX(70);
            Edits[1].Width := AWidth - ScaleX(70);
            Buttons[0].Left := Edits[0].Left + Edits[0].Width + ScaleX(10);
            Buttons[1].Left := Edits[1].Left + Edits[1].Width + ScaleX(10);
            PromptLabels[0].Left := ALeft;
            PromptLabels[1].Left := ALeft;
            SubCaptionLabel.WordWrap := AWordWrap;
            SubCaptionLabel.Width := AWidth;
            SubCaptionLabel.Left := ALeft;
            SubCaptionLabel.Top := ATop;
          end;
      end;
    'inputquery':
      begin
        biLeftSideImage := CreateBitmapImage(InputQueryWP,0);
        with InputQueryWP do
          begin
            Edits[0].Left := ALeft;
            Edits[0].Width := AWidth - ScaleX(75);
            PromptLabels[0].Left := ALeft;
            SubCaptionLabel.WordWrap := AWordWrap;
            SubCaptionLabel.Width := AWidth;
            SubCaptionLabel.Height := AHeight;
            SubCaptionLabel.Left := ALeft;
            SubCaptionLabel.Top := ATop;
          end;
      end;
  end;
end;

然后用这个来定义模型(有 8 小时的时间限制)

from sympy.utilities.iterables import permutations
from sympy import factorial

N,M = 8,3
P = ''.join([str(_) for _ in range(N)])
T = {''.join(p):set() for p in permutations(P,M)}
I,J = {},{}
for i,p in enumerate(permutations(P)):
    permutation = ''.join(p)
    I[permutation],J[i] = i,permutation
    for j in range(N-M+1):
        T[permutation[j:j+M]].add(permutation)
upper_bound = len(T)//(N-M+1)
print(f"Total of {N}!={factorial(N)} permutations and {len(T)} {M}-subpermutations are ready.")
print(f"Upper bound: {upper_bound}.")

注意事项:

  • 由于对称性,我添加了 from pulp import LpMaximize,LpProblem,LpStatus,lpSum,LpVariable,GUROBI x = {i: LpVariable(name=f"x{i}",cat="Binary") for i in range(factorial(N))} model = LpProblem(name=f"{N}_soldiers_{M}_puzzle",sense=LpMaximize) for i,t in enumerate(T.keys()): model += (lpSum([x[I[p]] for p in T[t]]) <= 1,f"constrain{i}") model += (x[0] == 1,"WLOG") objective = lpSum([x[i] for i in range(factorial(N))]) model += (objective <= upper_bound,"upper_bound") model += objective print("\nStarting GUROBI solver...") status = model.solve(solver=GUROBI(msg=True,timeLimit=60*60*8,LogToConsole=0)) 。但是,我不知道如何进一步利用对称性。
  • 我添加了 model += (x[0] == 1,"WLOG") 条件,但它似乎没有任何区别。

显然,原始链接解决方案的作者使用 SAS 在不到一个小时的时间内解决了问题。

对我来说,在我的笔记本电脑上使用这个 GUROBI 模型需要花费数小时甚至更多时间。我们可以优化它以更快吗?或者是否有其他一些 PuLP 可以使用的求解器在这个模型上效果更好? (在 GLPK 一夜之间未能解决之后,我改用了学术 gurobi 许可证。)

我最新的日志文件(为了字符限制不得不缩短它):

"upper_bound"

它似乎很快就能找到 55 的解决方案,但要找到最佳的 56 解决方案却要花很长时间。最终,在 3 个半小时后,我得到了一个解决方案:

Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (win64)
Thread count: 4 physical cores,4 logical processors,using up to 4 threads
Optimize a model with 338 rows,40320 columns and 282241 nonzeros
Model fingerprint: 0xa0617a52
Variable types: 0 continuous,40320 integer (0 binary)
Coefficient statistics:
  Matrix range     [1e+00,1e+00]
  Objective range  [1e+00,1e+00]
  Bounds range     [1e+00,1e+00]
  RHS range        [1e+00,6e+01]
Found heuristic solution: objective 43.0000000
Presolve removed 7 rows and 3624 columns
Presolve time: 0.88s
Presolved: 331 rows,36696 columns,256872 nonzeros
Variable types: 0 continuous,36696 integer (36696 binary)

Starting sifting (using dual simplex for sub-problems)...

    Iter     Pivots    Primal Obj      Dual Obj        Time
       0          0     infinity     -4.7000000e+02      1s
       1        306   1.9619997e+09  -1.8714284e+02      1s
       2       1956  -3.2453701e+01  -9.5576700e+01      1s
       3       4263  -3.7141380e+01  -6.0449129e+01      2s
       4       6546  -5.3519665e+01  -5.9851524e+01      2s
       5       8510  -5.5832220e+01  -5.8952552e+01      3s

Sifting complete


Root relaxation: objective 5.600000e+01,10313 iterations,1.97 seconds
Total elapsed time = 17.14s
Total elapsed time = 24.25s
Total elapsed time = 48.86s
Total elapsed time = 53.33s

    Nodes    |    Current Node    |     Objective Bounds      |     Work
 Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

     0     0   56.00000    0  165   43.00000   56.00000  30.2%     -   59s
H    0     0                      52.0000000   56.00000  7.69%     -   61s
H    0     0                      54.0000000   56.00000  3.70%     -  100s
     0     0   56.00000    0  298   54.00000   56.00000  3.70%     -  102s
     0     0   56.00000    0  140   54.00000   56.00000  3.70%     -  214s
H    0     0                      55.0000000   56.00000  1.82%     -  246s
     0     0   56.00000    0  161   55.00000   56.00000  1.82%     -  247s
     0     0   56.00000    0  228   55.00000   56.00000  1.82%     -  250s
     0     0   56.00000    0  212   55.00000   56.00000  1.82%     -  277s
     0     0   56.00000    0  285   55.00000   56.00000  1.82%     -  329s
     0     0   56.00000    0  257   55.00000   56.00000  1.82%     -  345s
     0     0   56.00000    0  257   55.00000   56.00000  1.82%     -  348s
     0     2   56.00000    0  253   55.00000   56.00000  1.82%     -  364s
     2     3   56.00000    1  257   55.00000   56.00000  1.82%  8759  387s
     4     4   56.00000    1  147   55.00000   56.00000  1.82%  4380  575s
     5     5   56.00000    1  134   55.00000   56.00000  1.82%  3504  743s
     6     6   56.00000    1  144   55.00000   56.00000  1.82%  2920  781s
     7     6   56.00000    1  254   55.00000   56.00000  1.82%  2503  819s
     8     7   56.00000    1  290   55.00000   56.00000  1.82%  2190  841s
     9     8   56.00000    1  280   55.00000   56.00000  1.82%  1946  875s
    10     8   56.00000    1  294   55.00000   56.00000  1.82%  1752  891s
    11     9   56.00000    1  294   55.00000   56.00000  1.82%  1593  899s
    12    10   56.00000    1  284   55.00000   56.00000  1.82%  1460  915s
    13    10   56.00000    1  317   55.00000   56.00000  1.82%  1348  924s
    14    11   56.00000    1  314   55.00000   56.00000  1.82%  1251  950s
    15    12   56.00000    1  320   55.00000   56.00000  1.82%  1168  958s
    16    12   56.00000    1  331   55.00000   56.00000  1.82%  1095  998s
    17    13   56.00000    1  320   55.00000   56.00000  1.82%  1030 1024s
    18    14   56.00000    1  320   55.00000   56.00000  1.82%   973 1093s
    19    17   56.00000   14  333   55.00000   56.00000  1.82% 16480 1161s
    21    21   56.00000   15  333   55.00000   56.00000  1.82% 14954 1234s
    25    23   56.00000   16  332   55.00000   56.00000  1.82% 12618 1286s
    29    26   56.00000   16  324   55.00000   56.00000  1.82% 10952 1346s
    33    29   56.00000   17  333   55.00000   56.00000  1.82%  9669 1372s
    37    31   56.00000   17  328   55.00000   56.00000  1.82%  8648 1405s
    41    34   56.00000   18  333   55.00000   56.00000  1.82%  7821 1428s
    45    37   56.00000   18  327   55.00000   56.00000  1.82%  7150 1579s
    49    42   56.00000   19  333   55.00000   56.00000  1.82%  6576 1611s
    56    47   56.00000   20  333   55.00000   56.00000  1.82%  5778 1642s
    63    78   56.00000   21  334   55.00000   56.00000  1.82%  5160 1733s
    95   221   56.00000   23  334   55.00000   56.00000  1.82%  3480 1900s
   250   303   56.00000   27  321   55.00000   56.00000  1.82%  1421 2081s
  1258   322   56.00000   55  121   55.00000   56.00000  1.82%   602 2118s
  2173   333 infeasible   64        55.00000   56.00000  1.82%   548 2144s
  2884   385   56.00000   57  131   55.00000   56.00000  1.82%   532 2166s
  3596   411 infeasible   58        55.00000   56.00000  1.82%   515 2189s
  3968   424   56.00000   43  234   55.00000   56.00000  1.82%   507 2230s
  3981   443   56.00000   44  234   55.00000   56.00000  1.82%   506 2267s
  4000   517   56.00000   48  233   55.00000   56.00000  1.82%   504 2292s
  4380   518   56.00000   73  153   55.00000   56.00000  1.82%   497 2378s
  4387   565   56.00000   74  153   55.00000   56.00000  1.82%   496 2399s
  5294   556   56.00000   56  120   55.00000   56.00000  1.82%   492 2437s
  5485   594   56.00000   57  123   55.00000   56.00000  1.82%   491 2460s
  5915   712 infeasible   57        55.00000   56.00000  1.82%   489 2484s
  6561   721 infeasible   68        55.00000   56.00000  1.82%   483 2507s
  7614   756   56.00000   73  139   55.00000   56.00000  1.82%   484 2528s
  8751   776   56.00000   41  184   55.00000   56.00000  1.82%   484 2548s
  9929   795   56.00000   76  137   55.00000   56.00000  1.82%   486 2569s
 11200   833   56.00000   75  154   55.00000   56.00000  1.82%   488 2648s
 13684   840   56.00000   69  139   55.00000   56.00000  1.82%   495 2663s
 14584   881   56.00000   42  178   55.00000   56.00000  1.82%   496 2678s
 14725   945   56.00000   60  167   55.00000   56.00000  1.82%   495 2692s
 15603   952   56.00000   84  143   55.00000   56.00000  1.82%   494 2709s
 16132  1027   56.00000   62  148   55.00000   56.00000  1.82%   495 2726s
 16783  1077 infeasible   92        55.00000   56.00000  1.82%   494 2739s
 17705  1055   56.00000   58  128   55.00000   56.00000  1.82%   494 2751s
 18547  1034 infeasible   72        55.00000   56.00000  1.82%   495 2763s
 19242  1058 infeasible   81        55.00000   56.00000  1.82%   495 2774s
 20032  1040 infeasible   95        55.00000   56.00000  1.82%   496 2786s
 20772  1048 infeasible   77        55.00000   56.00000  1.82%   497 2797s
 21530  1133   56.00000   86  152   55.00000   56.00000  1.82%   498 3287s
 23023  1114   56.00000   74  134   55.00000   56.00000  1.82%   498 3304s
 23838  1117   56.00000   84  134   55.00000   56.00000  1.82%   499 3317s
 24509  1088 infeasible   98        55.00000   56.00000  1.82%   501 3330s
 25326  1079 infeasible   78        55.00000   56.00000  1.82%   502 3344s
 25999  1058   56.00000   74  135   55.00000   56.00000  1.82%   503 3356s
 26666  1050 infeasible   89        55.00000   56.00000  1.82%   504 3367s
 27396  1076   56.00000   76  126   55.00000   56.00000  1.82%   506 3445s
 28034  1071   56.00000   81  140   55.00000   56.00000  1.82%   506 3458s
 28879  1111   56.00000   77  151   55.00000   56.00000  1.82%   506 3470s
 29474  1108   56.00000   71  135   55.00000   56.00000  1.82%   506 3485s
 30263  1167 infeasible   93        55.00000   56.00000  1.82%   507 3498s
 31138  1143 infeasible   90        55.00000   56.00000  1.82%   507 3510s
 31960  1144   56.00000   74  142   55.00000   56.00000  1.82%   507 3624s
 31967  1090   56.00000   75  142   55.00000   56.00000  1.82%   507 3636s
 32569  1064 infeasible   63        55.00000   56.00000  1.82%   508 3648s
 33337  1035 infeasible   91        55.00000   56.00000  1.82%   509 3660s
 34006  1092   56.00000   67  140   55.00000   56.00000  1.82%   510 3671s
 34805  1143 infeasible   72        55.00000   56.00000  1.82%   509 3717s
 36468  1176 infeasible   84        55.00000   56.00000  1.82%   509 3730s
 36863  1193   56.00000   71  132   55.00000   56.00000  1.82%   509 3745s
 37318  1171   56.00000   75  141   55.00000   56.00000  1.82%   509 3760s
 37802  1131 infeasible   76        55.00000   56.00000  1.82%   509 3775s
 38288  1100 infeasible   74        55.00000   56.00000  1.82%   510 3789s
 39133  1060   56.00000   61  121   55.00000   56.00000  1.82%   510 3802s
 39967  1095 infeasible   83        55.00000   56.00000  1.82%   511 3814s
 40728  1135   56.00000   58  154   55.00000   56.00000  1.82%   511 3827s
 41362  1104   56.00000   90  128   55.00000   56.00000  1.82%   511 3841s
 41973  1133   56.00000   68  146   55.00000   56.00000  1.82%   512 3854s
 42664  1152   56.00000   77  151   55.00000   56.00000  1.82%   512 3867s
 43363  1140 infeasible   88        55.00000   56.00000  1.82%   513 3879s
 44043  1155   56.00000   81  144   55.00000   56.00000  1.82%   514 3890s
 44399  1091 infeasible   79        55.00000   56.00000  1.82%   514 3902s
 45077  1159   56.00000   60  151   55.00000   56.00000  1.82%   515 3914s
 45801  1168 infeasible   75        55.00000   56.00000  1.82%   516 3956s
 47178  1197   56.00000   71  151   55.00000   56.00000  1.82%   517 3982s
 47467  1190 infeasible   80        55.00000   56.00000  1.82%   517 3996s
 48262  1164   56.00000   81  132   55.00000   56.00000  1.82%   518 4010s
 49032  1185 infeasible   88        55.00000   56.00000  1.82%   519 4022s
 49785  1214   56.00000   81  151   55.00000   56.00000  1.82%   520 4033s
 50534  1157 infeasible   88        55.00000   56.00000  1.82%   520 4045s
 51183  1121 infeasible   83        55.00000   56.00000  1.82%   521 4056s
 51835  1081 infeasible   91        55.00000   56.00000  1.82%   522 4067s
 52241  1075 infeasible   89        55.00000   56.00000  1.82%   522 4079s
 52801  1150 infeasible   85        55.00000   56.00000  1.82%   523 4092s
 53438  1151   56.00000   60  148   55.00000   56.00000  1.82%   522 4169s
 53445  1200   56.00000   61  147   55.00000   56.00000  1.82%   522 4181s
 54146  1252 infeasible   89        55.00000   56.00000  1.82%   521 4202s
 54758  1247   56.00000   76  125   55.00000   56.00000  1.82%   521 4213s
 55573  1297   56.00000   80  139   55.00000   56.00000  1.82%   520 4223s
 56237  1302 infeasible   67        55.00000   56.00000  1.82%   520 4264s
 57604  1334   56.00000   65  139   55.00000   56.00000  1.82%   519 4275s
 58328  1245   56.00000   70  128   55.00000   56.00000  1.82%   519 4284s
 58917  1220 infeasible   96        55.00000   56.00000  1.82%   519 4293s
 59566  1214 infeasible  106        55.00000   56.00000  1.82%   519 4303s
 60048  1328 infeasible   79        55.00000   56.00000  1.82%   519 4331s
 60576  1324 infeasible  102        55.00000   56.00000  1.82%   518 4415s
 60588  1349   56.00000   87  134   55.00000   56.00000  1.82%   518 4426s
 61361  1326 infeasible   88        55.00000   56.00000  1.82%   518 4436s
 62074  1326   56.00000   59  148   55.00000   56.00000  1.82%   517 4446s
 62640  1411 infeasible   75        55.00000   56.00000  1.82%   518 4457s
 63277  1353 infeasible   79        55.00000   56.00000  1.82%   517 4490s
 63713  1374   56.00000   72  142   55.00000   56.00000  1.82%   518 4517s
 64314  1376 infeasible  100        55.00000   56.00000  1.82%   517 4535s
 65036  1482   56.00000   72  144   55.00000   56.00000  1.82%   518 4548s
 65766  1463 infeasible   84        55.00000   56.00000  1.82%   517 4561s
 66389  1481 infeasible  115        55.00000   56.00000  1.82%   516 4574s
 66588  1481   56.00000   77  132   55.00000   56.00000  1.82%   516 4576s
 67121  1453 infeasible   88        55.00000   56.00000  1.82%   516 4622s
 68467  1463 infeasible   90        55.00000   56.00000  1.82%   517 4633s
 68891  1433 infeasible   62        55.00000   56.00000  1.82%   516 4650s
 69379  1476   56.00000   63  141   55.00000   56.00000  1.82%   517 4664s
 70167  1472 infeasible   77        55.00000   56.00000  1.82%   516 4676s
 70907  1401   56.00000   79  135   55.00000   56.00000  1.82%   516 4689s
 71564  1360   56.00000   96  139   55.00000   56.00000  1.82%   517 4716s
 72197  1355 infeasible   80        55.00000   56.00000  1.82%   517 4738s
 72826  1375   56.00000   67  140   55.00000   56.00000  1.82%   518 4755s
 73520  1342   56.00000   79  137   55.00000   56.00000  1.82%   517 4820s
 73812  1342 infeasible  100        55.00000   56.00000  1.82%   518 4834s
 74252  1359   56.00000   57  143   55.00000   56.00000  1.82%   518 4845s
 74979  1292   56.00000   60  141   55.00000   56.00000  1.82%   518 4857s
 75656  1337 infeasible   67        55.00000   56.00000  1.82%   519 4868s
 76357  1384 infeasible   77        55.00000   56.00000  1.82%   519 4885s
 77046  1436   56.00000   85  151   55.00000   56.00000  1.82%   519 4903s
 77680  1612 infeasible  111        55.00000   56.00000  1.82%   519 4948s
 79106  1645 infeasible   85        55.00000   56.00000  1.82%   518 4960s
 79699  1660 infeasible   82        55.00000   56.00000  1.82%   518 4971s
 80278  1586 infeasible   62        55.00000   56.00000  1.82%   518 4980s
 80854  1554   56.00000   68  124   55.00000   56.00000  1.82%   518 5007s
 81420  1551 infeasible   67        55.00000   56.00000  1.82%   518 5016s
 82081  1479   56.00000   89  141   55.00000   56.00000  1.82%   518 5026s
 82657  1603 infeasible   59        55.00000   56.00000  1.82%   519 5035s
 83353  1607 infeasible   79        55.00000   56.00000  1.82%   518 5044s
 84049  1613 infeasible   69        55.00000   56.00000  1.82%   518 5053s
 84709  1565 infeasible   81        55.00000   56.00000  1.82%   518 5062s
 85333  1546 infeasible   69        55.00000   56.00000  1.82%   518 5072s
 85998  1552 infeasible   89        55.00000   56.00000  1.82%   518 5083s
 86658  1650   56.00000  104  139   55.00000   56.00000  1.82%   518 5091s
 87162  1655 infeasible   87        55.00000   56.00000  1.82%   517 5100s
 87801  1676 infeasible   75        55.00000   56.00000  1.82%   517 5109s
 88114  1676   56.00000   91  127   55.00000   56.00000  1.82%   517 5111s
 88442  1609   56.00000   86  134   55.00000   56.00000  1.82%   517 5146s
 89775  1525 infeasible   91        55.00000   56.00000  1.82%   517 5155s
 90351  1522   56.00000   81  141   55.00000   56.00000  1.82%   517 5166s
 90882  1518   56.00000   81  124   55.00000   56.00000  1.82%   517 5175s
 91464  1540 infeasible   90        55.00000   56.00000  1.82%   518 5184s
 92116  1525   56.00000   81  132   55.00000   56.00000  1.82%   517 5193s
 92673  1492 infeasible   72        55.00000   56.00000  1.82%   517 5203s
 93284  1581 infeasible   81        55.00000   56.00000  1.82%   517 5212s
 93969  1584 infeasible   89        55.00000   56.00000  1.82%   517 5221s
 94538  1508   56.00000   53  132   55.00000   56.00000  1.82%   517 5231s
 95024  1495   56.00000   72  134   55.00000   56.00000  1.82%   517 5240s
 95651  1472 infeasible   81        55.00000   56.00000  1.82%   517 5283s
 95912  1472 infeasible   84        55.00000   56.00000  1.82%   517 5362s
 95920  1448   56.00000   78  135   55.00000   56.00000  1.82%   517 5373s
 96484  1435 infeasible   70        55.00000   56.00000  1.82%   517 5383s
 97101  1453   56.00000   79  148   55.00000   56.00000  1.82%   517 5395s
 97649  1414   56.00000   73  138   55.00000   56.00000  1.82%   517 5405s
 98152  1376   56.00000   67  126   55.00000   56.00000  1.82%   518 5415s
 98644  1484   56.00000   68  141   55.00000   56.00000  1.82%   518 5427s
 99118  1468   56.00000   75  149   55.00000   56.00000  1.82%   518 5461s
 100424  1416 infeasible   85        55.00000   56.00000  1.82%   517 5471s
 100940  1426 infeasible   67        55.00000   56.00000  1.82%   518 5481s
 101520  1435   56.00000   83  124   55.00000   56.00000  1.82%   518 5491s
 102149  1388 infeasible   76        55.00000   56.00000  1.82%   517 5572s
 102558  1392   56.00000  102  140   55.00000   56.00000  1.82%   518 5585s
 103392  1444 infeasible   84        55.00000   56.00000  1.82%   518 5596s
 104180  1433 infeasible   77        55.00000   56.00000  1.82%   518 5606s
 104927  1478 infeasible   77        55.00000   56.00000  1.82%   517 5617s
 105734  1463   56.00000   83  154   55.00000   56.00000  1.82%   517 5627s
 106509  1458   56.00000   95  133   55.00000   56.00000  1.82%   517 5638s
 107180  1458   56.00000   71  129   55.00000   56.00000  1.82%   517 5647s
 107942  1416 infeasible   81        55.00000   56.00000  1.82%   516 5657s
 108570  1442   56.00000   67  153   55.00000   56.00000  1.82%   517 5667s
 109216  1433   56.00000   99  154   55.00000   56.00000  1.82%   517 5718s
 109825  1435   56.00000   96  147   55.00000   56.00000  1.82%   517 5729s
 110528  1481 infeasible   77        55.00000   56.00000  1.82%   517 5740s
 111210  1453 infeasible   83        55.00000   56.00000  1.82%   517 5774s
 112332  1477   56.00000   94  125   55.00000   56.00000  1.82%   517 5783s
 112948  1500   56.00000   85  131   55.00000   56.00000  1.82%   518 5793s
 113569  1560 infeasible  101        55.00000   56.00000  1.82%   518 5803s
 114235  1493 infeasible   86        55.00000   56.00000  1.82%   518 5812s
 114852  1498   56.00000   87  141   55.00000   56.00000  1.82%   518 5821s
 115485  1526   56.00000   85  153   55.00000   56.00000  1.82%   518 5831s
 116033  1491 infeasible  105        55.00000   56.00000  1.82%   518 5841s
 116606  1448   56.00000  105  146   55.00000   56.00000  1.82%   518 5851s
 117175  1417 infeasible   93        55.00000   56.00000  1.82%   518 5861s
 117656  1435   56.00000   98  149   55.00000   56.00000  1.82%   519 5871s
 118272  1449 infeasible  111        55.00000   56.00000  1.82%   519 5880s
 118864  1445 infeasible   78        55.00000   56.00000  1.82%   519 5889s
 119478  1422 infeasible   94        55.00000   56.00000  1.82%   519 5899s
 120063  1358   56.00000  106  153   55.00000   56.00000  1.82%   520 5908s
 120589  1527   56.00000   68  152   55.00000   56.00000  1.82%   520 5918s
 121286  1577 infeasible   67        55.00000   56.00000  1.82%   520 5928s
 121926  1603   56.00000   83  132   55.00000   56.00000  1.82%   520 5969s
 122738  1582 infeasible   96        55.00000   56.00000  1.82%   520 5982s
 123534  1579 infeasible   91        55.00000   56.00000  1.82%   520 6067s
 123545  1577 infeasible   90        55.00000   56.00000  1.82%   520 6086s
 124105  1592   56.00000  103  139   55.00000   56.00000  1.82%   520 6102s
 124862  1596   56.00000   81  114   55.00000   56.00000  1.82%   521 6115s
 125568  1559 infeasible   86        55.00000   56.00000  1.82%   521 6129s
 126209  1545 infeasible   97        55.00000   56.00000  1.82%   521 6141s
 126863  1586   56.00000   78  139   55.00000   56.00000  1.82%   521 6157s
 127546  1599   56.00000   91  127   55.00000   56.00000  1.82%   521 6174s
 128235  1668   56.00000   75  140   55.00000   56.00000  1.82%   522 6188s
 128936  1675   56.00000  100  148   55.00000   56.00000  1.82%   521 6201s
 129679  1672 infeasible   85        55.00000   56.00000  1.82%   521 6213s
 130330  1664   56.00000   99  129   55.00000   56.00000  1.82%   521 6224s
 130994  1637   56.00000   85  141   55.00000   56.00000  1.82%   522 6236s
 131619  1645   56.00000   77  131   55.00000   56.00000  1.82%   522 6248s
 132243  1602   56.00000   88  151   55.00000   56.00000  1.82%   522 6286s
 133298  1589 infeasible  107        55.00000   56.00000  1.82%   522 6299s
 133665  1698   56.00000   63  152   55.00000   56.00000  1.82%   523 6314s
 134174  1716 infeasible  101        55.00000   56.00000  1.82%   522 6331s
 134698  1676 infeasible  100        55.00000   56.00000  1.82%   522 6348s
 135192  1685   56.00000   85  137   55.00000   56.00000  1.82%   522 6383s
 135547  1700   56.00000   85  140   55.00000   56.00000  1.82%   523 6405s
 136108  1687 infeasible  117        55.00000   56.00000  1.82%   523 6425s
 136667  1655   56.00000   95  147   55.00000   56.00000  1.82%   523 6446s
 137191  1629 infeasible  109        55.00000   56.00000  1.82%   523 6465s
 138127  1587 infeasible   96        55.00000   56.00000  1.82%   524 6483s
 138983  1539 infeasible  114        55.00000   56.00000  1.82%   524 6496s
 139796  1556 infeasible   88        55.00000   56.00000  1.82%   524 6509s
 140627  1693   56.00000   76  137   55.00000   56.00000  1.82%   525 6524s
 141398  1676   56.00000   76  154   55.00000   56.00000  1.82%   524 6540s
 142123  1687   56.00000   97  136   55.00000   56.00000  1.82%   525 6557s
 142497  1687 infeasible   95        55.00000   56.00000  1.82%   525 6560s
 142864  1740 infeasible  101        55.00000   56.00000  1.82%   525 6577s
 143641  1705   56.00000   76  140   55.00000   56.00000  1.82%   525 6656s
 144440  1654   56.00000   93  137   55.00000   56.00000  1.82%   526 6685s
 146083  1610 infeasible   86        55.00000   56.00000  1.82%   526 6707s
 146985  1542 infeasible  100        55.00000   56.00000  1.82%   527 6725s
 147767  1626 infeasible   99        55.00000   56.00000  1.82%   527 6742s
 148401  1731 infeasible   99        55.00000   56.00000  1.82%   527 6759s
 149062  1740   56.00000  100  132   55.00000   56.00000  1.82%   527 6776s
 149671  1776   56.00000   70  137   55.00000   56.00000  1.82%   527 6792s
 150381  1813 infeasible   93        55.00000   56.00000  1.82%   527 6810s
 151150  1761   56.00000   81  144   55.00000   56.00000  1.82%   527 6828s
 151862  1918 infeasible   95        55.00000   56.00000  1.82%   527 6841s
 152733  1896   56.00000  101  128   55.00000   56.00000  1.82%   527 6855s
 153535  1814 infeasible   75        55.00000   56.00000  1.82%   527 6867s
 154289  1823 infeasible   74        55.00000   56.00000  1.82%   527 6880s
 154972  1820 infeasible  102        55.00000   56.00000  1.82%   527 6968s
 154980  1820   56.00000   90  133   55.00000   56.00000  1.82%   527 6970s
 154983  1787   56.00000   94  132   55.00000   56.00000  1.82%   527 6986s
 155598  1755 infeasible   85        55.00000   56.00000  1.82%   527 6999s
 156268  1721 infeasible   80        55.00000   56.00000  1.82%   527 7011s
 156914  1750   56.00000   55  150   55.00000   56.00000  1.82%   528 7024s
 157475  1763   56.00000   78  127   55.00000   56.00000  1.82%   528 7037s
 158095  1736   56.00000   49  151   55.00000   56.00000  1.82%   528 7073s
 159044  1732 infeasible   69        55.00000   56.00000  1.82%   528 7134s
 159056  1777   56.00000   56  142   55.00000   56.00000  1.82%   528 7149s
 159753  1802   56.00000   58  123   55.00000   56.00000  1.82%   528 7161s
 160442  1843   56.00000   80  138   55.00000   56.00000  1.82%   528 7175s
 161141  1826 infeasible   88        55.00000   56.00000  1.82%   528 7187s
 161776  1956   56.00000   48  149   55.00000   56.00000  1.82%   528 7199s
 162558  1965 infeasible   85        55.00000   56.00000  1.82%   528 7208s
 163275  1984   56.00000   90  140   55.00000   56.00000  1.82%   527 7219s
 163900  2139 infeasible   71        55.00000   56.00000  1.82%   527 7231s
 164601  2194   56.00000   76  137   55.00000   56.00000  1.82%   527 7241s
 165360  2189 infeasible   81        55.00000   56.00000  1.82%   527 7252s

这意味着遵循正确的排列

Verifying solution...
status: 1,Optimal
objective: 56.0
{0: 1.0,1117: 1.0,11495: 1.0,11960: 1.0,13117: 1.0,14379: 1.0,14536: 1.0,15015: 1.0,1507: 1.0,15172: 1.0,15324: 1.0,16147: 1.0,16388: 1.0,16729: 1.0,17926: 1.0,18102: 1.0,18440: 1.0,19084: 1.0,20435: 1.0,21488: 1.0,2236: 1.0,22658: 1.0,22905: 1.0,23115: 1.0,23844: 1.0,24149: 1.0,24508: 1.0,24989: 1.0,25259: 1.0,26122: 1.0,26657: 1.0,3065: 1.0,31490: 1.0,31741: 1.0,31841: 1.0,33370: 1.0,34319: 1.0,34381: 1.0,34480: 1.0,34566: 1.0,36400: 1.0,37111: 1.0,37700: 1.0,38281: 1.0,38728: 1.0,39329: 1.0,39982: 1.0,4631: 1.0,5013: 1.0,5234: 1.0,5353: 1.0,6010: 1.0,8296: 1.0,8441: 1.0,8663: 1.0,989: 1.0}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-