Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aml5600 committed Nov 27, 2024
1 parent d994326 commit d6add0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/optimizationsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ end
@testset "Constraints work with nonnumeric parameters" begin
@variables x
@parameters p f(::Real)
@mtkbuild sys = OptimizationSystem(x^2 + f(x) * p, [x], [f, p]; constraints = [2.0 f(x) + p])
@mtkbuild sys = OptimizationSystem(
x^2 + f(x) * p, [x], [f, p]; constraints = [2.0 f(x) + p])
prob = OptimizationProblem(sys, [x => 1.0], [p => 1.0, f => (x -> 2x)])
@test abs(prob.f.cons(prob.u0, prob.p)[1]) 1.0
end

0 comments on commit d6add0e

Please sign in to comment.