Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needed to merge the two PRs here #867

Merged
merged 127 commits into from
Apr 5, 2024
Merged

Needed to merge the two PRs here #867

merged 127 commits into from
Apr 5, 2024

Conversation

EveCharbie
Copy link
Collaborator

@EveCharbie EveCharbie commented Mar 29, 2024

This change is Reviewable

@EveCharbie EveCharbie changed the title [WIP] Needed to merge the two PRs here [RTR] Needed to merge the two PRs here Apr 3, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 70.72848% with 221 lines in your changes are missing coverage. Please review.

Project coverage is 78.04%. Comparing base (4cc49ef) to head (93be904).
Report is 1 commits behind head on master.

Files Patch % Lines
bioptim/gui/ipopt_output_plot.py 0.00% 68 Missing ⚠️
bioptim/optimization/solution/solution.py 37.86% 64 Missing ⚠️
bioptim/gui/plot.py 68.18% 14 Missing ⚠️
bioptim/gui/online_callback.py 0.00% 11 Missing ⚠️
bioptim/dynamics/configure_problem.py 82.75% 10 Missing ⚠️
bioptim/models/biorbd/biorbd_model.py 83.33% 7 Missing ⚠️
...optimization/stochastic_optimal_control_program.py 50.00% 7 Missing ⚠️
bioptim/gui/check_conditioning.py 95.90% 5 Missing ⚠️
bioptim/limits/multinode_constraint.py 44.44% 5 Missing ⚠️
bioptim/dynamics/ode_solver.py 73.33% 4 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #867      +/-   ##
==========================================
- Coverage   78.51%   78.04%   -0.47%     
==========================================
  Files         141      142       +1     
  Lines       16296    16464     +168     
==========================================
+ Hits        12794    12849      +55     
- Misses       3502     3615     +113     
Flag Coverage Δ
unittests 78.04% <70.72%> (-0.47%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 59 of 66 files at r1, 7 of 7 files at r2, all commit messages.
Reviewable status: all files reviewed, 120 unresolved discussions (waiting on @EveCharbie)


bioptim/dynamics/configure_problem.py line 167 at r2 (raw file):

        soft_contacts_dynamics: SoftContactDynamics = SoftContactDynamics.ODE,
        fatigue: FatigueList = None,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

Must be a None
if None: skip


bioptim/dynamics/configure_problem.py line 192 at r2 (raw file):

        fatigue: FatigueList
            A list of fatigue elements
        dynamics_constants_used_at_each_nodes: dict[np.ndarray]

numerical_data_timeseries: dict[str, np.ndarray]


bioptim/dynamics/configure_problem.py line 205 at r2 (raw file):

                raise RuntimeError(
                    "The only dynamics_constants_used_at_each_nodes allowed for torque_driven dynamics is external_forces."
                )

just continue


bioptim/dynamics/configure_problem.py line 322 at r2 (raw file):

        with_ligament: bool = False,
        with_friction: bool = False,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 448 at r2 (raw file):

        with_cholesky: bool = False,
        initial_matrix: DM = None,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 531 at r2 (raw file):

        with_cholesky: bool = False,
        initial_matrix: DM = None,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 608 at r2 (raw file):

        rigidbody_dynamics: RigidBodyDynamics = RigidBodyDynamics.ODE,
        soft_contacts_dynamics: SoftContactDynamics = SoftContactDynamics.ODE,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 708 at r2 (raw file):

        with_residual_torque: bool = False,
        with_ligament: bool = False,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 777 at r2 (raw file):

        nlp,
        rigidbody_dynamics: RigidBodyDynamics = RigidBodyDynamics.ODE,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 839 at r2 (raw file):

        with_ligament: bool = False,
        rigidbody_dynamics: RigidBodyDynamics = RigidBodyDynamics.ODE,
        dynamics_constants_used_at_each_nodes: dict[list] = {},

= None


bioptim/dynamics/configure_problem.py line 930 at r2 (raw file):

    @staticmethod
    def holonomic_torque_driven(ocp, nlp, dynamics_constants_used_at_each_nodes: dict[list] = {}):

= None


bioptim/dynamics/configure_problem.py line 1000 at r2 (raw file):

                ],
                [dynamics_dxdt],
                ["t_span", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/dynamics/configure_problem.py line 1018 at r2 (raw file):

                    )

            # Only possible for regular dynamics, not for extra_dynamics

to be removed


bioptim/dynamics/configure_problem.py line 1032 at r2 (raw file):

                    ],
                    [dynamics_eval.defects],
                    ["t_span", "x", "u", "p", "a", "dynamics_constants", "xdot"],

d


bioptim/dynamics/configure_problem.py line 1060 at r2 (raw file):

                    ],
                    [dynamics_dxdt],
                    ["t_span", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/dynamics/configure_problem.py line 1065 at r2 (raw file):

            )

            # TODO: allow expand for each dynamics independently

Done


bioptim/dynamics/configure_problem.py line 1068 at r2 (raw file):

            if nlp.dynamics_type.expand_dynamics:
                try:
                    nlp.extra_dynamics_func[-1] = nlp.dynamics_funcextra_dynamics_func[-1].expand()

that is a bit convoluted for a name


bioptim/dynamics/configure_problem.py line 1117 at r2 (raw file):

                )
            ],
            ["t_span", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/dynamics/configure_problem.py line 1904 at r2 (raw file):

        state_continuity_weight: float | None = None,
        phase_dynamics: PhaseDynamics = PhaseDynamics.SHARED_DURING_THE_PHASE,
        dynamics_constants_used_at_each_nodes: dict[np.ndarray] = {},

= None


bioptim/dynamics/dynamics_functions.py line 94 at r2 (raw file):

        parameters: MX.sym,
        algebraic_states: MX.sym,
        dynamics_constants: MX.sym,

change name


bioptim/dynamics/integrator.py line 134 at r2 (raw file):

    @property
    def _input_names(self):
        return ["t_span", "x0", "u", "p", "a", "dynamics_constants"]

d


bioptim/dynamics/integrator.py line 361 at r2 (raw file):

    """

    def next_x(

d


bioptim/dynamics/integrator.py line 385 at r2 (raw file):

    def next_x(
        self, t0: float | MX | SX, x_prev: MX | SX, u: MX | SX, p: MX | SX, a: MX | SX, dynamics_constants: MX | SX

d


bioptim/dynamics/integrator.py line 536 at r2 (raw file):

            algebraic_states_next = algebraic_states
        if dynamics_constants.shape != (0, 0):
            dynamics_constants_prev = dynamics_constants[:, 0]

numerical_timeseries


bioptim/dynamics/ode_solver.py line 226 at r2 (raw file):

            "u": self.p_ode(nlp),
            "a": self.a_ode(nlp),
            "dynamics_constants": self.d_ode(nlp),

d


bioptim/dynamics/ode_solver.py line 630 at r2 (raw file):

                        nlp.dynamics_constants.cx_start,
                    ),
                    ["t_span", "x0", "u", "p", "a", "dynamics_constants"],

d


bioptim/examples/custom_model/custom_package/custom_dynamics.py line 23 at r2 (raw file):

    parameters: MX,
    algebraic_states: MX,
    dynamics_constants: MX,

numerical_timeseries


bioptim/examples/custom_model/custom_package/custom_dynamics.py line 48 at r2 (raw file):

def custom_configure_my_dynamics(
    ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}

numerical_timeseries


bioptim/examples/getting_started/custom_dynamics.py line 41 at r2 (raw file):

    parameters: MX | SX,
    algebraic_states: MX | SX,
    dynamics_constants: MX | SX,

numerical_timeseries


bioptim/examples/getting_started/custom_dynamics.py line 86 at r2 (raw file):

def custom_configure(
    ocp: OptimalControlProgram, nlp: NonLinearProgram, my_additional_factor=1, dynamics_constants_used_at_each_nodes={}

numerical_timeseries


bioptim/examples/getting_started/example_external_forces.py line 59 at r2 (raw file):

        The phase dynamics to use
    use_point_of_applications: bool
        If the external forces should be applied at the point of application or at the segment's origin

explain the dimensions of the external_forces


bioptim/examples/getting_started/example_external_forces.py line 103 at r2 (raw file):

        expand_dynamics=expand_dynamics,
        phase_dynamics=phase_dynamics,
        dynamics_constants_used_at_each_nodes={"external_forces": external_forces},  # the key word "external_forces" must be used

numerical_timeseries


bioptim/examples/muscle_driven_ocp/muscle_activations_tracker.py line 176 at r2 (raw file):

            parameters=symbolic_parameters,
            algebraic_states=MX(),
            dynamics_constants=MX(),

numerical_timeseries


bioptim/examples/muscle_driven_ocp/muscle_excitations_tracker.py line 178 at r2 (raw file):

            parameters=symbolic_parameters,
            algebraic_states=MX(),
            dynamics_constants=MX(),

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 56 at r2 (raw file):

    parameters: cas.MX | cas.SX,
    algebraic_states: cas.MX | cas.SX,
    dynamics_constants: cas.MX | cas.SX,

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 74 at r2 (raw file):

    parameters: cas.MX | cas.SX,
    algebraic_states: cas.MX | cas.SX,
    dynamics_constants: cas.MX | cas.SX,

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 98 at r2 (raw file):

        hand_pos_velo = nlp.model.sensory_reference(
            time, states, controls, parameters, algebraic_states, dynamics_constants, nlp

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_collocations.py line 42 at r2 (raw file):

    parameters: cas.MX | cas.SX,
    algebraic_states: cas.MX | cas.SX,
    dynamics_constants: cas.MX | cas.SX,

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 52 at r2 (raw file):

    parameters: cas.MX | cas.SX,
    algebraic_states: cas.MX | cas.SX,
    dynamics_constants: cas.MX | cas.SX,

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 80 at r2 (raw file):

    dqdot_constraint = dynamics_torque_driven_with_feedbacks(
        time, states, controls, parameters, algebraic_states, dynamics_constants, nlp, with_noise=with_noise

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 88 at r2 (raw file):

def configure_stochastic_optimal_control_problem(
    ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}

numerical_timeseries


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_implicit.py line 53 at r2 (raw file):

    parameters: cas.MX | cas.SX,
    algebraic_states: cas.MX | cas.SX,
    dynamics_constants: cas.MX | cas.SX,

numerical_timeseries


bioptim/examples/stochastic_optimal_control/common.py line 14 at r2 (raw file):

def dynamics_torque_driven_with_feedbacks(
    time, states, controls, parameters, algebraic_states, dynamics_constants, nlp, with_noise

numerical_timeseries


bioptim/examples/stochastic_optimal_control/common.py line 30 at r2 (raw file):

        sensory_noise = DynamicsFunctions.get(nlp.parameters["sensory_noise"], parameters)
        end_effector = nlp.model.sensory_reference(
            time, states, controls, parameters, algebraic_states, dynamics_constants, nlp

numerical_timeseries


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 331 at r2 (raw file):

def configure_optimal_control_problem(
    ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}

numerical_timeseries
and
= None


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 340 at r2 (raw file):

        ocp,
        nlp,
        dyn_func=lambda time, states, controls, parameters, algebraic_states, dynamics_constants, nlp: nlp.dynamics_type.dynamic_function(

numerical_timeseries


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 347 at r2 (raw file):

def configure_stochastic_optimal_control_problem(
    ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}

=None


bioptim/examples/torque_driven_ocp/example_pendulum_time_dependent.py line 42 at r2 (raw file):

    parameters: MX | SX,
    algebraic_states: MX | SX,
    dynamics_constants: MX | SX,

numerical_data_timeseries


bioptim/examples/torque_driven_ocp/example_pendulum_time_dependent.py line 60 at r2 (raw file):

    algebraic_states: MX | SX
        The algebraic states variables of the system
    dynamics_constants: MX | SX

numerical_data_timeseries


bioptim/examples/torque_driven_ocp/spring_load.py line 117 at r2 (raw file):

    parameters: MX,
    algebraic_states: MX,
    dynamics_constants: MX,

numerical_data_timeseries


bioptim/examples/torque_driven_ocp/spring_load.py line 136 at r2 (raw file):

        The current algebraic states of the system
    dynamics_constants: MX
        The current dynamics constants of the system

numerical_data_timeseries


bioptim/examples/torque_driven_ocp/spring_load.py line 158 at r2 (raw file):

def custom_configure(ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}):

numerical_data_timeseries


bioptim/gui/plot.py line 366 at r2 (raw file):

                                size_p = casadi_function.size_in("p")[0]
                                size_a = casadi_function.size_in("a")[0]
                                size_d = casadi_function.size_in("dynamics_constants")[0]

d


bioptim/gui/plot.py line 378 at r2 (raw file):

                                np.zeros((size_p, 1)),  # parameters
                                np.zeros((size_a, 1)),  # algebraic_states
                                np.zeros((size_d, 1)),  # dynamics_constants

numerical_data_timeseries


bioptim/gui/plot.py line 791 at r2 (raw file):

            The algebraic states of the current phase
        d
            The dynamics constants of the current phase

numerical_data_timeseries


bioptim/interfaces/solve_ivp_interface.py line 41 at r2 (raw file):

        array of the algebraic states of the system
    d : np.ndarray
        array of the dynamics constants

numerical_data_timeseries


bioptim/limits/constraints.py line 700 at r2 (raw file):

            tau_joints = MX.sym("tau_joints", nu, 1)
            algebraic_states_sym = MX.sym("algebraic_states_sym", controller.algebraic_states.shape, 1)
            dynamics_constants_sym = MX.sym("dynamics_constants_sym", controller.dynamics_constants.shape, 1)

numerical_data_timeseries


bioptim/limits/constraints.py line 708 at r2 (raw file):

                controller.parameters.mx,
                algebraic_states_sym,
                dynamics_constants_sym,

numerical_data_timeseries


bioptim/limits/penalty_controller.py line 279 at r2 (raw file):

    @property
    def dynamics_constants(self) -> OptimizationVariableList:

numerical_data_timeseries


bioptim/limits/penalty_helpers.py line 132 at r2 (raw file):

    @staticmethod
    def dynamics_constants(penalty, index, get_dynamics_constants: Callable, is_constructing_penalty: bool = False):

numerical_data_timeseries


bioptim/limits/penalty_helpers.py line 135 at r2 (raw file):

        node = penalty.node_idx[index]
        if penalty.multinode_penalty:
            d = get_dynamics_constants(penalty.nodes_phase[0], node, 0)  # cx_start

Raise NotImplementedYet here because we are not confident this works


bioptim/limits/penalty_helpers.py line 142 at r2 (raw file):

        #         if d_tp.shape != (0, 0):
        #             d += [_reshape_to_vector(get_dynamics_constants(phase, node, sub))]
        #     return _vertcat(d) if len(d) > 0 else DM()

To be removed?


bioptim/limits/penalty_option.py line 402 at r2 (raw file):

        )

        controller, _, x, u, p, a, dynamics_constants = self.get_variable_inputs(controllers)

numerical_data_timeseries


bioptim/limits/penalty_option.py line 446 at r2 (raw file):

            algebraic_states_start_cx = controller.algebraic_states_scaled.cx_start
            algebraic_states_end_cx = controller.algebraic_states_scaled.cx_end
            dynamics_constants_start_cx = controller.dynamics_constants.cx_start

numerical_data_timeseries


bioptim/limits/penalty_option.py line 467 at r2 (raw file):

                    p=controller.parameters.cx,
                    a=controller.algebraic_states.cx_start,
                    dynamics_constants=controller.dynamics_constants.cx_start,

numerical_data_timeseries


bioptim/limits/penalty_option.py line 496 at r2 (raw file):

                    param_cx_start,
                    algebraic_states_start_cx,
                    dynamics_constants_start_cx,

numerical_data_timeseries


bioptim/limits/penalty_option.py line 526 at r2 (raw file):

            self.function[node] = Function(
                name,
                [time, phases_dt, x, u, p, a, dynamics_constants],

d


bioptim/limits/penalty_option.py line 528 at r2 (raw file):

                [time, phases_dt, x, u, p, a, dynamics_constants],
                [(func_at_start + func_at_end) / 2],
                ["t", "dt", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/limits/penalty_option.py line 543 at r2 (raw file):

            a_start = controller.algebraic_states_scaled.cx_start
            a_end = controller.algebraic_states_scaled.cx_end
            dynamics_constants_start = controller.dynamics_constants.cx_start

numerical_data_timeseries


bioptim/limits/penalty_option.py line 550 at r2 (raw file):

                [time, phases_dt, x_start, u_start, p_start, a_start, dynamics_constants_start],
                [sub_fcn],
                ["t", "dt", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/limits/penalty_option.py line 593 at r2 (raw file):

        self.weighted_function[node] = Function(
            name,
            [time, phases_dt, x, u, p, a, dynamics_constants, weight_cx, target_cx],

d


bioptim/limits/penalty_option.py line 595 at r2 (raw file):

            [time, phases_dt, x, u, p, a, dynamics_constants, weight_cx, target_cx],
            [modified_fcn],
            ["t", "dt", "x", "u", "p", "a", "dynamics_constants", "weight", "target"],

d


bioptim/limits/penalty_option.py line 679 at r2 (raw file):

        )

        return controller, t0, x, u, p, a, dynamics_constants

d


bioptim/limits/penalty_option.py line 780 at r2 (raw file):

        return u

    def _get_dynamics_constants(self, ocp, p_idx, n_idx, sn_idx):

numerical_data_timeseries


bioptim/limits/penalty_option.py line 785 at r2 (raw file):

            nlp = ocp.nlp[p_idx]
        except:
            print("ici")

To be removed


bioptim/models/biorbd/stochastic_biorbd_model.py line 11 at r2 (raw file):

def _compute_torques_from_noise_and_feedback_default(
    nlp, time, states, controls, parameters, algebraic_states, dynamics_constants, sensory_noise, motor_noise

numerical_data_timeseries


bioptim/models/biorbd/stochastic_biorbd_model.py line 22 at r2 (raw file):

    sensory_input = nlp.model.sensory_reference(
        time, states, controls, parameters, algebraic_states, dynamics_constants, nlp

numerical_data_timeseries


bioptim/optimization/non_linear_program.py line 43 at r2 (raw file):

        The dynamic function used during the current phase dxdt = f(x,u,p)
    extra_dynamics_func: Callable
        The extra dynamic function used during the current phase dxdt = f(x,u,p)

numerical_data_timeseries


bioptim/optimization/non_linear_program.py line 149 at r2 (raw file):

        self.implicit_dynamics_func = None
        self.dynamics_type = None
        self.dynamics_constants = None

numerical_data_timeseries


bioptim/optimization/optimal_control_program.py line 9 at r2 (raw file):

from casadi import MX, SX, sum1, horzcat
from matplotlib import pyplot as plt
import subprocess

To be removed?


bioptim/optimization/optimal_control_program.py line 1612 at r2 (raw file):

        )

    def _define_dynamics_constants(self, dynamics):

numerical_data_timeseries


bioptim/optimization/optimal_control_program.py line 1614 at r2 (raw file):

    def _define_dynamics_constants(self, dynamics):
        """
        Declare the dynamics_constants symbolic variables.

numerical_data_timeseries


bioptim/optimization/optimal_control_program.py line 1647 at r2 (raw file):

        # Add to the nlp
        NLP.add(self, "dynamics_constants", dynamics_constants, True)

numerical_data_timeseries


bioptim/optimization/stochastic_optimal_control_program.py line 214 at r2 (raw file):

            ConstraintFcn.STOCHASTIC_MEAN_SENSORY_INPUT_EQUALS_REFERENCE,
            node=Node.ALL,
            # penalty_type=PenaltyType.INTERNAL,

TODO: Waiting the bug is fixed


bioptim/optimization/variational_optimal_control_program.py line 257 at r2 (raw file):

            ],
            [dynamics_dxdt],
            ["t_span", "x", "u", "p", "a", "dynamics_constants"],

