Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The objective is zero while model is solved with non-zero values #493

Closed
Betristor opened this issue Dec 21, 2022 · 2 comments
Closed

The objective is zero while model is solved with non-zero values #493

Betristor opened this issue Dec 21, 2022 · 2 comments

Comments

@Betristor
Copy link

When using gurobi to solve a model, the log in console shows that the objective is zero while the model is solved with non-zero values.
The log of gurobi is as follows:

Optimize a model with 8938 rows, 5068 columns and 26021 nonzeros
Model fingerprint: 0x3e181d3b
Coefficient statistics:
  Matrix range     [2e-05, 1e+01]
  Objective range  [0e+00, 0e+00]
  Bounds range     [0e+00, 0e+00]
  RHS range        [3e+00, 1e+04]
Presolve time: 0.00s
Presolved: 5040 rows, 2463 columns, 13881 nonzeros

Ordering time: 0.00s

Barrier statistics:
 Dense cols : 6
 AA' NZ     : 2.050e+04
 Factor NZ  : 8.022e+04 (roughly 4 MB of memory)
 Factor Ops : 1.744e+06 (less than 1 second per iteration)
 Threads    : 8

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   0.00000000e+00 -5.37889250e+04  4.14e+02 0.00e+00  4.99e+01     0s
   1   0.00000000e+00 -1.83853479e+04  4.52e-02 1.46e-02  7.59e+00     0s
   2   0.00000000e+00 -2.15364328e+01  3.41e-13 6.06e-07  3.15e-03     0s
   3   0.00000000e+00 -2.27813207e-04  5.85e-12 6.41e-12  3.33e-08     0s
   4   0.00000000e+00 -2.28789615e-07  3.41e-13 6.72e-15  3.33e-11     0s
   5   0.00000000e+00 -2.28965442e-10  2.27e-13 6.68e-18  3.33e-14     0s

Barrier solved model in 5 iterations and 0.02 seconds (0.02 work units)
Optimal objective 0.00000000e+00

Crossover log...

       0 DPushes remaining with DInf 0.0000000e+00                 0s

    1754 PPushes remaining with PInf 0.0000000e+00                 0s
       0 PPushes remaining with PInf 3.1185624e+04                 0s

  Push phase complete: Pinf 3.1185624e+04, Dinf 0.0000000e+00      0s

Iteration    Objective       Primal Inf.    Dual Inf.      Time
    1757    0.0000000e+00   9.906208e+04   0.000000e+00      0s
    1761    0.0000000e+00   0.000000e+00   0.000000e+00      0s

Solved in 1761 iterations and 0.03 seconds (0.02 work units)
Optimal objective  0.000000000e+00
@jd-foster
Copy link
Contributor

Your objective function is most likely the 0 constant function. You can see that the objective function never changes from 0 under the "Primal" column.

This is not really an issue for the Gurobi.jl Julia interface; it's a model or solver question.
I see you've also used Discourse already (https://discourse.julialang.org/t/construct-a-jump-model-from-smaller-models/91929) to ask something similar. That's the best place for this type of question.

@Betristor
Copy link
Author

Thanks for answering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants