-
I tried to solve a nonlinear optimal control problem in which model is defined as follows:
My intention is to discretize the time domain of 0-36 seconds into 5 finite elements of 7.2 s each, with 3 internal nodes in each element. The optimization problem is solved successfully. However, when I access the support values used to transcribe u(t) along the domain of t, using supports.(u), the result is a uniformly spaced set of points 1.8s apart. Full code is given below:
Version info: Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi there, great question! By default, we hide the internal supports (and associated variables/constraints) generated by collocation methods. However, these can be recovered using the u_opt = value.(u, label = All)
u_ts = supports.(u, label = All)
value.(x1, label = All)
value.(x2, label = All) Under the hood, we employ a sophisticated support point management system to ensure, user points, generated points, derivatives, and measures (e.g., integrals) work together seamlessly. This system assigns at least one label to each support value so we can keep track of where they came from and/or how they were generated as explained here. The labels we use are detailed here. By default, only the supports with labels that inherit from |
Beta Was this translation helpful? Give feedback.
Hi there, great question! By default, we hide the internal supports (and associated variables/constraints) generated by collocation methods. However, these can be recovered using the
label = All
keyword argument as explained here and here. So in this case, modify the last few lines to:Under the hood, we employ a sophisticated support point management system to ensure, user points, generated points, derivatives, and measures (e.g., integrals) work together seamlessly. This system assigns at least one label to each support value so we can keep track of where they came from and/or…