Skip to content

Commit 2efd558

Browse files
test: make optimization test robust to simplification
1 parent b0da478 commit 2efd558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/optimizationsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ end
8989
grad = true, hess = true, cons_j = true, cons_h = true)
9090
sol = solve(prob, IPNewton())
9191
@test sol.objective < 1.0
92-
@test sol.u[0.808, -0.064] atol=1e-3
92+
@test sol[[x, z]][0.808, -0.064] atol=1e-3
9393
@test sol[x]^2 + sol[y]^2 1.0
9494
sol = solve(prob, Ipopt.Optimizer(); print_level = 0)
9595
@test sol.objective < 1.0
96-
@test sol.u[0.808, -0.064] atol=1e-3
96+
@test sol[[x, z]][0.808, -0.064] atol=1e-3
9797
@test sol[x]^2 + sol[y]^2 1.0
9898

9999
prob = OptimizationProblem(sys, [x => 0.0, y => 0.0, z => 0.0, a => 1.0, b => 1.0],

0 commit comments

Comments
 (0)