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

Update README.md - Variable scaling #923

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update README.md - Variable scaling #923

wants to merge 1 commit into from

Conversation

Ipuch
Copy link
Collaborator

@Ipuch Ipuch commented Feb 19, 2025

@EveCharbie is that clearer ?


This change is Reviewable

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.69%. Comparing base (bbc656f) to head (0478f9c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #923   +/-   ##
=======================================
  Coverage   77.69%   77.69%           
=======================================
  Files         156      156           
  Lines       18005    18005           
=======================================
  Hits        13989    13989           
  Misses       4016     4016           
Flag Coverage Δ
unittests 77.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@EveCharbie EveCharbie left a comment

Choose a reason for hiding this comment

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

Once you are done (either accept or decline my recommendations), you can auto-merge this PR ;)

### Class VariableScalingList
A VariableScalingList is a list of VariableScaling.
The `add()` method can be called exactly as if one was calling the `VariableScaling` constructor.
The scaling applied to the optimization variables determines how they are represented within the `OptimalControlProgram`. The goal is to keep all variables in the optimization problem within an order of magnitude close to 1, which improves numerical conditioning and solver performance. This applies to `x_scaling`, `xdot_scaling`, and `u_init` parameters. If the expected value of a variable is of order `0.1`, then the scaling factor should be `0.1` to bring the variable closer to `O(1)`, as `0.1 / 0.1 = 1`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, thanks !

  • Could you please change "u_init parameters" for "u_scaling" ?

  • And add something like: "Bioptim will apply the scaling to all initial guesses and bounds entered by the user automatically. However, the target in objectives and constraints should be scaled by the user (see Issue Scaling of targets #848 ). In addition, there might be unexpected behaviors on the plots, but be assured that it does not represent what is happening internally in Bioptim."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants