Shared CRTP base for transcription methods.
More...
#include <TranscriptionBase.hpp>
template<typename Derived>
class janus::TranscriptionBase< Derived >
Shared CRTP base for transcription methods.
- Template Parameters
-
- See also
- DirectCollocation for direct collocation transcription
-
Pseudospectral for pseudospectral transcription
-
MultipleShooting for multiple shooting transcription
-
BirkhoffPseudospectral for Birkhoff pseudospectral transcription
◆ TranscriptionBase()
template<typename Derived>
Construct with a reference to the optimization environment.
- Parameters
-
| opti | Opti instance to add variables and constraints to |
◆ add_continuity_constraints()
template<typename Derived>
◆ add_defect_constraints()
template<typename Derived>
◆ add_dynamics_constraints()
template<typename Derived>
Add dynamics constraints to the optimization problem.
◆ controls()
template<typename Derived>
Get the control decision variable matrix.
- Returns
- matrix of size (n_nodes x n_controls) or (n_intervals x n_controls)
◆ get_control_at_node()
template<typename Derived>
◆ get_duration()
template<typename Derived>
◆ get_state_at_node()
template<typename Derived>
◆ get_time_at_node()
template<typename Derived>
◆ n_controls()
template<typename Derived>
Get the number of control variables per node.
- Returns
- control dimension
◆ n_nodes()
template<typename Derived>
Get the number of discretization nodes.
- Returns
- node count
◆ n_states()
template<typename Derived>
Get the number of state variables per node.
- Returns
- state dimension
◆ set_dynamics()
template<typename Derived>
template<typename Func>
Register the dynamics function xdot = f(x, u, t).
- Template Parameters
-
- Parameters
-
| dynamics | dynamics function |
◆ set_final_state() [1/2]
template<typename Derived>
Pin all final states to specified values.
- Parameters
-
| xf | state vector at the final time |
◆ set_final_state() [2/2]
template<typename Derived>
Pin a single final state component.
- Parameters
-
| idx | state index |
| value | fixed value for that state |
◆ set_initial_state() [1/2]
template<typename Derived>
Pin all initial states to specified values.
- Parameters
-
| x0 | state vector at the initial time |
◆ set_initial_state() [2/2]
template<typename Derived>
Pin a single initial state component.
- Parameters
-
| idx | state index |
| value | fixed value for that state |
◆ states()
template<typename Derived>
Get the state decision variable matrix.
- Returns
- matrix of size (n_nodes x n_states)
◆ time_grid()
template<typename Derived>
Get the normalized time grid.
- Returns
- vector of node times in [0, 1]
◆ controls_
template<typename Derived>
◆ dynamics_
template<typename Derived>
◆ dynamics_constraints_added_
template<typename Derived>
◆ dynamics_set_
template<typename Derived>
◆ n_controls_
template<typename Derived>
◆ n_nodes_
template<typename Derived>
◆ n_states_
template<typename Derived>
◆ opti_
template<typename Derived>
◆ setup_complete_
template<typename Derived>
◆ states_
template<typename Derived>
◆ t0_
template<typename Derived>
◆ tau_
template<typename Derived>
◆ tf_fixed_
template<typename Derived>
◆ tf_is_variable_
template<typename Derived>
◆ tf_symbolic_
template<typename Derived>
The documentation for this class was generated from the following file: