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

LP sensitivity summary doesn't handle nonbasic free variables correctly #2560

Closed
odow opened this issue Apr 15, 2021 · 1 comment · Fixed by #2562
Closed

LP sensitivity summary doesn't handle nonbasic free variables correctly #2560

odow opened this issue Apr 15, 2021 · 1 comment · Fixed by #2562

Comments

@odow
Copy link
Member

odow commented Apr 15, 2021

x-ref #2244 (comment)

julia> model = Model(GLPK.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: GLPK

julia> @variable(model, x >= 1)
x

julia> @variable(model, y)
y

julia> @objective(model, Min, x)
x

julia> optimize!(model)

julia> lp_sensitivity_report(model)
ERROR: AssertionError: size(B, 1) == size(B, 2)
Stacktrace:
 [1] lp_sensitivity_report(model::Model; atol::Float64)
   @ JuMP ~/.julia/packages/JuMP/MIPb6/src/lp_sensitivity2.jl:78
 [2] lp_sensitivity_report(model::Model)
   @ JuMP ~/.julia/packages/JuMP/MIPb6/src/lp_sensitivity2.jl:64
 [3] top-level scope
   @ REPL[46]:1

cc @geoffleyland

@odow odow added the Type: Bug label Apr 15, 2021
@odow
Copy link
Member Author

odow commented Apr 15, 2021

The issue is that we don't have a way to distinguish if a variable is in the basis if it has no bounds:
https://github.com/jump-dev/MathOptInterface.jl/blob/f585f81caddd54b8cc9843c263ee89b28ebc9a9e/src/attributes.jl#L1198-L1199

I guess for now, we can assume that if it has no bounds and is at 0.0, then it is nonbasic, otherwise it is basic. But this doesn't cover super-basic or degenerate problems.

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.

1 participant