26 #ifndef CASADI_DPLE_IMPL_HPP
27 #define CASADI_DPLE_IMPL_HPP
30 #include "function_internal.hpp"
31 #include "plugin_interface.hpp"
40 Dple(
const std::string& name,
const SpDict &st);
57 Sparsity get_sparsity_in(casadi_int i)
override;
58 Sparsity get_sparsity_out(casadi_int i)
override;
78 void init(
const Dict& opts)
override;
84 bool has_forward(casadi_int nfwd)
const override {
return true;}
85 Function get_forward(casadi_int nfwd,
const std::string& name,
86 const std::vector<std::string>& inames,
87 const std::vector<std::string>& onames,
88 const Dict& opts)
const override;
95 bool has_reverse(casadi_int nadj)
const override {
return true;}
96 Function get_reverse(casadi_int nadj,
const std::string& name,
97 const std::vector<std::string>& inames,
98 const std::vector<std::string>& onames,
99 const Dict& opts)
const override;
103 typedef Dple* (*Creator)(
const std::string& name,
104 const std::map<std::string, Sparsity>& st);
112 #ifdef CASADI_WITH_THREADSAFE_SYMBOLICS
113 static std::mutex mutex_solvers_;
Sparsity A_
List of sparsities of A_i.
static std::map< std::string, Plugin > solvers_
Collection of solvers.
double eps_unstable_
Margin for instability detection.
size_t get_n_out() override
Number of function inputs and outputs.
static const std::string infix_
Infix.
bool error_unstable_
Throw an error when system is unstable.
bool const_dim_
Constant dimensions.
std::string get_name_out(casadi_int i) override
Names of function input and outputs.
static std::string shortname()
Short name.
size_t get_n_in() override
Number of function inputs and outputs.
bool has_reverse(casadi_int nadj) const override
Generate a function that calculates nadj adjoint derivatives.
casadi_int nrhs_
Number of right hand sides.
static const Options options_
Options.
bool has_forward(casadi_int nfwd) const override
Generate a function that calculates nfwd forward derivatives.
std::string get_name_in(casadi_int i) override
Names of function input and outputs.
Sparsity V_
List of sparsities of V_i.
const Options & get_options() const override
Options.
bool pos_def_
Assume positive definiteness of P_i.
Internal class for Function.
Interface for accessing input and output data structures.
std::vector< std::string > dple_in()
Get input scheme of DPLE solvers.
std::vector< std::string > dple_out()
Get output scheme of DPLE solvers.
@ DPLE_NUM_OUT
Number of arguments.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
std::map< std::string, Sparsity > SpDict
Options metadata for a class.