-
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
[RTM] sol.graphs crashes if Meyer term in objective #644
Conversation
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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on @lsechoir)
bioptim/examples/getting_started/example_multiphase.py
line 66 at r1 (raw file):
# Add objective functions objective_functions = ObjectiveList() # objective_functions.add(ObjectiveFcn.Lagrange.MINIMIZE_CONTROL, key="tau", weight=100, phase=0)
Don't forget to reintroduce
Code quote:
# objective_functions.add(ObjectiveFcn.Lagrange.MINIMIZE_CONTROL, key="tau", weight=100, phase=0)
# objective_functions.add(ObjectiveFcn.Lagrange.MINIMIZE_CONTROL, key="tau", weight=100, phase=1)
# objective_functions.add(ObjectiveFcn.Lagrange.MINIMIZE_CONTROL, key="tau", weight=100, phase=2)
bioptim/gui/plot.py
line 388 at r1 (raw file):
] # for nlp_tp in self.ocp.nlp : # print(f'nlp_tp is {nlp_tp} and nlp_tp.plot is {nlp_tp.plot}')
Don't forget to remove
Code quote:
# for nlp_tp in self.ocp.nlp :
# print(f'nlp_tp is {nlp_tp} and nlp_tp.plot is {nlp_tp.plot}')
# print(f' new plot_func is {self.plot_func[variable]}')
bioptim/gui/plot.py
line 421 at r1 (raw file):
plot_type = self.plot_func[variable][i].type # if _ in [8 9 12 13] : # plot_type = PlotType.INTEGRATED
Don't forget to remove
Code quote:
# if _ in [8 9 12 13] :
# plot_type = PlotType.INTEGRATED
bioptim/gui/plot.py
line 599 at r1 (raw file):
------- """
I assume this will become relevent
Code quote:
@staticmethod
def save():
"""
Returns
-------
"""
bioptim/gui/plot.py
line 664 at r1 (raw file):
for key in self.variable_sizes[i]: # print(f' key is {key}')
Don't forget to remove
Code quote:
# print(f' key is {key}')
bioptim/gui/plot.py
line 728 at r1 (raw file):
#if self.plot_func[key][i].parameters: print(f' key is {key} and phase is {i}') print(self.plot_func[key][i].parameters)
Don't forget to remove
Code quote:
print('plot type point ')
for i_var in range(self.variable_sizes[i][key]):
#if self.plot_func[key][i].parameters:
print(f' key is {key} and phase is {i}')
print(self.plot_func[key][i].parameters)
bioptim/gui/plot.py
line 925 at r1 (raw file):
#for i, plot in enumerate(self.plots): # plot.plt.savefig("/home/mickaelbegon/Documents/Stage_Lisa/AnthropoImpactOnTech/Solutions_vrille_et_demi/, # dpi=500)
Don't forget to remove
Code quote:
#for i, plot in enumerate(self.plots):
# plot.plt.savefig("/home/mickaelbegon/Documents/Stage_Lisa/AnthropoImpactOnTech/Solutions_vrille_et_demi/,
# dpi=500)
bioptim/limits/penalty_option.py
line 585 at r1 (raw file):
self.target_plot_name, plot_function, penalty = self,
Replace this for :
penalty = self if plot_type == PlotType.POINT else None
Then you can remove the outer "if"
Suggestion:
penalty = self,
bioptim/optimization/solution.py
line 1288 at r1 (raw file):
show_now: bool = True, shooting_type: Shooting = Shooting.MULTIPLE, save_path: str = None,
save_figure_path?
Don't forget to add it in Parameters docstring
Code quote:
save_path
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 6 of 6 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lsechoir)
bioptim/gui/plot.py
line 599 at r1 (raw file):
Previously, pariterre (Pariterre) wrote…
I assume this will become relevent
Please remove
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #644 +/- ##
==========================================
- Coverage 81.90% 81.79% -0.11%
==========================================
Files 109 112 +3
Lines 12133 12558 +425
==========================================
+ Hits 9937 10272 +335
- Misses 2196 2286 +90
... and 13 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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 r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lsechoir)
All Submissions:
New Feature Submissions:
black . -l120 --exclude "external/*"
)?Changes to Core Features:
This change is