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

Fix return type of SimplexIterations #573

Merged
merged 1 commit into from
Sep 22, 2024
Merged

Fix return type of SimplexIterations #573

merged 1 commit into from
Sep 22, 2024

Conversation

odow
Copy link
Member

@odow odow commented Sep 22, 2024

julia> begin
           model = read_from_file("benchmark/stroemer.mps.gz")
           set_optimizer(model, Gurobi.Optimizer)
           set_silent(model)
           optimize!(model)
           solution_summary(model)
       end
* Solver : Gurobi

* Status
  Result count       : 1
  Termination status : OPTIMAL
  Message from the solver:
  "Model was solved to optimality (subject to tolerances), and an optimal solution is available."

* Candidate solution (result #1)
  Primal status      : FEASIBLE_POINT
  Dual status        : FEASIBLE_POINT
  Objective value    : 2.77048e+05
  Objective bound    : 2.77048e+05
  Dual objective value : 2.77048e+05

* Work counters
  Solve time (sec)   : 2.98400e-02
  Barrier iterations : 0
  Node count         : 0


julia> simplex_iterations(model)
ERROR: TypeError: in typeassert, expected Int64, got a value of type Float64
Stacktrace:
 [1] _get_model_attribute(model::MathOptInterface.Utilities.CachingOptimizer{…}, attr::MathOptInterface.SimplexIterations)
   @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/1fRdT/src/Utilities/cachingoptimizer.jl:865
 [2] get(model::MathOptInterface.Utilities.CachingOptimizer{…}, attr::MathOptInterface.SimplexIterations)
   @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/1fRdT/src/Utilities/cachingoptimizer.jl:900
 [3] _moi_get_result(model::MathOptInterface.Utilities.CachingOptimizer{…}, args::MathOptInterface.SimplexIterations)
   @ JuMP ~/.julia/packages/JuMP/6RAQ9/src/optimizer_interface.jl:1053
 [4] get(model::Model, attr::MathOptInterface.SimplexIterations)
   @ JuMP ~/.julia/packages/JuMP/6RAQ9/src/optimizer_interface.jl:1073
 [5] simplex_iterations(model::Model)
   @ JuMP ~/.julia/packages/JuMP/6RAQ9/src/optimizer_interface.jl:927
 [6] top-level scope
   @ REPL[12]:1
Some type information was truncated. Use `show(err)` to see complete types.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.51%. Comparing base (b8cea15) to head (855035d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #573   +/-   ##
=======================================
  Coverage   91.51%   91.51%           
=======================================
  Files           5        5           
  Lines        2450     2450           
=======================================
  Hits         2242     2242           
  Misses        208      208           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow odow merged commit 1545373 into master Sep 22, 2024
16 checks passed
@odow odow deleted the od/simplex branch September 22, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant