#include <dae_builder_internal.hpp>
Internal class for DaeBuilder, see comments on the public class.
Definition at line 209 of file dae_builder_internal.hpp.
Classes | |
struct | CallIO |
Helper class, represents inputs and outputs for a function call node. More... | |
Public Types | |
using | weak_ref_type = WeakRefInternal |
Public Member Functions | |
DaeBuilderInternal (const std::string &name, const std::string &path, const Dict &opts) | |
Constructor. More... | |
~DaeBuilderInternal () override | |
Destructor. More... | |
std::string | class_name () const override |
Readable name of the internal class. More... | |
void | sanity_check () const |
Check if dimensions match. More... | |
std::vector< MX > | input (Category ind) const |
std::vector< MX > | output (OutputCategory ind) const |
std::vector< MX > | input (const std::vector< Category > &ind) const |
std::vector< MX > | output (const std::vector< OutputCategory > &ind) const |
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, const Dict &opts, bool sx, bool lifted_calls) const |
Construct a function object. More... | |
Function | fmu_fun (const std::string &fname, const std::vector< std::string > &name_in, const std::vector< std::string > &name_out, const Dict &opts) const |
Construct function from an FMU DLL. 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... | |
Function | transition (const std::string &fname, casadi_int index, bool dummy_index_input=false) const |
Construct a function describing transition at a specific event. More... | |
Function | transition (const std::string &fname) const |
Construct a function describing transition at all events. More... | |
Function | gather_eq () const |
Function corresponding to all equations. More... | |
const MX & | var (const std::string &name) const |
Get variable expression by name. More... | |
MX | get_der (size_t ind) const |
Get a derivative expression by variable index (const, never create) More... | |
MX | get_der (size_t ind, bool may_allocate=true) |
Get a derivative expression by variable index (non-const, may create) More... | |
MX | der (const MX &var) const |
Get a derivative expression by non-differentiated expression (const, never create) More... | |
MX | der (const MX &var, bool may_allocate=true) |
Get a derivative expression by non-differentiated expression (non-const, may create) More... | |
std::string | unique_name (const std::string &prefix, bool allow_no_prefix=true) const |
Find a unique name, with a specific prefix. More... | |
std::string | type_name () const |
Readable name of the class. More... | |
void | disp (std::ostream &stream, bool more) const override |
Print description. More... | |
std::string | get_str (bool more=false) const |
Get string representation. More... | |
Variable & | new_variable (const std::string &name, const std::vector< casadi_int > &dimension={1}, const MX &expr=MX()) |
Create a new variable. More... | |
bool | has (const std::string &name) const |
Check if a particular variable exists. More... | |
std::vector< std::string > | all () const |
Get a list of all variables. More... | |
std::vector< std::string > | all (Category cat) const |
Get a list of all variables of a particular category. More... | |
size_t | n_variables () const |
Length of variables array. More... | |
size_t | n_mem () const |
Length of memory for all variables. More... | |
std::vector< double > | start_all () const |
Start values for all variables. More... | |
const MX & | var (size_t ind) const |
Get variable expression by index. More... | |
const MX & | var (Category cat, size_t ind) const |
Get variable expression by category and index. More... | |
std::vector< MX > | var (const std::vector< size_t > &ind) const |
Get variable expressions by index. More... | |
std::vector< MX > | var (Category cat) const |
Get variable expressions by category. More... | |
size_t | find (const std::string &name) const |
Get index of variable, given name. More... | |
size_t | find (const MX &v) const |
Get index of variable, given expression. More... | |
std::vector< size_t > | find (const std::vector< std::string > &name) const |
Get indices of variable, given multiple names. More... | |
std::vector< size_t > | find (const std::vector< MX > &v) const |
Get indices of variable, given multiple expressions. More... | |
const std::string & | name (size_t ind) const |
Get variable name by index. More... | |
std::vector< std::string > | name (const std::vector< size_t > &ind) const |
Get variable names by indices. More... | |
const 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< size_t > &oind, const std::vector< size_t > &iind) const |
Get Jacobian sparsity. More... | |
Sparsity | hess_sparsity (const std::vector< size_t > &oind, const std::vector< size_t > &iind) const |
Get what is known of the Hessian sparsity. More... | |
casadi_int | getCount () const |
Get the reference count. More... | |
std::string | debug_repr (const SharedObjectInternal *) const |
GenericWeakRef< SharedObject, SharedObjectInternal > * | weak () |
Get a weak reference to the object. More... | |
Manipulation | |
Reformulate the dynamic optimization problem. | |
void | eliminate (Category cat) |
Eliminate all variables of a category. More... | |
void | sort (Category cat) |
Sort all variables of a category. More... | |
void | lift (bool lift_shared, bool lift_calls) |
Lift problem formulation by extracting shared subexpressions. More... | |
void | sort_z (const std::vector< std::string > &z_order) |
Sort algebraic variables. More... | |
std::vector< size_t > & | indices (Category cat) |
Classified variable indices (mutable) More... | |
const std::vector< size_t > & | indices (Category cat) const |
Classified variable indices (immutable) More... | |
size_t | size (Category cat) const |
Number of indices with a particular category. More... | |
void | reorder (Category cat, const std::vector< size_t > &v) |
Reorder variables in a category. More... | |
void | reorder (const std::string &n, std::vector< size_t > &ind, const std::vector< size_t > &v) const |
Reorder any index vector. More... | |
void | prune (bool prune_p, bool prune_u) |
Prune unused controls. More... | |
void | tearing_variables (std::vector< std::string > *res, std::vector< std::string > *iv, std::vector< std::string > *iv_on_hold) const |
Identify free variables and residual equations. More... | |
void | tear () |
Identify free variables and residual equations. More... | |
Variable & | variable (size_t ind) |
const Variable & | variable (size_t ind) const |
Variable & | variable (Category cat, size_t ind) |
const Variable & | variable (Category cat, size_t ind) const |
Variable & | variable (const std::string &name) |
const Variable & | variable (const std::string &name) const |
Variable & | variable (const MX &v) |
const Variable & | variable (const MX &v) const |
Protected Member Functions | |
bool | has_t () const |
Is there a time variable? More... | |
const MX & | time () const |
std::vector< MX > | cdef () const |
Definitions of dependent constants. More... | |
std::vector< MX > | quad () const |
Quadrature right hand sides. More... | |
std::vector< MX > | init_lhs () const |
Initial conditions, left-hand-side. More... | |
std::vector< MX > | init_rhs () const |
Initial conditions, right-hand-side. More... | |
Variable & | add (const std::string &name, Causality causality, Variability variability, const Dict &opts) |
Add a new variable. More... | |
Variable & | add (const std::string &name, Causality causality, Variability variability, const MX &expr, const Dict &opts) |
Add a new variable, expression provided. More... | |
Variable & | add (const std::string &name, Causality causality, const Dict &opts) |
Add a new variable, default variability. More... | |
Variable & | add (const std::string &name, const Dict &opts) |
Add a new variable, default variability and causality. More... | |
void | categorize (size_t ind, Category cat) |
Set or change the category for a variable. More... | |
void | insert (std::vector< size_t > &v, size_t ind) const |
Insert into list of variables, keeping it ordered. More... | |
void | remove (std::vector< size_t > &v, size_t ind) const |
Remove from list of variables. More... | |
Causality | causality (size_t ind) const |
Get causality. More... | |
void | set_causality (size_t ind, Causality causality) |
Set causality. More... | |
Variability | variability (size_t ind) const |
Get variability. More... | |
void | set_variability (size_t ind, Variability variability) |
Set variability. More... | |
Category | category (size_t ind) const |
Get category. More... | |
void | set_category (size_t ind, Category cat) |
Set category. More... | |
void | eq (const MX &lhs, const MX &rhs, const Dict &opts) |
Add a simple equation. More... | |
void | when (const MX &cond, const std::vector< std::string > &eqs, const Dict &opts) |
Add when equations. More... | |
Variable & | assign (const std::string &name, const MX &val) |
Assignment inside when-equations or if-else equations. More... | |
Variable & | reinit (const std::string &name, const MX &val) |
Reinitialize a state inside when-equations. More... | |
void | set_init (const std::string &name, const MX &init_rhs) |
Set a initial equation. More... | |
MX | read_expr (const XmlNode &node) |
Read an equation. More... | |
MX | read_identifier (const XmlNode &node) |
Read an identifier expression. More... | |
Variable & | read_variable (const XmlNode &node, Attribute *att=0) |
Read a variable. More... | |
void | import_default_experiment (const XmlNode &n) |
std::vector< casadi_int > | read_dependencies (const XmlNode &n) |
std::vector< DependenciesKind > | read_dependencies_kind (const XmlNode &n, size_t ndep) |
void | import_model_exchange (const XmlNode &n) |
void | import_model_variables (const XmlNode &modvars) |
void | import_model_structure (const XmlNode &n) |
void | import_binding_equations (const XmlNode &eqs) |
void | import_dynamic_equations (const XmlNode &eqs) |
void | import_initial_equations (const XmlNode &eqs) |
void | clear_cache () const |
Problem structure has changed: Clear cache. More... | |
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... | |
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... | |
void | reset () |
casadi_int | size (Attribute a, const std::vector< std::string > &name) const |
Total number of elements for a particular attribute. More... | |
MX | jac_vdef_v_from_calls (std::map< MXNode *, CallIO > &call_nodes, const std::vector< casadi_int > &h_offsets) const |
Calculate contribution to jac_vdef_v from lifted calls. More... | |
MX | hess_v_v_from_calls (std::map< MXNode *, CallIO > &call_nodes, const std::vector< casadi_int > &h_offsets) const |
Calculate contribution to hess_?_v_v from lifted calls. More... | |
void | initSingleton () |
void | destroySingleton () |
B | shared_from_this () |
Get a shared object from the current internal object. More... | |
const B | shared_from_this () const |
Get a shared object from the current internal object. More... | |
double | attribute (Attribute a, const std::string &name) const |
std::vector< double > | attribute (Attribute a, const std::vector< std::string > &name) const |
void | set_attribute (Attribute a, const std::string &name, double val) |
void | set_attribute (Attribute a, const std::vector< std::string > &name, const std::vector< double > &val) |
std::string | string_attribute (Attribute a, const std::string &name) const |
std::vector< std::string > | string_attribute (Attribute a, const std::vector< std::string > &name) const |
void | set_string_attribute (Attribute a, const std::string &name, const std::string &val) |
void | set_string_attribute (Attribute a, const std::vector< std::string > &name, const std::vector< std::string > &val) |
Static Protected Member Functions | |
static std::string | qualified_name (const XmlNode &nn, Attribute *att=0) |
Get the qualified name. More... | |
static Variability | default_variability (Causality causality, Type type) |
Default variability attribute, per the FMI specification. More... | |
static Initial | default_initial (Causality causality, Variability variability) |
static void | sort_dependent (std::vector< MX > &v, std::vector< MX > &vdef) |
Protected Attributes | |
bool | debug_ |
double | fmutol_ |
bool | ignore_time_ |
std::string | fmi_version_ |
std::string | model_name_ |
std::string | instantiation_token_ |
std::string | description_ |
std::string | author_ |
std::string | copyright_ |
std::string | license_ |
std::string | generation_tool_ |
std::string | generation_date_and_time_ |
std::string | variable_naming_convention_ |
casadi_int | number_of_event_indicators_ |
double | start_time_ |
double | stop_time_ |
double | tolerance_ |
double | step_size_ |
std::string | model_identifier_ |
bool | provides_directional_derivatives_ |
bool | provides_adjoint_derivatives_ |
bool | can_be_instantiated_only_once_per_process_ |
std::vector< std::string > | source_files_ |
std::string | name_ |
Name of instance. More... | |
Resource | resource_ |
bool | symbolic_ |
bool | detect_quad_ |
casadi_int | fmi_major_ |
std::vector< Variable * > | variables_ |
All variables. More... | |
std::vector< size_t > | outputs_ |
std::vector< size_t > | derivatives_ |
std::vector< size_t > | initial_unknowns_ |
std::vector< size_t > | event_indicators_ |
std::vector< size_t > | residuals_ |
std::unordered_map< std::string, size_t > | varind_ |
Find of variable by name. More... | |
std::unordered_map< unsigned int, size_t > | vrmap_ |
Find of variable by value reference. More... | |
std::vector< std::vector< size_t > > | indices_ |
Ordered variables. More... | |
std::vector< size_t > | init_ |
std::vector< std::pair< size_t, std::vector< size_t > > > | when_ |
Function::AuxOut | lc_ |
Linear combinations of output expressions. More... | |
std::vector< Function > | fun_ |
Functions. More... | |
Function | oracle_ [2][2][2] |
Function oracles (cached) More... | |
bool | clear_cache_ |
Should the cache be cleared? More... | |
Friends | |
class | DaeBuilder |
class | FmuInternal |
class | FmuFunction |
class | Variable |
Import and export | |
void | load_fmi_description (const std::string &filename) |
std::vector< std::string > | export_fmu (const Dict &opts) const |
Export instance into an FMU (experimental) More... | |
std::string | generate_wrapper (const std::string &guid, const CodeGenerator &gen) const |
Generate FMU wrapper file (fmi3Functions.c) More... | |
std::string | generate_build_description (const std::vector< std::string > &cfiles) const |
Generate buildDescription.xml. More... | |
std::string | generate_model_description (const std::string &guid) const |
Generate modelDescription.xml. More... | |
XmlNode | generate_model_variables () const |
Generate FMU ModelVariables. More... | |
XmlNode | generate_model_structure () const |
Generate FMU ModelStructure. More... | |
void | update_dependencies () const |
Update model variable dependencies. More... | |
static std::string | iso_8601_time () |
Get current date and time in the ISO 8601 format. More... | |
static std::string | generate_guid () |
static std::string | generate (const std::vector< size_t > &v) |
static std::string | generate (const std::vector< double > &v) |
|
inherited |
Definition at line 152 of file shared_object.hpp.
|
explicit |
Definition at line 565 of file dae_builder_internal.cpp.
References can_be_instantiated_only_once_per_process_, casadi::Resource::change_option(), clear_cache_, debug_, detect_quad_, fmutol_, ignore_time_, indices_, casadi::nan, number_of_event_indicators_, provides_adjoint_derivatives_, provides_directional_derivatives_, resource_, start_time_, step_size_, stop_time_, symbolic_, and tolerance_.
|
override |
Definition at line 559 of file dae_builder_internal.cpp.
References variables_.
|
protected |
Definition at line 2866 of file dae_builder_internal.cpp.
References add(), causality(), default_variability(), casadi::FLOAT64, and name().
|
protected |
Definition at line 2735 of file dae_builder_internal.cpp.
References causality(), name(), and variability().
Referenced by add(), assign(), eq(), import_model_variables(), reinit(), and when().
|
protected |
Definition at line 2741 of file dae_builder_internal.cpp.
References casadi::C, casadi::CALCULATED_PARAMETER, categorize(), casadi::Variable::causality, causality(), casadi::CONSTANT, casadi::CONTINUOUS, casadi::D, casadi::description(), casadi::Variable::description, detect_quad_, casadi::DISCRETE, casadi::Variable::display_unit, casadi::FIXED, has_t(), casadi::INDEPENDENT, casadi::Variable::index, casadi::inf, casadi::Variable::initial, casadi::INPUT, casadi::LOCAL, casadi::Variable::max, casadi::Variable::min, name(), new_variable(), casadi::Variable::nominal, casadi::OT_DOUBLE, casadi::OUTPUT, outputs_, casadi::P, casadi::PARAMETER, casadi::Q, casadi::Variable::start, casadi::T, casadi::to_string(), casadi::TUNABLE, casadi::Variable::type, casadi::U, casadi::Variable::unit, casadi::Variable::variability, variability(), casadi::X, and casadi::Z.
|
inlineprotected |
Definition at line 3950 of file dae_builder_internal.cpp.
References fun_, has_fun(), and casadi::Function::name().
|
protected |
Definition at line 3956 of file dae_builder_internal.cpp.
References has_fun(), indices(), casadi::Variable::name, name(), output(), size(), var(), variable(), casadi::W, and casadi::WDEF.
void casadi::DaeBuilderInternal::add_lc | ( | const std::string & | name, |
const std::vector< std::string > & | f_out | ||
) |
Definition at line 1887 of file dae_builder_internal.cpp.
References lc_, name(), and sanity_check().
std::vector< std::string > casadi::DaeBuilderInternal::all | ( | ) | const |
Definition at line 1593 of file dae_builder_internal.cpp.
References n_variables(), and variables_.
std::vector< std::string > casadi::DaeBuilderInternal::all | ( | Category | cat | ) | const |
|
protected |
Definition at line 3214 of file dae_builder_internal.cpp.
References add(), casadi::CALCULATED, categorize(), casadi::CONTINUOUS, casadi::Variable::index, casadi::LOCAL, name(), casadi::Variable::parent, unique_name(), and variable().
Referenced by import_binding_equations(), import_dynamic_equations(), lift(), and read_expr().
|
protected |
Get by attribute name
Definition at line 4003 of file dae_builder_internal.cpp.
References casadi::Variable::get_attribute(), name(), and variable().
|
protected |
Get by attribute name
Definition at line 4009 of file dae_builder_internal.cpp.
References casadi::Variable::get_attribute(), name(), size(), and variable().
|
protected |
Definition at line 2877 of file dae_builder_internal.cpp.
References casadi::Variable::category, indices(), insert(), casadi::is_acyclic(), casadi::NUMEL, remove(), and variable().
Referenced by add(), assign(), eliminate(), import_dynamic_equations(), import_model_structure(), import_model_variables(), reinit(), set_category(), set_variability(), and when().
|
protected |
Definition at line 3014 of file dae_builder_internal.cpp.
References casadi::Variable::category, and variable().
|
protected |
Definition at line 2921 of file dae_builder_internal.cpp.
References casadi::Variable::causality, and variable().
Referenced by add(), default_initial(), default_variability(), import_model_variables(), and set_causality().
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_2c7
Definition at line 2667 of file dae_builder_internal.cpp.
References casadi::C, indices(), size(), and variable().
|
inlineoverridevirtual |
Implements casadi::SharedObjectInternal.
Definition at line 224 of file dae_builder_internal.hpp.
|
protected |
Definition at line 2222 of file dae_builder_internal.cpp.
References clear_cache_, casadi::GenericShared< Shared, Internal >::is_null(), and oracle_.
Referenced by oracle().
Function casadi::DaeBuilderInternal::create | ( | const std::string & | fname, |
const std::vector< std::string > & | name_in, | ||
const std::vector< std::string > & | name_out, | ||
const Dict & | opts, | ||
bool | sx, | ||
bool | lifted_calls | ||
) | const |
Definition at line 1912 of file dae_builder_internal.cpp.
References casadi::DaeBuilderInternal::CallIO::adj1_arg, casadi::DaeBuilderInternal::CallIO::arg, casadi::MX::dep(), casadi::DaeBuilderInternal::CallIO::f, casadi::Function::factory(), casadi::MX::find(), fmu_fun(), casadi::MX::get(), hess_v_v_from_calls(), indices(), casadi::MX::is_constant(), casadi::GenericMatrix< MatType >::is_empty(), casadi::MX::is_output(), jac_vdef_v_from_calls(), lc_, casadi::Function::mx_in(), casadi::MX::n_dep(), casadi::MX::n_out(), casadi::Function::name_in(), casadi::Function::name_out(), oracle(), output(), casadi::DaeBuilderInternal::CallIO::res, size(), symbolic_, casadi::DaeBuilderInternal::CallIO::v, var(), casadi::DaeBuilderInternal::CallIO::vdef, casadi::W, casadi::WDEF, casadi::MX::which_function(), and casadi::MX::which_output().
|
inherited |
Definition at line 62 of file generic_shared_internal.hpp.
|
staticprotected |
Definition at line 2708 of file dae_builder_internal.cpp.
References casadi::CALCULATED, casadi::CALCULATED_PARAMETER, causality(), casadi::CONSTANT, casadi::CONTINUOUS, casadi::DISCRETE, casadi::EXACT, casadi::FIXED, casadi::LOCAL, casadi::NA, casadi::OUTPUT, casadi::PARAMETER, casadi::TUNABLE, and variability().
Referenced by import_model_variables().
|
staticprotected |
Definition at line 2692 of file dae_builder_internal.cpp.
References casadi::CALCULATED_PARAMETER, causality(), casadi::CONTINUOUS, casadi::DISCRETE, casadi::FIXED, casadi::FLOAT32, casadi::FLOAT64, and casadi::PARAMETER.
Referenced by add(), and import_model_variables().
Function casadi::DaeBuilderInternal::dependent_fun | ( | const std::string & | fname, |
const std::vector< std::string > & | s_in, | ||
const std::vector< std::string > & | s_out | ||
) | const |
Definition at line 2434 of file dae_builder_internal.cpp.
References casadi::D, casadi::DDEF, indices(), input(), output(), var(), casadi::W, and casadi::WDEF.
Definition at line 1682 of file dae_builder_internal.cpp.
References var().
Referenced by der(), disp(), generate_model_structure(), generate_wrapper(), import_dynamic_equations(), lift(), and update_dependencies().
Definition at line 1686 of file dae_builder_internal.cpp.
References der(), find(), get_der(), casadi::GenericMatrix< MatType >::is_column(), casadi::MX::is_symbolic(), casadi::MX::is_valid_input(), casadi::MX::join_primitives(), casadi::MX::primitives(), and var().
|
inlineprotectedinherited |
Called in the destructor of singletons
Definition at line 77 of file generic_shared_internal.hpp.
|
overridevirtual |
Implements casadi::SharedObjectInternal.
Definition at line 1226 of file dae_builder_internal.cpp.
References casadi::Variable::bind, casadi::C, casadi::D, der(), casadi::description(), eq(), fun_, casadi::Variable::ieq, indices(), init_, casadi::GenericMatrix< MatType >::is_empty(), casadi::Variable::name, outputs_, casadi::P, casadi::Variable::parent, casadi::Q, residuals_, sanity_check(), size(), casadi::T, casadi::to_string(), casadi::U, casadi::Variable::v, var(), variable(), casadi::W, when_, casadi::X, and casadi::Z.
Referenced by import_binding_equations(), import_dynamic_equations(), and import_initial_equations().
void casadi::DaeBuilderInternal::eliminate | ( | Category | cat | ) |
Definition at line 1723 of file dae_builder_internal.cpp.
References casadi::CALCULATED, categorize(), clear_cache_, casadi::dependent_definition(), indices(), casadi::is_acyclic(), output(), casadi::Q, set_category(), size(), sort(), casadi::to_string(), var(), variable(), variables_, and casadi::X.
Definition at line 3058 of file dae_builder_internal.cpp.
References add(), casadi::Variable::category, casadi::CONTINUOUS, casadi::Variable::der, find(), casadi::Variable::index, casadi::GenericMatrix< MatType >::is_column(), casadi::GenericMatrix< MatType >::is_dense(), casadi::LOCAL, casadi::Variable::name, casadi::Variable::parent, casadi::GenericMatrix< MatType >::size1(), casadi::str(), unique_name(), variable(), and casadi::Z.
Referenced by disp(), import_binding_equations(), import_dynamic_equations(), import_initial_equations(), transition(), and when().
std::vector< std::string > casadi::DaeBuilderInternal::export_fmu | ( | const Dict & | opts | ) | const |
Definition at line 893 of file dae_builder_internal.cpp.
References casadi::CodeGenerator::add(), casadi::Function::create(), event_indicators_, casadi::Function::forward(), casadi::CodeGenerator::generate(), generate_build_description(), generate_guid(), generate_model_description(), generate_wrapper(), casadi::GenericShared< Shared, Internal >::is_null(), name_, casadi::Function::reverse(), transition(), and update_dependencies().
size_t casadi::DaeBuilderInternal::find | ( | const MX & | v | ) | const |
Definition at line 3916 of file dae_builder_internal.cpp.
References find(), casadi::is_equal(), casadi::MX::is_symbolic(), casadi::MX::name(), and variables_.
size_t casadi::DaeBuilderInternal::find | ( | const std::string & | name | ) | const |
std::vector< size_t > casadi::DaeBuilderInternal::find | ( | const std::vector< MX > & | v | ) | const |
std::vector< size_t > casadi::DaeBuilderInternal::find | ( | const std::vector< std::string > & | name | ) | const |
Function casadi::DaeBuilderInternal::fmu_fun | ( | const std::string & | fname, |
const std::vector< std::string > & | name_in, | ||
const std::vector< std::string > & | name_out, | ||
const Dict & | opts | ||
) | const |
Definition at line 2562 of file dae_builder_internal.cpp.
References casadi::Function::create(), casadi::Variable::der, casadi::dyn_in(), casadi::dyn_out(), find(), casadi::FMI2, casadi::FMI3, fmi_major_, FmuFunction, casadi::FmuFunction::identify_io(), indices(), name(), outputs_, casadi::P, size(), casadi::T, casadi::U, variable(), casadi::X, and casadi::Z.
Referenced by create().
|
protected |
Function casadi::DaeBuilderInternal::gather_eq | ( | ) | const |
Definition at line 2641 of file dae_builder_internal.cpp.
References output(), casadi::output_categories(), and casadi::to_string().
|
static |
|
static |
Helper function: generate constants
Definition at line 937 of file dae_builder_internal.cpp.
Referenced by generate_wrapper().
std::string casadi::DaeBuilderInternal::generate_build_description | ( | const std::vector< std::string > & | cfiles | ) | const |
Definition at line 703 of file dae_builder_internal.cpp.
References casadi::XmlNode::children, casadi::XmlFile::dump(), casadi::XmlNode::name, name_, and casadi::XmlNode::set_attribute().
Referenced by export_fmu().
|
static |
Import existing problem from FMI/XML
Definition at line 4170 of file dae_builder_internal.cpp.
References time().
Referenced by export_fmu().
std::string casadi::DaeBuilderInternal::generate_model_description | ( | const std::string & | guid | ) | const |
Definition at line 740 of file dae_builder_internal.cpp.
References casadi::XmlNode::children, casadi::description(), casadi::XmlFile::dump(), generate_model_structure(), generate_model_variables(), iso_8601_time(), casadi::XmlNode::name, name_, and casadi::XmlNode::set_attribute().
Referenced by export_fmu().
XmlNode casadi::DaeBuilderInternal::generate_model_structure | ( | ) | const |
Definition at line 796 of file dae_builder_internal.cpp.
References casadi::XmlNode::children, casadi::Variable::dependencies, der(), event_indicators_, indices(), casadi::XmlNode::name, outputs_, casadi::XmlNode::set_attribute(), casadi::Variable::value_reference, variable(), and casadi::X.
Referenced by generate_model_description().
XmlNode casadi::DaeBuilderInternal::generate_model_variables | ( | ) | const |
Definition at line 787 of file dae_builder_internal.cpp.
References casadi::XmlNode::children, casadi::XmlNode::name, and variables_.
Referenced by generate_model_description().
std::string casadi::DaeBuilderInternal::generate_wrapper | ( | const std::string & | guid, |
const CodeGenerator & | gen | ||
) | const |
Definition at line 975 of file dae_builder_internal.cpp.
References der(), event_indicators_, casadi::CodeGenerator::file_close(), casadi::CodeGenerator::file_open(), casadi::CodeGenerator::fmu_helpers(), generate(), indices(), n_mem(), n_variables(), name_, outputs_, casadi::P, size(), start_all(), casadi::CodeGenerator::sz_work(), casadi::U, variable(), variables_, and casadi::X.
Referenced by export_fmu().
|
inline |
Definition at line 358 of file dae_builder_internal.hpp.
Referenced by der().
|
inline |
Definition at line 361 of file dae_builder_internal.hpp.
|
inline |
Definition at line 381 of file dae_builder_internal.hpp.
|
inherited |
Definition at line 60 of file generic_shared_internal.hpp.
bool casadi::DaeBuilderInternal::has | ( | const std::string & | name | ) | const |
Definition at line 1589 of file dae_builder_internal.cpp.
References name(), and varind_.
Referenced by new_variable(), tearing_variables(), and unique_name().
|
protected |
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_2bx
Definition at line 2663 of file dae_builder_internal.cpp.
Sparsity casadi::DaeBuilderInternal::hess_sparsity | ( | const std::vector< size_t > & | oind, |
const std::vector< size_t > & | iind | ||
) | const |
Definition at line 4108 of file dae_builder_internal.cpp.
References casadi::Variable::dependencies, casadi::Variable::dependenciesKind, casadi::DEPENDENT, casadi::Sparsity::get_col(), casadi::Sparsity::get_row(), n_variables(), casadi::Sparsity::triplet(), and variable().
Referenced by casadi::FmuInternal::init().
|
protected |
Definition at line 2145 of file dae_builder_internal.cpp.
References casadi::MX::find(), casadi::GenericMatrix< MatType >::numel(), size(), var(), and casadi::W.
Referenced by create().
|
protected |
Definition at line 3707 of file dae_builder_internal.cpp.
References assign(), casadi::D, debug_, disp(), eq(), casadi::Variable::index, indices(), casadi::MX::name(), read_expr(), read_variable(), casadi::XmlNode::size(), size(), casadi::str(), casadi::uout(), and var().
Referenced by load_fmi_description().
|
protected |
Definition at line 3275 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), casadi::nan, start_time_, step_size_, stop_time_, and tolerance_.
Referenced by load_fmi_description().
|
protected |
Definition at line 3741 of file dae_builder_internal.cpp.
References assign(), casadi::XmlNode::attribute(), categorize(), debug_, der(), casadi::DISCRETE, disp(), eq(), casadi::Variable::index, casadi::Variable::name, casadi::MX::name(), name(), casadi::XmlNode::name, read_expr(), read_identifier(), read_variable(), reinit(), casadi::XmlNode::size(), size(), casadi::str(), casadi::uout(), casadi::Variable::v, variables_, when(), when_, and casadi::X.
Referenced by load_fmi_description().
|
protected |
Definition at line 3835 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), debug_, disp(), eq(), casadi::Variable::name, read_expr(), read_variable(), set_init(), casadi::XmlNode::size(), size(), casadi::str(), casadi::TUNABLE, casadi::uout(), casadi::Variable::v, and casadi::Variable::variability.
Referenced by load_fmi_description().
|
protected |
Definition at line 3282 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), can_be_instantiated_only_once_per_process_, fmi_major_, casadi::XmlNode::has_child(), model_identifier_, provides_adjoint_derivatives_, provides_directional_derivatives_, and source_files_.
Referenced by load_fmi_description().
|
protected |
Definition at line 3518 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), categorize(), casadi::Variable::category, casadi::Variable::dependencies, casadi::Variable::dependenciesKind, casadi::Variable::dependency, casadi::DEPENDENT, casadi::Variable::der, derivatives_, event_indicators_, casadi::EXACT, fmi_major_, casadi::XmlNode::has_child(), casadi::Variable::index, indices(), initial_unknowns_, n_variables(), casadi::Variable::name, casadi::XmlNode::name, number_of_event_indicators_, outputs_, casadi::P, casadi::Variable::parent, read_dependencies(), read_dependencies_kind(), casadi::XmlNode::size(), size(), casadi::T, casadi::U, variable(), variables_, vrmap_, casadi::W, casadi::X, and casadi::Z.
Referenced by load_fmi_description().
|
protected |
Definition at line 3299 of file dae_builder_internal.cpp.
References add(), casadi::XmlNode::attribute(), casadi::BOOLEAN, categorize(), causality(), debug_, default_initial(), default_variability(), casadi::Variable::der, casadi::Variable::der_of, derivatives_, casadi::description(), casadi::DISCRETE, casadi::ENUMERATION, casadi::FLOAT32, casadi::FLOAT64, fmi_major_, casadi::XmlNode::has_child(), ignore_time_, casadi::INDEPENDENT, casadi::Variable::index, casadi::inf, casadi::INPUT, casadi::INT16, casadi::INT32, casadi::INT64, casadi::INT8, n_variables(), casadi::MX::name(), name(), casadi::XmlNode::name, casadi::NUMEL, casadi::PARAMETER, casadi::Variable::parent, casadi::XmlNode::size(), casadi::STRING, casadi::XmlNode::text, casadi::to_string(), casadi::TUNABLE, casadi::UINT16, casadi::UINT32, casadi::UINT64, casadi::UINT8, casadi::uout(), var(), variability(), variable(), varind_, vrmap_, and casadi::Z.
Referenced by load_fmi_description().
std::vector< size_t > & casadi::DaeBuilderInternal::indices | ( | Category | cat | ) |
Definition at line 1354 of file dae_builder_internal.cpp.
References indices_.
Referenced by add_fun(), all(), categorize(), cdef(), create(), dependent_fun(), disp(), eliminate(), fmu_fun(), generate_model_structure(), generate_wrapper(), import_binding_equations(), import_model_structure(), indices(), input(), lift(), output(), prune(), read_expr(), reorder(), sort(), sort_z(), tear(), and time().
const std::vector< size_t > & casadi::DaeBuilderInternal::indices | ( | Category | cat | ) | const |
Definition at line 1358 of file dae_builder_internal.cpp.
References indices().
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_2a7
Definition at line 2674 of file dae_builder_internal.cpp.
References init_, and variable().
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_2a8
Definition at line 2683 of file dae_builder_internal.cpp.
References init_, and variable().
Referenced by set_init().
|
inlineprotectedinherited |
Called in the constructor of singletons to avoid that the counter reaches zero
Definition at line 71 of file generic_shared_internal.hpp.
Definition at line 1818 of file dae_builder_internal.cpp.
References indices(), casadi::is_input_category(), casadi::to_string(), and var().
Referenced by dependent_fun(), input(), oracle(), and prune().
|
protected |
Definition at line 2899 of file dae_builder_internal.cpp.
References variable().
Referenced by categorize(), and set_causality().
|
static |
Definition at line 4154 of file dae_builder_internal.cpp.
Referenced by generate_model_description().
Sparsity casadi::DaeBuilderInternal::jac_sparsity | ( | const std::vector< size_t > & | oind, |
const std::vector< size_t > & | iind | ||
) | const |
Definition at line 4086 of file dae_builder_internal.cpp.
References n_variables(), casadi::Sparsity::triplet(), and variable().
Referenced by casadi::FmuInternal::init().
|
protected |
Definition at line 2074 of file dae_builder_internal.cpp.
References casadi::MX::dep(), casadi::MX::find(), casadi::MX::get(), casadi::MX::is_output(), casadi::GenericMatrix< MatType >::numel(), output(), casadi::WDEF, and casadi::MX::which_output().
Referenced by create().
void casadi::DaeBuilderInternal::lift | ( | bool | lift_shared, |
bool | lift_calls | ||
) |
Definition at line 1762 of file dae_builder_internal.cpp.
References assign(), casadi::Variable::bind, der(), casadi::Variable::index, indices(), casadi::Variable::name, new_variable(), casadi::Q, residuals_, size(), casadi::Variable::v, variable(), casadi::W, and casadi::X.
void casadi::DaeBuilderInternal::load_fmi_description | ( | const std::string & | filename | ) |
Import existing problem from FMI/XML
Definition at line 602 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), author_, copyright_, description_, casadi::filename(), fmi_major_, fmi_version_, generation_date_and_time_, generation_tool_, casadi::XmlNode::has_child(), import_binding_equations(), import_default_experiment(), import_dynamic_equations(), import_initial_equations(), import_model_exchange(), import_model_structure(), import_model_variables(), instantiation_token_, casadi::Filesystem::is_enabled(), license_, model_name_, n_variables(), number_of_event_indicators_, casadi::XmlFile::parse(), symbolic_, and variable_naming_convention_.
size_t casadi::DaeBuilderInternal::n_mem | ( | ) | const |
Definition at line 1604 of file dae_builder_internal.cpp.
References variables_.
Referenced by generate_wrapper().
|
inline |
Definition at line 402 of file dae_builder_internal.hpp.
Referenced by all(), generate_wrapper(), hess_sparsity(), import_model_structure(), import_model_variables(), casadi::FmuInternal::init(), casadi::Fmu2::init(), casadi::Fmu3::init(), jac_sparsity(), load_fmi_description(), new_variable(), prune(), reorder(), and sort_z().
std::vector< std::string > casadi::DaeBuilderInternal::name | ( | const std::vector< size_t > & | ind | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_2bw
Definition at line 3944 of file dae_builder_internal.cpp.
References name().
const std::string & casadi::DaeBuilderInternal::name | ( | size_t | ind | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_2bv
Definition at line 3940 of file dae_builder_internal.cpp.
References casadi::Variable::name, and variable().
Referenced by add(), add_fun(), add_lc(), all(), assign(), attribute(), find(), fmu_fun(), fun(), has(), has_fun(), import_dynamic_equations(), import_model_variables(), name(), new_variable(), read_expr(), reinit(), reorder(), set_attribute(), set_init(), set_string_attribute(), size(), string_attribute(), tear(), and var().
Variable & casadi::DaeBuilderInternal::new_variable | ( | const std::string & | name, |
const std::vector< casadi_int > & | dimension = {1} , |
||
const MX & | expr = MX() |
||
) |
Definition at line 1610 of file dae_builder_internal.cpp.
References clear_cache_, has(), n_variables(), name(), Variable, variables_, and varind_.
Referenced by add(), lift(), and read_expr().
const Function & casadi::DaeBuilderInternal::oracle | ( | bool | sx = false , |
bool | elim_w = false , |
||
bool | lifted_calls = false |
||
) | const |
Definition at line 2234 of file dae_builder_internal.cpp.
References clear_cache(), clear_cache_, casadi::Function::expand(), input(), casadi::input_categories(), casadi::GenericShared< Shared, Internal >::is_null(), oracle_, output(), casadi::output_categories(), symbolic_, casadi::to_string(), var(), casadi::W, casadi::WDEF, and casadi::GenericMatrix< MX >::zeros().
Referenced by create(), transition(), and update_dependencies().
std::vector< MX > casadi::DaeBuilderInternal::output | ( | const std::vector< OutputCategory > & | ind | ) | const |
std::vector< MX > casadi::DaeBuilderInternal::output | ( | OutputCategory | ind | ) | const |
Definition at line 1834 of file dae_builder_internal.cpp.
References casadi::ALG, casadi::Variable::bind, casadi::DDEF, casadi::Variable::der, casadi::DISCRETE, event_indicators_, indices(), casadi::input_category(), casadi::Variable::name, casadi::ODE, outputs_, casadi::QUAD, residuals_, size(), casadi::MX::sparsity(), casadi::str(), casadi::Variable::v, var(), casadi::Variable::variability, variable(), casadi::WDEF, casadi::Y, casadi::ZERO, and casadi::GenericMatrix< MX >::zeros().
Referenced by add_fun(), create(), dependent_fun(), eliminate(), gather_eq(), jac_vdef_v_from_calls(), oracle(), output(), prune(), sort(), and transition().
void casadi::DaeBuilderInternal::prune | ( | bool | prune_p, |
bool | prune_u | ||
) |
Definition at line 1381 of file dae_builder_internal.cpp.
References casadi::Function::get_free(), indices(), input(), casadi::input_categories(), n_variables(), output(), casadi::output_categories(), casadi::P, size(), casadi::to_string(), casadi::U, and varind_.
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_10
|
staticprotected |
Definition at line 1635 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), casadi::XmlNode::get(), casadi::XmlNode::size(), size(), casadi::START, and casadi::VALUE.
Referenced by read_expr(), and read_variable().
|
protected |
Definition at line 3478 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), fmi_major_, casadi::XmlNode::has_attribute(), and vrmap_.
Referenced by import_model_structure().
|
protected |
Definition at line 3498 of file dae_builder_internal.cpp.
References casadi::XmlNode::attribute(), casadi::DEPENDENT, and casadi::XmlNode::has_attribute().
Referenced by import_model_structure().
Definition at line 1077 of file dae_builder_internal.cpp.
References assign(), casadi::Variable::bind, casadi::XmlNode::get(), casadi::if_else(), casadi::Variable::index, indices(), casadi::Variable::name, name(), casadi::XmlNode::name, new_variable(), qualified_name(), read_identifier(), read_variable(), casadi::XmlNode::size(), size(), casadi::str(), casadi::T, casadi::XmlNode::text, casadi::Variable::v, var(), variable(), and casadi::W.
Referenced by import_binding_equations(), import_dynamic_equations(), and import_initial_equations().
Definition at line 1064 of file dae_builder_internal.cpp.
References read_variable(), casadi::START, casadi::Variable::start, casadi::to_string(), casadi::Variable::v, and casadi::VALUE.
Referenced by import_dynamic_equations(), and read_expr().
|
protected |
Definition at line 1052 of file dae_builder_internal.cpp.
References qualified_name(), and variable().
Referenced by import_binding_equations(), import_dynamic_equations(), import_initial_equations(), read_expr(), and read_identifier().
|
protected |
Definition at line 3227 of file dae_builder_internal.cpp.
References add(), casadi::CALCULATED, categorize(), casadi::CONTINUOUS, casadi::Variable::index, casadi::LOCAL, name(), casadi::Variable::parent, unique_name(), and variable().
Referenced by import_dynamic_equations().
|
protected |
Definition at line 2911 of file dae_builder_internal.cpp.
Referenced by categorize(), and set_causality().
void casadi::DaeBuilderInternal::reorder | ( | Category | cat, |
const std::vector< size_t > & | v | ||
) |
Definition at line 1362 of file dae_builder_internal.cpp.
References indices(), and casadi::to_string().
void casadi::DaeBuilderInternal::reorder | ( | const std::string & | n, |
std::vector< size_t > & | ind, | ||
const std::vector< size_t > & | v | ||
) | const |
Definition at line 1366 of file dae_builder_internal.cpp.
References n_variables(), name(), casadi::str(), and variable().
|
protected |
void casadi::DaeBuilderInternal::sanity_check | ( | ) | const |
Definition at line 1627 of file dae_builder_internal.cpp.
References size(), casadi::T, and variable().
|
protected |
Set by attribute name
Definition at line 4023 of file dae_builder_internal.cpp.
References name(), casadi::Variable::set_attribute(), and variable().
|
protected |
Set by attribute name
Definition at line 4027 of file dae_builder_internal.cpp.
References name(), casadi::Variable::set_attribute(), casadi::Variable::size(), size(), casadi::str(), casadi::to_string(), and variable().
|
protected |
Definition at line 3018 of file dae_builder_internal.cpp.
References casadi::C, categorize(), casadi::Variable::category, casadi::CONTINUOUS, casadi::FIXED, casadi::Variable::in_rhs, casadi::Variable::index, casadi::Variable::name, casadi::P, casadi::Q, set_variability(), casadi::to_string(), casadi::TUNABLE, casadi::U, variable(), and casadi::X.
Referenced by eliminate().
|
protected |
Definition at line 2925 of file dae_builder_internal.cpp.
References casadi::Variable::category, casadi::Variable::causality, causality(), clear_cache_, casadi::Variable::index, insert(), casadi::LOCAL, casadi::Variable::name, casadi::OUTPUT, outputs_, remove(), casadi::to_string(), and variable().
|
protected |
Definition at line 3239 of file dae_builder_internal.cpp.
References casadi::Variable::ieq, casadi::Variable::index, init_, init_rhs(), casadi::GenericMatrix< MatType >::is_empty(), name(), and variable().
Referenced by import_initial_equations().
|
protected |
Set by attribute name (string-valued)
Definition at line 4069 of file dae_builder_internal.cpp.
References name(), casadi::Variable::set_attribute(), and variable().
|
protected |
Set by attribute name (string-valued)
Definition at line 4074 of file dae_builder_internal.cpp.
References name(), casadi::Variable::set_attribute(), and variable().
|
protected |
Definition at line 2952 of file dae_builder_internal.cpp.
References casadi::C, categorize(), casadi::Variable::category, casadi::Variable::causality, clear_cache_, casadi::CONTINUOUS, casadi::FIXED, casadi::Variable::index, casadi::INPUT, casadi::Variable::name, casadi::P, casadi::PARAMETER, casadi::to_string(), casadi::TUNABLE, casadi::U, casadi::Variable::variability, variability(), and variable().
Referenced by set_category().
|
inlineprotectedinherited |
Definition at line 83 of file generic_shared_internal.hpp.
|
inlineprotectedinherited |
Definition at line 92 of file generic_shared_internal.hpp.
|
protected |
Definition at line 4080 of file dae_builder_internal.cpp.
References name(), casadi::Variable::size(), and variable().
|
inline |
Definition at line 253 of file dae_builder_internal.hpp.
Referenced by add_fun(), attribute(), cdef(), create(), disp(), eliminate(), fmu_fun(), generate_wrapper(), has_t(), hess_v_v_from_calls(), import_binding_equations(), import_dynamic_equations(), import_initial_equations(), import_model_structure(), lift(), output(), prune(), qualified_name(), read_expr(), sanity_check(), set_attribute(), sort_z(), string_attribute(), tear(), transition(), and update_dependencies().
void casadi::DaeBuilderInternal::sort | ( | Category | cat | ) |
Definition at line 1325 of file dae_builder_internal.cpp.
References casadi::dependent_definition(), find(), indices(), casadi::is_acyclic(), output(), sort_dependent(), casadi::to_string(), and var().
Referenced by eliminate().
|
staticprotected |
Definition at line 2380 of file dae_builder_internal.cpp.
References casadi::dot(), and casadi::GenericMatrix< MX >::sym().
Referenced by sort().
void casadi::DaeBuilderInternal::sort_z | ( | const std::vector< std::string > & | z_order | ) |
Definition at line 1336 of file dae_builder_internal.cpp.
References find(), indices(), n_variables(), size(), and casadi::Z.
std::vector< double > casadi::DaeBuilderInternal::start_all | ( | ) | const |
Definition at line 967 of file dae_builder_internal.cpp.
References variables_.
Referenced by generate_wrapper().
|
protected |
Get by attribute name (string-valued)
Definition at line 4048 of file dae_builder_internal.cpp.
References casadi::Variable::get_attribute(), name(), and variable().
|
protected |
Get by attribute name (string-valued)
Definition at line 4055 of file dae_builder_internal.cpp.
References casadi::Variable::get_attribute(), name(), size(), and variable().
void casadi::DaeBuilderInternal::tear | ( | ) |
Definition at line 1433 of file dae_builder_internal.cpp.
References find(), indices(), name(), size(), tearing_variables(), casadi::U, variable(), and casadi::Z.
void casadi::DaeBuilderInternal::tearing_variables | ( | std::vector< std::string > * | res, |
std::vector< std::string > * | iv, | ||
std::vector< std::string > * | iv_on_hold | ||
) | const |
Definition at line 1468 of file dae_builder_internal.cpp.
References casadi::Function::get_free(), has(), casadi::Function::has_free(), casadi::str(), var(), variable(), and variables_.
Referenced by tear().
|
protected |
Definition at line 2658 of file dae_builder_internal.cpp.
References has_t(), indices(), casadi::T, and var().
Referenced by generate_guid().
Function casadi::DaeBuilderInternal::transition | ( | const std::string & | fname | ) | const |
Definition at line 2540 of file dae_builder_internal.cpp.
References casadi::Function::conditional(), casadi::str(), transition(), and when_.
Function casadi::DaeBuilderInternal::transition | ( | const std::string & | fname, |
casadi_int | index, | ||
bool | dummy_index_input = false |
||
) | const |
Definition at line 2492 of file dae_builder_internal.cpp.
References casadi::dyn_in(), casadi::DYN_NUM_IN, casadi::DYN_P, casadi::DYN_T, casadi::DYN_U, casadi::DYN_X, casadi::DYN_Z, eq(), casadi::event_in(), casadi::event_out(), casadi::Function::mx_in(), oracle(), output(), casadi::P, casadi::Variable::parent, size(), casadi::MX::substitute(), casadi::T, casadi::U, var(), variable(), casadi::W, casadi::WDEF, when_, casadi::X, and casadi::Z.
Referenced by export_fmu(), and transition().
|
inline |
Definition at line 375 of file dae_builder_internal.hpp.
std::string casadi::DaeBuilderInternal::unique_name | ( | const std::string & | prefix, |
bool | allow_no_prefix = true |
||
) | const |
void casadi::DaeBuilderInternal::update_dependencies | ( | ) | const |
Definition at line 847 of file dae_builder_internal.cpp.
References casadi::Sparsity::colind(), casadi::Variable::dependencies, der(), event_indicators_, casadi::Function::index_in(), casadi::Function::index_out(), casadi::Function::jac_sparsity(), oracle(), outputs_, casadi::Sparsity::row(), size(), casadi::U, variable(), and casadi::X.
Referenced by export_fmu().
const MX & casadi::DaeBuilderInternal::var | ( | const std::string & | name | ) | const |
Definition at line 1678 of file dae_builder_internal.cpp.
References name(), casadi::Variable::v, and variable().
Referenced by add_fun(), create(), dependent_fun(), der(), disp(), eliminate(), hess_v_v_from_calls(), import_binding_equations(), import_model_variables(), input(), oracle(), output(), read_expr(), sort(), tearing_variables(), time(), transition(), var(), and when().
std::vector< MX > casadi::DaeBuilderInternal::var | ( | const std::vector< size_t > & | ind | ) | const |
const MX & casadi::DaeBuilderInternal::var | ( | size_t | ind | ) | const |
Definition at line 3899 of file dae_builder_internal.cpp.
References casadi::Variable::v, and variable().
|
protected |
Definition at line 2948 of file dae_builder_internal.cpp.
References casadi::Variable::variability, and variable().
Referenced by add(), default_initial(), import_model_variables(), and set_variability().
Access a variable by Category and index
Definition at line 418 of file dae_builder_internal.hpp.
References variable().
Referenced by variable().
Access a variable by Category and index
Definition at line 419 of file dae_builder_internal.hpp.
Access a variable by expression
Definition at line 432 of file dae_builder_internal.hpp.
References casadi::find(), and variable().
Referenced by variable().
Access a variable by expression
Definition at line 433 of file dae_builder_internal.hpp.
References casadi::find(), and variable().
Referenced by variable().
|
inline |
Access a variable by name
Definition at line 426 of file dae_builder_internal.hpp.
References casadi::find(), and variable().
Referenced by variable().
|
inline |
Access a variable by name
Definition at line 427 of file dae_builder_internal.hpp.
References casadi::find(), and variable().
Referenced by variable().
|
inline |
Access a variable by index
Definition at line 412 of file dae_builder_internal.hpp.
Referenced by add_fun(), assign(), attribute(), categorize(), category(), causality(), cdef(), disp(), eliminate(), eq(), fmu_fun(), generate_model_structure(), generate_wrapper(), hess_sparsity(), import_model_structure(), import_model_variables(), casadi::FmuInternal::init(), casadi::Fmu2::init(), casadi::Fmu3::init(), init_lhs(), init_rhs(), insert(), jac_sparsity(), lift(), name(), output(), read_expr(), read_variable(), reinit(), reorder(), sanity_check(), set_attribute(), set_category(), set_causality(), set_init(), set_string_attribute(), set_variability(), size(), string_attribute(), tear(), tearing_variables(), transition(), update_dependencies(), var(), variability(), and when().
|
inline |
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_1ai
Definition at line 67 of file generic_shared_internal.hpp.
|
protected |
Definition at line 3180 of file dae_builder_internal.cpp.
References add(), casadi::CALCULATED, categorize(), casadi::Variable::category, casadi::CONTINUOUS, casadi::MX::dep(), eq(), event_indicators_, casadi::Variable::index, casadi::MX::is_op(), casadi::LOCAL, casadi::OP_LE, casadi::OP_LT, casadi::Variable::parent, casadi::str(), unique_name(), casadi::Variable::v, var(), variable(), and when_.
Referenced by import_dynamic_equations().
|
friend |
Definition at line 210 of file dae_builder_internal.hpp.
|
friend |
Definition at line 212 of file dae_builder_internal.hpp.
Referenced by fmu_fun().
|
friend |
Definition at line 211 of file dae_builder_internal.hpp.
|
friend |
Definition at line 213 of file dae_builder_internal.hpp.
Referenced by new_variable().
|
protected |
Definition at line 495 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 510 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), import_model_exchange(), and casadi::FmuInternal::init().
|
mutableprotected |
Definition at line 656 of file dae_builder_internal.hpp.
Referenced by clear_cache(), DaeBuilderInternal(), eliminate(), new_variable(), oracle(), set_causality(), and set_variability().
|
protected |
Definition at line 496 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 486 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), import_binding_equations(), import_dynamic_equations(), import_initial_equations(), import_model_variables(), and casadi::FmuInternal::init().
|
protected |
Definition at line 532 of file dae_builder_internal.hpp.
Referenced by import_model_structure(), and import_model_variables().
|
protected |
Definition at line 494 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 523 of file dae_builder_internal.hpp.
Referenced by add(), and DaeBuilderInternal().
|
protected |
Definition at line 532 of file dae_builder_internal.hpp.
Referenced by export_fmu(), generate_model_structure(), generate_wrapper(), import_model_structure(), output(), update_dependencies(), and when().
|
protected |
Definition at line 526 of file dae_builder_internal.hpp.
Referenced by fmu_fun(), import_model_exchange(), import_model_structure(), import_model_variables(), load_fmi_description(), and read_dependencies().
|
protected |
Definition at line 491 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 487 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and casadi::FmuInternal::init().
|
protected |
Extra doc: https://github.com/casadi/casadi/wiki/L_11
Definition at line 648 of file dae_builder_internal.hpp.
|
protected |
Definition at line 499 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 498 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 488 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and import_model_variables().
|
protected |
Definition at line 541 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and indices().
|
protected |
Definition at line 544 of file dae_builder_internal.hpp.
Referenced by disp(), init_lhs(), init_rhs(), and set_init().
|
protected |
Definition at line 532 of file dae_builder_internal.hpp.
Referenced by import_model_structure().
|
protected |
Definition at line 493 of file dae_builder_internal.hpp.
Referenced by casadi::FmuInternal::init(), and load_fmi_description().
|
protected |
Definition at line 643 of file dae_builder_internal.hpp.
|
protected |
Definition at line 497 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 507 of file dae_builder_internal.hpp.
Referenced by import_model_exchange(), and casadi::FmuInternal::init().
|
protected |
Definition at line 492 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 514 of file dae_builder_internal.hpp.
Referenced by export_fmu(), generate_build_description(), generate_model_description(), and generate_wrapper().
|
protected |
Definition at line 501 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), import_model_structure(), casadi::FmuInternal::init(), and load_fmi_description().
|
mutableprotected |
Extra doc: https://github.com/casadi/casadi/wiki/L_12
Definition at line 653 of file dae_builder_internal.hpp.
Referenced by clear_cache(), and oracle().
|
protected |
Definition at line 532 of file dae_builder_internal.hpp.
Referenced by add(), disp(), fmu_fun(), generate_model_structure(), generate_wrapper(), import_model_structure(), output(), set_causality(), and update_dependencies().
|
protected |
Definition at line 509 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), import_model_exchange(), and casadi::FmuInternal::init().
|
protected |
Definition at line 508 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), import_model_exchange(), and casadi::FmuInternal::init().
|
protected |
Definition at line 532 of file dae_builder_internal.hpp.
|
protected |
Definition at line 517 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and casadi::FmuInternal::init().
|
protected |
Definition at line 511 of file dae_builder_internal.hpp.
Referenced by import_model_exchange().
|
protected |
Definition at line 504 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and import_default_experiment().
|
protected |
Definition at line 504 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and import_default_experiment().
|
protected |
Definition at line 504 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and import_default_experiment().
|
protected |
Definition at line 520 of file dae_builder_internal.hpp.
Referenced by create(), DaeBuilderInternal(), load_fmi_description(), and oracle().
|
protected |
Definition at line 504 of file dae_builder_internal.hpp.
Referenced by DaeBuilderInternal(), and import_default_experiment().
|
protected |
Definition at line 500 of file dae_builder_internal.hpp.
Referenced by load_fmi_description().
|
protected |
Definition at line 529 of file dae_builder_internal.hpp.
Referenced by all(), eliminate(), find(), generate_model_variables(), generate_wrapper(), import_dynamic_equations(), import_model_structure(), n_mem(), new_variable(), reset(), start_all(), tearing_variables(), and ~DaeBuilderInternal().
|
protected |
Definition at line 535 of file dae_builder_internal.hpp.
Referenced by find(), has(), import_model_variables(), new_variable(), and prune().
|
protected |
Definition at line 538 of file dae_builder_internal.hpp.
Referenced by import_model_structure(), import_model_variables(), and read_dependencies().
|
protected |
Definition at line 547 of file dae_builder_internal.hpp.
Referenced by disp(), import_dynamic_equations(), transition(), and when().