Skip to content

Commit bc6a817

Browse files
geoffroylecontedpo
authored andcommitted
commit suggestions
1 parent f15a9c1 commit bc6a817

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/presolve/presolve.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ The `PresolvedQuadraticModel{T, S} <: AbstractQuadraticModel{T, S}` is located i
2323
2424
and should be used to call [`postsolve!`](@ref).
2525
26-
If the presolved problem has 0 variables, `stats_ps` contains a solution such that `stats_ps.solution` minimizes the primal problem,
27-
`stats_ps.multipliers` is a `SparseVector` full of zeros, and, with
26+
If the presolved problem has 0 variables, `stats_ps.solution` contains a solution of the primal problem,
27+
`stats_ps.multipliers` is a zero `SparseVector`, and, if we define
2828
2929
s = qm.data.c + qm.data.H * stats_ps.solution
3030
@@ -82,7 +82,7 @@ function presolve(
8282
i_u = findall(s .< zero(T))
8383
s_u = sparsevec(i_u, .-s[i_u])
8484
return GenericExecutionStats(
85-
feasible ? :acceptable : :infeasible,
85+
feasible ? :first_order : :infeasible,
8686
qm,
8787
solution = xrm,
8888
objective = obj(qm, xrm),
@@ -104,7 +104,7 @@ function presolve(
104104
nnzj = nnzj,
105105
nnzh = nnzh,
106106
lin = 1:ncon,
107-
islp = (ncon == 0);
107+
islp = (nnzh == 0);
108108
minimize = qm.meta.minimize,
109109
kwargs...,
110110
)

test/test_presolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@
6060
# test that solves the problem
6161
qp2 = QuadraticModel(zeros(2), SparseMatrixCOO(zeros(2,2)), A = SparseMatrixCOO(zeros(0, 2)), lvar = zeros(2), uvar = zeros(2))
6262
stats_ps2 = presolve(qp2)
63-
@test stats_ps2.status == :acceptable
63+
@test stats_ps2.status == :first_order
6464
end

0 commit comments

Comments
 (0)