Classes | Typedefs | Enumerations | Functions
casadi Namespace Reference

The casadi namespace. More...

Classes

class  Callback
 Callback function functionality. More...
 
class  CallbackInternal
 
class  Matrix
 Sparse matrix class. SX and DM are specializations. More...
 
class  casadi_limits
 casadi_limits class More...
 
class  Logger
 Keeps track of logging output to screen and/or files. More...
 
class  CasadiMeta
 Collects global CasADi meta information. More...
 
class  CodeGenerator
 Helper class for C code generation. More...
 
class  DaeBuilder
 A symbolic representation of a differential-algebraic equations model. More...
 
struct  Variable
 Holds expressions and meta-data corresponding to a physical quantity evolving in time. More...
 
class  CasadiException
 Casadi exception class. More...
 
class  KeyboardInterruptException
 
class  Function
 Function object. More...
 
class  FunctionBuffer
 Class to achieve minimal overhead function evaluations. More...
 
struct  GenericExpressionCommon
 Empty Base. More...
 
struct  GenericMatrixCommon
 Empty Base. More...
 
class  GenericMatrix
 Matrix base class. More...
 
class  GenericType
 Generic data type, can hold different types such as bool, casadi_int, std::string etc. More...
 
class  GlobalOptions
 Collects global CasADi options. More...
 
class  Importer
 Importer. More...
 
class  IOInstruction
 An input or output instruction. More...
 
class  Input
 Input instruction. More...
 
class  Output
 Input instruction. More...
 
class  Linsol
 Linear solver. More...
 
struct  MatrixCommon
 Empty Base. More...
 
class  MX
 MX - Matrix expression. More...
 
class  MXNode
 Node class for MX objects. More...
 
class  NlpBuilder
 A symbolic NLP representation. More...
 
class  NonZeros
 Access to a set of nonzeros. More...
 
class  Opti
 A simplified interface for NLP modeling/solving. More...
 
struct  IndexAbstraction
 
struct  MetaCon
 
struct  MetaVar
 
class  OptiCallback
 
class  OptiAdvanced
 
class  OptiSol
 A simplified interface for NLP modeling/solving. More...
 
class  OptiNode
 A simplified interface for NLP modeling/solving. More...
 
class  Polynomial
 Helper class for differentiating and integrating polynomials. More...
 
struct  PrintableCommon
 Empty Base. More...
 
class  SerializerBase
 
class  DeserializerBase
 
class  StringSerializer
 
class  FileSerializer
 
class  StringDeserializer
 
class  FileDeserializer
 
class  UniversalNodeOwner
 
class  DeserializingStream
 Helper class for Serialization. More...
 
class  SerializingStream
 Helper class for Serialization. More...
 
class  SharedObject
 SharedObject implements a reference counting framework similar for efficient and. More...
 
class  WeakRef
 Weak reference type. More...
 
class  Slice
 Class representing a Slice. More...
 
class  Solve
 An MX atomic for linear solver solution: x = r * A^-1 or x = r * A^-T. More...
 
class  LinsolCall
 Linear solve operation with a linear solver instance. More...
 
class  TriuSolve
 Linear solve with an upper triangular matrix. More...
 
class  TrilSolve
 Linear solve with an upper triangular matrix. More...
 
class  SolveUnity
 Linear solve with unity diagonal added. More...
 
class  TriuSolveUnity
 Linear solve with an upper triangular matrix, unity diagonal. More...
 
class  TrilSolveUnity
 Linear solve with an upper triangular matrix. More...
 
class  Sparsity
 General sparsity class. More...
 
struct  SparsityInterfaceCommon
 Empty Base. More...
 
class  SubMatrix
 
class  SubIndex
 
struct  SXElem
 
class  XmlFile
 XML parser. More...
 
struct  AlpaqaMemory
 
class  AlpaqaInterface
 
class  AlpaqaProblem
 
struct  SLEQPMemory
 
class  SLEQPInterface
 

Typedefs

typedef Matrix< double > DM
 
typedef std::vector< DMDMVector
 
typedef std::vector< DMVectorDMVectorVector
 
typedef std::map< std::string, DMDMDict
 
typedef GenericType::Dict Dict
 C++ equivalent of Python's dict or MATLAB's struct. More...
 
typedef Matrix< casadi_int > IM
 
typedef DM native_DM
 
typedef void(* external_print_callback_t) (const char *s)
 
typedef const char *(* external_transform_t) (char api_version, const char *casadi_version, const char *in, external_print_callback_t cb_stdout, external_print_callback_t cb_stderr)
 
typedef std::vector< MXMXVector
 
typedef std::initializer_list< MXMXIList
 
typedef std::vector< MXVectorMXVectorVector
 
typedef std::map< std::string, MXMXDict
 
typedef std::map< std::string, SparsitySpDict
 
typedef Matrix< SXElemSX
 
typedef std::vector< SXSXVector
 
typedef std::initializer_list< SXSXIList
 
typedef std::vector< SXVectorSXVectorVector
 
typedef std::map< std::string, SXSXDict
 

Enumerations

enum  UnifiedReturnStatus {
  SOLVER_RET_SUCCESS , SOLVER_RET_UNKNOWN , SOLVER_RET_LIMITED , SOLVER_RET_NAN ,
  SOLVER_RET_INFEASIBLE , SOLVER_RET_EXCEPTION
}
 
enum class  TypeFmi2 {
  REAL , INTEGER , BOOLEAN , STRING ,
  ENUM , NUMEL
}
 Variable type (FMI 2) More...
 
enum class  Type {
  FLOAT32 , FLOAT64 , INT8 , UINT8 ,
  INT16 , UINT16 , INT32 , UINT32 ,
  INT64 , UINT64 , BOOLEAN , STRING ,
  BINARY , ENUMERATION , CLOCK , NUMEL
}
 Variable type (FMI 3) More...
 
enum class  Causality {
  PARAMETER , CALCULATED_PARAMETER , INPUT , OUTPUT ,
  LOCAL , INDEPENDENT , NUMEL
}
 Causality: FMI 2.0 specification, section 2.2.7 or FMI 3.0 specification, section 2.4.7.4. More...
 
enum class  Variability {
  CONSTANT , FIXED , TUNABLE , DISCRETE ,
  CONTINUOUS , NUMEL
}
 Variability: FMI 2.0 specification, section 2.2.7 or FMI 3.0 specification, section 2.4.7.4. More...
 
enum class  Initial {
  EXACT , APPROX , CALCULATED , NA ,
  NUMEL
}
 Initial: FMI 2.0 specification, section 2.2.7 or FMI 3.0 specification, section 2.4.7.5. More...
 
enum class  Attribute {
  MIN , MAX , NOMINAL , START ,
  VALUE , STRINGVALUE , NUMEL
}
 
enum class  DependenciesKind {
  DEPENDENT , CONSTANT , FIXED , TUNABLE ,
  DISCRETE , NUMEL
}
 
enum  CollocationPoints { LEGENDRE , RADAU }
 
enum  ConstraintType {
  OPTI_GENERIC_EQUALITY , OPTI_GENERIC_INEQUALITY , OPTI_EQUALITY , OPTI_INEQUALITY ,
  OPTI_DOUBLE_INEQUALITY , OPTI_PSD , OPTI_UNKNOWN
}
 
enum  VariableType { OPTI_VAR , OPTI_PAR , OPTI_DUAL_G }
 
enum  DomainType { OPTI_DOMAIN_REAL , OPTI_DOMAIN_INTEGER }
 

Functions

template<class T >
bool is_zero (const T &x)
 
CASADI_EXPORT std::ostream & uout ()
 
CASADI_EXPORT std::ostream & uerr ()
 
