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

Have Objective Before/After costs be displayed Concurrently for Each Objective #1112

Closed
dpanici opened this issue Jul 8, 2024 · 1 comment · Fixed by #1189
Closed

Have Objective Before/After costs be displayed Concurrently for Each Objective #1112

dpanici opened this issue Jul 8, 2024 · 1 comment · Fixed by #1189
Assignees
Labels
enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc optimization Adding or improving optimization methods

Comments

@dpanici
Copy link
Collaborator

dpanici commented Jul 8, 2024

When there are lots of objectives, it is hard to take a glance at the output of an optimization and see how the objectives each changed before/after the optimization.

For example,

Start of solver
Total (sum of squares):  6.194e+03, 
Maximum absolute Boundary normal field error:  2.853e-01 (T m^2)
Minimum absolute Boundary normal field error:  2.050e-16 (T m^2)
Average absolute Boundary normal field error:  9.486e-02 (T m^2)
.. etc etc for another 50 lines
End of solver
Total (sum of squares):  6.389e+01, 
Maximum absolute Boundary normal field error:  1.127e-02 (T m^2)
Minimum absolute Boundary normal field error:  1.378e-16 (T m^2)
Average absolute Boundary normal field error:  3.303e-03 (T m^2)
.. etc etc

It would be easier if we could display them differently, like this

Objective : Start of solver ---> End of solver
Total (sum of squares):  6.194e+03  --->  6.389e+01
Maximum absolute Boundary normal field error:  2.853e-01 (T m^2) ---> 1.127e-02 (T m^2)
Minimum absolute Boundary normal field error:  2.050e-16 (T m^2) ---> 1.378e-16 (T m^2)
... etc etcetc
@dpanici dpanici added low priority Nice to have, but not needed right away enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc optimization Adding or improving optimization methods labels Jul 8, 2024
@dpanici dpanici self-assigned this Jul 8, 2024
@dpanici dpanici removed the low priority Nice to have, but not needed right away label Jul 10, 2024
@dpanici
Copy link
Collaborator Author

dpanici commented Jul 17, 2024

if print value also returned the printed values, this could be easy to do

YigitElma added a commit that referenced this issue Aug 24, 2024
Add an option to print start and end errors next to each other for
easier comparison.
Resolves #1112 

```
==============================================================================================================
                                                       Start  -->   End
Total (sum of squares)                             6.877e-12  -->   6.877e-12, 
Maximum absolute Force error:                      7.852e+00  -->   7.852e+00 (N)
Minimum absolute Force error:                      1.009e-05  -->   1.009e-05 (N)
Average absolute Force error:                      1.148e-01  -->   1.148e-01 (N)
Maximum absolute Force error:                      2.546e-06  -->   2.546e-06 (normalized)
Minimum absolute Force error:                      3.274e-12  -->   3.274e-12 (normalized)
Average absolute Force error:                      3.722e-08  -->   3.722e-08 (normalized)
R boundary error:                                  0.000e+00  -->   0.000e+00 (m)
Z boundary error:                                  0.000e+00  -->   0.000e+00 (m)
Fixed Psi error:                                   0.000e+00  -->   0.000e+00 (Wb)
Fixed pressure profile error:                      0.000e+00  -->   0.000e+00 (Pa)
Fixed iota profile error:                          0.000e+00  -->   0.000e+00 (dimensionless)
Fixed sheet current error:                         0.000e+00  -->   0.000e+00 (~)
==============================================================================================================
```

- [x] Add a test that checks length of `print_value_fmt` of each
objective and ensures that they are shorter than `print_result_width`
value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc optimization Adding or improving optimization methods
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant