Gurobi警告和最佳值不一致[某些整数变量的值大于最大支持值(2000000000)]

问题描述 投票:0回答:1

我正在使用Gurobi版本8.1.0和Python API版本3.6解决MIP问题。我有两个模型,我认为它们的全局最优值是相等的。但是,我发现在我的模拟中它们并不相等。然后,我尝试使用其他模型(模型2)的解决方案热启动我认为解决方案不正确的模型(模型1)。换句话说,问题在于最大化目标函数,而model-1的目标值为42.3333,但我认为应该为42.8333。因此,我使用目标值为42.8333的模型2解决方案热启动到模型1。

奇怪的是,模型2的解决方案对于模型1而言不可行,因为目标值大于42.3333,并且问题是最大化。但是,事实证明这是可行的热启动,现在model-1的最佳值为42.8333。同一模型如何具有多个最优值?

Changed value of parameter timeLimit to 10800.0
   Prev: 1e+100  Min: 0.0  Max: 1e+100  Default: 1e+100
Changed value of parameter LogFile to output/inconsistent_Model-1.log
   Prev: gurobi.log  Default: 
Optimize a model with 11277 rows, 15150 columns and 165637 nonzeros
Model has 5050 general constraints
Variable types: 0 continuous, 15150 integer (5050 binary)
Coefficient statistics:
  Matrix range     [1e+00, 1e+00]
  Objective range  [1e-02, 1e+00]
  Bounds range     [1e+00, 1e+00]
  RHS range        [1e+00, 5e+01]
Presolve removed 6167 rows and 7008 columns
Presolve time: 0.95s
Presolved: 5110 rows, 8142 columns, 37608 nonzeros
Presolved model has 3058 SOS constraint(s)
Variable types: 0 continuous, 8142 integer (4403 binary)
Warning: Markowitz tolerance tightened to 0.0625
Warning: Markowitz tolerance tightened to 0.125
Warning: Markowitz tolerance tightened to 0.25
Warning: Markowitz tolerance tightened to 0.5

Root relaxation: objective 4.333333e+01, 4856 iterations, 2.15 seconds

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

     0     0   43.33333    0  587          -   43.33333      -     -    3s
     0     0   43.26667    0  243          -   43.26667      -     -    4s
     0     0   43.20000    0 1282          -   43.20000      -     -    4s
     0     0   43.20000    0  567          -   43.20000      -     -    4s
     0     0   43.18333    0 1114          -   43.18333      -     -    5s
     0     0   43.16543    0 2419          -   43.16543      -     -    5s
     0     0   43.15556    0 1575          -   43.15556      -     -    5s
     0     0   43.15333    0 2271          -   43.15333      -     -    5s
     0     0   43.13333    0  727          -   43.13333      -     -    5s
     0     0   43.12778    0 1698          -   43.12778      -     -    5s
     0     0   43.12500    0 1146          -   43.12500      -     -    5s
     0     0   43.12500    0 1911          -   43.12500      -     -    6s
     0     0   43.11927    0 1859          -   43.11927      -     -    6s
     0     0   43.11845    0 2609          -   43.11845      -     -    7s
     0     0   43.11845    0 2631          -   43.11845      -     -    7s
     0     0   43.11845    0 2642          -   43.11845      -     -    7s
     0     0   43.11845    0 2462          -   43.11845      -     -    8s
     0     0   43.11845    0 2529          -   43.11845      -     -    8s
     0     0   43.11845    0 2529          -   43.11845      -     -    9s
     0     2   43.11845    0 2531          -   43.11845      -     -   14s
    41    35   43.09874   17  957          -   43.09874      -  29.4   15s
    94    84   42.93207   33  716          -   43.09874      -  22.1   31s
   117   101   42.91940   40 2568          -   43.09874      -   213   37s
   264   175 infeasible   92               -   43.09874      -   133   73s
   273   181 infeasible   97               -   43.09874      -   277   77s
   293   191   42.42424   17 1828          -   43.09874      -   280   90s
   369   249   42.40111   52 2633          -   43.09874      -   311  105s
   383   257   42.39608   59 3062          -   43.09874      -   329  152s
   408   265   42.39259   65 2819          -   43.09874      -   386  162s
   419   274   41.51399   66 2989          -   43.09874      -   401  170s
   454   282   41.29938   71 3000          -   43.09874      -   390  182s
   462   280 infeasible   74               -   43.09874      -   423  192s
   479   287 infeasible   78               -   43.09874      -   419  204s
   498   293   40.51287   81 2564          -   43.09874      -   435  207s
   526   307   40.16638   86 2619          -   43.09874      -   419  227s
   584   330   42.63100   33  621          -   43.09874      -   404  236s
   628   333 infeasible   37               -   43.09874      -   394  252s
   661   345   42.37500   26   25          -   43.09874      -   396  288s
   684   353 infeasible   30               -   43.09874      -   426  290s
   842   370 infeasible   69               -   43.09874      -   348  306s
   944   379 infeasible   86               -   43.09874      -   321  370s
  1009   395   42.36667   22   25          -   43.09874      -   350  409s
* 1031   243               3      42.3333333   43.09874  1.81%   343  409s
  1056   203   43.00000   19  141   42.33333   43.09874  1.81%   362  411s
  1194   222     cutoff   23        42.33333   43.00000  1.57%   325  430s
  1199   219     cutoff   25        42.33333   43.00000  1.57%   349  450s
  1202   212     cutoff   29        42.33333   43.00000  1.57%   361  472s
  1211   200 infeasible   47        42.33333   42.91851  1.38%   380  498s
  1226   169 infeasible   43        42.33333   42.91471  1.37%   395  511s

Cutting planes:
  Gomory: 2
  Cover: 15
  Implied bound: 1
  Clique: 26
  MIR: 17
  Inf proof: 1
  Zero half: 8

Explored 1426 nodes (502432 simplex iterations) in 512.68 seconds
Thread count was 4 (of 4 available processors)

Solution count 1: 42.3333 

Optimal solution found (tolerance 1.00e-04)
Warning: some integer variables take values larger than the maximum
         supported value (2000000000)
Best objective 4.233333333333e+01, best bound 4.233333333333e+01, gap 0.0000%

除了上述内容,我还收到此警告:“找到了最佳解决方案(公差1.00e-04)警告:某些整数变量的值大于最大值支持值(2000000000)”。这是什么意思?非常感谢!

gurobi
1个回答
0
投票

似乎您遇到了一些数字上的麻烦。根部松弛需要增加Markowitz耐受性,这表明基质条件不佳。正如您在两种不同的“最佳”解决方案中所观察到的,这可能导致不一致。

关于太大值的警告表示,存在整数值的解值太大,以致无法可靠地检查整数可行性公差。如果您的变量的解决方案值在1e + 9范围内,则它们是否为整数可能不再重要。因此,您还可以通过使它们成为连续变量来简化模型。

您应该检查两个模型的两个解决方案中是否存在违规情况(请参阅here,以查看解决方案的实际可行性。

© www.soinside.com 2019 - 2024. All rights reserved.