@@ -243,9 +243,9 @@ for consf in [cons, con2_c]
243
243
@test lcons[2 ] ≤ consf (sol1. u, nothing )[2 ] ≤ ucons[2 ]
244
244
end
245
245
246
- #= --- These equality constraints are so fiddly. Can't get it to pass with consf(sol1.u, nothing)[1] ≈ lcons[1] rtol = 0.1 being true
247
- (I can get sol1.minimum ≈ sol2.minimum and sol1.u ≈ sol2.u, though, just not the constraint - or I can get the constraint and not
248
- sol1.minimum ≈ sol2.minimum, sol1.u ≈ sol2.u)
246
+ # --- These equality constraints are so fiddly. Can't get it to pass with consf(sol1.u, nothing)[1] ≈ lcons[1] rtol = 0.1 being true
247
+ # (I can get sol1.minimum ≈ sol2.minimum and sol1.u ≈ sol2.u, though, just not the constraint - or I can get the constraint and not
248
+ # sol1.minimum ≈ sol2.minimum, sol1.u ≈ sol2.u)
249
249
lcons = consf == cons ? [0.2 ] : [0.2 , 0.5 ]
250
250
ucons = consf == cons ? [0.2 ] : [0.2 , 0.5 ]
251
251
optf1 = OptimizationFunction (rosenbrock, Optimization. AutoFiniteDiff (); cons = consf)
@@ -254,11 +254,10 @@ for consf in [cons, con2_c]
254
254
optf2 = OptimizationFunction (rosenbrock, Optimization. AutoForwardDiff (); cons = consf)
255
255
prob2 = OptimizationProblem (optf2, [0.5 , 0.5 ], lcons = lcons, ucons = ucons)
256
256
sol2 = solve (prob2,Optim. IPNewton ())
257
- @test sol1.minimum ≈ sol2.minimum
258
- @test sol1.u ≈ sol2.u
257
+ @test_broken sol1. minimum ≈ sol2. minimum
258
+ @test_broken sol1. u ≈ sol2. u
259
259
@test consf (sol1. u, nothing )[1 ] ≈ lcons[1 ] rtol = 0.1
260
260
if consf == con2_c
261
- @test consf(sol1.u, nothing)[2] ≈ lcons[2]
261
+ @test_broken consf (sol1. u, nothing )[2 ] ≈ lcons[2 ]
262
262
end
263
- =#
264
263
end
0 commit comments