Skip to content

Commit

Permalink
made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EveCharbie committed Jul 18, 2023
1 parent 7ef44d4 commit 377de7b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 3 deletions.
Binary file added OCP_equation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed OCP_equation.png
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion bioptim/optimization/optimization_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, :
Expand Down

0 comments on commit 377de7b

Please sign in to comment.