Gurobipy vs Pyomo Discrepancy

Answered

Comments

3 comments

  • Fraser MacMillan

    Pyomo Output:

    Read LP format model from file C:\Users\FMACMI~1\AppData\Local\Temp\tmpiyrrwkzc.pyomo.lp
    Reading time = 0.02 seconds
    x6359: 3765 rows, 6354 columns, 15763 nonzeros
    Changed value of parameter nonConvex to 2
    Prev: -1 Min: -1 Max: 2 Default: -1
    Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (win64)
    Thread count: 6 physical cores, 12 logical processors, using up to 12 threads
    Optimize a model with 3765 rows, 6354 columns and 15763 nonzeros
    Model fingerprint: 0xb2721db2
    Model has 3173 quadratic objective terms
    Coefficient statistics:
    Matrix range [1e-04, 2e+04]
    Objective range [0e+00, 0e+00]
    QObjective range [2e-01, 3e+04]
    Bounds range [1e+00, 1e+00]
    RHS range [2e-02, 7e+03]
    Presolve removed 363 rows and 384 columns
    Continuous model is non-convex -- solving as a MIP.
    Presolve removed 363 rows and 384 columns
    Presolve time: 0.01s
    Presolved: 9039 rows, 8789 columns, 29735 nonzeros
    Presolved model has 2818 bilinear constraint(s)
    Variable types: 8789 continuous, 0 integer (0 binary)
    Root relaxation: objective 1.026381e+08, 4902 iterations, 0.09 seconds
    Nodes | Current Node | Objective Bounds | Work
    Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
    0 0 1.0264e+08 0 6 - 1.0264e+08 - - 0s
    H 0 0 1.026380e+08 1.0264e+08 0.00% - 0s
    Explored 1 nodes (4902 simplex iterations) in 0.15 seconds
    Thread count was 12 (of 12 available processors)
    Solution count 1: 1.02638e+08
    Optimal solution found (tolerance 1.00e-04)
    Best objective 1.026380496757e+08, best bound 1.026380534995e+08, gap 0.0000%

    1
    Comment actions Permalink
  • Fraser MacMillan

    Gurobipy Output:

    Changed value of parameter nonConvex to 2
    Prev: -1 Min: -1 Max: 2 Default: -1
    Changed value of parameter QCPDual to 1
    Prev: 0 Min: 0 Max: 1 Default: 0
    Changed value of parameter TimeLimit to 480.0
    Prev: inf Min: 0.0 Max: inf Default: inf
    Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (win64)
    Thread count: 6 physical cores, 12 logical processors, using up to 12 threads
    Optimize a model with 3764 rows, 6353 columns and 15763 nonzeros
    Model fingerprint: 0x70d8dc90
    Model has 3173 quadratic objective terms
    Coefficient statistics:
    Matrix range [1e-04, 2e+04]
    Objective range [0e+00, 0e+00]
    QObjective range [2e-01, 3e+04]
    Bounds range [1e+00, 1e+00]
    RHS range [2e-02, 7e+03]
    Presolve time: 0.00s
    Barrier solved model in 0 iterations and 0.00 seconds
    Model is infeasible or unbounded

    1
    Comment actions Permalink
  • Fraser MacMillan

    Hey guys, figured out my fairly basic error. Pyomo defaults variables with no lower bound to inf whereas gurobipy defaults to lb=0.

    Stupid mistake easily overlooked, hope this helps someone in the future.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk