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

Basic grid refinement #119

Open
jbcaillau opened this issue Jun 21, 2024 · 6 comments
Open

Basic grid refinement #119

jbcaillau opened this issue Jun 21, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@jbcaillau
Copy link
Member

@PierreMartinon now that it is possible to pass a time_grid, we can rather easily combine solve with grid refinement and warm start to solve iteratively on a adaptive discretisation.

@ocots
Copy link
Member

ocots commented Jun 27, 2024

@PierreMartinon @jbcaillau @0Yassine0 In the Space shuttle problem from JuMP tutorial, the time steps are considered as variables to optimize. Do we agree that we cannot do that for the moment?

@PierreMartinon
Copy link
Member

PierreMartinon commented Jun 27, 2024

We can do

  • a fixed uniform time grid (set grid_size=...) with fixed or free t0,tf.
  • a fixed non-uniform time grid, also compatible with fixed or free t0,tf. More precisely the normalized grid in [0,1] is the one fixed, so if t0 and/or tf are free, all the time steps can change, but the 'repartition' of the steps is fixed.

We cannot do

  • optimize the whole vector [t0, t1, ..., tf] with each t_i an independant variable

On the other hand, we could try to do that by using a fixed grid on [0,1] with a series of n positive optimization variables Dt_i, and manually rescale the dynamics. I expect the numerical cost to be horrendous though.

@jbcaillau
Copy link
Member Author

@ocots @PierreMartinon @0Yassine0 yes, the usual manual trick works to glue things (e.g. multidynamics with unknown switching time). Actually, it is interesting and not completely standard to optimise the grid points themselves: interesting to compare with a uniform grid size (should be better, but price to pay = more vars).

@ocots I remember that you did sth similar, no?

@PierreMartinon @joseph-gergaud not very difficult to add this possibility in the transcription process (enforcing a lower bound on each $t_{i+1}-t_i$ to avoid stupid things), provided there is a demonstrated advantage.

@PierreMartinon
Copy link
Member

I think I can do a simple example for this. @jbcaillau, you typically take positive Dt_i instead of the t_i themselves, easier constraint ;-)

@PierreMartinon
Copy link
Member

@PierreMartinon now that it is possible to pass a time_grid, we can rather easily combine solve with grid refinement and warm start to solve iteratively on a adaptive discretisation.

A basic illustration here #158
(on uniform grids, but still passed as explicit grids...)

@PierreMartinon
Copy link
Member

@ocots @PierreMartinon @0Yassine0 yes, the usual manual trick works to glue things (e.g. multidynamics with unknown switching time). Actually, it is interesting and not completely standard to optimise the grid points themselves: interesting to compare with a uniform grid size (should be better, but price to pay = more vars).

@ocots I remember that you did sth similar, no?

@PierreMartinon @joseph-gergaud not very difficult to add this possibility in the transcription process (enforcing a lower bound on each ti+1−ti to avoid stupid things), provided there is a demonstrated advantage.

Added an example in #158

@ocots ocots added the enhancement New feature or request label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants