Open
Description
If you have N nodes, then you only get N-1 constraints for the equations of motion due to the discretization:
$\frac{d\mathbf{y}}{dt} \approx \frac{\mathbf{y}i - \mathbf{y}{i-1}}{h}$
dy y_i - y_{i-1}
-- = -----------------
dt t_i - t_{i-1}
So for i = 2, ..., N we make N-1 constraint equations. When n = 1 there is no n-1=0 point to make a constraint with. Thus the n=1 node does not have to abide by the equations of motion relative to the prior non-existent node.
Examples:
https://opty.readthedocs.io/latest/examples/beginner/plot_betts_10_7.html
https://opty.readthedocs.io/latest/examples/beginner/plot_pendulum_swing_up_fixed_duration.html
Only on the input:
https://opty.readthedocs.io/latest/examples/beginner/plot_betts_10_50.html
What can we do:
- We could return a solution for only n=1, ..., N.
- Don't plot the first node.
- Add an extra node when formulating the problem, but they remove it in the solution so the user gets the expected results back.
- Use forward Euler on the first node.
- other?
Metadata
Metadata
Assignees
Labels
No labels