Skip to content

Commit

Permalink
added in place tests in test_model
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcaillau committed Sep 7, 2024
1 parent fe95823 commit 0eff660
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/optimal_control_model-getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function constraint(
(:control, rg, _, _) => begin
C = @match ocp begin
::OptimalControlModel{Autonomous, Fixed} => is_in_place(ocp) ?
ControlConstraint!((r, u) -> (r[:] .= __view(u, rg); nothing), T, V) :
ControlConstraint!((r, u) -> (r[:] .= __view(u, rg); nothing), T, V) : # todo: CC!{T, V}(fun) syntax?
ControlConstraint(u -> u[rg], T, V)
::OptimalControlModel{Autonomous, NonFixed} => is_in_place(ocp) ?
ControlConstraint!((r, u, v) -> (r[:] .= __view(u, rg); nothing), T, V) :
Expand Down
Loading

0 comments on commit 0eff660

Please sign in to comment.