Skip to content

Commit

Permalink
adds opt
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinKaisermayer committed Dec 9, 2022
1 parent 449a75e commit 7e70255
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/OptimizationMOI/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,9 @@ end

cons(res, x, p) = (res .= [x[1]^2 + x[2]^2, x[1] * x[2]])

optprob = OptimizationFunction(rosenbrock, Optimization.AutoZygote(), cons = cons)
prob = OptimizationProblem(optprob, x0, _p, lcons = [-Inf, -1.0], ucons = [0.8, 2.0])
sol = solve(prob, Ipopt.Optimizer())

optprob = OptimizationFunction(rosenbrock, Optimization.AutoModelingToolkit(),
cons = cons)
prob = OptimizationProblem(optprob, x0, _p, lcons = [1.0, 0.5], ucons = [1.0, 0.5])
sol = solve(prob, AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
sol = solve(prob, HiGHS.Optimizer())
end

0 comments on commit 7e70255

Please sign in to comment.