d


bioptim/optimization/variational_optimal_control_program.py line 347 at r2 (raw file):

    def configure_torque_driven(
        self, ocp: OptimalControlProgram, nlp: NonLinearProgram, dynamics_constants_used_at_each_nodes={}

numerical_data_timeseries
=None


bioptim/optimization/solution/solution.py line 797 at r2 (raw file):

            d = []
            for n_idx in range(nlp.ns + 1):
                d_tp = _get_dynamics_constants(self.ocp, p, n_idx, 0)

numerical_data_timeseries


bioptim/optimization/solution/solution.py line 997 at r2 (raw file):

        The states to integrate
        """
        from ...interfaces.interface_utils import _get_dynamics_constants

numerical_data_timeseries


bioptim/optimization/solution/solution.py line 997 at r2 (raw file):

        The states to integrate
        """
        from ...interfaces.interface_utils import _get_dynamics_constants

should not be protected (get...)


tests/utils.py line 194 at r2 (raw file):

    @staticmethod
    def initialize_dynamics_constants(nlp, dynamics):

numerical_data_timeseries


tests/utils.py line 195 at r2 (raw file):

    @staticmethod
    def initialize_dynamics_constants(nlp, dynamics):
        dynamics_constants = OptimizationVariableList(nlp.cx, dynamics.phase_dynamics)

numerical_data_timeseries


tests/shard1/test__global_plots.py line 261 at r2 (raw file):

                    param = MX.sym("param", *p.weighted_function[node_index].size_in("p"))
                    a = MX.sym("a", *p.weighted_function[node_index].size_in("a"))
                    d = MX.sym("dynamics_constants", *p.weighted_function[node_index].size_in("dynamics_constants"))

numerical_data_timeseries


tests/shard1/test_dynamics.py line 160 at r2 (raw file):

        np.random.rand(nlp.ns, 6)  # just not to change the values of the next random values

    nlp.dynamics_constants = TestUtils.initialize_dynamics_constants(nlp, dynamics=nlp.dynamics_type)

numerical_data_timeseries


tests/shard1/test_dynamics.py line 168 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = external_forces[:, 0, 0] if with_external_force else []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 326 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 547 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = external_forces[:, 0, 0] if with_external_force else []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1027 at r2 (raw file):

            expand_dynamics=True,
            phase_dynamics=phase_dynamics,
            dynamics_constants_used_at_each_nodes=(

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1046 at r2 (raw file):

        np.random.rand(nlp.ns, 6)

    nlp.dynamics_constants = TestUtils.initialize_dynamics_constants(nlp, dynamics=nlp.dynamics_type)

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1054 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = external_forces[:, 0, 0] if with_external_force else []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1207 at r2 (raw file):

            expand_dynamics=True,
            phase_dynamics=phase_dynamics,
            dynamics_constants_used_at_each_nodes=(

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1234 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = external_forces[:, 0, 0] if with_external_force else []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1458 at r2 (raw file):

            expand_dynamics=True,
            phase_dynamics=phase_dynamics,
            dynamics_constants_used_at_each_nodes=(

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1488 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = external_forces[:, 0, 0] if with_external_force else []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 1990 at r2 (raw file):

        params = np.random.rand(nlp.parameters.shape, nlp.ns)
        algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
        dynamics_constants = []

numerical_data_timeseries


tests/shard1/test_dynamics.py line 2013 at r2 (raw file):

        return DynamicsEvaluation(dxdt=vertcat(dq, ddq), defects=None)

    def configure(ocp, nlp, with_contact=None, dynamics_constants_used_at_each_nodes={}):

=None


tests/shard1/test_dynamics_units.py line 28 at r2 (raw file):

        match="Phase 0 has dynamics_constant_at_each_node of type <class 'list'> but it should be of type np.ndarray",
    ):
        _check_dynamics_constants_format([0, 0, 0, 0, 0, 0], 5, 0)

numerical_data_timeseries


tests/shard1/test_dynamics_units.py line 57 at r2 (raw file):

def test_check_external_forces_format_wrong_length():
    with pytest.raises(RuntimeError):
        _check_dynamics_constants_format([MockData(), MockData()], 3, 0)

numerical_data_timeseries


tests/shard2/test_cost_function_integration.py line 195 at r2 (raw file):

                        [],  # Parameters
                        [],  # Algebraic states
                        [],  # Dynamics constants

numerical_data_timeseries


tests/shard3/test_ligaments.py line 86 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_ligaments.py line 152 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_ligaments.py line 214 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_ligaments.py line 284 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_passive_torque.py line 92 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_passive_torque.py line 180 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_passive_torque.py line 274 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard3/test_passive_torque.py line 397 at r2 (raw file):

    params = np.random.rand(nlp.parameters.shape, nlp.ns)
    algebraic_states = np.random.rand(nlp.algebraic_states.shape, nlp.ns)
    dynamics_constants = []

numerical_data_timeseries


tests/shard4/test_penalty.py line 109 at r2 (raw file):

        ocp.nlp[0].algebraic_states.cx_start if ocp.nlp[0].algebraic_states.cx_start.shape != (0, 0) else ocp.cx(0, 0)
    )
    dynamics_constants = (

numerical_data_timeseries


tests/shard6/test_time_dependent_problems.py line 41 at r2 (raw file):

    parameters: MX | SX,
    algebraic_states: MX | SX,
    dynamics_constants: MX | SX,

numerical_data_timeseries


tests/shard6/test_time_dependent_problems.py line 60 at r2 (raw file):

        The Algebraic states variables of the system
    dynamics_constants: MX | SX
        The dynamics constants of the system

numerical_data_timeseries


bioptim/examples/stochastic_optimal_control/models/mass_point_model.py line 75 at r2 (raw file):

        return ["Ux", "Uy"]

    def dynamics(self, states, controls, parameters, algebraic_states, dynamics_constants, nlp, with_noise=False):

numerical_timeseries

@pariterre pariterre changed the title [RTR] Needed to merge the two PRs here Needed to merge the two PRs here Apr 4, 2024
Copy link
Collaborator Author

@EveCharbie EveCharbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 120 unresolved discussions (waiting on @pariterre)


bioptim/dynamics/configure_problem.py line 167 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

Must be a None
if None: skip

Done.


bioptim/dynamics/configure_problem.py line 192 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries: dict[str, np.ndarray]

Done.


bioptim/dynamics/configure_problem.py line 205 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

just continue

Done.


bioptim/dynamics/configure_problem.py line 322 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 448 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 531 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 608 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 708 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 777 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 839 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 930 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/configure_problem.py line 1000 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/configure_problem.py line 1018 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

to be removed

Done.


bioptim/dynamics/configure_problem.py line 1032 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/configure_problem.py line 1060 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/configure_problem.py line 1065 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

Done

Done.


bioptim/dynamics/configure_problem.py line 1068 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

that is a bit convoluted for a name

Done.


bioptim/dynamics/configure_problem.py line 1117 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/configure_problem.py line 1904 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

= None

Done.


bioptim/dynamics/dynamics_functions.py line 94 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

change name

Done.


bioptim/dynamics/integrator.py line 134 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/integrator.py line 361 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/integrator.py line 385 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/integrator.py line 536 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/dynamics/ode_solver.py line 226 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/dynamics/ode_solver.py line 630 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/examples/custom_model/custom_package/custom_dynamics.py line 23 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/custom_model/custom_package/custom_dynamics.py line 48 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/getting_started/custom_dynamics.py line 41 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/getting_started/custom_dynamics.py line 86 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/getting_started/example_external_forces.py line 59 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

explain the dimensions of the external_forces

Done.


bioptim/examples/getting_started/example_external_forces.py line 103 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/muscle_driven_ocp/muscle_activations_tracker.py line 176 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/muscle_driven_ocp/muscle_excitations_tracker.py line 178 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 56 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 74 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py line 98 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_collocations.py line 42 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 52 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 80 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_explicit.py line 88 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/arm_reaching_torque_driven_implicit.py line 53 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/common.py line 14 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/common.py line 30 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 331 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries
and
= None

Done.


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 340 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.


bioptim/examples/stochastic_optimal_control/obstacle_avoidance_direct_collocation.py line 347 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

=None

Done.


bioptim/examples/torque_driven_ocp/example_pendulum_time_dependent.py line 42 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/examples/torque_driven_ocp/example_pendulum_time_dependent.py line 60 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/examples/torque_driven_ocp/spring_load.py line 117 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/examples/torque_driven_ocp/spring_load.py line 136 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/examples/torque_driven_ocp/spring_load.py line 158 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/gui/plot.py line 366 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/gui/plot.py line 378 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/gui/plot.py line 791 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/interfaces/solve_ivp_interface.py line 41 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/constraints.py line 700 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/constraints.py line 708 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_controller.py line 279 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_helpers.py line 132 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_helpers.py line 135 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

Raise NotImplementedYet here because we are not confident this works

Done.


bioptim/limits/penalty_helpers.py line 142 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

To be removed?

Done.


bioptim/limits/penalty_option.py line 402 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 446 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 467 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 496 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 526 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 528 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 543 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 550 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 593 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 595 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 679 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/limits/penalty_option.py line 780 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/limits/penalty_option.py line 785 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

To be removed

Done.


bioptim/models/biorbd/stochastic_biorbd_model.py line 11 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/models/biorbd/stochastic_biorbd_model.py line 22 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/non_linear_program.py line 43 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/non_linear_program.py line 149 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/optimal_control_program.py line 9 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

To be removed?

Done.


bioptim/optimization/optimal_control_program.py line 1612 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/optimal_control_program.py line 1614 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/optimal_control_program.py line 1647 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/stochastic_optimal_control_program.py line 214 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

TODO: Waiting the bug is fixed

Done.


bioptim/optimization/variational_optimal_control_program.py line 257 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

d

Done.


bioptim/optimization/variational_optimal_control_program.py line 347 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries
=None

Done.


bioptim/optimization/solution/solution.py line 797 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/solution/solution.py line 997 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/optimization/solution/solution.py line 997 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

should not be protected (get...)

Done.


tests/utils.py line 194 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/utils.py line 195 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test__global_plots.py line 261 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 160 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 168 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 326 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 547 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1027 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1046 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1054 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1207 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1234 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1458 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1488 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 1990 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics.py line 2013 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

=None

Done.


tests/shard1/test_dynamics_units.py line 28 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard1/test_dynamics_units.py line 57 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard2/test_cost_function_integration.py line 195 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_ligaments.py line 86 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_ligaments.py line 152 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_ligaments.py line 214 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_ligaments.py line 284 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_passive_torque.py line 92 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_passive_torque.py line 180 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_passive_torque.py line 274 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard3/test_passive_torque.py line 397 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard4/test_penalty.py line 109 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard6/test_time_dependent_problems.py line 41 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


tests/shard6/test_time_dependent_problems.py line 60 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_data_timeseries

Done.


bioptim/examples/stochastic_optimal_control/models/mass_point_model.py line 75 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

numerical_timeseries

Done.

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 43 of 43 files at r3, 5 of 5 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @EveCharbie)


bioptim/dynamics/configure_problem.py line 971 at r3 (raw file):

            nlp.parameters.scaled.mx_reduced,
            nlp.algebraic_states.scaled.mx_reduced,
            nlp.numerical_timeseries.mx,

should we be consistent (numerical_data_timeseries vs numerical_timeseries) ? Or there was a reason to have these two names. I suspect it was based on mistake I've made in the comments yesterday...
That said, I think numerical_data_timeseries is too long... maybe we can drop the "data"

Copy link
Collaborator Author

@EveCharbie EveCharbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pariterre)


bioptim/dynamics/configure_problem.py line 971 at r3 (raw file):

Previously, pariterre (Pariterre) wrote…

should we be consistent (numerical_data_timeseries vs numerical_timeseries) ? Or there was a reason to have these two names. I suspect it was based on mistake I've made in the comments yesterday...
That said, I think numerical_data_timeseries is too long... maybe we can drop the "data"

No, it's because I wanted to discriminate between numerical_data_timeseries the actual np.array data provided by the user and numerical_timeseries the symbolic variables. I have to stock both values in nlp and I found it less confusing to have two different names.

pariterre
pariterre previously approved these changes Apr 5, 2024
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)

@EveCharbie
Copy link
Collaborator Author

@pariterre ready to merge :)

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 5 of 5 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)

@pariterre pariterre merged commit 5d9ee41 into pyomeca:master Apr 5, 2024
21 of 24 checks passed
@Ipuch Ipuch mentioned this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants