-
Notifications
You must be signed in to change notification settings - Fork 24
Plot constraint violations of eoms with inequalities #464
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
base: master
Are you sure you want to change the base?
Plot constraint violations of eoms with inequalities #464
Conversation
Again, I tested all combinations I could think of. |
opty/direct_collocation.py
Outdated
- 0 otherwise. | ||
|
||
If only one eom is given and and eom bounds are given, then | ||
``subplots`` is set to ``True``. |
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.
subplots
should only be set to true or false by the user.
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.
Also "eom" is not a word.
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.
subplots
should only be set to true or false by the user.
If only one equation of motion is given, subplots really does not make sense.
I set it to True in the program to simplify the 'logical flow' if only one eom is given.
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.
Also "eom" is not a word.
I changed this sentence to: If only one equation od motion is given and eom_bounds are given, the value of the equation of motion will be plotted.
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.
At the minimum, whether the output is an array of axes or a single axis matters also.
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.
At the minimum, whether the output is an array of axes or a single axis matters also.
I believe this was taken care of earlier, It worked with my one-eom example, but I have to double check.
Update: it seems to work with one eom and no instance constraints.
I believe it would be clearer if the plot_constraint_violations function plotted only the violations, even when the subplots argument is set to True. |
I don't want to beat a dead horse, but I just thought of this: |
The violations of the inequality constraints are shown, as discussed during the recent hackathon. I tested it with one eom only, too (plot_betts_10_7). For the main tests I used plot_car_one_racecourse_smooth, where there are many eom_bounds available. |
I changed along the lines discussed in #488, which it should fix.
I tested every combination/permutation I could think of.
When
subplots=True
I changed the numbering of the eoms, now starting with Eq 0 (before Eq 1). Reason is that like this the user can easily see his eom_bounds key matching the label on the respective plot.I disregard the case of one eom only.
I cannot imagine a situation that opty gets only one eom, and this eom has bounds.
Of course, easy to add if useful.
Update: I will add it to avoid exceptions.