We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36a8590 commit 953fda2Copy full SHA for 953fda2
lib/OptimizationODE/test/runtests.jl
@@ -5,26 +5,26 @@ using LinearAlgebra, ForwardDiff
5
using OrdinaryDiffEq, DifferentialEquations, SteadyStateDiffEq, Sundials
6
7
# Test helper functions
8
-function rosenbrock(x, p,args...)
+function rosenbrock(x, p)
9
return (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
10
end
11
12
-function rosenbrock_grad!(grad, x, p,args...)
+function rosenbrock_grad!(grad, x, p)
13
grad[1] = -2.0 * (p[1] - x[1]) - 4.0 * p[2] * (x[2] - x[1]^2) * x[1]
14
grad[2] = 2.0 * p[2] * (x[2] - x[1]^2)
15
16
17
-function quadratic(x, p,args...)
+function quadratic(x, p)
18
return (x[1] - p[1])^2 + (x[2] - p[2])^2
19
20
21
-function quadratic_grad!(grad, x, p,args...)
+function quadratic_grad!(grad, x, p)
22
grad[1] = 2.0 * (x[1] - p[1])
23
grad[2] = 2.0 * (x[2] - p[2])
24
25
26
# Constrained optimization problem
27
-function constrained_objective(x, p,args...)
+function constrained_objective(x, p)
28
return x[1]^2 + x[2]^2
29
30
0 commit comments