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

Slow calculations for dual_objective_value() #232

Closed
trulsf opened this issue Oct 14, 2024 · 1 comment · Fixed by #233
Closed

Slow calculations for dual_objective_value() #232

trulsf opened this issue Oct 14, 2024 · 1 comment · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@trulsf
Copy link

trulsf commented Oct 14, 2024

I have a primal infeasible model where I want to find the dual objective value (following the Benders' tutorial on generating feasibility cuts). While solving the problem in HiGHS (v1.9.3) takes less than a second, the calculation for dual_objective_value takes around 2 minutes. It seems that this time is spent in MOI.Utilities.get_fallback which is triggered by the existence of a dual ray for the solution (MOI_wrapper.jl, line 2046):

if model.solution.has_dual_ray
    return MOI.Utilities.get_fallback(model, attr, Float64)

Is this expected behavior? My problem is fairly large, but I did not expect such long running times. If needed, I can share the model.

A JuMP Model
├ solver: HiGHS
├ objective_sense: MIN_SENSE
│ └ objective_function_type: AffExpr
├ num_variables: 91171
├ num_constraints: 182159
│ ├ AffExpr in MOI.EqualTo{Float64}: 81350
│ ├ AffExpr in MOI.GreaterThan{Float64}: 1848
│ ├ AffExpr in MOI.LessThan{Float64}: 13524
│ ├ VariableRef in MOI.EqualTo{Float64}: 7473
│ ├ VariableRef in MOI.GreaterThan{Float64}: 77963
│ └ VariableRef in MOI.LessThan{Float64}: 1
└ Names registered in the model: none

Looking at the profiled results, almost all time is spent in Highs_getRowsByRange. So maybe this is related to #207.

@odow
Copy link
Member

odow commented Oct 14, 2024

It's the same cause as #207.

I fixed the normal case in #226, but I didn't fix the dual ray case.

@odow odow self-assigned this Oct 14, 2024
@odow odow added the bug Something isn't working label Oct 14, 2024
@odow odow closed this as completed in #233 Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants