@@ -107,7 +107,7 @@ set_silent(model)
107107@variable (model, x >= 0 )
108108@constraint (model, x == - 1e-8 )
109109optimize! (model)
110- assert_is_solved_and_feasible (model) # src
110+ assert_is_solved_and_feasible (model)
111111is_solved_and_feasible (model)
112112
113113# -
@@ -122,7 +122,7 @@ value(x)
122122
123123set_attribute (model, " primal_feasibility_tolerance" , 1e-10 )
124124optimize! (model)
125- @assert ! is_solved_and_feasible (model) # src
125+ @assert ! is_solved_and_feasible (model)
126126is_solved_and_feasible (model)
127127
128128# ### Realistic example
@@ -142,7 +142,7 @@ optimize!(model)
142142
143143# SCS reports that it solved the problem to optimality:
144144
145- assert_is_solved_and_feasible (model) # src
145+ assert_is_solved_and_feasible (model)
146146is_solved_and_feasible (model)
147147
148148# and that the solution for `x[1]` is nearly zero:
@@ -199,7 +199,6 @@ optimize!(model)
199199
200200# -
201201
202- assert_is_solved_and_feasible (model) # src
203202assert_is_solved_and_feasible (model)
204203value (x[1 ])
205204
@@ -234,12 +233,12 @@ set_attribute(model, "presolve", "off")
234233set_attribute (model, " mip_heuristic_run_feasibility_jump" , false )
235234@variable (model, x == 1 + 1e-6 , Int)
236235optimize! (model)
237- assert_is_solved_and_feasible (model) # src
236+ assert_is_solved_and_feasible (model)
238237is_solved_and_feasible (model)
239238
240239# HiGHS found an optimal solution, and the value of `x` is:
241240
242- @assert isapprox (value (x), 1.000001 ) # src
241+ @assert isapprox (value (x), 1.000001 )
243242value (x)
244243
245244# In other words, HiGHS thinks that the solution `x = 1.000001` satisfies the
@@ -255,7 +254,7 @@ primal_feasibility_report(model)
255254
256255set_attribute (model, " mip_feasibility_tolerance" , 1e-10 )
257256optimize! (model)
258- @assert ! is_solved_and_feasible (model) # src
257+ @assert ! is_solved_and_feasible (model)
259258is_solved_and_feasible (model)
260259
261260# ### Realistic example
@@ -348,7 +347,7 @@ set_silent(model)
348347@variable (model, y >= 0 )
349348@constraint (model, x + 1e8 * y == - 1 )
350349optimize! (model)
351- @assert ! is_solved_and_feasible (model) # src
350+ @assert ! is_solved_and_feasible (model)
352351is_solved_and_feasible (model)
353352
354353# The feasible solution `(x, y) = (0.0, -1e-8)` has a maximum primal violation
@@ -371,7 +370,7 @@ set_silent(model)
371370@constraint (model, y <= 0.5 )
372371@constraint (model, x <= M * y)
373372optimize! (model)
374- @assert ! is_solved_and_feasible (model) # src
373+ @assert ! is_solved_and_feasible (model)
375374is_solved_and_feasible (model)
376375
377376# HiGHS reports the problem is infeasible, but there is a feasible (to
@@ -394,7 +393,7 @@ set_start_value(y, 1e-6)
394393# Now HiGHS will report that the problem is feasible:
395394
396395optimize! (model)
397- assert_is_solved_and_feasible (model) # src
396+ assert_is_solved_and_feasible (model)
398397is_solved_and_feasible (model)
399398
400399# ## Problem is optimal, solution is infeasible
0 commit comments