26 #ifndef CASADI_INTEGRATOR_HPP
27 #define CASADI_INTEGRATOR_HPP
29 #include "function.hpp"
31 #include "rootfinder.hpp"
32 #include "casadi_enum.hpp"
86 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
88 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
90 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
91 const Function& dae,
const Dict& opts=
Dict());
92 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
93 const SXDict& dae,
double t0,
const std::vector<double>& tout,
const Dict& opts=
Dict());
94 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
95 const MXDict& dae,
double t0,
const std::vector<double>& tout,
const Dict& opts=
Dict());
96 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
97 const Function& dae,
double t0,
const std::vector<double>& tout,
const Dict& opts=
Dict());
99 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
100 const SXDict& dae,
double t0,
double tf,
const Dict& opts=
Dict());
101 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
102 const MXDict& dae,
double t0,
double tf,
const Dict& opts=
Dict());
103 CASADI_EXPORT Function
integrator(
const std::string& name,
const std::string& solver,
104 const Function& dae,
double t0,
double tf,
const Dict& opts=
Dict());
115 CASADI_EXPORT std::string
doc_integrator(
const std::string& name);
150 CASADI_EXPORT std::vector<std::string>
dyn_in();
155 CASADI_EXPORT std::vector<std::string>
dyn_out();
160 CASADI_EXPORT std::string
dyn_in(casadi_int ind);
165 CASADI_EXPORT std::string
dyn_out(casadi_int ind);
170 CASADI_EXPORT casadi_int
dyn_n_in();
180 CASADI_EXPORT std::vector<std::string>
event_in();
185 CASADI_EXPORT std::vector<std::string>
event_out();
std::vector< std::string > dyn_out()
Get output scheme of a DAE function.
std::vector< std::string > event_in()
Get input scheme of an event transition function.
bool has_integrator(const std::string &name)
Check if a particular plugin is available.
std::vector< std::string > dyn_in()
Get input scheme of a DAE function.
casadi_int integrator_n_out()
Get the number of integrator outputs.
casadi_int dyn_n_in()
Get the number of inputs for a DAE function.
std::vector< std::string > integrator_out()
Get integrator output scheme of integrators.
std::vector< std::string > event_out()
Get output scheme of an event transition functions.
void load_integrator(const std::string &name)
Explicitly load a plugin dynamically.
casadi_int integrator_n_in()
Get the number of integrator inputs.
std::vector< std::string > integrator_in()
Get input scheme of integrators.
Function integrator(const std::string &name, const std::string &solver, const SXDict &dae, const Dict &opts)
std::string doc_integrator(const std::string &name)
Get the documentation string for a plugin.
casadi_int dyn_n_out()
Get the number of outputs for a DAE function.
std::map< std::string, MX > MXDict
IntegratorOutput
Output arguments of an integrator.
@ INTEGRATOR_ADJ_U
Adjoint sensitivities corresponding to the control vector.
@ INTEGRATOR_ADJ_Z0
Adjoint sensitivities corresponding to the algebraic variable guess.
@ INTEGRATOR_QF
Quadrature state at all output times.
@ INTEGRATOR_ADJ_P
Adjoint sensitivities corresponding to the parameter vector.
@ INTEGRATOR_ZF
Algebraic variable at all output times.
@ INTEGRATOR_XF
Differential state at all output times.
@ INTEGRATOR_NUM_OUT
Number of output arguments of an integrator.
@ INTEGRATOR_ADJ_X0
Adjoint sensitivities corresponding to the initial state.
IntegratorInput
Input arguments of an integrator.
@ INTEGRATOR_U
Piecewise constant control, a new control interval starts at each output time.
@ INTEGRATOR_ADJ_QF
Adjoint seeds corresponding to the quadratures at the output times.
@ INTEGRATOR_ADJ_ZF
Adjoint seeds corresponding to the algebraic variables at the output times.
@ INTEGRATOR_P
Parameters.
@ INTEGRATOR_ADJ_XF
Adjoint seeds corresponding to the states at the output times.
@ INTEGRATOR_Z0
Initial guess for the algebraic variable at the initial time.
@ INTEGRATOR_NUM_IN
Number of input arguments of an integrator.
@ INTEGRATOR_X0
Differential state at the initial time.
EventIn
Inputs of an event transition function.
DynIn
Inputs of the symbolic representation of the DAE.
EventOut
Outputs of an event transition function.
std::map< std::string, SX > SXDict
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
DynOut
Outputs of the symbolic representation of the DAE.
std::string to_string(TypeFmi2 v)
Helper class: Specify number of entries in an enum.
static const size_t n_enum