Skip to content

Commit 1d9acc3

Browse files
🤖 Format .jl files (#91)
Co-authored-by: geoffroyleconte <[email protected]>
1 parent c88194f commit 1d9acc3

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

src/presolve/free_rows.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ function free_rows!(
2121
return free_row_pass
2222
end
2323

24-
postsolve!(pt::OutputPoint, operation::FreeRow) = nothing
24+
postsolve!(pt::OutputPoint, operation::FreeRow) = nothing

src/presolve/presolve.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ function presolve(
250250
infeasible_bnd = check_bounds(lvar, uvar, lcon, ucon, nvar, ncon, kept_rows, kept_cols)
251251

252252
infeasible = infeasible_bnd || infeasible_cst
253-
reduction_pass = empty_row_pass || singl_row_pass || ifix_pass || free_lsc_pass || free_rows_pass
253+
reduction_pass =
254+
empty_row_pass || singl_row_pass || ifix_pass || free_lsc_pass || free_rows_pass
254255
keep_iterating = reduction_pass && !unbounded && !infeasible
255256
keep_iterating && (nb_pass += 1)
256257
end
@@ -314,8 +315,7 @@ function presolve(
314315
multipliers_U = s_u,
315316
iter = 0,
316317
elapsed_time = time() - start_time,
317-
solver_specific = Dict(:presolvedQM => nothing,
318-
:psoperations => operations),
318+
solver_specific = Dict(:presolvedQM => nothing, :psoperations => operations),
319319
)
320320
else
321321
psmeta = NLPModelMeta{T, S}(

src/presolve/primal_constraints.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ function primal_constraints!(
1212
row_cnt,
1313
col_cnt,
1414
) where {T, S}
15-
16-
for i=1:ncon
15+
for i = 1:ncon
1716
(kept_rows[i] && !(lcon[i] == -T(Inf) && ucon[i] == T(Inf))) || continue
1817
rowi = arows[i]
1918
uconi2 = zero(T)
@@ -59,4 +58,4 @@ function primal_constraints!(
5958
end
6059
end
6160
return false
62-
end
61+
end

src/presolve/remove_ifix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function remove_ifix!(
5858
# store acolj for postsolve
5959
acolj = Col(zeros(Int, c_acolj), zeros(T, c_acolj))
6060
c_acolj = 1
61-
for k in 1:length(acols[j].nzind)
61+
for k = 1:length(acols[j].nzind)
6262
i = acols[j].nzind[k]
6363
kept_rows[i] || continue
6464
aij = acols[j].nzval[k]

src/presolve/singleton_rows.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ function postsolve!(pt::OutputPoint{T, S}, operation::SingletonRow{T, S}) where
6767
i, j = operation.i, operation.j
6868
Aij = operation.Aij
6969
pt.y[i] = zero(T)
70-
if operation.tightened_lvar
71-
pt.y[i] += pt.s_l[j] / Aij
70+
if operation.tightened_lvar
71+
pt.y[i] += pt.s_l[j] / Aij
7272
pt.s_l[j] = zero(T)
7373
end
7474
if operation.tightened_uvar

0 commit comments

Comments
 (0)