custom_dynamics/implicit_dynamics_taudot_driven.py
def custom_configure_taudot_implicit(ocp: OptimalControlProgram, nlp: NonLinearProgram):
    """
    Tell the program which variables are states and controls.
    The user is expected to use the ConfigureProblem.configure_xxx functions.

    Parameters
    ----------
    ocp: OptimalControlProgram
        A reference to the ocp
    nlp: NonLinearProgram
        A reference to the phase
    """

    ConfigureProblem.configure_q(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_qdot(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_tau(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_taudot(nlp, as_states=False, as_controls=True)
    ConfigureProblem.configure_qddot(nlp, as_states=False, as_controls=True)

    ocp.implicit_constraints.add(
        ImplicitConstraintFcn.TAU_EQUALS_INVERSE_DYNAMICS,
        node=Node.ALL_SHOOTING,
        constraint_type=ConstraintType.IMPLICIT,
        phase=nlp.phase_idx,
    )

    ConfigureProblem.configure_dynamics_function(ocp, nlp, taudot_implicit_dynamic)

    Tell the program which variables are states and controls.
    The user is expected to use the ConfigureProblem.configure_xxx functions.

    Parameters
    ----------
    ocp: OptimalControlProgram
        A reference to the ocp
    nlp: NonLinearProgram
        A reference to the phase
    
Tell the program which variables are states and controls.
The user is expected to use the ConfigureProblem.configure_xxx functions.

Parameters

OptimalControlProgram
A reference to the ocp
nlp: NonLinearProgram
A reference to the phase
Tell the program which variables are states and controls . The user is expected to use the ConfigureProblem . configure_xxx functions . Parameters OptimalControlProgram A reference to the ocp nlp : NonLinearProgram A reference to the phase
def custom_configure_taudot_implicit(ocp: OptimalControlProgram, nlp: NonLinearProgram):
    ConfigureProblem.configure_q(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_qdot(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_tau(nlp, as_states=True, as_controls=False)
    ConfigureProblem.configure_taudot(nlp, as_states=False, as_controls=True)
    ConfigureProblem.configure_qddot(nlp, as_states=False, as_controls=True)
    ocp.implicit_constraints.add(
        ImplicitConstraintFcn.TAU_EQUALS_INVERSE_DYNAMICS,
        node=Node.ALL_SHOOTING,
        constraint_type=ConstraintType.IMPLICIT,
        phase=nlp.phase_idx,
    )
    ConfigureProblem.configure_dynamics_function(ocp, nlp, taudot_implicit_dynamic)
def custom_configure_taudot_implicit ( ocp : OptimalControlProgram , nlp : NonLinearProgram ) : ConfigureProblem . configure_q ( nlp , as_states = True , as_controls = False ) ConfigureProblem . configure_qdot ( nlp , as_states = True , as_controls = False ) ConfigureProblem . configure_tau ( nlp , as_states = True , as_controls = False ) ConfigureProblem . configure_taudot ( nlp , as_states = False , as_controls = True ) ConfigureProblem . configure_qddot ( nlp , as_states = False , as_controls = True ) ocp . implicit_constraints . add ( ImplicitConstraintFcn . TAU_EQUALS_INVERSE_DYNAMICS , node = Node . ALL_SHOOTING , constraint_type = ConstraintType . IMPLICIT , phase = nlp . phase_idx , ) ConfigureProblem . configure_dynamics_function ( ocp , nlp , taudot_implicit_dynamic )
Tell the program which variables are states and controls.
Tell the program which variables are states and controls .
"""
    Tell the program which variables are states and controls.
    The user is expected to use the ConfigureProblem.configure_xxx functions.

    Parameters
    ----------
    ocp: OptimalControlProgram
        A reference to the ocp
    nlp: NonLinearProgram
        A reference to the phase
    """
ocp
OptimalControlProgram
nlp
NonLinearProgram