Skip to content

Commit 99816ef

Browse files
committed
All specification of dynamics con sig and diffmethod
1 parent d166fe4 commit 99816ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/problem.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,14 @@ defaults to the same integration specified in `prob`, but can be changed. The
270270
argument `idx` specifies the location of the dynamics constraint in the constraint vector.
271271
If `idx == -1`, it will be added at the end of the `ConstraintList`.
272272
"""
273-
function add_dynamics_constraints!(prob::Problem, idx=-1)
273+
function add_dynamics_constraints!(prob::Problem, idx=-1;
274+
diffmethod=ForwardAD(), sig=StaticReturn())
274275
n,m = dims(prob)
275276
conSet = prob.constraints
276277

277278
# Implicit dynamics
278279
dyn_con = DynamicsConstraint(prob.model)
279-
add_constraint!(conSet, dyn_con, 1:prob.N-1, idx, diffmethod=ForwardAD()) # add it at the end
280+
add_constraint!(conSet, dyn_con, 1:prob.N-1, idx, sig=sig, diffmethod=diffmethod) # add it at the end
280281

281282
# Initial condition
282283
init_con = GoalConstraint(n, prob.x0, SVector{n}(1:n)) # make sure it's linked

0 commit comments

Comments
 (0)