List of all members | Public Member Functions | Public Attributes | Friends
casadi::Variable Struct Reference

Holds expressions and meta-data corresponding to a physical quantity evolving in time. More...

#include <dae_builder_internal.hpp>

Detailed Description

Date
2012-2021
Author
Joel Andersson

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

Definition at line 83 of file dae_builder_internal.hpp.

Public Member Functions

casadi_int size (Attribute a) const
 Total number of elements for a particular attribute. More...
 
XmlNode export_xml (const DaeBuilderInternal &self) const
 
bool is_real () const
 
bool has_start () const
 
bool is_set () const
 
bool has_beq () const
 
bool needs_der () const
 
MX get_der (DaeBuilderInternal &self, bool may_allocate=true)
 
MX get_der (const DaeBuilderInternal &self) const
 
void get_attribute (Attribute a, double *val) const
 
void get_attribute (Attribute a, std::vector< double > *val) const
 
void get_attribute (Attribute a, std::string *val) const
 
void set_attribute (Attribute a, double val)
 
void set_attribute (Attribute a, const std::vector< double > &val)
 
void set_attribute (Attribute a, const std::string &val)
 

Public Attributes

casadi_int index
 Location in variable vector. More...
 
std::string name
 Name of the variable. More...
 
std::vector< casadi_int > dimension
 Dimensions. More...
 
casadi_int numel
 Number of elements - product of all dimensions. More...
 
Category category
 CasADi's classification of the variable. More...
 
casadi_int der
 
casadi_int bind
 
bool in_rhs
 
std::vector< double > value
 Numerical value (also for booleans, integers, enums) More...
 
std::string stringvalue
 String value (if string-valued) More...
 
bool dependency
 Do other expressions depend on this variable. More...
 
std::vector< casadi_int > dependencies
 Dependencies. More...
 
std::vector< DependenciesKinddependenciesKind
 Dependencies. More...
 
MX v
 Variable expression (always a vector) More...
 
MX ieq
 Initial equation (to be removed and moved to a separate dependent variable) More...
 
unsigned int value_reference
 
std::string description
 
Type type
 
Causality causality
 
Variability variability
 
std::string unit
 
std::string display_unit
 
Initial initial
 
double min
 
double max
 
double nominal
 
std::vector< double > start
 
casadi_int der_of
 
casadi_int parent
 

Friends

class DaeBuilderInternal
 

Member Function Documentation

◆ export_xml()

XmlNode casadi::Variable::export_xml ( const DaeBuilderInternal self) const

◆ get_attribute() [1/3]

void casadi::Variable::get_attribute ( Attribute  a,
double *  val 
) const

Get by attribute name

◆ get_attribute() [2/3]

void casadi::Variable::get_attribute ( Attribute  a,
std::string *  val 
) const

Get by attribute name

◆ get_attribute() [3/3]

void casadi::Variable::get_attribute ( Attribute  a,
std::vector< double > *  val 
) const

Get by attribute name

◆ get_der() [1/2]

MX casadi::Variable::get_der ( const DaeBuilderInternal self) const

◆ get_der() [2/2]

MX casadi::Variable::get_der ( DaeBuilderInternal self,
bool  may_allocate = true 
)

◆ has_beq()

bool casadi::Variable::has_beq ( ) const
inline

Definition at line 195 of file dae_builder_internal.hpp.

◆ has_start()

bool casadi::Variable::has_start ( ) const

◆ is_real()

bool casadi::Variable::is_real ( ) const
inline

Definition at line 184 of file dae_builder_internal.hpp.

◆ is_set()

bool casadi::Variable::is_set ( ) const
inline

Definition at line 190 of file dae_builder_internal.hpp.

◆ needs_der()

bool casadi::Variable::needs_der ( ) const

◆ set_attribute() [1/3]

void casadi::Variable::set_attribute ( Attribute  a,
const std::string &  val 
)

Set by attribute name

◆ set_attribute() [2/3]

void casadi::Variable::set_attribute ( Attribute  a,
const std::vector< double > &  val 
)

Set by attribute name

◆ set_attribute() [3/3]

void casadi::Variable::set_attribute ( Attribute  a,
double  val 
)

Set by attribute name

◆ size()

casadi_int casadi::Variable::size ( Attribute  a) const

Friends And Related Function Documentation

◆ DaeBuilderInternal

friend class DaeBuilderInternal
friend

Definition at line 84 of file dae_builder_internal.hpp.

Member Data Documentation

◆ bind

casadi_int casadi::Variable::bind

Definition at line 137 of file dae_builder_internal.hpp.

◆ category

Category casadi::Variable::category

Definition at line 114 of file dae_builder_internal.hpp.

◆ causality

Causality casadi::Variable::causality

Attributes common to all types of variables, cf. Table 17 in FMI specification

Definition at line 109 of file dae_builder_internal.hpp.

◆ dependencies

std::vector<casadi_int> casadi::Variable::dependencies
mutable

Definition at line 152 of file dae_builder_internal.hpp.

◆ dependenciesKind

std::vector<DependenciesKind> casadi::Variable::dependenciesKind
mutable

Definition at line 155 of file dae_builder_internal.hpp.

◆ dependency

bool casadi::Variable::dependency

Definition at line 149 of file dae_builder_internal.hpp.

◆ der

casadi_int casadi::Variable::der

Definition at line 134 of file dae_builder_internal.hpp.

◆ der_of

casadi_int casadi::Variable::der_of

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 129 of file dae_builder_internal.hpp.

◆ description

std::string casadi::Variable::description

Attributes common to all types of variables, cf. Table 17 in FMI specification

Definition at line 107 of file dae_builder_internal.hpp.

◆ dimension

std::vector<casadi_int> casadi::Variable::dimension

Definition at line 99 of file dae_builder_internal.hpp.

◆ display_unit

std::string casadi::Variable::display_unit

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 120 of file dae_builder_internal.hpp.

◆ ieq

MX casadi::Variable::ieq

Definition at line 161 of file dae_builder_internal.hpp.

◆ in_rhs

bool casadi::Variable::in_rhs

Definition at line 140 of file dae_builder_internal.hpp.

◆ index

casadi_int casadi::Variable::index

Definition at line 93 of file dae_builder_internal.hpp.

◆ initial

Initial casadi::Variable::initial

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 121 of file dae_builder_internal.hpp.

◆ max

double casadi::Variable::max

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 126 of file dae_builder_internal.hpp.

◆ min

double casadi::Variable::min

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 125 of file dae_builder_internal.hpp.

◆ name

std::string casadi::Variable::name

Definition at line 96 of file dae_builder_internal.hpp.

◆ nominal

double casadi::Variable::nominal

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 127 of file dae_builder_internal.hpp.

◆ numel

casadi_int casadi::Variable::numel

Definition at line 102 of file dae_builder_internal.hpp.

◆ parent

casadi_int casadi::Variable::parent

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 130 of file dae_builder_internal.hpp.

◆ start

std::vector<double> casadi::Variable::start

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 128 of file dae_builder_internal.hpp.

◆ stringvalue

std::string casadi::Variable::stringvalue

Definition at line 146 of file dae_builder_internal.hpp.

◆ type

Type casadi::Variable::type

Attributes common to all types of variables, cf. Table 17 in FMI specification

Definition at line 108 of file dae_builder_internal.hpp.

◆ unit

std::string casadi::Variable::unit

Type specific attributes common to all types, cf. Table FMI 3.0 specification

Definition at line 119 of file dae_builder_internal.hpp.

◆ v

MX casadi::Variable::v

Definition at line 158 of file dae_builder_internal.hpp.

◆ value

std::vector<double> casadi::Variable::value

Definition at line 143 of file dae_builder_internal.hpp.

◆ value_reference

unsigned int casadi::Variable::value_reference

Attributes common to all types of variables, cf. Table 17 in FMI specification

Definition at line 106 of file dae_builder_internal.hpp.

◆ variability

Variability casadi::Variable::variability

Attributes common to all types of variables, cf. Table 17 in FMI specification

Definition at line 110 of file dae_builder_internal.hpp.


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