Skip to content

Commit 4dc4cee

Browse files
committed
cleanup
1 parent 8b0008e commit 4dc4cee

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

lib/OptimizationIpopt/test/additional_tests.jl

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,6 @@ using Test
44
using LinearAlgebra
55

66
@testset "Additional Ipopt Examples" begin
7-
8-
# @testset "Recursive NLP Example" begin
9-
# # Based on recursive_nlp example from Ipopt
10-
# # Inner problem: minimize exp[0.5 * (x - a)^2 + 0.5 * x^2] w.r.t x
11-
# # Outer problem: minimize exp[0.5 * (y(a) - a)^2 + 0.5 * y(a)^2] w.r.t a
12-
13-
# function inner_objective(x, a)
14-
# arg = 0.5 * (x[1] - a)^2 + 0.5 * x[1]^2
15-
# return exp(arg)
16-
# end
17-
18-
# function outer_objective(a, p)
19-
# # Solve inner problem
20-
# inner_optfunc = OptimizationFunction((x, _) -> inner_objective(x, a[1]), Optimization.AutoZygote())
21-
# inner_prob = OptimizationProblem(inner_optfunc, [2.0], nothing)
22-
# inner_sol = solve(inner_prob, IpoptOptimizer())
23-
24-
# y = inner_sol.u[1]
25-
# arg = 0.5 * (y - a[1])^2 + 0.5 * y^2
26-
# return exp(arg)
27-
# end
28-
29-
# optfunc = OptimizationFunction(outer_objective, Optimization.AutoZygote())
30-
# prob = OptimizationProblem(optfunc, [2.0], nothing)
31-
# sol = solve(prob, IpoptOptimizer())
32-
33-
# @test SciMLBase.successful_retcode(sol)
34-
# @test sol.u[1] ≈ 0.0 atol=1e-4
35-
# end
36-
377
@testset "Simple 2D Example (MyNLP)" begin
388
# Based on MyNLP example from Ipopt
399
# minimize -x[1] - x[2]

0 commit comments

Comments
 (0)