diff --git a/OCP_equation.jpg b/OCP_equation.jpg new file mode 100644 index 000000000..95b5b4860 Binary files /dev/null and b/OCP_equation.jpg differ diff --git a/OCP_equation.png b/OCP_equation.png deleted file mode 100644 index 61d04e57b..000000000 Binary files a/OCP_equation.png and /dev/null differ diff --git a/README.md b/README.md index 018b87208..93e69bb9d 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ You can already enjoy bioptimizing! # Defining our optimal control problems Here we will detail our implementation of optimal control problems and some definitions. The mathematical transcription of the OCP is as follows: -![](OCP_equation.png) +![](OCP_equation.jpg) The optimization variables are the states (x = variables that represent the state of the system at each node and that are subject to continuity constraints), controls (u = decision variables defined at each node that have an effect on the system), algebraic states (s = optimization variables that are defined at each node, but that are not subject to the diff --git a/bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py b/bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py index 854680e22..62acc62a3 100644 --- a/bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py +++ b/bioptim/examples/stochastic_optimal_control/arm_reaching_muscle_driven.py @@ -40,7 +40,7 @@ MultinodeObjectiveList, ) -from bioptim.examples.stochastic_optimal_control.LeuvenArmModel import LeuvenArmModel +from bioptim.examples.stochastic_optimal_control.leuven_arm_model import LeuvenArmModel def stochastic_forward_dynamics( diff --git a/bioptim/examples/stochastic_optimal_control/LeuvenArmModel.py b/bioptim/examples/stochastic_optimal_control/leuven_arm_model.py similarity index 100% rename from bioptim/examples/stochastic_optimal_control/LeuvenArmModel.py rename to bioptim/examples/stochastic_optimal_control/leuven_arm_model.py diff --git a/bioptim/optimization/optimization_vector.py b/bioptim/optimization/optimization_vector.py index 873514187..e62384d08 100644 --- a/bioptim/optimization/optimization_vector.py +++ b/bioptim/optimization/optimization_vector.py @@ -501,7 +501,7 @@ def to_dictionaries(ocp, data: np.ndarray | DM) -> tuple: nlp.stochastic_variables.node_index = k s_array = v_array[offset : offset + nstochastic].reshape( (nlp.stochastic_variables.shape, -1), order="F" - ) # @pariterre "F" seems like an interpolation? + ) for key in nlp.stochastic_variables: data_stochastic_variables[p_idx][key][:, k : k + 1] = s_array[ nlp.stochastic_variables[key].index, :