template<typename T >
bool in_range (const std::vector< T > &v, casadi_int upper)
 Check if for each element of v holds: v_i < upper. More...
 
template<typename T >
bool in_range (const std::vector< T > &v, casadi_int lower, casadi_int upper)
 Check if for each element of v holds: lower <= v_i < upper. More...
 
CASADI_EXPORT std::vector< casadi_int > complement (const std::vector< casadi_int > &v, casadi_int size)
 Returns the list of all i in [0, size[ not found in supplied list. More...
 
CASADI_EXPORT std::vector< casadi_int > lookupvector (const std::vector< casadi_int > &v, casadi_int size)
 Returns a vector for quickly looking up entries of supplied list. More...
 
CASADI_EXPORT std::vector< casadi_int > lookupvector (const std::vector< casadi_int > &v)
 
template<class T , class S >
void flatten_nested_vector (const std::vector< std::vector< T > > &nested, std::vector< S > &flat)
 Flatten a nested std::vector tot a single flattened vector. More...
 
template<class T , class S , class I >
void flatten_nested_vector (const std::vector< std::vector< T > > &nested, std::vector< S > &flat, std::vector< I > &indices)
 Flatten a nested std::vector tot a single flattened vector. More...
 
template<typename T >
bool is_increasing (const std::vector< T > &v)
 Check if the vector is strictly increasing. More...
 
template<typename T >
bool is_decreasing (const std::vector< T > &v)
 Check if the vector is strictly decreasing. More...
 
template<typename T >
bool is_nonincreasing (const std::vector< T > &v)
 Check if the vector is non-increasing. More...
 
template<typename T >
bool is_nondecreasing (const std::vector< T > &v)
 Check if the vector is non-decreasing. More...
 
template<typename T >
bool is_monotone (const std::vector< T > &v)
 Check if the vector is monotone. More...
 
template<typename T >
bool is_strictly_monotone (const std::vector< T > &v)
 Check if the vector is strictly monotone. More...
 
template<typename T >
bool has_negative (const std::vector< T > &v)
 Check if the vector has negative entries. More...
 
template<typename T >
void write_matlab (std::ostream &stream, const std::vector< T > &v)
 Print vector, matlab style. More...
 
template<typename T >
void write_matlab (std::ostream &stream, const std::vector< std::vector< T > > &v)
 Print matrix, matlab style. More...
 
template<typename T >
void read_matlab (std::istream &stream, std::vector< T > &v)
 Read vector, matlab style. More...
 
template<typename T >
void read_matlab (std::ifstream &file, std::vector< std::vector< T > > &v)
 Read matrix, matlab style. More...
 
template<typename T >
bool is_regular (const std::vector< T > &v)
 Checks if array does not contain NaN or Inf. More...
 
CASADI_EXPORT std::string temporary_file (const std::string &prefix, const std::string &suffix)
 
CASADI_EXPORT void normalized_setup (std::istream &stream)
 
CASADI_EXPORT void normalized_setup (std::ostream &stream)
 
void normalized_out (std::ostream &stream, double val)
 
int normalized_in (std::istream &stream, double &ret)
 
CASADI_EXPORT Function conic (const std::string &name, const std::string &solver, const SpDict &qp, const Dict &opts=Dict())
 
CASADI_EXPORT Function qpsol (const std::string &name, const std::string &solver, const SXDict &qp, const Dict &opts=Dict())
 
CASADI_EXPORT Function qpsol (const std::string &name, const std::string &solver, const MXDict &qp, const Dict &opts=Dict())
 
CASADI_EXPORT std::vector< std::string > conic_in ()
 Get input scheme of QP solvers. More...
 
CASADI_EXPORT std::vector< std::string > conic_out ()
 Get QP solver output scheme of QP solvers. More...
 
CASADI_EXPORT std::string conic_in (casadi_int ind)
 Get QP solver input scheme name by index. More...
 
CASADI_EXPORT std::string conic_out (casadi_int ind)
 Get output scheme name by index. More...
 
CASADI_EXPORT casadi_int conic_n_in ()
 Get the number of QP solver inputs. More...
 
CASADI_EXPORT casadi_int conic_n_out ()
 Get the number of QP solver outputs. More...
 
CASADI_EXPORT std::vector< std::string > conic_options (const std::string &name)
 Get all options for a plugin. More...
 
CASADI_EXPORT std::string conic_option_type (const std::string &name, const std::string &op)
 Get type info for a particular option. More...
 
CASADI_EXPORT std::string conic_option_info (const std::string &name, const std::string &op)
 Get documentation for a particular option. More...
 
CASADI_EXPORT bool has_conic (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_conic (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_conic (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT void conic_debug (const Function &f, const std::string &filename)
 
CASADI_EXPORT void conic_debug (const Function &f, std::ostream &file)
 
CASADI_EXPORT Function dplesol (const std::string &name, const std::string &solver, const SpDict &st, const Dict &opts=Dict())
 
CASADI_EXPORT MX dplesol (const MX &A, const MX &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT MXVector dplesol (const MXVector &A, const MXVector &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT DMVector dplesol (const DMVector &A, const DMVector &V, const std::string &solver, const Dict &opts=Dict())
 
CASADI_EXPORT std::vector< std::string > dple_in ()
 Get input scheme of DPLE solvers. More...
 
CASADI_EXPORT std::vector< std::string > dple_out ()
 Get output scheme of DPLE solvers. More...
 
CASADI_EXPORT std::string dple_in (casadi_int ind)
 Get DPLE input scheme name by index. More...
 
CASADI_EXPORT std::string dple_out (casadi_int ind)
 Get DPLE output scheme name by index. More...
 
CASADI_EXPORT casadi_int dple_n_in ()
 Get the number of QP solver inputs. More...
 
CASADI_EXPORT casadi_int dple_n_out ()
 Get the number of QP solver outputs. More...
 
CASADI_EXPORT bool has_dple (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_dple (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_dple (const std::string &name)
 Get the documentation string for a plugin. More...
 
std::string trim_path (const std::string &full_path)
 
std::ostream & message_prefix (std::ostream &stream)
 
CASADI_EXPORT Function expmsol (const std::string &name, const std::string &solver, const Sparsity &A, const Dict &opts=Dict())
 
CASADI_EXPORT casadi_int expm_n_in ()
 Get the number of expm solver inputs. More...
 
CASADI_EXPORT casadi_int expm_n_out ()
 Get the number of expm solver outputs. More...
 
CASADI_EXPORT bool has_expm (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_expm (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_expm (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT Function external (const std::string &name, const Dict &opts=Dict())
 Load an external function from a shared library. More...
 
CASADI_EXPORT Function external (const std::string &name, const std::string &bin_name, const Dict &opts=Dict())
 Load an external function from a shared library. More...
 
CASADI_EXPORT Function external (const std::string &name, const Importer &li, const Dict &opts=Dict())
 Load a just-in-time compiled external function. More...
 
void CASADI_EXPORT _function_buffer_eval (void *raw)
 
double CASADI_EXPORT index_interp1d (const std::vector< double > &x, double xq, bool equidistant=false)
 
bool CASADI_EXPORT is_slice (const IM &x, bool ind1=false)
 Is the IM a Slice. More...
 
Slice CASADI_EXPORT to_slice (const IM &x, bool ind1=false)
 Convert IM to Slice. More...
 
CASADI_EXPORT void collocation_interpolators (const std::vector< double > &tau, std::vector< std::vector< double > > &C, std::vector< double > &D)
 Obtain collocation interpolating matrices. More...
 
CASADI_EXPORT void collocation_coeff (const std::vector< double > &tau, DM &C, DM &D, DM &B)
 Obtain collocation interpolating matrices. More...
 
CASADI_EXPORT Function simpleRK (Function f, casadi_int N=10, casadi_int order=4)
 Construct an explicit Runge-Kutta integrator. More...
 
CASADI_EXPORT Function simpleIRK (Function f, casadi_int N=10, casadi_int order=4, const std::string &scheme="radau", const std::string &solver="newton", const Dict &solver_options=Dict())
 Construct an implicit Runge-Kutta integrator using a collocation scheme. More...
 
CASADI_EXPORT Function simpleIntegrator (Function f, const std::string &integrator="cvodes", const Dict &integrator_options=Dict())
 Simplified wrapper for the Integrator class. More...
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const SXDict &dae, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const MXDict &dae, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const Function &dae, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const SXDict &dae, double t0, const std::vector< double > &tout, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const MXDict &dae, double t0, const std::vector< double > &tout, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const Function &dae, double t0, const std::vector< double > &tout, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const SXDict &dae, double t0, double tf, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const MXDict &dae, double t0, double tf, const Dict &opts=Dict())
 
CASADI_EXPORT Function integrator (const std::string &name, const std::string &solver, const Function &dae, double t0, double tf, const Dict &opts=Dict())
 
CASADI_EXPORT bool has_integrator (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_integrator (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_integrator (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT std::vector< std::string > integrator_in ()
 Get input scheme of integrators. More...
 
CASADI_EXPORT std::vector< std::string > integrator_out ()
 Get integrator output scheme of integrators. More...
 
CASADI_EXPORT std::string integrator_in (casadi_int ind)
 Get integrator input scheme name by index. More...
 
CASADI_EXPORT std::string integrator_out (casadi_int ind)
 Get output scheme name by index. More...
 
CASADI_EXPORT casadi_int integrator_n_in ()
 Get the number of integrator inputs. More...
 
CASADI_EXPORT casadi_int integrator_n_out ()
 Get the number of integrator outputs. More...
 
CASADI_EXPORT std::vector< std::string > dyn_in ()
 Get input scheme of simulators. More...
 
CASADI_EXPORT std::vector< std::string > dyn_out ()
 Get simulator output scheme of simulators. More...
 
CASADI_EXPORT std::string dyn_in (casadi_int ind)
 Get simulator input scheme name by index. More...
 
CASADI_EXPORT std::string dyn_out (casadi_int ind)
 Get output scheme name by index. More...
 
CASADI_EXPORT casadi_int dyn_n_in ()
 Get the number of simulator inputs. More...
 
CASADI_EXPORT casadi_int dyn_n_out ()
 Get the number of simulator outputs. More...
 
CASADI_EXPORT Function interpolant (const std::string &name, const std::string &solver, const std::vector< std::vector< double > > &grid, const std::vector< double > &values, const Dict &opts=Dict())
 
CASADI_EXPORT Function interpolant (const std::string &name, const std::string &solver, const std::vector< std::vector< double > > &grid, casadi_int m=1, const Dict &opts=Dict())
 Parametric variant of interpolant. More...
 
CASADI_EXPORT Function interpolant (const std::string &name, const std::string &solver, const std::vector< casadi_int > &grid_dims, casadi_int m=1, const Dict &opts=Dict())
 Parametric variant of interpolant. More...
 
CASADI_EXPORT Function interpolant (const std::string &name, const std::string &solver, const std::vector< casadi_int > &grid_dims, const std::vector< double > &values, const Dict &opts=Dict())
 Parametric variant of interpolant. More...
 
CASADI_EXPORT bool has_interpolant (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_interpolant (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_interpolant (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT bool has_linsol (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_linsol (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_linsol (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT void detect_simple_bounds (const SX &xX, const SX &p, const SX &g, const SX &lbg, const SX &ubg, std::vector< casadi_int > &gi, SX &lbx, SX &ubx, Function &lam_forward, Function &lam_backward)
 Detect simple bounds from general constraints. More...
 
CASADI_EXPORT void detect_simple_bounds (const MX &xX, const MX &p, const MX &g, const MX &lbg, const MX &ubg, std::vector< casadi_int > &gi, MX &lbx, MX &ubx, Function &lam_forward, Function &lam_backward)
 
template<class T >
void check_sos (casadi_int nx, const std::vector< std::vector< T > > &groups, std::vector< std::vector< double > > &weights, std::vector< casadi_int > &types)
 Check sos structure and generate defaults. More...
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const SXDict &nlp, const Dict &opts=Dict())
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const MXDict &nlp, const Dict &opts=Dict())
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const std::string &fname, const Dict &opts=Dict())
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const Importer &compiler, const Dict &opts=Dict())
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const NlpBuilder &nl, const Dict &opts=Dict())
 
CASADI_EXPORT Function nlpsol (const std::string &name, const std::string &solver, const Function &nlp, const Dict &opts=Dict())
 
CASADI_EXPORT std::vector< std::string > nlpsol_in ()
 Get input scheme of NLP solvers. More...
 
CASADI_EXPORT std::vector< std::string > nlpsol_out ()
 Get NLP solver output scheme of NLP solvers. More...
 
CASADI_EXPORT std::string nlpsol_in (casadi_int ind)
 Get NLP solver input scheme name by index. More...
 
CASADI_EXPORT std::string nlpsol_out (casadi_int ind)
 Get output scheme name by index. More...
 
CASADI_EXPORT casadi_int nlpsol_n_in ()
 Number of NLP solver inputs. More...
 
CASADI_EXPORT casadi_int nlpsol_n_out ()
 Number of NLP solver outputs. More...
 
CASADI_EXPORT std::vector< std::string > nlpsol_options (const std::string &name)
 Get all options for a plugin. More...
 
CASADI_EXPORT std::string nlpsol_option_type (const std::string &name, const std::string &op)
 Get type info for a particular option. More...
 
CASADI_EXPORT std::string nlpsol_option_info (const std::string &name, const std::string &op)
 Get documentation for a particular option. More...
 
CASADI_EXPORT bool has_nlpsol (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_nlpsol (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_nlpsol (const std::string &name)
 Get the documentation string for a plugin. More...
 
CASADI_EXPORT Function rootfinder (const std::string &name, const std::string &solver, const SXDict &rfp, const Dict &opts=Dict())
 
CASADI_EXPORT Function rootfinder (const std::string &name, const std::string &solver, const MXDict &rfp, const Dict &opts=Dict())
 
CASADI_EXPORT Function rootfinder (const std::string &name, const std::string &solver, const Function &f, const Dict &opts=Dict())
 
CASADI_EXPORT std::vector< std::string > rootfinder_in ()
 Get rootfinder input scheme. More...
 
CASADI_EXPORT std::vector< std::string > rootfinder_out ()
 Get rootfinder output scheme. More...
 
CASADI_EXPORT std::string rootfinder_in (casadi_int ind)
 Get rootfinder input scheme name by index. More...
 
CASADI_EXPORT std::string rootfinder_out (casadi_int ind)
 Get rootfinder output scheme name by index. More...
 
CASADI_EXPORT casadi_int rootfinder_n_in ()
 Number of rootfinder inputs. More...
 
CASADI_EXPORT casadi_int rootfinder_n_out ()
 Number of rootfinder outputs. More...
 
CASADI_EXPORT std::vector< std::string > rootfinder_options (const std::string &name)
 Get all options for a plugin. More...
 
CASADI_EXPORT std::string rootfinder_option_type (const std::string &name, const std::string &op)
 Get type info for a particular option. More...
 
CASADI_EXPORT std::string rootfinder_option_info (const std::string &name, const std::string &op)
 Get documentation for a particular option. More...
 
CASADI_EXPORT bool has_rootfinder (const std::string &name)
 Check if a particular plugin is available. More...
 
CASADI_EXPORT void load_rootfinder (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
CASADI_EXPORT std::string doc_rootfinder (const std::string &name)
 Get the documentation string for a plugin. More...
 
template<typename T >
casadi_int einstein_process (const T &A, const T &B, const T &C, const std::vector< casadi_int > &dim_a, const std::vector< casadi_int > &dim_b, const std::vector< casadi_int > &dim_c, const std::vector< casadi_int > &a, const std::vector< casadi_int > &b, const std::vector< casadi_int > &c, std::vector< casadi_int > &iter_dims, std::vector< casadi_int > &strides_a, std::vector< casadi_int > &strides_b, std::vector< casadi_int > &strides_c)
 
template<typename T >
void Contraction (const T &a, const T &b, T &r)
 
template<>
void Contraction (const bvec_t &a, const bvec_t &b, bvec_t &r)
 
template<typename T >
void einstein_eval (casadi_int n_iter, const std::vector< casadi_int > &iter_dims, const std::vector< casadi_int > &strides_a, const std::vector< casadi_int > &strides_b, const std::vector< casadi_int > &strides_c, const T *a_in, const T *b_in, T *c_in)
 
Slice CASADI_EXPORT to_slice (const std::vector< casadi_int > &v, bool ind1=false)
 Construct from an index vector (requires is_slice(v) to be true) More...
 
std::pair< Slice, Slice > CASADI_EXPORT to_slice2 (const std::vector< casadi_int > &v)
 Construct nested slices from an index vector (requires is_slice2(v) to be true) More...
 
bool CASADI_EXPORT is_slice (const std::vector< casadi_int > &v, bool ind1=false)
 Check if an index vector can be represented more efficiently as a slice. More...
 
bool CASADI_EXPORT is_slice2 (const std::vector< casadi_int > &v)
 Check if an index vector can be represented more efficiently as two nested slices. More...
 
template<typename T >
size_t hash_value (T v)
 Hash value of an integer. More...
 
template<typename T >
void hash_combine (std::size_t &seed, T v)
 Generate a hash value incrementally (function taken from boost) More...
 
template<typename T >
void hash_combine (std::size_t &seed, const T *v, std::size_t sz)
 Generate a hash value incrementally, array. More...
 
template<typename T >
void hash_combine (std::size_t &seed, const std::vector< T > &v)
 Generate a hash value incrementally (function taken from boost) More...
 
template<>
size_t hash_value (std::string v)
 
CASADI_EXPORT std::size_t hash_sparsity (casadi_int nrow, casadi_int ncol, const std::vector< casadi_int > &colind, const std::vector< casadi_int > &row)
 Hash a sparsity pattern. More...
 
CASADI_EXPORT std::size_t hash_sparsity (casadi_int nrow, casadi_int ncol, const casadi_int *colind, const casadi_int *row)
 
template<>
std::string matrixName< SXElem > ()
 
CASADI_EXPORT Function external_transform (const std::string &name, const std::string &op, const Function &f, const Dict &opts=Dict())
 Apply a transformation defined externally. More...
 
void casadi_sleqp_func_create (SleqpFunc **star, int num_vars, int num_cons, SLEQPMemory *m)
 
int slicot_mb03vd (int n, int p, int ilo, int ihi, double *a, int lda1, int lda2, double *tau, int ldtau, double *dwork=nullptr)
 
int slicot_mb03vy (int n, int p, int ilo, int ihi, double *a, int lda1, int lda2, const double *tau, int ldtau, double *dwork=nullptr, int ldwork=0)
 
int slicot_mb03wd (char job, char compz, int n, int p, int ilo, int ihi, int iloz, int ihiz, double *h, int ldh1, int ldh2, double *z, int ldz1, int ldz2, double *wr, double *wi, double *dwork=nullptr, int ldwork=0)
 
int slicot_mb05nd (int n, double delta, const double *a, int lda, double *ex, int ldex, double *exint, int ldexin, double tol, int *iwork, double *dwork, int ldwork)
 
CASADI_EXPORT std::vector< double > collocation_points (casadi_int order, const std::string &scheme="radau")
 Obtain collocation points of specific order and scheme. More...
 
CASADI_EXPORT MXDict dae_reduce_index (const MXDict &dae, Dict &stats, const Dict &opts={})
 Reduce index. More...
 
CASADI_EXPORT SXDict dae_reduce_index (const SXDict &dae, Dict &stats, const Dict &opts={})
 Reduce index. More...
 
CASADI_EXPORT MXDict dae_map_semi_expl (const MXDict &dae, const MXDict &dae_red, Function &state_to_orig, Function &phi)
 Turn a reduced DAE into a semi explicit form suitable for CasADi integrator. More...
 
CASADI_EXPORT SXDict dae_map_semi_expl (const SXDict &dae, const SXDict &dae_red, Function &state_to_orig, Function &phi)
 Turn a reduced DAE into a semi explicit form suitable for CasADi integrator. More...
 
CASADI_EXPORT Function dae_init_gen (const MXDict &dae, const MXDict &dae_red, const std::string &init_solver, const DMDict &init_strength=DMDict(), const Dict &init_solver_options=Dict())
 Obtain a generator Function for producing consistent initial guesses of a reduced DAE. More...
 
CASADI_EXPORT Function dae_init_gen (const SXDict &dae, const SXDict &dae_red, const std::string &init_solver, const DMDict &init_strength=DMDict(), const Dict &init_solver_options=Dict())
 Obtain a generator Function for producing consistent initial guesses of a reduced DAE. More...
 
CASADI_EXPORT double nlpsol_default_in (casadi_int ind)
 Default input for an NLP solver. More...
 
CASADI_EXPORT std::vector< double > nlpsol_default_in ()
 Default input for an NLP solver. More...
 

Detailed Description

C/C++.

Convenience tools for C++ Standard Library vectors.

Extra doc: https://github.com/casadi/casadi/wiki/L_1aj

Author
Joel Andersson
Date
2010-2011

Extra doc: https://github.com/casadi/casadi/wiki/L_1l5

Extra doc: https://github.com/casadi/casadi/wiki/L_10g

Typedef Documentation

◆ Dict

typedef std::map< std::string, GenericType > casadi::Dict
Examples
Function/callback_c.cc.

Definition at line 258 of file generic_type.hpp.

◆ DM

typedef Matrix<double> casadi::DM
Examples
Function/callback_c.cc, and misc/all.cc.

Definition at line 33 of file dm_fwd.hpp.

◆ DMDict

typedef std::map<std::string, DM> casadi::DMDict

Definition at line 36 of file dm_fwd.hpp.

◆ DMVector

typedef std::vector<DM> casadi::DMVector

Definition at line 34 of file dm_fwd.hpp.

◆ DMVectorVector

typedef std::vector<DMVector> casadi::DMVectorVector

Definition at line 35 of file dm_fwd.hpp.

◆ external_print_callback_t

typedef void(* casadi::external_print_callback_t) (const char *s)

Definition at line 47 of file tools.hpp.

◆ external_transform_t

typedef const char*(* casadi::external_transform_t) (char api_version, const char *casadi_version, const char *in, external_print_callback_t cb_stdout, external_print_callback_t cb_stderr)

Definition at line 48 of file tools.hpp.

◆ IM

typedef Matrix<casadi_int> casadi::IM

Definition at line 31 of file im_fwd.hpp.

◆ MXDict

typedef std::map<std::string, MX> casadi::MXDict

Readability typedefs

Definition at line 948 of file mx.hpp.

◆ MXIList

typedef std::initializer_list<MX> casadi::MXIList

Readability typedefs

Definition at line 946 of file mx.hpp.

◆ MXVector

typedef std::vector<MX> casadi::MXVector

Readability typedefs

Definition at line 945 of file mx.hpp.

◆ MXVectorVector

typedef std::vector<MXVector> casadi::MXVectorVector

Readability typedefs

Definition at line 947 of file mx.hpp.

◆ native_DM

Definition at line 33 of file optistack.hpp.

◆ SpDict

typedef std::map<std::string, Sparsity> casadi::SpDict

Readability typedefs

Definition at line 1490 of file sparsity.hpp.

◆ SX

Readability typedefs

Examples
SX/SXaddition.cc.

Definition at line 36 of file sx_fwd.hpp.

◆ SXDict

typedef std::map<std::string, SX> casadi::SXDict

Readability typedefs

Definition at line 40 of file sx_fwd.hpp.

◆ SXIList

typedef std::initializer_list<SX> casadi::SXIList

Readability typedefs

Definition at line 38 of file sx_fwd.hpp.

◆ SXVector

typedef std::vector<SX> casadi::SXVector

Readability typedefs

Definition at line 37 of file sx_fwd.hpp.

◆ SXVectorVector

typedef std::vector<SXVector> casadi::SXVectorVector

Readability typedefs

Definition at line 39 of file sx_fwd.hpp.

Enumeration Type Documentation

◆ Attribute

enum casadi::Attribute
strong
Enumerator
MIN 
MAX 
NOMINAL 
START 
VALUE 
STRINGVALUE 
NUMEL 

Definition at line 57 of file dae_builder_internal.hpp.

◆ Causality

enum casadi::Causality
strong
Enumerator
PARAMETER 
CALCULATED_PARAMETER 
INPUT 
OUTPUT 
LOCAL 
INDEPENDENT 
NUMEL 

Definition at line 48 of file dae_builder_internal.hpp.

◆ CollocationPoints

Enumerator
LEGENDRE 
RADAU 

Definition at line 123 of file integration_tools.hpp.

◆ ConstraintType

Enumerator
OPTI_GENERIC_EQUALITY 
OPTI_GENERIC_INEQUALITY 
OPTI_EQUALITY 
OPTI_INEQUALITY 
OPTI_DOUBLE_INEQUALITY 
OPTI_PSD 
OPTI_UNKNOWN 

Definition at line 458 of file optistack.hpp.

◆ DependenciesKind

Enumerator
DEPENDENT 
CONSTANT 
FIXED 
TUNABLE 
DISCRETE 
NUMEL 

Definition at line 60 of file dae_builder_internal.hpp.

◆ DomainType

Enumerator
OPTI_DOMAIN_REAL 
OPTI_DOMAIN_INTEGER 

Definition at line 471 of file optistack.hpp.

◆ Initial

enum casadi::Initial
strong
Enumerator
EXACT 
APPROX 
CALCULATED 
NA 
NUMEL 

Definition at line 54 of file dae_builder_internal.hpp.

◆ Type

enum casadi::Type
strong
Enumerator
FLOAT32 
FLOAT64 
INT8 
UINT8 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
BOOLEAN 
STRING 
BINARY 
ENUMERATION 
CLOCK 
NUMEL 

Definition at line 44 of file dae_builder_internal.hpp.

◆ TypeFmi2

enum casadi::TypeFmi2
strong
Enumerator
REAL 
INTEGER 
BOOLEAN 
STRING 
ENUM 
NUMEL 

Definition at line 41 of file dae_builder_internal.hpp.

◆ UnifiedReturnStatus

Unified return status for solvers

Enumerator
SOLVER_RET_SUCCESS 
SOLVER_RET_UNKNOWN 
SOLVER_RET_LIMITED 
SOLVER_RET_NAN 
SOLVER_RET_INFEASIBLE 
SOLVER_RET_EXCEPTION 

Definition at line 55 of file casadi_types.hpp.

◆ Variability

enum casadi::Variability
strong
Enumerator
CONSTANT 
FIXED 
TUNABLE 
DISCRETE 
CONTINUOUS 
NUMEL 

Definition at line 51 of file dae_builder_internal.hpp.

◆ VariableType

Enumerator
OPTI_VAR 
OPTI_PAR 
OPTI_DUAL_G 

Definition at line 466 of file optistack.hpp.

Function Documentation

◆ _function_buffer_eval()

void CASADI_EXPORT casadi::_function_buffer_eval ( void *  raw)

◆ casadi_sleqp_func_create()

void casadi::casadi_sleqp_func_create ( SleqpFunc **  star,
int  num_vars,
int  num_cons,
SLEQPMemory m 
)

◆ check_sos()

template<class T >
void casadi::check_sos ( casadi_int  nx,
const std::vector< std::vector< T > > &  groups,
std::vector< std::vector< double > > &  weights,
std::vector< casadi_int > &  types 
)

Extra doc: https://github.com/casadi/casadi/wiki/L_1sx

Definition at line 79 of file nlp_tools.hpp.

◆ collocation_coeff()

CASADI_EXPORT void casadi::collocation_coeff ( const std::vector< double > &  tau,
DM C,
DM D,
DM B 
)

A collocation method poses a polynomial Pi that interpolates exactly through an initial state (0,X_0) and helper states at collocation points (tau_j,Xc_j) with j=1..degree.

This function computes the linear mapping between dPi/dt and coefficients Z=[X_0 Xc].

Parameters
taulocation of collocation points (length: degree), as obtained from collocation_points
[out]Cinterpolating coefficients to obtain derivatives. Size: (degree+1)-by-degree

You may find the slopes of Pi at the collocation points as

    dPi/dt @ Xc = (1/h) Z*C,

with h the length of the integration interval.

Parameters
[out]Dinterpolating coefficients to obtain end state. Size: (degree+1)-by-1

You may find the end point of Pi as

    Pi @X_f = Z*D
Parameters
[out]Bquadrature coefficients Size: degree-by-1

Given quadrature righ-hand-sides 'quad' evaluated at the collocation points, you may find the integrated quadratures as

    q = quad*B*h

Extra doc: https://github.com/casadi/casadi/wiki/L_1sq

◆ collocation_interpolators()

CASADI_EXPORT void casadi::collocation_interpolators ( const std::vector< double > &  tau,
std::vector< std::vector< double > > &  C,
std::vector< double > &  D 
)

A collocation method poses a polynomial Pi that interpolates exactly through an initial state (0,X_0) and helper states at collocation points (tau_j,X:collPoint(j)).

This function computes the linear mapping between dPi/dt and coefficients Z=[X_0 X:collPoints].

Parameters
taulocation of collocation points, as obtained from collocation_points
[out]Cinterpolating coefficients to obtain derivatives. Length: order+1, order+1
    dPi/dt @Z_j = (1/h) Sum_i C[j][i]*Z_i,

with h the length of the integration interval.

Parameters
[out]Dinterpolating coefficients to obtain end state. Length: order+1
    Pi @X_f = Sum_i D[i]*Z_i

Extra doc: https://github.com/casadi/casadi/wiki/L_1sp

◆ collocation_points()

CASADI_EXPORT std::vector<double> casadi::collocation_points ( casadi_int  order,
const std::string &  scheme = "radau" 
)
Parameters
orderWhich order (1 to 9 supported)
scheme'radau' or 'legendre'

Extra doc: https://github.com/casadi/casadi/wiki/L_1so

◆ complement()

CASADI_EXPORT std::vector<casadi_int> casadi::complement ( const std::vector< casadi_int > &  v,
casadi_int  size 
)

The supplied vector may contain duplicates and may be non-monotonous The supplied vector will be checked for bounds The result vector is guaranteed to be monotonously increasing

Extra doc: https://github.com/casadi/casadi/wiki/L_1lf

◆ Contraction() [1/2]

template<>
void casadi::Contraction ( const bvec_t &  a,
const bvec_t &  b,
bvec_t &  r 
)
inline

Definition at line 156 of file shared.hpp.

◆ Contraction() [2/2]

template<typename T >
void casadi::Contraction ( const T &  a,
const T &  b,
T &  r 
)

Definition at line 151 of file shared.hpp.

◆ dae_init_gen() [1/2]

CASADI_EXPORT Function casadi::dae_init_gen ( const MXDict dae,
const MXDict dae_red,
const std::string &  init_solver,
const DMDict init_strength = DMDict(),
const Dict init_solver_options = Dict() 
)
Parameters
[in]daeOriginal (unreduced) DAE structure
[in]dae_redReduced DAE (see dae_reduce_index)
[in]init_solverNLP solver plugin name for nlpsol used to construct an initial guess
[in]init_strengthInfluence the nature of the NLP Structure with keys x_impl, dx_impl, z corresponding to inputs of init_gen Each key maps to a DM that should match the variable size corresponding to that key. For each variable the meaning of the corresponding DM value is as follows: When >=0, indicates that the provided initial guess is used in a quadratic penalty (value used as weight) When -1, indicates that the provided initial guess must be observed (simple bound on variable)
[in]init_solver_optionsNLP solver options to be passed to nlpsol
Returns
init_gen A function to generate a consistent initial guess that can be used to pass to an integrator constructed from a semi explict reduced DAE Inputs:
  • x_impl, dx_impl, z: initial guesses in the original DAE space
  • p: parameters
  • t: time Outputs:
  • x0, z0: (semi explicit) integrator states and algebraic variables; typically used as input for integrators
See also
dae_reduce_index

Extra doc: https://github.com/casadi/casadi/wiki/L_1sv

◆ dae_init_gen() [2/2]

CASADI_EXPORT Function casadi::dae_init_gen ( const SXDict dae,
const SXDict dae_red,
const std::string &  init_solver,
const DMDict init_strength = DMDict(),
const Dict init_solver_options = Dict() 
)
Parameters
[in]daeOriginal (unreduced) DAE structure
[in]dae_redReduced DAE (see dae_reduce_index)
[in]init_solverNLP solver plugin name for nlpsol used to construct an initial guess
[in]init_strengthInfluence the nature of the NLP Structure with keys x_impl, dx_impl, z corresponding to inputs of init_gen Each key maps to a DM that should match the variable size corresponding to that key. For each variable the meaning of the corresponding DM value is as follows: When >=0, indicates that the provided initial guess is used in a quadratic penalty (value used as weight) When -1, indicates that the provided initial guess must be observed (simple bound on variable)
[in]init_solver_optionsNLP solver options to be passed to nlpsol
Returns
init_gen A function to generate a consistent initial guess that can be used to pass to an integrator constructed from a semi explict reduced DAE Inputs:
  • x_impl, dx_impl, z: initial guesses in the original DAE space
  • p: parameters
  • t: time Outputs:
  • x0, z0: (semi explicit) integrator states and algebraic variables; typically used as input for integrators
See also
dae_reduce_index

Extra doc: https://github.com/casadi/casadi/wiki/L_1sv

◆ dae_map_semi_expl() [1/2]

CASADI_EXPORT MXDict casadi::dae_map_semi_expl ( const MXDict dae,
const MXDict dae_red,
Function state_to_orig,
Function phi 
)
Parameters
[in]daeOriginal (unreduced) DAE structure
[in]dae_redReduced DAE (see dae_reduce_index)
[out]state_to_origA mapping of integrator (semi explicit) states to states of the original DAE
[out]phiA function to compute the invariants of the reduced DAE Inputs:
  • x and z: (semi explicit) integrator states; typically integrator outputs xf and zf
  • p: parameters
  • t: time
Returns
Semi explicit DAE dictionary, suitable to pass to a CasADi integrator
See also
dae_reduce_index

Extra doc: https://github.com/casadi/casadi/wiki/L_1su

◆ dae_map_semi_expl() [2/2]

CASADI_EXPORT SXDict casadi::dae_map_semi_expl ( const SXDict dae,
const SXDict dae_red,
Function state_to_orig,
Function phi 
)
Parameters
[in]daeOriginal (unreduced) DAE structure
[in]dae_redReduced DAE (see dae_reduce_index)
[out]state_to_origA mapping of integrator (semi explicit) states to states of the original DAE
[out]phiA function to compute the invariants of the reduced DAE Inputs:
  • x and z: (semi explicit) integrator states; typically integrator outputs xf and zf
  • p: parameters
  • t: time
Returns
Semi explicit DAE dictionary, suitable to pass to a CasADi integrator
See also
dae_reduce_index

Extra doc: https://github.com/casadi/casadi/wiki/L_1su

◆ dae_reduce_index() [1/2]

CASADI_EXPORT MXDict casadi::dae_reduce_index ( const MXDict dae,
Dict stats,
const Dict opts = {} 
)

Index reduction leads to a new set of variables and equations.

In the process, a set of constraints (algebraic equations or derivatives) a.k.a invariants is constructed that are invariant to the problem: whenever an initial point satisfies these constraints, the boundary-value-problem outcome will keep satisfying those constraints automatically, even though they are not part of the reduced DAE.

For any practical numerical integration method, there will be numerical drift away from satisfaction of those constraints. In other words, you will see the value of invariants slowly moving away from original zero.

A classic mitigation technique is Baumgarte stabilization: you add these invariants to the reduced DAE as a correction term that acts in a way to make small (numerical) perturbations to the invariants decay to the origin as a dampened linear system.

in which a certain set of constraints (algebraic equations or derivatives) has been dropped in favour of

Parameters
daeExpression dictionary describing the DAE

Each value must be a dense column vector.

keys:

  • x_impl: symbol for implicit differential states
  • dx_impl: symbol for implicit differential state derivatives
  • z: symbol for algebraic variables
  • alg: expression for algebraic equations
  • t: symbol for time
  • p: symbol for parameters
    Parameters
    optsOption dictionary
    'baumgarte_pole': double Poles (inverse time constants) of the Baumgarte invariant correction term. Must be <0 to dampen out perturbations 0 (default) amounts to no correction. Corresponds to -gamma of equation (1.5) in Ascher, Uri M., Hongsheng Chin, and Sebastian Reich. "Stabilization of DAEs and invariant manifolds." Numerische Mathematik 67.2 (1994): 131-149.
Parameters
statsStatistics
Returns
Expression dictionary describing the reduced DAE

In addition the fields allowed in the input DAE, the following keys occur:

  • x: symbol for explicit differential states
  • ode: expression for right-hand-side of explicit differential states
  • I: expression for invariants

Extra doc: https://github.com/casadi/casadi/wiki/L_23h

◆ dae_reduce_index() [2/2]

CASADI_EXPORT SXDict casadi::dae_reduce_index ( const SXDict dae,
Dict stats,
const Dict opts = {} 
)

Index reduction leads to a new set of variables and equations.

In the process, a set of constraints (algebraic equations or derivatives) a.k.a invariants is constructed that are invariant to the problem: whenever an initial point satisfies these constraints, the boundary-value-problem outcome will keep satisfying those constraints automatically, even though they are not part of the reduced DAE.

For any practical numerical integration method, there will be numerical drift away from satisfaction of those constraints. In other words, you will see the value of invariants slowly moving away from original zero.

A classic mitigation technique is Baumgarte stabilization: you add these invariants to the reduced DAE as a correction term that acts in a way to make small (numerical) perturbations to the invariants decay to the origin as a dampened linear system.

in which a certain set of constraints (algebraic equations or derivatives) has been dropped in favour of

Parameters
daeExpression dictionary describing the DAE

Each value must be a dense column vector.

keys:

  • x_impl: symbol for implicit differential states
  • dx_impl: symbol for implicit differential state derivatives
  • z: symbol for algebraic variables
  • alg: expression for algebraic equations
  • t: symbol for time
  • p: symbol for parameters
    Parameters
    optsOption dictionary
    'baumgarte_pole': double Poles (inverse time constants) of the Baumgarte invariant correction term. Must be <0 to dampen out perturbations 0 (default) amounts to no correction. Corresponds to -gamma of equation (1.5) in Ascher, Uri M., Hongsheng Chin, and Sebastian Reich. "Stabilization of DAEs and invariant manifolds." Numerische Mathematik 67.2 (1994): 131-149.
Parameters
statsStatistics
Returns
Expression dictionary describing the reduced DAE

In addition the fields allowed in the input DAE, the following keys occur:

  • x: symbol for explicit differential states
  • ode: expression for right-hand-side of explicit differential states
  • I: expression for invariants

Extra doc: https://github.com/casadi/casadi/wiki/L_23h

◆ detect_simple_bounds() [1/2]

CASADI_EXPORT void casadi::detect_simple_bounds ( const MX xX,
const MX p,
const MX g,
const MX lbg,
const MX ubg,
std::vector< casadi_int > &  gi,
MX lbx,
MX ubx,
Function lam_forward,
Function lam_backward 
)

◆ detect_simple_bounds() [2/2]

CASADI_EXPORT void casadi::detect_simple_bounds ( const SX xX,
const SX p,
const SX g,
const SX lbg,
const SX ubg,
std::vector< casadi_int > &  gi,
SX lbx,
SX ubx,
Function lam_forward,
Function lam_backward 
)

Given parametric constraints:

*   subject to lbg(p) <= g(x,p) <= ubg(p)
* 

Returns an equivalent set

*   subject to  lbg(p)(gi) <= g(x,p)(gi) <= ubg(p)(gi)
*               lbx(p) <= x                 <= ubx(p)
* 
Parameters
[out]lam_forward(lam_g,p)->(lam_sg,lam_x)
[out]lam_backward(lam_sg,lam_x,p)->(lam_g)

Extra doc: https://github.com/casadi/casadi/wiki/L_1sw

◆ doc_linsol()

CASADI_EXPORT std::string casadi::doc_linsol ( const std::string &  name)

◆ einstein_eval()

template<typename T >
void casadi::einstein_eval ( casadi_int  n_iter,
const std::vector< casadi_int > &  iter_dims,
const std::vector< casadi_int > &  strides_a,
const std::vector< casadi_int > &  strides_b,
const std::vector< casadi_int > &  strides_c,
const T *  a_in,
const T *  b_in,
T *  c_in 
)

Definition at line 161 of file shared.hpp.

◆ einstein_process()

template<typename T >
casadi_int casadi::einstein_process ( const T &  A,
const T &  B,
const T &  C,
const std::vector< casadi_int > &  dim_a,
const std::vector< casadi_int > &  dim_b,
const std::vector< casadi_int > &  dim_c,
const std::vector< casadi_int > &  a,
const std::vector< casadi_int > &  b,
const std::vector< casadi_int > &  c,
std::vector< casadi_int > &  iter_dims,
std::vector< casadi_int > &  strides_a,
std::vector< casadi_int > &  strides_b,
std::vector< casadi_int > &  strides_c 
)

Definition at line 35 of file shared.hpp.

◆ external() [1/3]

CASADI_EXPORT Function casadi::external ( const std::string &  name,
const Dict opts = Dict() 
)
Parameters
nameName as in the label assigned to a CasADi Function object: Function(name,...,...) Will be used to look up symbols/functions named eg. <name>_eval Use nm (linux/osx) or depends.exe (win) to check which symbols are present in your shared library

File name is assumed to be ./<name>.so

Extra doc: https://github.com/casadi/casadi/wiki/L_i0

◆ external() [2/3]

CASADI_EXPORT Function casadi::external ( const std::string &  name,
const Importer li,
const Dict opts = Dict() 
)

File name given

Extra doc: https://github.com/casadi/casadi/wiki/L_i2

◆ external() [3/3]

CASADI_EXPORT Function casadi::external ( const std::string &  name,
const std::string &  bin_name,
const Dict opts = Dict() 
)
Parameters
nameName as in the label assigned to a CasADi Function object: Function(name,...,...) Will be used to look up symbols/functions named eg. <name>_eval Use nm (linux/osx) or depends.exe (win) to check which symbols are present in your shared library
bin_nameFile name of the shared library

Extra doc: https://github.com/casadi/casadi/wiki/L_i1

◆ external_transform()

CASADI_EXPORT Function casadi::external_transform ( const std::string &  name,
const std::string &  op,
const Function f,
const Dict opts = Dict() 
)
Parameters
nameName of the shared library
opName of the operation
fFunction to transform
optsOptions
Extra doc: https://github.com/casadi/casadi/wiki/L_27i 

◆ flatten_nested_vector() [1/2]

template<class T , class S >
void casadi::flatten_nested_vector ( const std::vector< std::vector< T > > &  nested,
std::vector< S > &  flat 
)

Contents of nested[i] ends up in flat[indices[i]]..flat[indices[i+1]-1]

Extra doc: https://github.com/casadi/casadi/wiki/L_1lh

◆ flatten_nested_vector() [2/2]

template<class T , class S , class I >
void casadi::flatten_nested_vector ( const std::vector< std::vector< T > > &  nested,
std::vector< S > &  flat,
std::vector< I > &  indices 
)

Contents of nested[i] ends up in flat[indices[i]]..flat[indices[i+1]-1]

Extra doc: https://github.com/casadi/casadi/wiki/L_1li

◆ has_linsol()

CASADI_EXPORT bool casadi::has_linsol ( const std::string &  name)

◆ has_negative()

template<typename T >
bool casadi::has_negative ( const std::vector< T > &  v)

◆ hash_combine() [1/3]

template<typename T >
void casadi::hash_combine ( std::size_t &  seed,
const std::vector< T > &  v 
)
inline

Extra doc: https://github.com/casadi/casadi/wiki/L_dr

Definition at line 1211 of file sparsity.hpp.

◆ hash_combine() [2/3]

template<typename T >
void casadi::hash_combine ( std::size_t &  seed,
const T *  v,
std::size_t  sz 
)
inline

Extra doc: https://github.com/casadi/casadi/wiki/L_dq

Definition at line 1203 of file sparsity.hpp.

◆ hash_combine() [3/3]

template<typename T >
void casadi::hash_combine ( std::size_t &  seed,
v 
)
inline

Extra doc: https://github.com/casadi/casadi/wiki/L_dp

Definition at line 1195 of file sparsity.hpp.

◆ hash_sparsity() [1/2]

CASADI_EXPORT std::size_t casadi::hash_sparsity ( casadi_int  nrow,
casadi_int  ncol,
const casadi_int *  colind,
const casadi_int *  row 
)

◆ hash_sparsity() [2/2]

CASADI_EXPORT std::size_t casadi::hash_sparsity ( casadi_int  nrow,
casadi_int  ncol,
const std::vector< casadi_int > &  colind,
const std::vector< casadi_int > &  row 
)

◆ hash_value() [1/2]

template<>
size_t casadi::hash_value ( std::string  v)
inline

Definition at line 1216 of file sparsity.hpp.

◆ hash_value() [2/2]

template<typename T >
size_t casadi::hash_value ( v)
inline

Extra doc: https://github.com/casadi/casadi/wiki/L_do

Definition at line 1189 of file sparsity.hpp.

◆ in_range() [1/2]

template<typename T >
bool casadi::in_range ( const std::vector< T > &  v,
casadi_int  lower,
casadi_int  upper 
)

◆ in_range() [2/2]

template<typename T >
bool casadi::in_range ( const std::vector< T > &  v,
casadi_int  upper 
)

◆ index_interp1d()

double CASADI_EXPORT casadi::index_interp1d ( const std::vector< double > &  x,
double  xq,
bool  equidistant = false 
)

◆ is_decreasing()

template<typename T >
bool casadi::is_decreasing ( const std::vector< T > &  v)

◆ is_increasing()

template<typename T >
bool casadi::is_increasing ( const std::vector< T > &  v)

◆ is_monotone()

template<typename T >
bool casadi::is_monotone ( const std::vector< T > &  v)

◆ is_nondecreasing()

template<typename T >
bool casadi::is_nondecreasing ( const std::vector< T > &  v)

◆ is_nonincreasing()

template<typename T >
bool casadi::is_nonincreasing ( const std::vector< T > &  v)

◆ is_regular()

template<typename T >
bool casadi::is_regular ( const std::vector< T > &  v)

Definition at line 415 of file casadi_misc.hpp.

◆ is_slice() [1/2]

bool CASADI_EXPORT casadi::is_slice ( const IM x,
bool  ind1 = false 
)

◆ is_slice() [2/2]

bool CASADI_EXPORT casadi::is_slice ( const std::vector< casadi_int > &  v,
bool  ind1 = false 
)

◆ is_slice2()

bool CASADI_EXPORT casadi::is_slice2 ( const std::vector< casadi_int > &  v)

◆ is_strictly_monotone()

template<typename T >
bool casadi::is_strictly_monotone ( const std::vector< T > &  v)

◆ is_zero()

template<class T >
bool casadi::is_zero ( const T &  x)
inline

Definition at line 87 of file casadi_limits.hpp.

◆ load_linsol()

CASADI_EXPORT void casadi::load_linsol ( const std::string &  name)

◆ lookupvector() [1/2]

CASADI_EXPORT std::vector<casadi_int> casadi::lookupvector ( const std::vector< casadi_int > &  v)

◆ lookupvector() [2/2]

CASADI_EXPORT std::vector<casadi_int> casadi::lookupvector ( const std::vector< casadi_int > &  v,
casadi_int  size 
)

lookupvector[i]!=-1 <=> v contains i v[lookupvector[i]] == i <=> v contains i

Duplicates are treated by looking up last occurrence

Extra doc: https://github.com/casadi/casadi/wiki/L_1lg

◆ matrixName< SXElem >()

template<>
std::string casadi::matrixName< SXElem > ( )
inline

Definition at line 33 of file sx.hpp.

◆ message_prefix()

std::ostream& casadi::message_prefix ( std::ostream &  stream)
inline

Definition at line 119 of file exception.hpp.

◆ normalized_in()

int casadi::normalized_in ( std::istream &  stream,
double &  ret 
)
inline

Definition at line 440 of file casadi_misc.hpp.

◆ normalized_out()

void casadi::normalized_out ( std::ostream &  stream,
double  val 
)
inline

Definition at line 429 of file casadi_misc.hpp.

◆ normalized_setup() [1/2]

CASADI_EXPORT void casadi::normalized_setup ( std::istream &  stream)

◆ normalized_setup() [2/2]

CASADI_EXPORT void casadi::normalized_setup ( std::ostream &  stream)

◆ read_matlab() [1/2]

template<typename T >
void casadi::read_matlab ( std::ifstream &  file,
std::vector< std::vector< T > > &  v 
)

◆ read_matlab() [2/2]

template<typename T >
void casadi::read_matlab ( std::istream &  stream,
std::vector< T > &  v 
)

◆ simpleIntegrator()

CASADI_EXPORT Function casadi::simpleIntegrator ( Function  f,
const std::string &  integrator = "cvodes",
const Dict integrator_options = Dict() 
)

◆ simpleIRK()

CASADI_EXPORT Function casadi::simpleIRK ( Function  f,
casadi_int  N = 10,
casadi_int  order = 4,
const std::string &  scheme = "radau",
const std::string &  solver = "newton",
const Dict solver_options = Dict() 
)

The constructed function has three inputs, corresponding to initial state (x0), parameter (p) and integration time (h) and one output, corresponding to final state (xf).

Parameters
fODE function with two inputs (x and p) and one output (xdot)
NNumber of integrator steps
orderOrder of interpolating polynomials
schemeCollocation scheme, as excepted by collocationPoints function.
solverSolver plugin
solver_optionsOptions to be passed to the solver plugin

Extra doc: https://github.com/casadi/casadi/wiki/L_1ss

◆ simpleRK()

CASADI_EXPORT Function casadi::simpleRK ( Function  f,
casadi_int  N = 10,
casadi_int  order = 4 
)

The constructed function has three inputs, corresponding to initial state (x0), parameter (p) and integration time (h) and one output, corresponding to final state (xf).

Parameters
fODE function with two inputs (x and p) and one output (xdot)
NNumber of integrator steps
orderOrder of interpolating polynomials

Extra doc: https://github.com/casadi/casadi/wiki/L_1sr

◆ slicot_mb03vd()

int casadi::slicot_mb03vd ( int  n,
int  p,
int  ilo,
int  ihi,
double *  a,
int  lda1,
int  lda2,
double *  tau,
int  ldtau,
double *  dwork = nullptr 
)

◆ slicot_mb03vy()

int casadi::slicot_mb03vy ( int  n,
int  p,
int  ilo,
int  ihi,
double *  a,
int  lda1,
int  lda2,
const double *  tau,
int  ldtau,
double *  dwork = nullptr,
int  ldwork = 0 
)

◆ slicot_mb03wd()

int casadi::slicot_mb03wd ( char  job,
char  compz,
int  n,
int  p,
int  ilo,
int  ihi,
int  iloz,
int  ihiz,
double *  h,
int  ldh1,
int  ldh2,
double *  z,
int  ldz1,
int  ldz2,
double *  wr,
double *  wi,
double *  dwork = nullptr,
int  ldwork = 0 
)

◆ slicot_mb05nd()

int casadi::slicot_mb05nd ( int  n,
double  delta,
const double *  a,
int  lda,
double *  ex,
int  ldex,
double *  exint,
int  ldexin,
double  tol,
int *  iwork,
double *  dwork,
int  ldwork 
)

◆ temporary_file()

CASADI_EXPORT std::string casadi::temporary_file ( const std::string &  prefix,
const std::string &  suffix 
)

◆ to_slice() [1/2]

Slice CASADI_EXPORT casadi::to_slice ( const IM x,
bool  ind1 = false 
)

◆ to_slice() [2/2]

Slice CASADI_EXPORT casadi::to_slice ( const std::vector< casadi_int > &  v,
bool  ind1 = false 
)

◆ to_slice2()

std::pair<Slice, Slice> CASADI_EXPORT casadi::to_slice2 ( const std::vector< casadi_int > &  v)

◆ trim_path()

std::string casadi::trim_path ( const std::string &  full_path)
inline

Definition at line 107 of file exception.hpp.

◆ uerr()

CASADI_EXPORT std::ostream& casadi::uerr ( )

◆ uout()

CASADI_EXPORT std::ostream& casadi::uout ( )

◆ write_matlab() [1/2]

template<typename T >
void casadi::write_matlab ( std::ostream &  stream,
const std::vector< std::vector< T > > &  v 
)

◆ write_matlab() [2/2]

template<typename T >
void casadi::write_matlab ( std::ostream &  stream,
const std::vector< T > &  v 
)