-
Notifications
You must be signed in to change notification settings - Fork 46
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
if we have radau and inverse dynamics constraints in collocation #448
Conversation
Codecov Report
@@ Coverage Diff @@
## CrazyDynamics #448 +/- ##
=================================================
+ Coverage 80.84% 83.86% +3.02%
=================================================
Files 85 86 +1
Lines 9299 9354 +55
=================================================
+ Hits 7518 7845 +327
+ Misses 1781 1509 -272
Continue to review full report at Codecov.
|
related to #421 |
and #385 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work so far!
I couldn't find out why the bimapping in test_symmetry_by_mapping(ode_solver) is not applied on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 11 files at r3, 12 of 12 files at r4, all commit messages.
Reviewable status: 15 of 16 files reviewed, 8 unresolved discussions (waiting on @Ipuch and @pariterre)
bioptim/dynamics/dynamics_functions.py, line 48 at r4 (raw file):
@staticmethod def custom(states: MX.sym, controls: MX.sym, parameters: MX.sym, nlp):
The return should be -> DynamicsEvalution
bioptim/dynamics/dynamics_functions.py, line 102 at r4 (raw file):
fatigue : FatigueList A list of fatigue elements """
Please add back the Returns, but adjust it to the DynamicsEvaluation class
bioptim/dynamics/dynamics_functions.py, line 116 at r4 (raw file):
dxdt[nlp.states["qdot"].index, :] = DynamicsFunctions.get(nlp.controls["qddot"], controls) else:
Remove spacing
bioptim/dynamics/dynamics_functions.py, line 212 at r4 (raw file):
with_contact: bool If the dynamic with contact should be used """
Please add back the Returns, but adjust it to the DynamicsEvaluation class
bioptim/dynamics/dynamics_functions.py, line 248 at r4 (raw file):
with_contact: bool If the dynamic with contact should be used """
Please add back the Returns, but adjust it to the DynamicsEvaluation class
bioptim/dynamics/dynamics_functions.py, line 373 at r4 (raw file):
with_torque: bool If the dynamic should be added with residual torques """
Please add back the Returns, but adjust it to the DynamicsEvaluation class
bioptim/examples/getting_started/custom_dynamics.py, line 76 at r4 (raw file):
# the implicit dynamics f(x,u,p,xdot)=0 as the second argument # which may be useful for IRK or COLLOCATION integrators return DynamicsEvaluation(vertcat(dq, ddq), None)
Maybe add the hints here so lambda user sees what it means (DynamicsEvaluation(dxdt=..., ...=...)
)
bioptim/optimization/non_linear_program.py, line 119 at r4 (raw file):
self.dt = None self.dynamics = [] self.dynamics_sym = DynamicsEvaluation()
dynamics_sym
? Why not dynamics_evalution as it is a DynamicsEvaluation class... Otherwise everyone has to remember that dynamics_sym is not an MX.sym instance, but a DynamicsEvaluation..
@pariterre reviewable, and I think mergeable on CrazyDyanmics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 17 files reviewed, 8 unresolved discussions (waiting on @pariterre)
bioptim/dynamics/dynamics_functions.py
line 71 at r3 (raw file):
Previously, pariterre (Pariterre) wrote…
This should also take into account the dynamics when the user does not provide the implicit version.
I'm not sure to understand what you meant
bioptim/dynamics/dynamics_functions.py
line 569 at r3 (raw file):
Previously, pariterre (Pariterre) wrote…
This is not tested but I feel it should be
this function was not used so deleted
bioptim/dynamics/dynamics_functions.py
line 48 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
The return should be -> DynamicsEvalution
ok
bioptim/dynamics/dynamics_functions.py
line 102 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Please add back the Returns, but adjust it to the DynamicsEvaluation class
done
bioptim/dynamics/dynamics_functions.py
line 116 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Remove spacing
done
bioptim/dynamics/dynamics_functions.py
line 212 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Please add back the Returns, but adjust it to the DynamicsEvaluation class
done
bioptim/dynamics/dynamics_functions.py
line 248 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Please add back the Returns, but adjust it to the DynamicsEvaluation class
done
bioptim/dynamics/dynamics_functions.py
line 373 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Please add back the Returns, but adjust it to the DynamicsEvaluation class
done
bioptim/examples/getting_started/custom_dynamics.py
line 76 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
Maybe add the hints here so lambda user sees what it means (
DynamicsEvaluation(dxdt=..., ...=...)
)
done
bioptim/optimization/non_linear_program.py
line 119 at r4 (raw file):
Previously, pariterre (Pariterre) wrote…
dynamics_sym
? Why not dynamics_evalution as it is a DynamicsEvaluation class... Otherwise everyone has to remember that dynamics_sym is not an MX.sym instance, but a DynamicsEvaluation..
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 11 files at r3, 4 of 4 files at r5, 10 of 12 files at r6, 2 of 2 files at r7, 1 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @Ipuch and @pariterre)
bioptim/dynamics/configure_problem.py
line 160 at r7 (raw file):
ConfigureProblem.configure_qdot(nlp, True, False, True) ConfigureProblem.configure_tau(nlp, False, True, fatigue) ConfigureProblem.configure_qddot(nlp, False, False, True)
move this to an else
bioptim/dynamics/configure_problem.py
line 170 at r7 (raw file):
or rigidbody_dynamics == RigidBodyDynamics.DAE_INVERSE_DYNAMICS_JERK ): ConfigureProblem.configure_qddot(nlp, True, False)
There is a bug here
bioptim/dynamics/integrator.py
line 618 at r7 (raw file):
xp_j += self._c[r, j] * states[r] if self.defects_type == "explicit":
DefectType.EXPLICIT
DefectType.IMPLICIT
DefectType.NOT_APPLICABLE
bioptim/dynamics/ode_solver.py
line 237 at r7 (raw file):
""" def __init__(self, polynomial_degree: int = 4, method: str = "legendre", defects_type: str = "explicit"):
ENUM
bioptim/dynamics/ode_solver.py
line 316 at r7 (raw file):
""" def __init__(self, polynomial_degree: int = 4, method: str = "legendre", defects_type: str = "explicit"):
ENUM
There was a problem hiding this 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, 6 unresolved discussions (waiting on @pariterre)
bioptim/dynamics/configure_problem.py
line 160 at r7 (raw file):
Previously, pariterre (Pariterre) wrote…
move this to an else
not implemented yet
bioptim/dynamics/configure_problem.py
line 170 at r7 (raw file):
Previously, pariterre (Pariterre) wrote…
There is a bug here
done
bioptim/dynamics/integrator.py
line 618 at r7 (raw file):
Previously, pariterre (Pariterre) wrote…
DefectType.EXPLICIT
DefectType.IMPLICIT
DefectType.NOT_APPLICABLE
done
bioptim/dynamics/ode_solver.py
line 237 at r7 (raw file):
Previously, pariterre (Pariterre) wrote…
ENUM
done
bioptim/dynamics/ode_solver.py
line 316 at r7 (raw file):
Previously, pariterre (Pariterre) wrote…
ENUM
done
done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 8 files at r9, 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Ipuch)
bioptim/examples/getting_started/pendulum.py
line 34 at r10 (raw file):
n_shooting: int, ode_solver: OdeSolver = OdeSolver.IRK(), use_sx: bool = False,
Please revert to the actual example
Code quote:
ode_solver: OdeSolver = OdeSolver.IRK(),
use_sx: bool = False,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r11, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Ipuch)
All Submissions:
New Feature Submissions:
black . -l120 --exclude "external/*"
)?Changes to Core Features:
according to
https://github.com/casadi/casadi/blob/402fe583f0d3cf1fc77d1e1ac933f75d86083124/casadi/solvers/collocation.cpp#L125
This change is