Skip to content

Commit 237fd6c

Browse files
authored
Switch to LU factorization in lp_sensitivity_report (#3182)
1 parent dc00048 commit 237fd6c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lp_sensitivity2.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ function lp_sensitivity_report(model::Model; atol::Float64 = 1e-8)
8787
l_B = @view std_form.lower[basis.basic_cols]
8888
u_B = @view std_form.upper[basis.basic_cols]
8989

90-
B_fact = LinearAlgebra.factorize(B)
90+
B_fact = if size(B, 1) > 0
91+
LinearAlgebra.lu(B)
92+
else
93+
zeros(Float64, (0, 0))
94+
end
9195
d = Dict{Int,Vector{Float64}}(
9296
# We call `collect` here because some Julia versions are missing sparse
9397
# matrix \ sparse vector fallbacks.

0 commit comments

Comments
 (0)