From 11903b663ba2b190caf06212afa7352570bcb19d Mon Sep 17 00:00:00 2001 From: dpo Date: Fri, 22 Apr 2022 22:57:32 +0000 Subject: [PATCH] :robot: Format .jl files --- src/presolve/presolve.jl | 22 +++++++++++----------- test/test_presolve.jl | 8 +++++++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/presolve/presolve.jl b/src/presolve/presolve.jl index 3611609..404cb1a 100644 --- a/src/presolve/presolve.jl +++ b/src/presolve/presolve.jl @@ -82,17 +82,17 @@ function presolve( i_u = findall(s .< zero(T)) s_u = sparsevec(i_u, .-s[i_u]) return GenericExecutionStats( - feasible ? :first_order : :infeasible, - qm, - solution = xrm, - objective = obj(qm, xrm), - multipliers = zeros(T, qm.meta.nvar), - multipliers_L = s_l, - multipliers_U = s_u, - iter = 0, - elapsed_time = time() - start_time, - solver_specific = Dict(:presolvedQM => nothing), - ) + feasible ? :first_order : :infeasible, + qm, + solution = xrm, + objective = obj(qm, xrm), + multipliers = zeros(T, qm.meta.nvar), + multipliers_L = s_l, + multipliers_U = s_u, + iter = 0, + elapsed_time = time() - start_time, + solver_specific = Dict(:presolvedQM => nothing), + ) else psmeta = NLPModelMeta{T, S}( nvarps, diff --git a/test/test_presolve.jl b/test/test_presolve.jl index 9a3a915..b973898 100644 --- a/test/test_presolve.jl +++ b/test/test_presolve.jl @@ -58,7 +58,13 @@ @test x_out == [4.0; 2.0; 7.0] # test that solves the problem - qp2 = QuadraticModel(zeros(2), SparseMatrixCOO(zeros(2,2)), A = SparseMatrixCOO(zeros(0, 2)), lvar = zeros(2), uvar = zeros(2)) + qp2 = QuadraticModel( + zeros(2), + SparseMatrixCOO(zeros(2, 2)), + A = SparseMatrixCOO(zeros(0, 2)), + lvar = zeros(2), + uvar = zeros(2), + ) stats_ps2 = presolve(qp2) @test stats_ps2.status == :first_order end