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

solution_summary should report multiple solutions #3136

Closed
odow opened this issue Nov 24, 2022 · 2 comments · Fixed by #3138
Closed

solution_summary should report multiple solutions #3136

odow opened this issue Nov 24, 2022 · 2 comments · Fixed by #3138

Comments

@odow
Copy link
Member

odow commented Nov 24, 2022

It'd be helpful if solution_summary gave the number of solutions, as well as their statuses. This would have helped diagnose https://discourse.julialang.org/t/mosek-does-not-give-the-optimal-value-derived-by-simplex-methods/90727

@odow odow added this to the 1.x milestone Nov 24, 2022
@odow
Copy link
Member Author

odow commented Nov 24, 2022

I played around locally, but this didn't seem to be an improvement:

julia> solution_summary(model)
* Solver : Gurobi

* Status
  Result count       : 20
  Termination status : OPTIMAL
  Solution #1
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #2
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #3
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #4
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #5
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #6
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #7
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #8
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #9
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #10
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #11
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #12
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #13
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #14
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #15
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #16
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #17
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #18
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #19
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Solution #20
    Primal status    : FEASIBLE_POINT
    Dual status      : NO_SOLUTION
  Message from the solver:
  "Model was solved to optimality (subject to tolerances), and an optimal solution is available."

* Candidate solution
  Objective value      : 0.00000e+00
  Objective bound      : 0.00000e+00
  Relative gap         : 0.00000e+00
  Dual objective value : 0.00000e+00

* Work counters
  Solve time (sec)   : 6.40609e-01
  Barrier iterations : 0
  Node count         : 11391

And the default case of

julia> solution_summary(model)
* Solver : HiGHS

* Status
  Result count       : 1
  Termination status : OPTIMAL
  Solution #1 (default)
    Primal status    : FEASIBLE_POINT
    Dual status      : FEASIBLE_POINT
  Message from the solver:
  "kHighsModelStatusOptimal"

just adds noise.

The discourse problem is really a bug in Mosek.jl.

@blegat
Copy link
Member

blegat commented Nov 25, 2022

Maybe make it a bit more visible that we are truncating solutions:

julia> solution_summary(model)
* Solver : HiGHS

* Status
  Result count       : 20
  Termination status : OPTIMAL
  Solution #1/20 (default)
    Primal status    : FEASIBLE_POINT
    Dual status      : FEASIBLE_POINT
  (other 19 solutions truncated for brevity, display them with `show_all_solutions=true`...)
  Message from the solver:
  "kHighsModelStatusOptimal"

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

Successfully merging a pull request may close this issue.

2 participants