Skip to content
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

[RTR] more detailed detailed costs #545

Merged
merged 8 commits into from
Oct 20, 2022
Merged

[RTR] more detailed detailed costs #545

merged 8 commits into from
Oct 20, 2022

Conversation

Ipuch
Copy link
Collaborator

@Ipuch Ipuch commented Sep 30, 2022

detailed detailed costs


This change is Reviewable

@Ipuch Ipuch added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 30, 2022
pariterre
pariterre previously approved these changes Sep 30, 2022
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Ipuch)

@Ipuch Ipuch changed the title more detailed detailed costs [RTR] more detailed detailed costs Sep 30, 2022
Copy link
Member

@pariterre pariterre left a 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 r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Ipuch)


bioptim/optimization/solution.py line 1392 at r2 (raw file):

                ]
                if print_only_weighted:
                    print(f"{penalty.type.__str__()}: {val_weighted}")

is __str__() actually needed? If so, call it as such str(penalty.type)

Code quote:

penalty.type.__str__()

bioptim/optimization/solution.py line 1394 at r2 (raw file):

                    print(f"{penalty.type.__str__()}: {val_weighted}")
                else:
                    print(f"{penalty.type.__str__()}: {val_weighted} (non weighted {val: .2f})")

2 decimal places seem short? Don't we expect the value to be down up to 10^-6 or something?

Code quote:

 .2f

Copy link
Collaborator Author

@Ipuch Ipuch left a 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, 2 unresolved discussions (waiting on @pariterre)


bioptim/optimization/solution.py line 1392 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

is __str__() actually needed? If so, call it as such str(penalty.type)

It is needed yes, I find it more readable this way ...
It allows to print something like "Lagrange.MINIMIZE_CONTROL" or "Mayer.MINIMIZE_CONTROL"


bioptim/optimization/solution.py line 1394 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

2 decimal places seem short? Don't we expect the value to be down up to 10^-6 or something?

Yep but we usually don't care about the non-weighted value. This was originally printed like this.

Copy link
Member

@pariterre pariterre left a 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, 1 unresolved discussion (waiting on @Ipuch and @pariterre)


bioptim/optimization/solution.py line 1392 at r2 (raw file):

Previously, Ipuch (Pierre Puchaud) wrote…

It is needed yes, I find it more readable this way ...
It allows to print something like "Lagrange.MINIMIZE_CONTROL" or "Mayer.MINIMIZE_CONTROL"

f"{penalty.type}: {val_weighted}" does not work??

@Ipuch
Copy link
Collaborator Author

Ipuch commented Oct 14, 2022

@pariterre I think this is mergeable

Copy link
Collaborator Author

@Ipuch Ipuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @pariterre)


bioptim/optimization/solution.py line 1392 at r2 (raw file):

Previously, pariterre (Pariterre) wrote…

f"{penalty.type}: {val_weighted}" does not work??

indeed

@pariterre pariterre merged commit f4b834a into pyomeca:master Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants