List of all members | Public Member Functions
casadi::DaeBuilder Class Reference

A symbolic representation of a differential-algebraic equations model. More...

#include <dae_builder.hpp>

Detailed Description

Variables:

t:      independent variable (usually time)
c:      constants
p:      parameters
d:      dependent parameters (time independent)
u:      controls
w:      dependent variables  (time dependent)
x:      differential states
z:      algebraic variables
q:      quadrature states
y:      outputs

Equations:

differential equations: \dot{x} ==  ode(...)
algebraic equations:          0 ==  alg(...)
quadrature equations:   \dot{q} == quad(...)
dependent parameters:         d == ddef(d_prev,p)
dependent variables:          w == wdef(w_prev,x,z,u,p,t)
output equations:             y == ydef(...)
initial equations:     init_lhs == init_rhs(...)
events:      when when_cond < 0: when_lhs := when_rhs
Date
2012-2021
Author
Joel Andersson

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

Definition at line 68 of file dae_builder.hpp.

Inheritance diagram for casadi::DaeBuilder:
Inheritance graph
[legend]

Public Member Functions

std::string type_name () const
 Readable name of the class. More...
 
 DaeBuilder ()
 Default constructor. More...
 
 DaeBuilder (const std::string &name, const std::string &path="", const Dict &opts=Dict())
 Construct a DaeBuilder instance. More...
 
const std::string & name () const
 Name of instance. More...
 
std::vector< std::string > outputs () const
 Model structure: outputs. More...
 
std::vector< std::string > derivatives () const
 Model structure: derivatives. More...
 
std::vector< std::string > initial_unknowns () const
 Model structure: initial unknowns. More...
 
void clear_all (const std::string &v)
 Clear all variables of a type. More...
 
void set_all (const std::string &v, const std::vector< std::string > &name)
 Set all variables of a type. More...
 
Function create (const std::string &name, const Dict &opts=Dict()) const
 Load a function from an FMU DLL, standard IO conforming with simulator. More...
 
Function dependent_fun (const std::string &fname, const std::vector< std::string > &s_in, const std::vector< std::string > &s_out) const
 Construct a function for evaluating dependent parameters. More...
 
std::vector< std::string > der (const std::vector< std::string > &name) const
 Get the time derivative of an expression. More...
 
casadi_int numel (const std::string &name) const
 Get the number of elements of a variable. More...
 
std::vector< casadi_int > dimension (const std::string &name) const
 Get the dimensions of a variable. More...
 
std::string der (const std::string &name) const
 Get the time derivative of an expression, single variable. More...
 
double attribute (const std::string &a, const std::string &name) const
 Get an attribute, single variable. More...
 
void set_attribute (const std::string &a, const std::string &name, double val)
 Set an attribute, single variable. More...
 
double min (const std::string &name) const
 Get the lower bound, single variable. More...
 
void set_min (const std::string &name, double val)
 Set the lower bound, single variable. More...
 
double max (const std::string &name) const
 Get the upper bound, single variable. More...
 
void set_max (const std::string &name, double val)
 Set the upper bound, single variable. More...
 
double nominal (const std::string &name) const
 Get the nominal value, single variable. More...
 
void set_nominal (const std::string &name, double val)
 Set the nominal value, single variable. More...
 
double start (const std::string &name) const
 Get the start attribute, single variable. More...
 
void set_start (const std::string &name, double val)
 Set the start attribute, single variable. More...
 
void reset ()
 
void set (const std::string &name, double val)
 
void set (const std::string &name, const std::string &val)
 
GenericType get (const std::string &name) const
 Evaluate the values for a set of variables at the initial time, single value. More...
 
std::vector< double > attribute (const std::string &a, const std::vector< std::string > &name) const
 Get an attribute. More...
 
void set_attribute (const std::string &a, const std::vector< std::string > &name, const std::vector< double > &val)
 Set an attribute. More...
 
std::vector< double > min (const std::vector< std::string > &name) const
 Get the lower bound. More...
 
void set_min (const std::vector< std::string > &name, const std::vector< double > &val)
 Set the lower bound. More...
 
std::vector< double > max (const std::vector< std::string > &name) const
 Get the upper bound. More...
 
void set_max (const std::vector< std::string > &name, const std::vector< double > &val)
 Set the upper bound. More...
 
std::vector< double > nominal (const std::vector< std::string > &name) const
 Get the nominal value. More...
 
void set_nominal (const std::vector< std::string > &name, const std::vector< double > &val)
 Set the nominal value. More...
 
std::vector< double > start (const std::vector< std::string > &name) const
 Get the start attribute. More...
 
void set_start (const std::vector< std::string > &name, const std::vector< double > &val)
 Set the start attribute. More...
 
void set (const std::vector< std::string > &name, const std::vector< double > &val)
 Set the current value. More...
 
void set (const std::vector< std::string > &name, const std::vector< std::string > &val)
 Set the current value (string) More...
 
std::vector< GenericTypeget (const std::vector< std::string > &name) const
 Evaluate the values for a set of variables at the initial time. More...
 
MX add_variable (const std::string &name, casadi_int n=1)
 Add a new variable: returns corresponding symbolic expression. More...
 
MX add_variable (const std::string &name, const Sparsity &sp)
 Add a new variable: returns corresponding symbolic expression. More...
 
void add_variable (const MX &new_v)
 Add a new variable from symbolic expressions. More...
 
size_t add_variable_new (const std::string &name, casadi_int n=1)
 Add a new variable: returns corresponding symbolic expression. More...
 
size_t add_variable_new (const std::string &name, const Sparsity &sp)
 Add a new variable: returns corresponding symbolic expression. More...
 
size_t add_variable_new (const MX &new_v)
 Add a new variable from symbolic expressions. More...
 
bool has_variable (const std::string &name) const
 Check if a particular variable exists. More...
 
std::vector< std::string > all_variables () const
 Get a list of all variables. More...
 
Function oracle (bool sx=false, bool elim_w=false, bool lifted_calls=false) const
 Get the (cached) oracle, SX or MX. More...
 
Sparsity jac_sparsity (const std::vector< std::string > &onames, const std::vector< std::string > &inames) const
 Get Jacobian sparsity. More...
 
std::string class_name () const
 Get class name. More...
 
void disp (std::ostream &stream, bool more=false) const
 Print a description of the object. More...
 
std::string get_str (bool more=false) const
 Get string representation. More...
 
bool is_null () const
 Is a null pointer? More...
 
casadi_int __hash__ () const
 Returns a number that is unique for a given Node. More...
 
Variables and equations
const MXt () const
 Independent variable (usually time) More...
 
std::vector< std::string > x () const
 Differential states. More...
 
std::vector< MXode () const
 Ordinary differential equations (ODE) More...
 
std::vector< std::string > z () const
 Algebraic variables. More...
 
std::vector< MXalg () const
 Algebraic equations. More...
 
std::vector< std::string > q () const
 Quadrature states. More...
 
std::vector< MXquad () const
 Quadrature equations. More...
 
std::vector< std::string > y () const
 Output variables. More...
 
std::vector< MXydef () const
 Definitions of output variables. More...
 
std::vector< std::string > u () const
 Free controls. More...
 
std::vector< std::string > p () const
 Parameters. More...
 
std::vector< std::string > c () const
 Named constants. More...
 
std::vector< MXcdef () const
 Definitions of named constants. More...
 
std::vector< std::string > d () const
 Dependent parameters. More...
 
std::vector< MXddef () const
 Definitions of dependent parameters. More...
 
std::vector< std::string > w () const
 Dependent variables. More...
 
std::vector< MXwdef () const
 Dependent variables and corresponding definitions. More...
 
const std::vector< MX > & aux () const
 Auxiliary variables: Used e.g. to define functions. More...
 
const std::vector< MX > & init_lhs () const
 Initial conditions, left-hand-side. More...
 
const std::vector< MX > & init_rhs () const
 Initial conditions, right-hand-side. More...
 
const std::vector< MX > & when_cond () const
 When statement: triggering condition. More...
 
const std::vector< MX > & when_lhs () const
 When statement: left-hand-side. More...
 
const std::vector< MX > & when_rhs () const
 When statement: right-hand-side. More...
 
bool has_t () const
 Is there a time variable? More...
 
casadi_int nx () const
 Differential states. More...
 
casadi_int nz () const
 Algebraic variables. More...
 
casadi_int nq () const
 Quadrature states. More...
 
casadi_int ny () const
 Output variables. More...
 
casadi_int nu () const
 Free controls. More...
 
casadi_int np () const
 Parameters. More...
 
casadi_int nc () const
 Named constants. More...
 
casadi_int nd () const
 Dependent parameters. More...
 
casadi_int nw () const
 Dependent variables. More...
 
Symbolic modeling

Formulate a dynamic system model

MX add_t (const std::string &name="t")
 
MX add_p (const std::string &name=std::string())
 Add a new parameter. More...
 
MX add_u (const std::string &name=std::string())
 Add a new control. More...
 
MX add_x (const std::string &name=std::string())
 Add a new differential state. More...
 
MX add_z (const std::string &name=std::string())
 Add a new algebraic variable. More...
 
MX add_q (const std::string &name=std::string())
 Add a new quadrature state. More...
 
MX add_c (const std::string &name, const MX &new_cdef)
 Add a new constant. More...
 
MX add_d (const std::string &name, const MX &new_ddef)
 Add a new dependent parameter. More...
 
MX add_w (const std::string &name, const MX &new_wdef)
 Add a new dependent variable. More...
 
MX add_y (const std::string &name, const MX &new_ydef)
 Add a new output. More...
 
void set_ode (const std::string &name, const MX &ode_rhs)
 Specify the ordinary differential equation for a state. More...
 
void set_alg (const std::string &name, const MX &alg_rhs)
 Specificy the residual equation for an algebraic variable. More...
 
MX add_aux (const std::string &name=std::string(), casadi_int n=1)
 Add an auxiliary variable. More...
 
void add_init (const MX &lhs, const MX &rhs)
 Add an initial equation. More...
 
void add_when (const MX &cond, const MX &lhs, const MX &rhs)
 Add a when statement. More...
 
void sanity_check () const
 Check if dimensions match. More...
 
Register an existing variable
void register_t (const std::string &name)
 
void register_p (const std::string &name)
 
void register_u (const std::string &name)
 
void register_x (const std::string &name)
 
void register_z (const std::string &name)
 
void register_q (const std::string &name)
 
void register_c (const std::string &name)
 
void register_d (const std::string &name)
 
void register_w (const std::string &name)
 
void register_y (const std::string &name)
 
[DEPRECATED] Specify all variables of a type: Call set_all instead
void set_u (const std::vector< std::string > &name)
 
void set_x (const std::vector< std::string > &name)
 
void set_z (const std::vector< std::string > &name, const std::vector< std::string > &alg=std::vector< std::string >())
 
void set_q (const std::vector< std::string > &name)
 
void set_y (const std::vector< std::string > &name)
 
Manipulation

Reformulate the dynamic optimization problem.

void clear_in (const std::string &v)
 [DEPRECATED] Clear input variable: Replaced by clear_all More...
 
void eliminate_w ()
 Eliminate all dependent variables. More...
 
void lift (bool lift_shared=true, bool lift_calls=true)
 Lift problem formulation by extracting shared subexpressions. More...
 
void eliminate_quad ()
 Eliminate quadrature states and turn them into ODE states. More...
 
void sort_d ()
 Sort dependent parameters. More...
 
void sort_w ()
 Sort dependent variables. More...
 
void sort_z (const std::vector< std::string > &z_order)
 Sort algebraic variables. More...
 
void prune (bool prune_p=true, bool prune_u=true)
 Prune unused controls. More...
 
void tear ()
 Identify iteration variables and residual equations using naming convention. More...
 
Functions

Add or load auxiliary functions

Function add_fun (const std::string &name, const std::vector< std::string > &arg, const std::vector< std::string > &res, const Dict &opts=Dict())
 Add a function from loaded expressions. More...
 
Function add_fun (const Function &f)
 Add an already existing function. More...
 
Function add_fun (const std::string &name, const Importer &compiler, const Dict &opts=Dict())
 Add an external function. More...
 
bool has_fun (const std::string &name) const
 Does a particular function already exist? More...
 
Function fun (const std::string &name) const
 Get function by name. More...
 
std::vector< Functionfun () const
 Get all functions. More...
 
void gather_fun (casadi_int max_depth=-1)
 Collect embedded functions from the expression graph. More...
 
Import and export
void parse_fmi (const std::string &filename)
 
bool provides_directional_derivative () const
 Does the FMU provide support for analytic derivatives. More...
 
void load_fmi_description (const std::string &filename)
 Import problem description from FMI or XML. More...
 
std::vector< std::string > export_fmu (const Dict &opts=Dict())
 Export instance into an FMU. More...
 
void add_lc (const std::string &name, const std::vector< std::string > &f_out)
 Add a named linear combination of output expressions. More...
 
Function create (const std::string &fname, const std::vector< std::string > &name_in, const std::vector< std::string > &name_out, bool sx, bool lifted_calls=false) const
 Construct a function object, legacy syntax. More...
 
Function create (const std::string &name, const std::vector< std::string > &name_in, const std::vector< std::string > &name_out, const Dict &opts=Dict()) const
 Construct a function object, names provided. More...
 
MX var (const std::string &name) const
 
MX operator() (const std::string &name) const
 
MX beq (const std::string &name) const
 
void set_beq (const std::string &name, const MX &val)
 
casadi_int value_reference (const std::string &name) const
 
void set_value_reference (const std::string &name, casadi_int val)
 
std::string description (const std::string &name) const
 
void set_description (const std::string &name, const std::string &val)
 
std::string type (const std::string &name, casadi_int fmi_version=3) const
 
void set_type (const std::string &name, const std::string &val)
 
std::string causality (const std::string &name) const
 
void set_causality (const std::string &name, const std::string &val)
 
std::string variability (const std::string &name) const
 
void set_variability (const std::string &name, const std::string &val)
 
std::string initial (const std::string &name) const
 
void set_initial (const std::string &name, const std::string &val)
 
std::string unit (const std::string &name) const
 
void set_unit (const std::string &name, const std::string &val)
 
std::string display_unit (const std::string &name) const
 
void set_display_unit (const std::string &name, const std::string &val)
 

Constructor & Destructor Documentation

◆ DaeBuilder() [1/2]

casadi::DaeBuilder::DaeBuilder ( )

◆ DaeBuilder() [2/2]

casadi::DaeBuilder::DaeBuilder ( const std::string &  name,
const std::string &  path = "",
const Dict opts = Dict() 
)
explicit

Member Function Documentation

◆ __hash__()

casadi_int casadi::SharedObject::__hash__ ( ) const
inherited

If the Object does not point to any node, "0" is returned.

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

◆ add_aux()

MX casadi::DaeBuilder::add_aux ( const std::string &  name = std::string(),
casadi_int  n = 1 
)

◆ add_c()

MX casadi::DaeBuilder::add_c ( const std::string &  name,
const MX new_cdef 
)

◆ add_d()

MX casadi::DaeBuilder::add_d ( const std::string &  name,
const MX new_ddef 
)

◆ add_fun() [1/3]

Function casadi::DaeBuilder::add_fun ( const Function f)

◆ add_fun() [2/3]

Function casadi::DaeBuilder::add_fun ( const std::string &  name,
const Importer compiler,
const Dict opts = Dict() 
)

◆ add_fun() [3/3]

Function casadi::DaeBuilder::add_fun ( const std::string &  name,
const std::vector< std::string > &  arg,
const std::vector< std::string > &  res,
const Dict opts = Dict() 
)

◆ add_init()

void casadi::DaeBuilder::add_init ( const MX lhs,
const MX rhs 
)

◆ add_lc()

void casadi::DaeBuilder::add_lc ( const std::string &  name,
const std::vector< std::string > &  f_out 
)

◆ add_p()

MX casadi::DaeBuilder::add_p ( const std::string &  name = std::string())

◆ add_q()

MX casadi::DaeBuilder::add_q ( const std::string &  name = std::string())

◆ add_t()

MX casadi::DaeBuilder::add_t ( const std::string &  name = "t")

Add an independent variable (time)

◆ add_u()

MX casadi::DaeBuilder::add_u ( const std::string &  name = std::string())

◆ add_variable() [1/3]

void casadi::DaeBuilder::add_variable ( const MX new_v)

◆ add_variable() [2/3]

MX casadi::DaeBuilder::add_variable ( const std::string &  name,
casadi_int  n = 1 
)

◆ add_variable() [3/3]

MX casadi::DaeBuilder::add_variable ( const std::string &  name,
const Sparsity sp 
)

◆ add_variable_new() [1/3]

size_t casadi::DaeBuilder::add_variable_new ( const MX new_v)

◆ add_variable_new() [2/3]

size_t casadi::DaeBuilder::add_variable_new ( const std::string &  name,
casadi_int  n = 1 
)

◆ add_variable_new() [3/3]

size_t casadi::DaeBuilder::add_variable_new ( const std::string &  name,
const Sparsity sp 
)

◆ add_w()

MX casadi::DaeBuilder::add_w ( const std::string &  name,
const MX new_wdef 
)

◆ add_when()

void casadi::DaeBuilder::add_when ( const MX cond,
const MX lhs,
const MX rhs 
)

◆ add_x()

MX casadi::DaeBuilder::add_x ( const std::string &  name = std::string())

◆ add_y()

MX casadi::DaeBuilder::add_y ( const std::string &  name,
const MX new_ydef 
)

◆ add_z()

MX casadi::DaeBuilder::add_z ( const std::string &  name = std::string())

◆ alg()

std::vector<MX> casadi::DaeBuilder::alg ( ) const

◆ all_variables()

std::vector<std::string> casadi::DaeBuilder::all_variables ( ) const

◆ attribute() [1/2]

double casadi::DaeBuilder::attribute ( const std::string &  a,
const std::string &  name 
) const

◆ attribute() [2/2]

std::vector<double> casadi::DaeBuilder::attribute ( const std::string &  a,
const std::vector< std::string > &  name 
) const

◆ aux()

const std::vector<MX>& casadi::DaeBuilder::aux ( ) const

◆ beq()

MX casadi::DaeBuilder::beq ( const std::string &  name) const

Get/set the binding equation for a variable

◆ c()

std::vector<std::string> casadi::DaeBuilder::c ( ) const

◆ causality()

std::string casadi::DaeBuilder::causality ( const std::string &  name) const

Get/set the causality

◆ cdef()

std::vector<MX> casadi::DaeBuilder::cdef ( ) const

◆ class_name()

std::string casadi::SharedObject::class_name ( ) const
inherited

◆ clear_all()

void casadi::DaeBuilder::clear_all ( const std::string &  v)

◆ clear_in()

void casadi::DaeBuilder::clear_in ( const std::string &  v)
inline

Definition at line 371 of file dae_builder.hpp.

◆ create() [1/3]

Function casadi::DaeBuilder::create ( const std::string &  fname,
const std::vector< std::string > &  name_in,
const std::vector< std::string > &  name_out,
bool  sx,
bool  lifted_calls = false 
) const

◆ create() [2/3]

Function casadi::DaeBuilder::create ( const std::string &  name,
const Dict opts = Dict() 
) const
Parameters
nameName assigned to the resulting function object
optsOptional settings

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

◆ create() [3/3]

Function casadi::DaeBuilder::create ( const std::string &  name,
const std::vector< std::string > &  name_in,
const std::vector< std::string > &  name_out,
const Dict opts = Dict() 
) const
Parameters
nameName assigned to the resulting function object
name_inNames of all the inputs
name_outNames of all the outputs
optsOptional settings

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

◆ d()

std::vector<std::string> casadi::DaeBuilder::d ( ) const

◆ ddef()

std::vector<MX> casadi::DaeBuilder::ddef ( ) const

Interdependencies are allowed but must be non-cyclic.

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

◆ dependent_fun()

Function casadi::DaeBuilder::dependent_fun ( const std::string &  fname,
const std::vector< std::string > &  s_in,
const std::vector< std::string > &  s_out 
) const

◆ der() [1/2]

std::string casadi::DaeBuilder::der ( const std::string &  name) const

◆ der() [2/2]

std::vector<std::string> casadi::DaeBuilder::der ( const std::vector< std::string > &  name) const

◆ derivatives()

std::vector<std::string> casadi::DaeBuilder::derivatives ( ) const

◆ description()

std::string casadi::DaeBuilder::description ( const std::string &  name) const

Get/set description

◆ dimension()

std::vector<casadi_int> casadi::DaeBuilder::dimension ( const std::string &  name) const

◆ disp()

void casadi::SharedObject::disp ( std::ostream &  stream,
bool  more = false 
) const
inherited

◆ display_unit()

std::string casadi::DaeBuilder::display_unit ( const std::string &  name) const

Get/set the display unit

◆ eliminate_quad()

void casadi::DaeBuilder::eliminate_quad ( )

◆ eliminate_w()

void casadi::DaeBuilder::eliminate_w ( )

◆ export_fmu()

std::vector<std::string> casadi::DaeBuilder::export_fmu ( const Dict opts = Dict())

◆ fun() [1/2]

std::vector<Function> casadi::DaeBuilder::fun ( ) const

◆ fun() [2/2]

Function casadi::DaeBuilder::fun ( const std::string &  name) const

◆ gather_fun()

void casadi::DaeBuilder::gather_fun ( casadi_int  max_depth = -1)

◆ get() [1/2]

GenericType casadi::DaeBuilder::get ( const std::string &  name) const

◆ get() [2/2]

std::vector<GenericType> casadi::DaeBuilder::get ( const std::vector< std::string > &  name) const

◆ get_str()

std::string casadi::SharedObject::get_str ( bool  more = false) const
inlineinherited

Definition at line 138 of file shared_object.hpp.

◆ has_fun()

bool casadi::DaeBuilder::has_fun ( const std::string &  name) const

◆ has_t()

bool casadi::DaeBuilder::has_t ( ) const

◆ has_variable()

bool casadi::DaeBuilder::has_variable ( const std::string &  name) const

◆ init_lhs()

const std::vector<MX>& casadi::DaeBuilder::init_lhs ( ) const

◆ init_rhs()

const std::vector<MX>& casadi::DaeBuilder::init_rhs ( ) const

◆ initial()

std::string casadi::DaeBuilder::initial ( const std::string &  name) const

Get/set the initial property

◆ initial_unknowns()

std::vector<std::string> casadi::DaeBuilder::initial_unknowns ( ) const

◆ is_null()

bool casadi::SharedObject::is_null ( ) const
inherited

◆ jac_sparsity()

Sparsity casadi::DaeBuilder::jac_sparsity ( const std::vector< std::string > &  onames,
const std::vector< std::string > &  inames 
) const

◆ lift()

void casadi::DaeBuilder::lift ( bool  lift_shared = true,
bool  lift_calls = true 
)

◆ load_fmi_description()

void casadi::DaeBuilder::load_fmi_description ( const std::string &  filename)

◆ max() [1/2]

double casadi::DaeBuilder::max ( const std::string &  name) const

◆ max() [2/2]

std::vector<double> casadi::DaeBuilder::max ( const std::vector< std::string > &  name) const

◆ min() [1/2]

double casadi::DaeBuilder::min ( const std::string &  name) const

◆ min() [2/2]

std::vector<double> casadi::DaeBuilder::min ( const std::vector< std::string > &  name) const

◆ name()

const std::string& casadi::DaeBuilder::name ( ) const

◆ nc()

casadi_int casadi::DaeBuilder::nc ( ) const

◆ nd()

casadi_int casadi::DaeBuilder::nd ( ) const

◆ nominal() [1/2]

double casadi::DaeBuilder::nominal ( const std::string &  name) const

◆ nominal() [2/2]

std::vector<double> casadi::DaeBuilder::nominal ( const std::vector< std::string > &  name) const

◆ np()

casadi_int casadi::DaeBuilder::np ( ) const

◆ nq()

casadi_int casadi::DaeBuilder::nq ( ) const

◆ nu()

casadi_int casadi::DaeBuilder::nu ( ) const

◆ numel()

casadi_int casadi::DaeBuilder::numel ( const std::string &  name) const

◆ nw()

casadi_int casadi::DaeBuilder::nw ( ) const

◆ nx()

casadi_int casadi::DaeBuilder::nx ( ) const

◆ ny()

casadi_int casadi::DaeBuilder::ny ( ) const

◆ nz()

casadi_int casadi::DaeBuilder::nz ( ) const

◆ ode()

std::vector<MX> casadi::DaeBuilder::ode ( ) const

◆ operator()()

MX casadi::DaeBuilder::operator() ( const std::string &  name) const
inline

Get variable expression by name

Definition at line 482 of file dae_builder.hpp.

◆ oracle()

Function casadi::DaeBuilder::oracle ( bool  sx = false,
bool  elim_w = false,
bool  lifted_calls = false 
) const

◆ outputs()

std::vector<std::string> casadi::DaeBuilder::outputs ( ) const

◆ p()

std::vector<std::string> casadi::DaeBuilder::p ( ) const

◆ parse_fmi()

void casadi::DaeBuilder::parse_fmi ( const std::string &  filename)
inline

Import existing problem from FMI/XML

Definition at line 433 of file dae_builder.hpp.

◆ provides_directional_derivative()

bool casadi::DaeBuilder::provides_directional_derivative ( ) const

◆ prune()

void casadi::DaeBuilder::prune ( bool  prune_p = true,
bool  prune_u = true 
)

◆ q()

std::vector<std::string> casadi::DaeBuilder::q ( ) const

◆ quad()

std::vector<MX> casadi::DaeBuilder::quad ( ) const

◆ register_c()

void casadi::DaeBuilder::register_c ( const std::string &  name)

◆ register_d()

void casadi::DaeBuilder::register_d ( const std::string &  name)

◆ register_p()

void casadi::DaeBuilder::register_p ( const std::string &  name)

◆ register_q()

void casadi::DaeBuilder::register_q ( const std::string &  name)

◆ register_t()

void casadi::DaeBuilder::register_t ( const std::string &  name)

◆ register_u()

void casadi::DaeBuilder::register_u ( const std::string &  name)

◆ register_w()

void casadi::DaeBuilder::register_w ( const std::string &  name)

◆ register_x()

void casadi::DaeBuilder::register_x ( const std::string &  name)

◆ register_y()

void casadi::DaeBuilder::register_y ( const std::string &  name)

◆ register_z()

void casadi::DaeBuilder::register_z ( const std::string &  name)

◆ reset()

void casadi::DaeBuilder::reset ( )

◆ sanity_check()

void casadi::DaeBuilder::sanity_check ( ) const

◆ set() [1/4]

void casadi::DaeBuilder::set ( const std::string &  name,
const std::string &  val 
)

◆ set() [2/4]

void casadi::DaeBuilder::set ( const std::string &  name,
double  val 
)

◆ set() [3/4]

void casadi::DaeBuilder::set ( const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set() [4/4]

void casadi::DaeBuilder::set ( const std::vector< std::string > &  name,
const std::vector< std::string > &  val 
)

◆ set_alg()

void casadi::DaeBuilder::set_alg ( const std::string &  name,
const MX alg_rhs 
)

◆ set_all()

void casadi::DaeBuilder::set_all ( const std::string &  v,
const std::vector< std::string > &  name 
)

◆ set_attribute() [1/2]

void casadi::DaeBuilder::set_attribute ( const std::string &  a,
const std::string &  name,
double  val 
)

◆ set_attribute() [2/2]

void casadi::DaeBuilder::set_attribute ( const std::string &  a,
const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set_beq()

void casadi::DaeBuilder::set_beq ( const std::string &  name,
const MX val 
)

Get/set the binding equation for a variable

◆ set_causality()

void casadi::DaeBuilder::set_causality ( const std::string &  name,
const std::string &  val 
)

Get/set the causality

◆ set_description()

void casadi::DaeBuilder::set_description ( const std::string &  name,
const std::string &  val 
)

Get/set description

◆ set_display_unit()

void casadi::DaeBuilder::set_display_unit ( const std::string &  name,
const std::string &  val 
)

Get/set the display unit

◆ set_initial()

void casadi::DaeBuilder::set_initial ( const std::string &  name,
const std::string &  val 
)

Get/set the initial property

◆ set_max() [1/2]

void casadi::DaeBuilder::set_max ( const std::string &  name,
double  val 
)

◆ set_max() [2/2]

void casadi::DaeBuilder::set_max ( const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set_min() [1/2]

void casadi::DaeBuilder::set_min ( const std::string &  name,
double  val 
)

◆ set_min() [2/2]

void casadi::DaeBuilder::set_min ( const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set_nominal() [1/2]

void casadi::DaeBuilder::set_nominal ( const std::string &  name,
double  val 
)

◆ set_nominal() [2/2]

void casadi::DaeBuilder::set_nominal ( const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set_ode()

void casadi::DaeBuilder::set_ode ( const std::string &  name,
const MX ode_rhs 
)

◆ set_q()

void casadi::DaeBuilder::set_q ( const std::vector< std::string > &  name)
inline

Definition at line 359 of file dae_builder.hpp.

◆ set_start() [1/2]

void casadi::DaeBuilder::set_start ( const std::string &  name,
double  val 
)

◆ set_start() [2/2]

void casadi::DaeBuilder::set_start ( const std::vector< std::string > &  name,
const std::vector< double > &  val 
)

◆ set_type()

void casadi::DaeBuilder::set_type ( const std::string &  name,
const std::string &  val 
)

Get/set the type

◆ set_u()

void casadi::DaeBuilder::set_u ( const std::vector< std::string > &  name)
inline

Definition at line 355 of file dae_builder.hpp.

◆ set_unit()

void casadi::DaeBuilder::set_unit ( const std::string &  name,
const std::string &  val 
)

Get/set the unit

◆ set_value_reference()

void casadi::DaeBuilder::set_value_reference ( const std::string &  name,
casadi_int  val 
)

Get/set value reference

◆ set_variability()

void casadi::DaeBuilder::set_variability ( const std::string &  name,
const std::string &  val 
)

Get/set the variability

◆ set_x()

void casadi::DaeBuilder::set_x ( const std::vector< std::string > &  name)
inline

Definition at line 356 of file dae_builder.hpp.

◆ set_y()

void casadi::DaeBuilder::set_y ( const std::vector< std::string > &  name)
inline

Definition at line 360 of file dae_builder.hpp.

◆ set_z()

void casadi::DaeBuilder::set_z ( const std::vector< std::string > &  name,
const std::vector< std::string > &  alg = std::vector< std::string >() 
)

◆ sort_d()

void casadi::DaeBuilder::sort_d ( )

◆ sort_w()

void casadi::DaeBuilder::sort_w ( )

◆ sort_z()

void casadi::DaeBuilder::sort_z ( const std::vector< std::string > &  z_order)

◆ start() [1/2]

double casadi::DaeBuilder::start ( const std::string &  name) const

◆ start() [2/2]

std::vector<double> casadi::DaeBuilder::start ( const std::vector< std::string > &  name) const

◆ t()

const MX& casadi::DaeBuilder::t ( ) const

◆ tear()

void casadi::DaeBuilder::tear ( )

◆ type()

std::string casadi::DaeBuilder::type ( const std::string &  name,
casadi_int  fmi_version = 3 
) const

Get/set the type

◆ type_name()

std::string casadi::DaeBuilder::type_name ( ) const
inline

Definition at line 74 of file dae_builder.hpp.

◆ u()

std::vector<std::string> casadi::DaeBuilder::u ( ) const

◆ unit()

std::string casadi::DaeBuilder::unit ( const std::string &  name) const

Get/set the unit

◆ value_reference()

casadi_int casadi::DaeBuilder::value_reference ( const std::string &  name) const

Get/set value reference

◆ var()

MX casadi::DaeBuilder::var ( const std::string &  name) const

Get variable expression by name

◆ variability()

std::string casadi::DaeBuilder::variability ( const std::string &  name) const

Get/set the variability

◆ w()

std::vector<std::string> casadi::DaeBuilder::w ( ) const

◆ wdef()

std::vector<MX> casadi::DaeBuilder::wdef ( ) const

Interdependencies are allowed but must be non-cyclic.

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

◆ when_cond()

const std::vector<MX>& casadi::DaeBuilder::when_cond ( ) const

◆ when_lhs()

const std::vector<MX>& casadi::DaeBuilder::when_lhs ( ) const

◆ when_rhs()

const std::vector<MX>& casadi::DaeBuilder::when_rhs ( ) const

◆ x()

std::vector<std::string> casadi::DaeBuilder::x ( ) const

◆ y()

std::vector<std::string> casadi::DaeBuilder::y ( ) const

◆ ydef()

std::vector<MX> casadi::DaeBuilder::ydef ( ) const

◆ z()

std::vector<std::string> casadi::DaeBuilder::z ( ) const

The documentation for this class was generated from the following file: