-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
Context: Following PR #959, there is an empty VARIATIONAL "enum" in dynamics/ode_solvers.py and dynamics/integrators.py in anticipation for the refactor suggested in this issue.
Current code state: The implementation of the variational integrator is done in VariationalOptimalControlProgram.
Possible action item: To uniformize the implementation of the variational integrator with the other integrators, it would be better to move it to
- dynamics/ode_solvers.py: define the variational constraint:
nlp.implicit_dynamics_func = Function(
"ThreeNodesIntegration",
three_nodes_input,
[
self.bio_model.discrete_euler_lagrange_equations(
dt,
q_prev,
q_cur,
q_next,
control_prev,
control_cur,
control_next,
lambdas,
)
],
)- dynamics/integrators.py evaluate the constraint here
*Please note that I did not fully thought this through, if you (aka the dev who tackle this issue) think it would be better to do otherwise, feel free to do so.
Reactions are currently unavailable