-
Notifications
You must be signed in to change notification settings - Fork 2
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
Single phase problem and calcium summation in control #6
Conversation
fixed absurd control when in linearcontinuous type, enabled nmpc with old model
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 84 of 97 files at r1, all commit messages.
Reviewable status: 84 of 97 files reviewed, 14 unresolved discussions (waiting on @Kev1CO)
cocofest/custom_constraints.py
line 15 at r1 (raw file):
@staticmethod def cn_sum(controller: PenaltyController, stim_time: list, stim_index: list) -> MX | SX: intensity_in_model = True if isinstance(controller.model, DingModelIntensityFrequency) else False
model = controller.model
model.compute_lambda_i(...)
model.compute_r0(....)
Try to put the physics equations always in the model if in the model as much as possible.
cocofest/custom_constraints.py
line 28 at r1 (raw file):
@staticmethod def cn_sum_msk(controller: PenaltyController, stim_time: list, model_idx: int, sum_truncation: int) -> MX | SX:
remove truncation
cocofest/custom_constraints.py
line 29 at r1 (raw file):
@staticmethod def cn_sum_msk(controller: PenaltyController, stim_time: list, model_idx: int, sum_truncation: int) -> MX | SX: model = controller.model.muscles_dynamics_model[model_idx]
@Property such that
model.km_name
cocofest/custom_constraints.py
line 47 at r1 (raw file):
return controller.controls["Cn_sum_" + muscle_name].cx - model.cn_sum_fun( r0=r0, t=controller.time.cx, t_stim_prev=stim_time, lambda_i=lambda_i )
msk should use the core of cn_sum N times.
cocofest/dynamics/warm_start.py
line 21 at r1 (raw file):
Solver, )
initial guess of warm start make sure you know
cocofest/examples/getting_started/pulse_duration_optimization.py
line 23 at r1 (raw file):
"min": minimum_pulse_duration, "max": 0.0006, "bimapping": True,
as_unique_variable ?
cocofest/examples/getting_started/pulse_intensity_optimization.py
line 17 at r1 (raw file):
stim_time=[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9], n_shooting=100, final_time=1,
Think the interface twice.
cocofest/models/ding2003.py
line 128 at r1 (raw file):
cn: MX, f: MX, cn_sum: MX | float = None,
Can we get cn_sum approximate = True ?
cocofest/models/ding2003_integrate.py
line 15 at r1 (raw file):
class DingModelFrequencyIntegrate(DingModelFrequency):
DingModelFrequencyApproximated vs DingModelFrequency
cocofest/models/ding2007.py
line 134 at r1 (raw file):
cn, f, a_scale,
a_scale_as_control ?
cocofest/models/state_configue.py
line 215 at r1 (raw file):
as_states, as_controls, as_states_dot,
state_confiture
cocofest/optimization/fes_ocp.py
line 149 at r1 (raw file):
pulse_duration : dict Dictionary containing parameters related to the duration of the pulse. Optional if not using DingModelPulseDurationFrequency or DingModelPulseDurationFrequencyWithFatigue.
document dicts
cocofest/optimization/fes_ocp.py
line 377 at r1 (raw file):
raise NotImplementedError("If added, pulse duration parameter mapping must be a bool type") if isinstance(
one function per check
cocofest/optimization/fes_ocp_dynamics_nmpc_cyclic.py
line 20 at r1 (raw file):
def update_stim(self, sol): stimulation_time = sol.decision_parameters()["pulse_apparition_time"] stim_prev = list(np.round(np.array(stimulation_time) - sol.ocp.phase_time[0], 3))
don't round ! It can be dangerous.
Code quote:
np.round(
Previously, Ipuch (Pierre Puchaud) wrote…
Done. Removed n_shooting option to automaticaly calculate it based on final time and stimulation instant |
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: 43 of 98 files reviewed, 14 unresolved discussions (waiting on @Ipuch)
cocofest/custom_constraints.py
line 15 at r1 (raw file):
Previously, Ipuch (Pierre Puchaud) wrote…
model = controller.model model.compute_lambda_i(...) model.compute_r0(....)Try to put the physics equations always in the model if in the model as much as possible.
Done.
cocofest/custom_constraints.py
line 28 at r1 (raw file):
Previously, Ipuch (Pierre Puchaud) wrote…
remove truncation
Done.
cocofest/custom_constraints.py
line 29 at r1 (raw file):
Previously, Ipuch (Pierre Puchaud) wrote…
@Property such that
model.km_name
Done.
cocofest/custom_constraints.py
line 47 at r1 (raw file):
Previously, Ipuch (Pierre Puchaud) wrote…
msk should use the core of cn_sum N times.
Done.
cocofest/dynamics/warm_start.py
line 21 at r1 (raw file):
Previously, Ipuch (Pierre Puchaud) wrote…
initial guess of warm start make sure you know
Done.
All Submissions:
New Feature Submissions:
black . -l120 --exclude "external/*"
)?Changes to Core Features:
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)