【问题标题】:dramatic error in lp_solve?lp_solve 中的严重错误?
【发布时间】:2016-04-30 13:18:19
【问题描述】:

我有一个通过 IDE (5.5.2.0) 传递给 lp_solve 的简单问题

/* Objective function */
max: +r1 +r2;

/* Constraints */
R1: +r1 +r2 <= 4;
R2: +r1 -2 b1 = 0;
R3: +r2 -3 b2 = 0;

/* Variable bounds */
b1 <= 1;
b2 <= 1;

/* Integer definitions */
int b1,b2;

这个问题的明显解决方案是 3。SCIP 和 CBC 给出 3 作为答案,但不是 lp_solve。在这里我得到 2。求解器中是否存在重大错误?

提前致谢。

【问题讨论】:

  • 我可以确认这一点。当我在 Options, Pivot 下选择“Randomize”时,我得到了 3。

标签: linear-programming solver lpsolve


【解决方案1】:

我联系了关心 lpsolve 软件的开发人员小组。该错误将在下一版本的 lpsolve 中修复。

【讨论】:

    【解决方案2】:

    当我尝试它时,我得到 3 作为 Obj 函数的最佳值。

    Model name:  'LPSolver' - run #1
    Objective:   Maximize(R0)
    
    SUBMITTED
    Model size:        3 constraints,       4 variables,            6 non-zeros.
    Sets:                                   0 GUB,                  0 SOS.
    
    Using DUAL simplex for phase 1 and PRIMAL simplex for phase 2.
    The primal and dual simplex pricing strategy set to 'Devex'.
    
    Relaxed solution                   4 after          4 iter is B&B base.
    
    Feasible solution                  2 after          6 iter,         3 nodes (gap 40.0%)
    
    Optimal solution                   2 after          7 iter,         4 nodes (gap 40.0%).
    Excellent numeric accuracy ||*|| = 0
    
    MEMO: lp_solve version 5.5.2.0 for 32 bit OS, with 64 bit REAL variables.
    In the total iteration count 7, 1 (14.3%) were bound flips.
    There were 2 refactorizations, 0 triggered by time and 0 by density.
    ... on average 3.0 major pivots per refactorization.
    The largest [LUSOL v2.2.1.0] fact(B) had 8 NZ entries, 1.0x largest basis.
    The maximum B&B level was 3, 0.8x MIP order, 3 at the optimal solution.
    The constraint matrix inf-norm is 3, with a dynamic range of 3.
    Time to load data was 0.001 seconds, presolve used 0.017 seconds,
    ... 0.007 seconds in simplex solver, in total 0.025 seconds.
    

    【讨论】:

    • 你用的是windows IDE吗?
    • 是的,我做到了。LPSOLVE IDE v5.5.2.0
    • 嗯...好吧,我明白了。 IDE 中“结果”下显示的是 2 作为解决方案。所以这是 IDE 的问题,不是吗?
    • 哦不...写的是“7次迭代后的最佳解决方案2”所以结果是错误的!
    • 将比例模式更改为二次,得到正确的解决方案......所以lp_solve肯定有错误!
    猜你喜欢
    • 1970-01-01
    • 2013-08-02
    • 1970-01-01
    • 1970-01-01
    • 2011-08-05
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多