author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
538,857
09.04.2020 18:18:46
14,400
7f7c5af88398104bca679ab093e4d925d5277f42
Correction of values of testing eocarSym
[ { "change_type": "MODIFY", "old_path": "tests/test_symmetrical_torque_driven_ocp.py", "new_path": "tests/test_symmetrical_torque_driven_ocp.py", "diff": "@@ -63,12 +63,12 @@ def test_eocarSym():\n# Check objective function value\nf = np.array(sol[\"f\"])\nnp.testing.assert_equal(f.shape, (1, 1))\n- ...
Python
MIT License
pyomeca/bioptim
Correction of values of testing eocarSym
538,851
09.04.2020 18:21:33
14,400
fa3ef7787e9c4fef673b8ffde597e157ac0cf942
Adapt eocar with new problem type.
[ { "change_type": "MODIFY", "old_path": "examples/torque_driven_ocp/eocar.py", "new_path": "examples/torque_driven_ocp/eocar.py", "diff": "-import numpy as np\nimport biorbd\n+import numpy as np\nfrom matplotlib import pyplot as plt\nfrom biorbd_optim import OptimalControlProgram\n@@ -75,16 +75,15 @@...
Python
MIT License
pyomeca/bioptim
Adapt eocar with new problem type.
538,857
09.04.2020 18:45:37
14,400
1f59448e891fa9d76cd2b5faef57860902af5b40
Completed version of eocarSym test & tests of eocar and eocarSym blacked
[ { "change_type": "MODIFY", "old_path": "tests/test_symmetrical_torque_driven_ocp.py", "new_path": "tests/test_symmetrical_torque_driven_ocp.py", "diff": "@@ -6,61 +6,24 @@ from pathlib import Path\nimport numpy as np\n+from biorbd_optim import ProblemType\n+\n# Load eocarSym\nPROJECT_FOLDER = Path(_...
Python
MIT License
pyomeca/bioptim
Completed version of eocarSym test & tests of eocar and eocarSym blacked
538,851
10.04.2020 10:43:58
14,400
279faaae91a9e4c5bd68c92563cc8d7aa7170f02
Gives number of phases and param in raise RuntimeError.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -177,7 +177,7 @@ class OptimalControlProgram:\nif isinstance(param, (list, tuple)):\nif len(param) != self.nb_phases:\nraise RuntimeError(\n- param_name + \" size does not correspon...
Python
MIT License
pyomeca/bioptim
Gives number of phases and param in raise RuntimeError.
538,851
10.04.2020 11:26:08
14,400
9ef0848f1798c36afff58f6a65845bc706015d6c
Transforms eocar one phase in two phases.
[ { "change_type": "MODIFY", "old_path": "examples/torque_driven_ocp_plot/eocar.py", "new_path": "examples/torque_driven_ocp_plot/eocar.py", "diff": "@@ -12,27 +12,30 @@ from biorbd_optim.path_conditions import Bounds, QAndQDotBounds, InitialConditio\ndef prepare_ocp(biorbd_model_path=\"eocar.bioMod\"...
Python
MIT License
pyomeca/bioptim
Transforms eocar one phase in two phases.
538,857
10.04.2020 17:07:37
14,400
2c1d975a7b77628b6bb8c7864eff8df6b3dfebf1
Started to symmetrize through constraints
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -11,6 +11,7 @@ class Constraint:\n\"\"\"\nMARKERS_TO_PAIR = 0\n+ PROPORTIONAL_CONTROL = 1\n@staticmethod\nclass Instant(enum.Enum):\n@@ -61,6 +62,9 @@ class Constraint:\nif el...
Python
MIT License
pyomeca/bioptim
Started to symmetrize through constraints
538,851
10.04.2020 18:15:05
14,400
8dfa6c7c971773da29da388e611711d4de8ceca0
Uses plot.py at the end.
[ { "change_type": "MODIFY", "old_path": "examples/torque_driven_ocp/eocar.py", "new_path": "examples/torque_driven_ocp/eocar.py", "diff": "import biorbd\n-import numpy as np\n-from matplotlib import pyplot as plt\nfrom biorbd_optim import OptimalControlProgram\n+from biorbd_optim.plot import PlotOcp\...
Python
MIT License
pyomeca/bioptim
Uses plot.py at the end.
538,851
10.04.2020 18:47:54
14,400
cd8cf36be1034141d4e090267683a5ce78c4fcb8
Fix name of V in MX.sym.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -77,7 +77,7 @@ class OptimalControlProgram:\n\"biorbd_model must either be a string or an instance of biorbd.Model()\"\n)\nself.nb_phases = len(biorbd_model)\n- self.nlp = [{}] * se...
Python
MIT License
pyomeca/bioptim
Fix name of V in MX.sym.
538,851
10.04.2020 18:49:25
14,400
21252a2b59698f9a873d9a26384cadbc2009963b
Fix subtraction, no difference for g continuity
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -101,14 +101,14 @@ class Constraint:\nocp.g_bounds.min.append(0)\nocp.g_bounds.max.append(0)\n- # Dynamics must be continuous between constraints\n+ # Dynamics must be continu...
Python
MIT License
pyomeca/bioptim
Fix subtraction, no difference for g continuity
538,851
10.04.2020 18:50:33
14,400
41b7f97d804ec25c49047ed42cce5806ed5be94e
New version, adapts for multi-phases and plot without callback.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -7,6 +7,116 @@ import numpy as np\nfrom .problem_type import ProblemType\n+class PlotOcp:\n+ def __init__(self, ocp):\n+ self.ocp = ocp\n+ self.ns_per_phase = [nlp[\"ns\"] + 1 for nlp in oc...
Python
MIT License
pyomeca/bioptim
New version, adapts for multi-phases and plot without callback.
538,851
10.04.2020 18:51:15
14,400
3576ecb48273bd8d59bbeef833bafc535ace28a9
Fix equation of offset
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -93,7 +93,7 @@ class ProblemType:\noffsets = [0]\nfor i, nlp in enumerate(ocp.nlp):\noffsets.append(\n- offsets[i] + nlp[\"ns\"] * (nlp[\"nx\"] + 1) + nlp[\"ns\"] * (nlp[\"n...
Python
MIT License
pyomeca/bioptim
Fix equation of offset
538,851
10.04.2020 18:52:06
14,400
f308b8288e9599ef530304663d7e6a0965c823bf
Transforms in multi-phases problem.
[ { "change_type": "MODIFY", "old_path": "examples/torque_driven_ocp_plot/eocar.py", "new_path": "examples/torque_driven_ocp_plot/eocar.py", "diff": "@@ -3,6 +3,7 @@ import time\nimport biorbd\nfrom biorbd_optim import OptimalControlProgram\n+from biorbd_optim.plot import PlotOcp\nfrom biorbd_optim.pr...
Python
MIT License
pyomeca/bioptim
Transforms in multi-phases problem.
538,851
10.04.2020 18:55:47
14,400
8d8b00efdd10fc1a77a99bb8653a79775a587ad4
New folder multiphase_plot for tests
[ { "change_type": "RENAME", "old_path": "examples/torque_driven_ocp_plot/eocar.bioMod", "new_path": "examples/multiphase_plot_test_version/eocar.bioMod", "diff": "" }, { "change_type": "RENAME", "old_path": "examples/torque_driven_ocp_plot/eocar.py", "new_path": "examples/multiphase_p...
Python
MIT License
pyomeca/bioptim
New folder multiphase_plot for tests
538,851
13.04.2020 10:37:31
14,400
7ef6c965f06755958b54e1464065f27ca523029e
Ok if one phase and no constraint.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -142,9 +142,10 @@ class OptimalControlProgram:\nif self.nb_phases == 1:\nif (\n- isinstance(constraints, (list, tuple))\n+ len(constraints) == 0\n+ or (isinstance(constraints, (list...
Python
MIT License
pyomeca/bioptim
Ok if one phase and no constraint.
538,851
13.04.2020 10:38:22
14,400
c32ba0ff486ca00eb687fe1b574b2496eaa650f7
Adds detail in regulation error (size of list).
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/path_conditions.py", "new_path": "biorbd_optim/path_conditions.py", "diff": "@@ -14,7 +14,7 @@ class PathCondition:\n@staticmethod\ndef regulation_private(var, nb_elements, type):\nif len(var) != nb_elements:\n- raise RuntimeError(f\"Invalid numbe...
Python
MIT License
pyomeca/bioptim
Adds detail in regulation error (size of list).
538,851
13.04.2020 10:38:56
14,400
c8862a3abd79ffabe989a4d6647cc6d55233e38c
Adapts muscle case to new biorbdoptim version
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -57,12 +57,14 @@ class ProblemType:\nnlp[\"dynamics_func\"] = Dynamics.forward_dynamics_torque_muscle_driven\nu = MX()\n- muscle_names = nlp.model.muscleNames()\n- for i in ...
Python
MIT License
pyomeca/bioptim
Adapts muscle case to new biorbdoptim version
538,851
13.04.2020 10:39:28
14,400
fb912369db9c365661b42221dbf40a398f1d0d22
Adapts to new version of biorbdoptim.
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/static_arm.py", "new_path": "examples/muscle_driven_ocp/static_arm.py", "diff": "@@ -13,12 +13,6 @@ def prepare_nlp(biorbd_model_path=\"arm26.bioMod\", show_online_optim=False):\n# Model path\nbiorbd_model = biorbd.Model(biorbd_model...
Python
MIT License
pyomeca/bioptim
Adapts to new version of biorbdoptim.
538,857
13.04.2020 11:37:00
14,400
7e22142c30ec9e2a02b79b1d69bb53d023a3aea5
Started to develop symmetry by constraints + dynamics with contacts
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -2,6 +2,8 @@ import enum\nfrom casadi import vertcat\n+from .dynamics import Dynamics\n+\nclass Constraint:\n@staticmethod\n@@ -11,7 +13,11 @@ class Constraint:\n\"\"\"\nMARKE...
Python
MIT License
pyomeca/bioptim
Started to develop symmetry by constraints + dynamics with contacts
538,857
13.04.2020 16:27:29
14,400
85d8fc68d0dbeaa5f15233f78f9fbccd4407ce37
Error handling in constraints on controls at the last node
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -71,11 +71,17 @@ class Constraint:\nelif elem[0] == Constraint.Type.PROPORTIONAL_Q:\nConstraint.__proportional_variable(ocp, nlp, x, elem[2])\nelif elem[0] == Constraint.Type....
Python
MIT License
pyomeca/bioptim
Error handling in constraints on controls at the last node
538,851
13.04.2020 18:02:59
14,400
82de0346eb032b4f5a0cd4dcfd787e06e553b19e
Adds "expected number" in error
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/path_conditions.py", "new_path": "biorbd_optim/path_conditions.py", "diff": "@@ -14,7 +14,7 @@ class PathCondition:\n@staticmethod\ndef regulation_private(var, nb_elements, type):\nif len(var) != nb_elements:\n- raise RuntimeError(f\"Invalid numbe...
Python
MIT License
pyomeca/bioptim
Adds "expected number" in error
538,851
13.04.2020 19:18:10
14,400
561d91f3f8ccbbcdd3e174a8855e2fa5fa1e0b35
Remove Gravity and adds marker
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/arm26.bioMod", "new_path": "examples/muscle_driven_ocp/arm26.bioMod", "diff": "version 3\n+//gravity 0 -3.81 0\n// SEGMENT DEFINITION\n@@ -16,14 +17,18 @@ version 3\n0.0 0.0 0.0\n0.0 0.0 0.0\ncom 0 0 0\n- //meshfile ground_ribs.vtp\n...
Python
MIT License
pyomeca/bioptim
Remove Gravity and adds marker
538,851
13.04.2020 19:21:10
14,400
8011f5b7d8ede4025fb1b17f3a46d09f09d50182
New constraints on bounds and save in npy.
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/static_arm.py", "new_path": "examples/muscle_driven_ocp/static_arm.py", "diff": "@@ -6,6 +6,7 @@ import biorbd_optim\nfrom biorbd_optim.objective_functions import ObjectiveFunction\nfrom biorbd_optim.constraints import Constraint\nfr...
Python
MIT License
pyomeca/bioptim
New constraints on bounds and save in npy.
538,851
13.04.2020 19:32:08
14,400
778c012484e6ccd592f24365db1a00e9fae609da
New problem.
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/static_arm.py", "new_path": "examples/muscle_driven_ocp/static_arm.py", "diff": "@@ -56,11 +56,11 @@ def prepare_nlp(biorbd_model_path=\"arm26.bioMod\", show_online_optim=False):\nX_bounds.first_node_max[1] = 1.4\nX_bounds.last_node_...
Python
MIT License
pyomeca/bioptim
New problem.
538,857
13.04.2020 20:10:25
14,400
3bea8314ec42c25d92e06136d9fe4cac81b05010
__proportionnal_variable works also with simple tuple for policy
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -104,6 +104,21 @@ class Constraint:\n@staticmethod\ndef __proportional_variable(ocp, nlp, V, policy):\n+ \"\"\"\n+ Adds proportionality constraint between the elements (states...
Python
MIT License
pyomeca/bioptim
__proportionnal_variable works also with simple tuple for policy
538,857
13.04.2020 20:14:34
14,400
26959691ce719701d8c259f3f910788a7d81eb3e
__dispatch_data added to reduce repeated obtaining of q, q_dot and tau
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -3,6 +3,21 @@ import biorbd\nclass Dynamics:\n+\n+ @staticmethod\n+ def __dispatch_data(states, controls, nlp):\n+ \"\"\"\n+ Returns q, qdot, tau (unreduced by a potential symmetry)...
Python
MIT License
pyomeca/bioptim
__dispatch_data added to reduce repeated obtaining of q, q_dot and tau
538,857
14.04.2020 00:00:26
14,400
78c555d6c01dd1b24785c8bcf680ede433f516d4
foward_dynamics_torque driven_with_contact added
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -33,6 +33,21 @@ class Dynamics:\nreturn vertcat(qdot_reduced, qddot_reduced)\n+ @staticmethod\n+ def forward_dynamics_torque_driven_with_contact(states, controls, nlp):\n+ \"\"\"\n+...
Python
MIT License
pyomeca/bioptim
foward_dynamics_torque driven_with_contact added
538,857
14.04.2020 00:08:48
14,400
0996260c867c658bc8bf69a02021ebffb0bcb549
Differentiation between contact and contactless dynamics in some files
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -19,11 +19,11 @@ class Dynamics:\nreturn q, qdot, qdot_reduced, tau\n@staticmethod\n- def forward_dynamics_torque_driven(states, controls, nlp):\n+ def forward_dynamics_torque_drive...
Python
MIT License
pyomeca/bioptim
Differentiation between contact and contactless dynamics in some files
538,857
14.04.2020 00:10:39
14,400
1957507319f96f442302dff4aa37414991ae398c
[WIP] First constraint on contact forces ("GREATER_THAN")
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "@@ -62,10 +62,10 @@ def prepare_ocp(\n((3, 5, -1), (4, 6, 1), (7, 10, 1), (8, 11, 1), (9, 12, 1))),\n(Constraint.Type.CONTACT_FORCE_GREATER_THAN,\nConstraint.Instan...
Python
MIT License
pyomeca/bioptim
[WIP] First constraint on contact forces ("GREATER_THAN")
538,851
14.04.2020 09:30:12
14,400
dc56e7d02557ee44108dcb924e1220d9ce1bc8b6
Adds "expected number" in error v2.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/path_conditions.py", "new_path": "biorbd_optim/path_conditions.py", "diff": "@@ -17,7 +17,7 @@ class PathCondition:\nraise RuntimeError(\nf\"Invalid number of {type} (\"\n+ str(len(var))\n- + \"), the expected number as well \"\n+ + \"), the expec...
Python
MIT License
pyomeca/bioptim
Adds "expected number" in error v2.
538,851
14.04.2020 11:41:19
14,400
eaeac975b0ed3f85c37dc72ac5a2727296ed266b
Plot muscle activation.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -28,16 +28,17 @@ class PlotOcp:\n)\nself.ns += nlp[\"ns\"] + 1\n- if self.problem_type == ProblemType.torque_driven:\n+ #self.axes = []\n+ if self.problem_type == ProblemType.torque_driven\...
Python
MIT License
pyomeca/bioptim
Plot muscle activation.
538,857
14.04.2020 12:35:24
14,400
2ba5235db69605929d8b674aff3b53097d8a967f
Change in commentary
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -58,7 +58,7 @@ class Constraint:\nu = nlp[\"U\"][1 : nlp[\"ns\"] - 1]\nelif elem[1] == Constraint.Instant.END:\nx = [nlp[\"X\"][nlp[\"ns\"]]]\n- u = [] # doesn't make sense at...
Python
MIT License
pyomeca/bioptim
Change in commentary
538,857
14.04.2020 17:52:22
14,400
9d2a7f323e69fd5cade55db029abbc071b355389
Code condensed + lists testing + can raises error about policy type
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -110,22 +110,22 @@ class Constraint:\nAdds proportionality constraint between the elements (states or controls) chosen.\n:param nlp: An instance of the OptimalControlProgram c...
Python
MIT License
pyomeca/bioptim
Code condensed + lists testing + can raises error about policy type
538,857
14.04.2020 17:58:41
14,400
227b3e33d5c331fbd4c4051d27e2bbab04a36e5e
__dispatch_data moved to the end of the Dynamics class
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -3,20 +3,6 @@ import biorbd\nclass Dynamics:\n- @staticmethod\n- def __dispatch_data(states, controls, nlp):\n- \"\"\"\n- Returns q, qdot, tau (unreduced by a potential symmetry) an...
Python
MIT License
pyomeca/bioptim
__dispatch_data moved to the end of the Dynamics class
538,857
14.04.2020 18:14:14
14,400
65ec1d0db84d583a7724e1b31b5b2eaa3fd7c10f
"no_contact" removed from torque_driven
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -4,7 +4,7 @@ import biorbd\nclass Dynamics:\n@staticmethod\n- def forward_dynamics_torque_driven_no_contact(states, controls, nlp):\n+ def forward_dynamics_torque_driven(states, con...
Python
MIT License
pyomeca/bioptim
"no_contact" removed from torque_driven
538,851
14.04.2020 19:41:13
14,400
b5c92f7be364123958c75d2b2612ecf6b6a73f02
Adds a muscle windows.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -28,7 +28,7 @@ class PlotOcp:\n)\nself.ns += nlp[\"ns\"] + 1\n- #self.axes = []\n+ self.axes = []\nif self.problem_type == ProblemType.torque_driven\\\nor self.problem_type == ProblemType.m...
Python
MIT License
pyomeca/bioptim
Adds a muscle windows.
538,851
14.04.2020 19:43:08
14,400
f4d52635e46b8f5af5f2b71c65f90f68eddca5fc
Adds update data for muscles
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -113,12 +113,12 @@ class PlotOcp:\nself.__update_ydata(q_dot, nlp[\"nbQdot\"], i)\nself.__update_ydata(tau, nlp[\"nbTau\"], i)\n- # elif self.problem_type == ProblemType.muscles_and_torque_...
Python
MIT License
pyomeca/bioptim
Adds update data for muscles
538,851
14.04.2020 19:44:36
14,400
5ec8b9b1bac9730000c11c9150bada613894b225
Update all figures of axes.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -127,24 +127,25 @@ class PlotOcp:\nself.ydata[phase_idx].append(array[i, :])\ndef __update_axes(self):\n- for i in range(len(self.ydata[0])):\n+ for figure in self.axes:\n+ for i, ax in enu...
Python
MIT License
pyomeca/bioptim
Update all figures of axes.
538,851
14.04.2020 19:44:58
14,400
05ef8f528061f22b226476966f78e9a9539ca4d0
Adds plot of muscles.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -201,8 +201,9 @@ class AnimateCallback(Callback):\ndef __call__(self, pipe):\nself.pipe = pipe\nself.plot = PlotOcp(self.ocp)\n-\n- timer = self.plot.fig_state.canvas.new_timer(interval=100...
Python
MIT License
pyomeca/bioptim
Adds plot of muscles.
538,851
14.04.2020 19:49:51
14,400
3a37eb981e2bbe53ffed3ce6d039a550a2d987b3
Renames marker and adds gravity.
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/arm26.bioMod", "new_path": "examples/muscle_driven_ocp/arm26.bioMod", "diff": "version 3\n-//gravity 0 -3.81 0\n+gravity 0 -9.81 0\n// SEGMENT DEFINITION\n@@ -21,7 +21,7 @@ version 3\nendsegment\n// Markers\n- marker objectif\n+ mark...
Python
MIT License
pyomeca/bioptim
Renames marker and adds gravity.
538,858
15.04.2020 08:05:04
14,400
741c22fbd24503598a5c3d47368a2da8f3efaa76
Added sandbox folder
[ { "change_type": "ADD", "old_path": null, "new_path": "sandbox/torque_driven_ocp/eocar.py", "diff": "+import biorbd\n+import numpy as np\n+\n+from biorbd_optim import OptimalControlProgram\n+from biorbd_optim.plot import PlotOcp\n+from biorbd_optim.problem_type import ProblemType\n+from biorbd_optim...
Python
MIT License
pyomeca/bioptim
Added sandbox folder
538,851
15.04.2020 09:28:15
14,400
ee1f72e2a00ec70d045114d89e25d864b5921743
Adapts problem to plot results
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/static_arm.py", "new_path": "examples/muscle_driven_ocp/static_arm.py", "diff": "@@ -25,10 +25,10 @@ def prepare_nlp(biorbd_model_path=\"arm26.bioMod\", show_online_optim=False):\nobjective_functions = (\n#(ObjectiveFunction.minimize...
Python
MIT License
pyomeca/bioptim
Adapts problem to plot results
538,851
15.04.2020 09:28:58
14,400
ee9c86c6201af1c20ef3cd79825767159f12770d
Fix double plots.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -38,12 +38,13 @@ class PlotOcp:\n)\nnlp = self.ocp.nlp[0]\nself.fig_q_qdot_tau = plt.figure(\"Q, Qdot, Tau\", figsize=(10, 6))\n- self.axes.append(self.fig_q_qdot_tau.subplots(3, nlp[\"nbQ\...
Python
MIT License
pyomeca/bioptim
Fix double plots.
538,857
15.04.2020 16:15:40
14,400
1143d05d17b273f4efd0e9c3cb2d6fd132d59e9e
Number of contacts adapted + use of PlotOcp added
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -144,9 +144,8 @@ class Constraint:\nfor i in range(len(U)):\ncontact_forces = CS_func(X[i], U[i])\n- contact_forces = contact_forces[\n- :6\n- ] # To be changed: it must be re...
Python
MIT License
pyomeca/bioptim
Number of contacts adapted + use of PlotOcp added
538,851
15.04.2020 19:53:45
14,400
f481d79e19ea6644e67dee101639ac82f7dbdfb8
Fix to dico call.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -52,7 +52,7 @@ class Constraint:\nx = [nlp[\"X\"][0]]\nu = [nlp[\"U\"][0]]\nelif elem[1] == Constraint.Instant.MID:\n- if nlp.ns % 2 == 0:\n+ if nlp[\"ns\"] % 2 == 0:\nraise (...
Python
MIT License
pyomeca/bioptim
Fix to dico call.
538,851
15.04.2020 19:54:17
14,400
15c6a78cdddf55eed5499d63fdb14ce06319fb6d
Try of configuration.
[ { "change_type": "MODIFY", "old_path": "examples/muscle_driven_ocp/static_arm.py", "new_path": "examples/muscle_driven_ocp/static_arm.py", "diff": "@@ -11,7 +11,7 @@ def prepare_nlp(biorbd_model_path=\"arm26.bioMod\", show_online_optim=False):\n# --- Options --- #\n# Model path\nbiorbd_model = biorb...
Python
MIT License
pyomeca/bioptim
Try of configuration.
538,857
16.04.2020 16:49:44
14,400
49212d4ed9c1ed9ab8f7488e96fc61dfd5d61297
Different mappings for q, qdot and tau added in __init and jumper
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -43,7 +43,10 @@ class OptimalControlProgram:\nU_bounds,\nconstraints,\node_solver=OdeSolver.RK,\n- dof_mapping=None,\n+ all_generalized_mapping=None,\n+ q_mapping=None,\n+ q_dot_map...
Python
MIT License
pyomeca/bioptim
Different mappings for q, qdot and tau added in __init and jumper
538,857
16.04.2020 16:52:09
14,400
ef6e2e96156636d1042ff1ff170334f8f3e9f0b9
BiorbdOptim files adapted to work with multiple mapping (q, qdot, tau)
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -91,9 +91,9 @@ class Constraint:\n:param X: List of instant(s).\n:param policy: Tuple of indices of two markers.\n\"\"\"\n- nq = nlp[\"dof_mapping\"].nb_reduced\n+ nq = nlp[\"...
Python
MIT License
pyomeca/bioptim
BiorbdOptim files adapted to work with multiple mapping (q, qdot, tau)
538,857
16.04.2020 16:53:21
14,400
b2a56060e4164ed25f17e98beafddb3a52919ed5
Jumper adapted to work with different mapping for q, qdot and tau
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "@@ -24,12 +24,6 @@ def prepare_ocp(\nnumber_shooting_points = [20, 20]\nphase_time = [0.5, 0.5]\n- # x = zeros(13)\n- # # idx1 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n...
Python
MIT License
pyomeca/bioptim
Jumper adapted to work with different mapping for q, qdot and tau
538,851
16.04.2020 18:48:54
14,400
084618f6902af7bcf4475ba3831297ead97a7a53
Adds align_with_custom_rt constraint.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "import enum\n+import biorbd\n+import numpy as np\nfrom casadi import vertcat, MX, Function\n@@ -16,9 +18,10 @@ class Constraint:\n\"\"\"\nMARKERS_TO_PAIR = 0\n- PROPORTIONAL_Q = ...
Python
MIT License
pyomeca/bioptim
Adds align_with_custom_rt constraint.
538,857
17.04.2020 10:53:46
14,400
3dab432da3be4ed7e17cf6eaf712e47e09a6c962
More consistent constraints and bounds in the jumper example
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "@@ -36,7 +36,8 @@ def prepare_ocp(\n# Add objective functions\nobjective_functions = (\n- ((ObjectiveFunction.minimize_torque, {\"weight\": 1}), (ObjectiveFunction....
Python
MIT License
pyomeca/bioptim
More consistent constraints and bounds in the jumper example
538,857
17.04.2020 10:54:54
14,400
a498684f4644acd97fb09436f7e6c9e17cdfae7d
Jumper bioMod corrected (confusion between right and left feet)
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper1contacts.bioMod", "new_path": "examples/jumper/jumper1contacts.bioMod", "diff": "@@ -530,7 +530,7 @@ external_forces 0\nendmarker\n// Contact\n- contact PiedG_1\n+ contact PiedD_1\nparent PiedD\nposition -0.00465 0.15809 0.00611\naxis yz...
Python
MIT License
pyomeca/bioptim
Jumper bioMod corrected (confusion between right and left feet)
538,857
17.04.2020 10:57:17
14,400
02fc19ffd4f154a749543d2f1da0f7c8f668622a
plot.py adapted to work with different values of nbQ, nbQdot et nbTau
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -35,15 +35,15 @@ class PlotOcp:\nif self.ocp.nlp[0][\"nbQ\"] != self.ocp.nlp[i][\"nbQ\"]:\nraise RuntimeError(\"Graphs with nbQ different at each phase is not implemented yet\")\nnlp = self...
Python
MIT License
pyomeca/bioptim
plot.py adapted to work with different values of nbQ, nbQdot et nbTau
538,851
17.04.2020 12:05:57
14,400
b58ed330aed3077dd2b1c15541913b432f4ffa0c
Add transpose for rotation in align with custom rt
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -119,11 +119,11 @@ class Constraint:\nnq = nlp[\"dof_mapping\"].nb_reduced\nfor x in X:\nq = nlp[\"dof_mapping\"].expand(x[:nq])\n- r_seg = np.array(nlp[\"model\"].globalJCS(q...
Python
MIT License
pyomeca/bioptim
Add transpose for rotation in align with custom rt
538,851
17.04.2020 20:45:18
14,400
c34a9614cfb5ba8cae8d19015b56301025f842b5
Organise plots area.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "import multiprocessing as mp\n+import numpy as np\n+import tkinter\nfrom matplotlib import pyplot as plt\nfrom casadi import Callback, nlpsol_out, nlpsol_n_out, Sparsity\n@@ -6,9 +8,15 @@ impo...
Python
MIT License
pyomeca/bioptim
Organise plots area.
538,851
17.04.2020 20:46:24
14,400
97db3f35071d34fa7269c50d79295a3843bdfbb0
Adds Class to show results
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -4,7 +4,6 @@ import tkinter\nfrom matplotlib import pyplot as plt\nfrom casadi import Callback, nlpsol_out, nlpsol_n_out, Sparsity\n-import numpy as np\nfrom .problem_type import ProblemTyp...
Python
MIT License
pyomeca/bioptim
Adds Class to show results
538,851
17.04.2020 20:57:02
14,400
3bc5de709ecff3131ac15369fc58fa0f906bd26c
New way to plot and use biorbd-viz in all examples
[ { "change_type": "MODIFY", "old_path": "examples/multiphase_torque_driven_ocp/eocar.py", "new_path": "examples/multiphase_torque_driven_ocp/eocar.py", "diff": "-import time\n+from biorbd_optim.plot import ShowResult\nimport biorbd\nfrom biorbd_optim import OptimalControlProgram\n-from biorbd_optim.p...
Python
MIT License
pyomeca/bioptim
New way to plot and use biorbd-viz in all examples
538,859
18.04.2020 12:41:36
-7,200
38c8ea9ae92e05dfc4ca4e46846ef7b357c6b3b6
Added how to install in ReadMe file
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "# BiorbdOptim\nAn optimization framework that links CasADi, ipopt and biorbd for Optimal Control Problem\n+\n+# How to install\n+The way to install BiorbdOptim on your computer is to installing from the sources.\n+...
Python
MIT License
pyomeca/bioptim
Added how to install in ReadMe file
538,857
19.04.2020 17:45:34
14,400
7cc7b33a69d27233e1678125451608cacf9467f0
[WIP] maximize_height_jump objective function added
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -95,6 +95,23 @@ class ObjectiveFunction:\nocp.J += casadi.dot(marker0 - marker1, marker0 - marker1) * nlp[\"dt\"] * nlp[\"dt\"] * weight\n+ @staticmethod\n+ de...
Python
MIT License
pyomeca/bioptim
[WIP] maximize_height_jump objective function added
538,851
20.04.2020 11:19:17
14,400
f3cb3f7084f21341ce2b319f9268467150e0e572
Fix dof_ in q_mapping
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -116,9 +116,9 @@ class Constraint:\n:param X: List of instant(s).\n:param policy: Tuple of indices of segment and rt.\n\"\"\"\n- nq = nlp[\"dof_mapping\"].nb_reduced\n+ nq = n...
Python
MIT License
pyomeca/bioptim
Fix dof_ in q_mapping
538,851
20.04.2020 11:20:10
14,400
e4abc86c34951397d2dc6fbf070854fa49ee1a27
Concatenate q phases for biorbdviz if it's possible.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -161,15 +161,22 @@ class ShowResult:\nself.sol = sol\ndef show_biorbd_viz(self, show_meshes=True):\n- if self.ocp.nlp[0][\"problem_type\"] == ProblemType.torque_driven:\n- x, _, _ = Problem...
Python
MIT License
pyomeca/bioptim
Concatenate q phases for biorbdviz if it's possible.
538,851
20.04.2020 11:20:41
14,400
47b8f9dd589e295b3618a644838fe52c3e7ff7fe
New way to get q without question of problem type !
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -156,3 +156,15 @@ class ProblemType:\nreturn q, q_dot, tau, muscle\nelse:\nreturn q, q_dot, tau\n+\n+ @staticmethod\n+ def get_q_from_V(ocp, V, num_phase=None):\n+ if ocp.nl...
Python
MIT License
pyomeca/bioptim
New way to get q without question of problem type !
538,850
20.04.2020 12:35:31
14,400
03cef557a9dbd2135ddfadc0714f44668049a738
Modification of 'problem_type' file, 'muscle_and_torque_driven' function. There were two dynamics formulations inside, and it needs only just one, with torque and muscle driven. Delete so the first one : torque driven dynamic
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -68,8 +68,8 @@ class ProblemType:\nWorks with torques and muscles.\n:param nlp: An OptimalControlProgram class.\n\"\"\"\n- ProblemType.torque_driven(nlp)\nnlp[\"dynamics_fun...
Python
MIT License
pyomeca/bioptim
Modification of 'problem_type' file, 'muscle_and_torque_driven' function. There were two dynamics formulations inside, and it needs only just one, with torque and muscle driven. Delete so the first one : torque driven dynamic
538,858
20.04.2020 12:53:44
14,400
efcc38fa62ecf78d8b61926ed51aec5bdd9e2978
Auto stash before merge of "master" and "pyomeca/master"
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -10,10 +10,14 @@ class ObjectiveFunction:\nfor i in range(nlp[\"ns\"] + 1):\nocp.J += (\n+<<<<<<< Updated upstream\ncasadi.dot(\nnlp[\"X\"][i][states_idx] - da...
Python
MIT License
pyomeca/bioptim
Auto stash before merge of "master" and "pyomeca/master"
538,851
20.04.2020 17:41:27
14,400
31df2d464abe424dc7df0f2eebad81c4521b3c12
Adds cyclic objective function.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -81,9 +81,15 @@ class ObjectiveFunction:\ndef minimize_all_controls(ocp, nlp, weight=1):\nraise RuntimeError(\"cyclic objective function not implemented yet\")...
Python
MIT License
pyomeca/bioptim
Adds cyclic objective function.
538,851
20.04.2020 17:48:13
14,400
184bced2eecd3bfd7086fe3b63fe2738fcf1563f
Eocar adds cyclic constraint
[ { "change_type": "MODIFY", "old_path": "examples/multiphase_torque_driven_ocp/eocar.py", "new_path": "examples/multiphase_torque_driven_ocp/eocar.py", "diff": "@@ -22,8 +22,10 @@ def prepare_ocp(biorbd_model_path=\"eocar.bioMod\", show_online_optim=True):\n# Add objective functions\nobjective_functi...
Python
MIT License
pyomeca/bioptim
Eocar adds cyclic constraint
538,857
20.04.2020 18:11:14
14,400
3e7f7f114bc2313c465daf2ecf6482482a3f468e
maximize_predicted_height_jump & minimize_all_controls added
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -79,34 +79,38 @@ class ObjectiveFunction:\n@staticmethod\ndef minimize_all_controls(ocp, nlp, weight=1):\n- raise RuntimeError(\"cyclic objective function not ...
Python
MIT License
pyomeca/bioptim
maximize_predicted_height_jump & minimize_all_controls added
538,857
20.04.2020 18:12:07
14,400
6c616b02088c04199806b1c2d960b729e529c961
Simplification of a single line in path_conditions.py
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/path_conditions.py", "new_path": "biorbd_optim/path_conditions.py", "diff": "@@ -15,7 +15,7 @@ class PathCondition:\ndef regulation_private(var, nb_elements, type):\nif len(var) != nb_elements:\nraise RuntimeError(\n- f\"Invalid number of {type} (...
Python
MIT License
pyomeca/bioptim
Simplification of a single line in path_conditions.py
538,857
20.04.2020 18:45:49
14,400
7acc17e7c0c749fda45677fb715a21c72bfa0f56
Minors corrections
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -40,7 +40,7 @@ class ProblemType:\nnlp[\"q_mapping\"] = Mapping(range(nlp[\"model\"].nbQ()), range(nlp[\"model\"].nbQ()))\nif nlp[\"q_dot_mapping\"] is None:\nnlp[\"q_dot_ma...
Python
MIT License
pyomeca/bioptim
Minors corrections
538,857
20.04.2020 18:46:35
14,400
71b391cef602cc08e26d43e949149c1c9174ac2c
Jumper example adapted for a more coherent simulation
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "+import numpy as np\n+from matplotlib import pyplot as plt\nimport biorbd\nfrom biorbd_optim import OptimalControlProgram\n@@ -21,13 +23,13 @@ def prepare_ocp(\ntor...
Python
MIT License
pyomeca/bioptim
Jumper example adapted for a more coherent simulation
538,858
21.04.2020 10:26:22
14,400
870d5513664a367b45a39ddfc6aa508557caa7a4
New folder in examples
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -10,14 +10,10 @@ class ObjectiveFunction:\nfor i in range(nlp[\"ns\"] + 1):\nocp.J += (\n-<<<<<<< Updated upstream\ncasadi.dot(\nnlp[\"X\"][i][states_idx] - da...
Python
MIT License
pyomeca/bioptim
New folder in examples
538,857
21.04.2020 16:20:30
14,400
cfe355e41cfb57fb3ee25b110b7a9b6c74009214
[WIP] Plot of contact forces added but need to be moved in plot.py
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "@@ -23,8 +23,8 @@ def prepare_ocp(\ntorque_min, torque_max, torque_init = -1000, 1000, 0\n# Problem parameters\n- number_shooting_points = [8, 8]\n- phase_time = [0...
Python
MIT License
pyomeca/bioptim
[WIP] Plot of contact forces added but need to be moved in plot.py
538,857
21.04.2020 18:31:15
14,400
36c0d3c320f07bd870810a0a95cba32bcd8325eb
all_generalized_mapping in init and bound max of contact_forces fixed
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -92,7 +92,7 @@ class OptimalControlProgram:\nif all_generalized_mapping is not None:\nif q_mapping is not None or q_dot_mapping is not None or tau_mapping is not None:\nraise Runtim...
Python
MIT License
pyomeca/bioptim
all_generalized_mapping in init and bound max of contact_forces fixed
538,857
21.04.2020 18:38:42
14,400
c79902a2d74faca19c0aca82c38e635fb59263f7
Examples made compatible with recent changes in mapping
[ { "change_type": "MODIFY", "old_path": "examples/jumper/jumper2contacts.py", "new_path": "examples/jumper/jumper2contacts.py", "diff": "import numpy as np\n-from matplotlib import pyplot as plt\nimport biorbd\nfrom biorbd_optim import OptimalControlProgram\n@@ -23,7 +22,7 @@ def prepare_ocp(\ntorque...
Python
MIT License
pyomeca/bioptim
Examples made compatible with recent changes in mapping
538,857
21.04.2020 18:39:30
14,400
0728ecabeea993aa1d321c1ff31e9e10fa933566
[WIP] emg tracking example made compatible with new mapping
[ { "change_type": "MODIFY", "old_path": "examples/emg_and_marker_tracking/emg_tracker.py", "new_path": "examples/emg_and_marker_tracking/emg_tracker.py", "diff": "@@ -29,7 +29,9 @@ def generate_data(biorbd_model, final_time, nb_shooting):\n\"model\": biorbd_model,\n\"nbTau\": nb_tau,\n\"nbMuscle\": n...
Python
MIT License
pyomeca/bioptim
[WIP] emg tracking example made compatible with new mapping
538,851
21.04.2020 21:16:26
14,400
c4f143137e27b465dd6a0bf03fe70261580cad18
Adds dict in constraints and objective functions.
[ { "change_type": "MODIFY", "old_path": "examples/multiphase_torque_driven_ocp/eocar.py", "new_path": "examples/multiphase_torque_driven_ocp/eocar.py", "diff": "-from biorbd_optim.plot import ShowResult\n-\nimport biorbd\nfrom biorbd_optim import OptimalControlProgram\n@@ -22,10 +20,14 @@ def prepare...
Python
MIT License
pyomeca/bioptim
Adds dict in constraints and objective functions.
538,851
21.04.2020 21:17:14
14,400
56ddcc137443226cfe80375e7d0dd2ae3c900076
Adds dict : need to adapt proportionnal_q
[ { "change_type": "MODIFY", "old_path": "examples/symmetrical_torque_driven_ocp/eocarSymByConstraint.py", "new_path": "examples/symmetrical_torque_driven_ocp/eocarSymByConstraint.py", "diff": "@@ -20,16 +20,26 @@ def prepare_ocp(biorbd_model_path=\"eocarSym.bioMod\", show_online_optim=False):\ntorque...
Python
MIT License
pyomeca/bioptim
Adds dict : need to adapt proportionnal_q
538,851
21.04.2020 21:20:42
14,400
ada466552727351c7b75bda360c2959e252adc79
Adds dict and adds a regulator of constraints and objective_functions
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -5,6 +5,7 @@ import casadi\nfrom casadi import MX, vertcat\nfrom .constraints import Constraint\n+from .objective_functions import ObjectiveFunction\nfrom .problem_type import Probl...
Python
MIT License
pyomeca/bioptim
Adds dict and adds a regulator of constraints and objective_functions
538,851
21.04.2020 21:22:17
14,400
f90224d95fc8c2bbd16af1760fd4365fed45f164
Adds dict in add_constraints and multiple instant.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -2,7 +2,7 @@ import enum\nimport biorbd\nimport numpy as np\n-from casadi import vertcat, MX, Function\n+from casadi import vertcat, horzcat, MX, Function, horzsplit\nfrom .dy...
Python
MIT License
pyomeca/bioptim
Adds dict in add_constraints and multiple instant.
538,851
21.04.2020 21:23:18
14,400
c0eab5957c636c1525024230c335f04d6bb7ad30
Adds dict into parameters of static methods.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -121,7 +121,7 @@ class Constraint:\nreturn x, u, last_node\n@staticmethod\n- def __markers_to_pair(ocp, nlp, X, policy):\n+ def __markers_to_pair(ocp, nlp, X, first_marker, se...
Python
MIT License
pyomeca/bioptim
Adds dict into parameters of static methods.
538,851
21.04.2020 21:24:27
14,400
435a4502096d9bb17e7e2a2df1b9bfe52c0b08d1
Scroll X or U with horzsplit.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -129,7 +129,7 @@ class Constraint:\n:param policy: Tuple of indices of two markers.\n\"\"\"\nnq = nlp[\"q_mapping\"].nb_reduced\n- for x in X:\n+ for x in horzsplit(X, 1):\nq ...
Python
MIT License
pyomeca/bioptim
Scroll X or U with horzsplit.
538,851
21.04.2020 21:24:54
14,400
3f6fbb2b6911d32f68aa76ffad9d429624477392
Adds test to check parameters are valids.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -128,6 +128,8 @@ class Constraint:\n:param X: List of instant(s).\n:param policy: Tuple of indices of two markers.\n\"\"\"\n+ Correct.parameters(\"marker\", [first_marker, sec...
Python
MIT License
pyomeca/bioptim
Adds test to check parameters are valids.
538,851
21.04.2020 21:25:31
14,400
f3a0ac72675ef4ee601350a7a6f570d4aad28cd1
Create add_objective_functions.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -3,6 +3,15 @@ import numpy as np\nclass ObjectiveFunction:\n+ @staticmethod\n+ def add_objective_functions(ocp, nlp):\n+ for objective_function in nlp[\"object...
Python
MIT License
pyomeca/bioptim
Create add_objective_functions.
538,851
21.04.2020 21:26:31
14,400
847c3d1a53d2e2ed188c956793a431590860a423
Uses dict to call some objective functions.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -96,16 +96,17 @@ class ObjectiveFunction:\nif ocp.nlp[0][\"nx\"] != ocp.nlp[-1][\"nx\"]:\nraise RuntimeError(\"Cyclic constraint without same nx is not support...
Python
MIT License
pyomeca/bioptim
Uses dict to call some objective functions.
538,857
22.04.2020 11:09:54
14,400
9a277f29906c9805aa0adf2c03ddd4cc097acb16
Bidirectional mapping added
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -9,6 +9,7 @@ from .problem_type import ProblemType\nfrom .plot import AnimateCallback\nfrom .path_conditions import Bounds, InitialConditions\nfrom .dynamics import Dynamics\n+from ...
Python
MIT License
pyomeca/bioptim
Bidirectional mapping added
538,857
22.04.2020 12:02:44
14,400
92f679f161da02ec898cb624c0cde62e204c800e
greater and lesser than
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -91,7 +91,7 @@ class Constraint:\nelif elem[0] == Constraint.Type.CONTACT_FORCE_GREATER_THAN:\nif elem[1] == Constraint.Instant.END:\nraise RuntimeError(\"Instant.END is used ...
Python
MIT License
pyomeca/bioptim
greater and lesser than
538,851
22.04.2020 12:06:27
14,400
e2b366a20ba0928a8c0db5f2452c69ce50478b34
Rename markers_to_ pair in to_match.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/constraints.py", "new_path": "biorbd_optim/constraints.py", "diff": "@@ -17,7 +17,7 @@ class Constraint:\nDifferent conditions between biorbd geometric structures.\n\"\"\"\n- MARKERS_TO_PAIR = 0\n+ MARKERS_TO_MATCH = 0\nALIGN_WITH_CUSTOM_RT = 1\nP...
Python
MIT License
pyomeca/bioptim
Rename markers_to_ pair in to_match.
538,851
22.04.2020 12:07:30
14,400
e9ff72c8111e3665e1b605c315f675799c166db0
Use f"{...} in all raise RuntimeError.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/__init__.py", "new_path": "biorbd_optim/__init__.py", "diff": "@@ -176,13 +176,7 @@ class OptimalControlProgram:\nif isinstance(param, (list, tuple)):\nif len(param) != self.nb_phases:\nraise RuntimeError(\n- param_name\n- + \" size(\"\n- + str(le...
Python
MIT License
pyomeca/bioptim
Use f"{...} in all raise RuntimeError.
538,851
22.04.2020 12:09:27
14,400
2d27f3baa5ead5b0666cd3b78d23471808394464
Fix double nodes problem in concatenate.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -178,7 +178,7 @@ class ShowResult:\nif same_dof:\nx_concat = x[0]\nfor i in range(1, self.ocp.nb_phases):\n- x_concat = np.concatenate((x_concat, x[i]), axis=1)\n+ x_concat = np.concatenate...
Python
MIT License
pyomeca/bioptim
Fix double nodes problem in concatenate.
538,851
22.04.2020 12:10:09
14,400
361dd2ec6564e37982082e2bee6070ffcaae0d3e
Adds interpolation for biorbd_viz.
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/plot.py", "new_path": "biorbd_optim/plot.py", "diff": "@@ -2,6 +2,7 @@ import multiprocessing as mp\nimport numpy as np\nimport tkinter\n+from scipy import interpolate\nfrom matplotlib import pyplot as plt\nfrom casadi import Callback, nlpsol_out,...
Python
MIT License
pyomeca/bioptim
Adds interpolation for biorbd_viz.
538,851
22.04.2020 12:11:12
14,400
831013077fdf20f2467a8d81ced858192668e2d5
Rename markers_to_pair in to_match
[ { "change_type": "MODIFY", "old_path": "examples/multiphase_torque_driven_ocp/eocar.py", "new_path": "examples/multiphase_torque_driven_ocp/eocar.py", "diff": "@@ -37,13 +37,13 @@ def prepare_ocp(biorbd_model_path=\"eocar.bioMod\", show_online_optim=True):\nconstraints = (\n(\n{\n- \"type\": Constra...
Python
MIT License
pyomeca/bioptim
Rename markers_to_pair in to_match
538,851
22.04.2020 12:11:39
14,400
d329f06470b34b11e391324f1ca72e23bff10ad1
Fix objective_function calls.
[ { "change_type": "MODIFY", "old_path": "examples/multiphase_torque_driven_ocp_plot/eocar.py", "new_path": "examples/multiphase_torque_driven_ocp_plot/eocar.py", "diff": "@@ -20,7 +20,7 @@ def prepare_ocp(biorbd_model_path=\"eocar.bioMod\", show_online_optim=True):\n# Add objective functions\nobjecti...
Python
MIT License
pyomeca/bioptim
Fix objective_function calls.
538,850
23.04.2020 11:20:32
14,400
00a8324f9082080aa74685f899cbd9781bc7accc
Move the variable 'nbMuscle' creation and used it in the function (1/2)
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -73,7 +73,7 @@ class ProblemType:\nu = MX()\nmuscle_names = nlp[\"model\"].muscleNames()\n- for i in range(nlp[\"model\"].nbMuscleTotal()):\n+ for i in range(nlp[\"nbMuscle\...
Python
MIT License
pyomeca/bioptim
Move the variable 'nbMuscle' creation and used it in the function (1/2)
538,850
23.04.2020 11:22:18
14,400
9e8a7f50f4b3e03e4d1cf7c02cf05bc515257197
Move the variable 'nbMuscle' creation and used it in the function (2/2)
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -71,6 +71,8 @@ class ProblemType:\nnlp[\"dynamics_func\"] = Dynamics.forward_dynamics_torque_muscle_driven\nProblemType.__configure_torque_driven(nlp)\n+ nlp[\"nbMuscle\"] =...
Python
MIT License
pyomeca/bioptim
Move the variable 'nbMuscle' creation and used it in the function (2/2)
538,850
23.04.2020 11:24:56
14,400
fe3e272e479e6f9481767784179ba5291aa1ec43
[WIP] Creation of 'excitation_driven' function in 'problem_type'. Not tested yet
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -81,8 +81,29 @@ class ProblemType:\nnlp[\"nu\"] = nlp[\"u\"].rows()\n+ @staticmethod\n+ def excitation_driven(nlp):\n+ \"\"\"\n+ Names states (nlp.x) and controls (nlp.u) an...
Python
MIT License
pyomeca/bioptim
[WIP] Creation of 'excitation_driven' function in 'problem_type'. Not tested yet
538,850
23.04.2020 11:29:43
14,400
208050c840d7b9b00231cc445e976bad7458c7bd
[WIP] Creation of 'forward_dynamics_excitation_driven' in 'dynamics'. Not tested yet You can see maybe if I am on the right track ?
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -60,6 +60,32 @@ class Dynamics:\nreturn vertcat(qdot_reduced, qddot_reduced)\n+ @staticmethod\n+ def forward_dynamics_excitation_driven(states, controls, nlp):\n+ q, qdot, qdot_redu...
Python
MIT License
pyomeca/bioptim
[WIP] Creation of 'forward_dynamics_excitation_driven' in 'dynamics'. Not tested yet You can see maybe if I am on the right track ?
538,850
23.04.2020 11:30:22
14,400
e91424b2dd134d781b5144d7428994e161e19de5
[WIP] Star some modification
[ { "change_type": "MODIFY", "old_path": "examples/emg_and_marker_tracking/emg_tracker.py", "new_path": "examples/emg_and_marker_tracking/emg_tracker.py", "diff": "@@ -111,7 +111,7 @@ def prepare_ocp(\nraise RuntimeError(\"Wrong choice of kin_data_to_track\")\n# Dynamics\n- variable_type = ProblemType...
Python
MIT License
pyomeca/bioptim
[WIP] Star some modification
538,865
23.04.2020 11:51:12
14,400
397230f6c6e4d64d36b0efa7f4917d304de8449c
Changed data_to_track indexes in minimize torque
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -61,8 +61,8 @@ class ObjectiveFunction:\nfor i in range(nlp[\"ns\"]):\nocp.J += (\ncasadi.dot(\n- nlp[\"U\"][i][controls_idx] - data_to_track[i, controls_idx],...
Python
MIT License
pyomeca/bioptim
Changed data_to_track indexes in minimize torque
538,865
23.04.2020 11:52:45
14,400
30c3def42ae0a9eb3e0fa9288fccb3ca59c5dc77
Added forward dynamics function for muscles and contact
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/dynamics.py", "new_path": "biorbd_optim/dynamics.py", "diff": "@@ -63,6 +63,25 @@ class Dynamics:\nqddot_reduced = nlp[\"q_dot_mapping\"].reduce.map(qddot)\nreturn vertcat(qdot_reduced, qddot_reduced)\n+ @staticmethod\n+ def forward_dynamics_torqu...
Python
MIT License
pyomeca/bioptim
Added forward dynamics function for muscles and contact
538,865
23.04.2020 11:54:18
14,400
7bd25d429369ac18b98ebcf10861bbfc28c493bd
Added problem type with muscles and contact
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/problem_type.py", "new_path": "biorbd_optim/problem_type.py", "diff": "@@ -90,6 +90,26 @@ class ProblemType:\nnlp[\"nbMuscle\"] = nlp[\"model\"].nbMuscleTotal()\n+ @staticmethod\n+ def muscles_and_torque_driven_with_contact(nlp):\n+ \"\"\"\n+ Name...
Python
MIT License
pyomeca/bioptim
Added problem type with muscles and contact
538,865
23.04.2020 16:21:48
14,400
2457a7093c5b88f7613a6f4b7f458e71ba1e8d15
make the data_to_track big enough when nothing is sent
[ { "change_type": "MODIFY", "old_path": "biorbd_optim/objective_functions.py", "new_path": "biorbd_optim/objective_functions.py", "diff": "@@ -18,7 +18,7 @@ class ObjectiveFunction:\n@staticmethod\ndef minimize_states(ocp, nlp, weight=1, states_idx=(), data_to_track=()):\nstates_idx = ObjectiveFuncti...
Python
MIT License
pyomeca/bioptim
make the data_to_track big enough when nothing is sent