-
Notifications
You must be signed in to change notification settings - Fork 56
Lagrange interpolation: variable name change + removed unused and untested code #1040
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
Conversation
|
I think the tests failing are the same as on my other PR. |
|
Why don't you like polynomial degree ? |
|
I feel "polynomial_degree" is misleading in the case of Legendre polynomial it holds the value of the order of the polynomial + 1 in practice. |
|
Okay, I'm asking because i kinda disagree to change its name here. The Lagrange interpolation class should be in fact decoupled from the NLP transcription. The NLP transcription, indeed add some points either at the begining or at the end depending on the nature of the time grid (legendre vs radau and if there a point for the final point or not). So the time_grid_length changes is more related to the CollocationIntegrator that adds extra points. Nonetheless, I think you've landed where i've stopped thinking during that refactoring. By systematically adding the zero, "we artificially augment the degree of the polynomial", that's why i've left the unused classmethod, with the idea that we should only use it through the class method and maybe something was wrong with the way we define the lagrange interpolation, because by sending the zero we can't trace back to the initial degree of the polynomial. So we SHOULD be able to either have polynomial degree as property of the LagrangeInterpolation but also the collocation time grid length needed for optimal control. Let me know what you think. |
pariterre
left a comment
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.
@pariterre reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @EveCharbie).
The name polynomial_degree is misleading (at least in the case of Legendre polynomial as the value of this variable is rather polynomial_degree + 1).
This change is