Skip to content

Commit 06f9110

Browse files
continue fix typo check asserts
1 parent dec13c1 commit 06f9110

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NonLinearProgram/nlp_utilities.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ function compute_solution_and_bounds(model::Model; tol = 1e-6)
255255
model.y[form.nlp_index_2_constraint[con].value] *
256256
(-sense_multiplier)
257257
if sense_multiplier == 1.0
258-
@assert V_U[num_vars+num_geq+i] <= -tol "Dual of leq constraint must be positive: $i $(V_U[num_vars+i])"
258+
@assert V_U[num_vars+num_geq+i] >= -tol "Dual of leq constraint must be positive: $i $(V_U[num_vars+i])"
259259
else
260-
@assert V_U[num_vars+num_geq+i] >= tol "Dual of leq constraint must be negative: $i $(V_U[num_vars+i])"
260+
@assert V_U[num_vars+num_geq+i] <= tol "Dual of leq constraint must be negative: $i $(V_U[num_vars+i])"
261261
end
262262
end
263263
return X, # Primal and slack solution

0 commit comments

Comments
 (0)