Interface to a binary FMU, adhering to FMI version 2.0. More...
#include <fmu3.hpp>
Extra doc: https://github.com/casadi/casadi/wiki/L_2ba
Classes | |
struct | Value |
Public Types | |
using | weak_ref_type = WeakRefInternal |
Public Member Functions | |
Fmu3 (const std::string &name, const std::vector< std::string > &scheme_in, const std::vector< std::string > &scheme_out, const std::map< std::string, std::vector< size_t >> &scheme, const std::vector< std::string > &aux) | |
~Fmu3 () override | |
Destructor. More... | |
std::string | class_name () const override |
Get type name. More... | |
void | init (const DaeBuilderInternal *dae) override |
int | init_mem (FmuMemory *m) const override |
Initalize memory block. More... | |
FmuMemory * | alloc_mem (const FmuFunction &f) const override |
Create memory block. More... | |
void | free_mem (void *mem) const override |
Free memory block. More... | |
void | finalize () override |
void | load_functions () override |
std::string | system_infix () const override |
void * | instantiate () const override |
void | free_instance (void *instance) const override |
int | reset (void *instance) |
int | enter_initialization_mode (void *instance) const override |
int | exit_initialization_mode (void *instance) const override |
int | enter_continuous_time_mode (void *instance) const override |
int | update_discrete_states (void *instance, EventMemory *eventmem) const override |
int | get_derivatives (void *instance, double *derivatives, size_t nx) const override |
int | set_real (void *instance, const unsigned int *vr, size_t n_vr, const double *values, size_t n_values) const override |
int | get_real (void *instance, const unsigned int *vr, size_t n_vr, double *values, size_t n_values) const override |
int | get_directional_derivative (void *instance, const unsigned int *vr_out, size_t n_out, const unsigned int *vr_in, size_t n_in, const double *seed, size_t n_seed, double *sensitivity, size_t n_sensitivity) const override |
int | get_adjoint_derivative (void *instance, const unsigned int *vr_out, size_t n_out, const unsigned int *vr_in, size_t n_in, const double *seed, size_t n_seed, double *sensitivity, size_t n_sensitivity) const override |
int | set_values (void *instance) const override |
int | get_aux (void *instance) override |
int | get_aux_impl (void *instance, Value &aux_value) const |
void | get_stats (FmuMemory *m, Dict *stats, const std::vector< std::string > &name_in, const InputStruct *in) const override |
Get stats. More... | |
void | serialize_body (SerializingStream &s) const override |
void | disp (std::ostream &stream, bool more) const override |
Print. More... | |
size_t | n_in () const |
Get the number of scheme inputs. More... | |
size_t | n_out () const |
Get the number of scheme outputs. More... | |
size_t | index_in (const std::string &n) const |
size_t | index_out (const std::string &n) const |
Sparsity | jac_sparsity (const std::vector< size_t > &osub, const std::vector< size_t > &isub) const |
Sparsity | hess_sparsity (const std::vector< size_t > &r, const std::vector< size_t > &c) const |
std::string | desc_in (FmuMemory *m, size_t id, bool more=true) const |
template<typename T > | |
T * | load_function (const std::string &symname) |
int | discrete_states_iter (void *instance) const |
void | set (FmuMemory *m, size_t ind, const double *value) const |
void | request (FmuMemory *m, size_t ind) const |
int | eval (FmuMemory *m) const |
void | get (FmuMemory *m, size_t id, double *value) const |
void | set_fwd (FmuMemory *m, casadi_int nseed, const casadi_int *id, const double *v) const |
void | set_fwd (FmuMemory *m, size_t ind, const double *v) const |
void | request_fwd (FmuMemory *m, casadi_int nsens, const casadi_int *id, const casadi_int *wrt_id) const |
void | request_fwd (FmuMemory *m, casadi_int ind) const |
int | eval_fwd (FmuMemory *m, bool independent_seeds) const |
int | eval_ad (FmuMemory *m) const |
int | eval_fd (FmuMemory *m, bool independent_seeds) const |
void | get_fwd (FmuMemory *m, casadi_int nsens, const casadi_int *id, double *v) const |
void | get_fwd (FmuMemory *m, size_t ind, double *v) const |
void | set_adj (FmuMemory *m, casadi_int nseed, const casadi_int *id, const double *v) const |
void | set_adj (FmuMemory *m, size_t ind, const double *v) const |
void | request_adj (FmuMemory *m, casadi_int nsens, const casadi_int *id, const casadi_int *wrt_id) const |
void | request_adj (FmuMemory *m, casadi_int ind) const |
int | eval_adj (FmuMemory *m) const |
void | get_adj (FmuMemory *m, casadi_int nsens, const casadi_int *id, double *v) const |
void | get_adj (FmuMemory *m, size_t ind, double *v) const |
void | gather_fwd (FmuMemory *m) const |
void | gather_adj (FmuMemory *m) const |
void | gather_io (FmuMemory *m) const |
void | serialize (SerializingStream &s) const |
virtual void | serialize_type (SerializingStream &s) const |
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... | |
std::vector< double > | all_nominal_in (size_t i) const |
Retreive nominal values. More... | |
std::vector< double > | all_nominal_out (size_t i) const |
Retreive nominal values. More... | |
Static Public Member Functions | |
static void | log_message_callback (fmi3InstanceEnvironment instanceEnvironment, fmi3Status status, fmi3String category, fmi3String message) |
static Fmu3 * | deserialize (DeserializingStream &s) |
static std::string | dll_suffix () |
Public Attributes | |
std::vector< fmi3ValueReference > | vr_real_ |
std::vector< fmi3ValueReference > | vr_integer_ |
std::vector< fmi3ValueReference > | vr_boolean_ |
std::vector< fmi3ValueReference > | vr_string_ |
std::vector< fmi3Float64 > | init_real_ |
std::vector< fmi3Int32 > | init_integer_ |
std::vector< fmi3Boolean > | init_boolean_ |
std::vector< std::string > | init_string_ |
std::vector< std::string > | vn_aux_real_ |
std::vector< std::string > | vn_aux_integer_ |
std::vector< std::string > | vn_aux_boolean_ |
std::vector< std::string > | vn_aux_string_ |
std::vector< fmi3ValueReference > | vr_aux_real_ |
std::vector< fmi3ValueReference > | vr_aux_integer_ |
std::vector< fmi3ValueReference > | vr_aux_boolean_ |
std::vector< fmi3ValueReference > | vr_aux_string_ |
fmi3InstantiateModelExchangeTYPE * | instantiate_model_exchange_ |
fmi3FreeInstanceTYPE * | free_instance_ |
fmi3ResetTYPE * | reset_ |
fmi3EnterInitializationModeTYPE * | enter_initialization_mode_ |
fmi3ExitInitializationModeTYPE * | exit_initialization_mode_ |
fmi3EnterContinuousTimeModeTYPE * | enter_continuous_time_mode_ |
fmi3SetTimeTYPE * | set_time_ |
fmi3GetFloat64TYPE * | get_float64_ |
fmi3SetFloat64TYPE * | set_float64_ |
fmi3GetBooleanTYPE * | get_boolean_ |
fmi3SetBooleanTYPE * | set_boolean_ |
fmi3GetInt32TYPE * | get_int32_ |
fmi3SetInt32TYPE * | set_int32_ |
fmi3GetStringTYPE * | get_string_ |
fmi3SetStringTYPE * | set_string_ |
fmi3GetDirectionalDerivativeTYPE * | get_directional_derivative_ |
fmi3GetAdjointDerivativeTYPE * | get_adjoint_derivative_ |
fmi3UpdateDiscreteStatesTYPE * | update_discrete_states_ |
Value | aux_value_ |
Protected Member Functions | |
Fmu3 (DeserializingStream &s) | |
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... | |
Protected Attributes | |
Resource | resource_ |
std::string | name_ |
Instance name. More... | |
std::vector< std::string > | scheme_in_ |
std::vector< std::string > | scheme_out_ |
std::map< std::string, std::vector< size_t > > | scheme_ |
std::vector< std::string > | aux_ |
std::string | resource_loc_ |
double | fmutol_ |
std::string | instance_name_ |
std::string | instantiation_token_ |
bool | logging_on_ |
casadi_int | number_of_event_indicators_ |
bool | provides_directional_derivatives_ |
bool | provides_adjoint_derivatives_ |
bool | can_be_instantiated_only_once_per_process_ |
Importer | li_ |
DLL. More... | |
std::vector< size_t > | iind_ |
std::vector< size_t > | iind_map_ |
std::vector< size_t > | oind_ |
std::vector< size_t > | oind_map_ |
bool | has_independent_ |
std::vector< double > | nominal_in_ |
std::vector< double > | nominal_out_ |
std::vector< double > | min_in_ |
std::vector< double > | min_out_ |
std::vector< double > | max_in_ |
std::vector< double > | max_out_ |
std::vector< std::string > | vn_in_ |
std::vector< std::string > | vn_out_ |
std::vector< unsigned int > | vr_in_ |
std::vector< unsigned int > | vr_out_ |
std::vector< double > | value_in_ |
std::vector< std::vector< size_t > > | ired_ |
std::vector< std::vector< size_t > > | ored_ |
Sparsity | jac_sp_ |
Sparsity | hess_sp_ |
bool | warning_fired_discrete_states_need_update_ |
bool | warning_fired_terminate_simulation_ |
bool | warning_fired_nominals_of_continuous_states_changed_ |
bool | warning_fired_values_of_continuous_states_changed_ |
bool | warning_fired_next_event_time_defined_ |
size_t | nx_ |
bool | do_evaluation_dance_ |
|
inherited |
Definition at line 152 of file shared_object.hpp.
casadi::Fmu3::Fmu3 | ( | const std::string & | name, |
const std::vector< std::string > & | scheme_in, | ||
const std::vector< std::string > & | scheme_out, | ||
const std::map< std::string, std::vector< size_t >> & | scheme, | ||
const std::vector< std::string > & | aux | ||
) |
Definition at line 500 of file fmu3.cpp.
References enter_continuous_time_mode_, enter_initialization_mode_, exit_initialization_mode_, free_instance_, get_adjoint_derivative_, get_directional_derivative_, get_float64_, instantiate_model_exchange_, reset_, set_boolean_, set_float64_, set_time_, and update_discrete_states_.
Referenced by deserialize().
|
explicitprotected |
Definition at line 528 of file fmu3.cpp.
References enter_continuous_time_mode_, enter_initialization_mode_, exit_initialization_mode_, free_instance_, get_adjoint_derivative_, get_directional_derivative_, get_float64_, init_boolean_, init_integer_, init_real_, init_string_, instantiate_model_exchange_, reset_, set_boolean_, set_float64_, set_time_, casadi::DeserializingStream::unpack(), update_discrete_states_, casadi::DeserializingStream::version(), vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, vn_aux_string_, vr_aux_boolean_, vr_aux_integer_, vr_aux_real_, vr_aux_string_, vr_boolean_, vr_integer_, vr_real_, and vr_string_.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_26r
Definition at line 687 of file fmu.cpp.
References casadi::FmuInternal::ired_, and casadi::FmuInternal::nominal_in_.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_26r
Definition at line 695 of file fmu.cpp.
References casadi::FmuInternal::nominal_out_, and casadi::FmuInternal::ored_.
|
overridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_2ds
Implements casadi::FmuInternal.
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_2bb
Implements casadi::SharedObjectInternal.
|
inherited |
Definition at line 62 of file generic_shared_internal.hpp.
|
inherited |
Definition at line 716 of file fmu.cpp.
References casadi::FmuMemory::ibuf_, casadi::FmuInternal::max_in_, casadi::FmuInternal::min_in_, casadi::FmuInternal::nominal_in_, and casadi::FmuInternal::vn_in_.
Referenced by casadi::FmuInternal::eval_fd().
|
static |
Definition at line 522 of file fmu3.cpp.
References finalize(), and Fmu3().
Referenced by casadi::FmuInternal::deserialize().
|
inlineprotectedinherited |
Called in the destructor of singletons
Definition at line 77 of file generic_shared_internal.hpp.
|
inherited |
Definition at line 1098 of file fmu.cpp.
References casadi::EventMemory::discrete_states_need_update, casadi::EventMemory::next_event_time_defined, casadi::EventMemory::nominals_of_continuous_states_changed, casadi::EventMemory::terminate_simulation, casadi::FmuInternal::update_discrete_states(), casadi::EventMemory::values_of_continuous_states_changed, casadi::FmuInternal::warning_fired_discrete_states_need_update_, casadi::FmuInternal::warning_fired_next_event_time_defined_, casadi::FmuInternal::warning_fired_nominals_of_continuous_states_changed_, casadi::FmuInternal::warning_fired_terminate_simulation_, and casadi::FmuInternal::warning_fired_values_of_continuous_states_changed_.
Referenced by casadi::FmuInternal::init_mem().
|
overridevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_26m
Implements casadi::SharedObjectInternal.
Definition at line 631 of file fmu.cpp.
References casadi::SharedObjectInternal::class_name(), and casadi::FmuInternal::name_.
|
staticinherited |
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 295 of file fmu3.cpp.
References enter_continuous_time_mode_.
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 275 of file fmu3.cpp.
References enter_initialization_mode_, casadi::FmuInternal::fmutol_, and casadi::str().
|
inherited |
Definition at line 1222 of file fmu.cpp.
References casadi::FmuInternal::gather_io(), casadi::get_ptr(), casadi::FmuInternal::get_real(), casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::instance, casadi::FmuInternal::n_out(), casadi::FmuMemory::obuf_, casadi::FmuInternal::set_real(), casadi::FmuMemory::v_in_, casadi::FmuMemory::v_out_, casadi::FmuMemory::vr_in_, and casadi::FmuMemory::vr_out_.
|
inherited |
Definition at line 768 of file fmu.cpp.
References casadi::FmuMemory::d_in_, casadi::FmuMemory::d_out_, casadi::FmuInternal::get_directional_derivative(), casadi::get_ptr(), casadi::FmuInternal::get_real(), casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::instance, casadi::FmuMemory::osens_, casadi::FmuMemory::v_out_, casadi::FmuMemory::vr_in_, and casadi::FmuMemory::vr_out_.
Referenced by casadi::FmuInternal::eval_fwd().
|
inherited |
Definition at line 745 of file fmu.cpp.
References casadi::FmuMemory::d_in_, casadi::FmuMemory::d_out_, casadi::FmuInternal::gather_adj(), casadi::FmuInternal::get_adjoint_derivative(), casadi::get_ptr(), casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::instance, casadi::FmuMemory::isens_, casadi::FmuMemory::vr_in_, and casadi::FmuMemory::vr_out_.
|
inherited |
Definition at line 797 of file fmu.cpp.
References casadi::FmuFunction::abstol_, casadi::casadi_copy(), casadi::FmuMemory::d_in_, casadi::FmuMemory::d_out_, casadi::FmuInternal::desc_in(), casadi::eps, casadi::FmuFunction::fd_, casadi::fd_offset(), casadi::FmuMemory::fd_out_, casadi::finite_diff(), casadi::FmuMemory::flip_, casadi::get_ptr(), casadi::FmuInternal::get_real(), casadi::FmuMemory::ibuf_, casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::in_bounds_, casadi::FmuMemory::instance, casadi::FmuInternal::max_in_, casadi::FmuInternal::min_in_, casadi::n_fd_points(), casadi::nan, casadi::FmuInternal::nominal_in_, casadi::FmuInternal::nominal_out_, casadi::Filesystem::ofstream_ptr(), casadi::FmuMemory::osens_, casadi::FmuFunction::reltol_, casadi::FmuMemory::self, casadi::FmuInternal::set_real(), casadi::sign(), casadi::FmuFunction::step_, casadi::str(), casadi::to_string(), casadi::FmuMemory::v_in_, casadi::FmuMemory::v_out_, casadi::FmuMemory::v_pert_, casadi::FmuFunction::validate_ad_file_, casadi::FmuFunction::validate_forward_, casadi::FmuInternal::vn_in_, casadi::FmuInternal::vn_out_, casadi::FmuMemory::vr_in_, casadi::FmuMemory::vr_out_, and casadi::FmuMemory::wrt_.
Referenced by casadi::FmuInternal::eval_fwd().
|
inherited |
Definition at line 729 of file fmu.cpp.
References casadi::FmuInternal::eval_ad(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::gather_fwd(), casadi::FmuMemory::self, casadi::FmuFunction::uses_directional_derivatives_, and casadi::FmuFunction::validate_forward_.
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 285 of file fmu3.cpp.
References exit_initialization_mode_.
|
overridevirtual |
Allocate numerical values for initial auxilliary variables
Reimplemented from casadi::FmuInternal.
Definition at line 194 of file fmu3.cpp.
References aux_value_, casadi::FmuInternal::finalize(), casadi::Fmu3::Value::v_boolean, casadi::Fmu3::Value::v_integer, casadi::Fmu3::Value::v_real, casadi::Fmu3::Value::v_string, vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, and vn_aux_string_.
Referenced by deserialize().
|
overridevirtual |
|
overridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_2dw
Implements casadi::FmuInternal.
|
inherited |
Definition at line 1338 of file fmu.cpp.
References casadi::FmuMemory::d_in_, casadi::FmuMemory::d_out_, casadi::FmuInternal::gather_io(), casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::osens_, and casadi::FmuMemory::v_in_.
Referenced by casadi::FmuInternal::eval_adj().
|
inherited |
Definition at line 1319 of file fmu.cpp.
References casadi::FmuMemory::d_in_, casadi::FmuMemory::d_out_, casadi::FmuInternal::gather_io(), casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::isens_, and casadi::FmuMemory::v_out_.
Referenced by casadi::FmuInternal::eval_fwd().
|
inherited |
Definition at line 1294 of file fmu.cpp.
References casadi::FmuMemory::ibuf_, casadi::FmuMemory::id_in_, casadi::FmuMemory::id_out_, casadi::FmuMemory::imarked_, casadi::FmuMemory::omarked_, casadi::FmuMemory::v_in_, casadi::FmuMemory::vr_in_, casadi::FmuInternal::vr_in_, casadi::FmuMemory::vr_out_, and casadi::FmuInternal::vr_out_.
Referenced by casadi::FmuInternal::eval(), casadi::FmuInternal::gather_adj(), and casadi::FmuInternal::gather_fwd().
|
inherited |
Definition at line 1250 of file fmu.cpp.
References casadi::FmuMemory::obuf_, and casadi::FmuInternal::ored_.
Referenced by casadi::Fmu::get().
|
inherited |
Definition at line 1082 of file fmu.cpp.
References casadi::FmuMemory::isens_.
Referenced by casadi::FmuInternal::get_adj().
|
inherited |
Definition at line 1088 of file fmu.cpp.
References casadi::FmuInternal::get_adj(), and casadi::FmuInternal::ired_.
|
overridevirtual |
Reimplemented from casadi::FmuInternal.
Definition at line 361 of file fmu3.cpp.
References get_adjoint_derivative_, casadi::FmuInternal::n_in(), and casadi::FmuInternal::n_out().
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 413 of file fmu3.cpp.
References aux_value_, and get_aux_impl().
int casadi::Fmu3::get_aux_impl | ( | void * | instance, |
Value & | aux_value | ||
) | const |
Definition at line 417 of file fmu3.cpp.
References get_boolean_, get_float64_, get_int32_, casadi::get_ptr(), set_string_, casadi::str(), casadi::Fmu3::Value::v_integer, casadi::Fmu3::Value::v_real, casadi::Fmu3::Value::v_string, vr_aux_boolean_, vr_aux_integer_, vr_aux_real_, and vr_aux_string_.
Referenced by get_aux(), and get_stats().
|
overridevirtual |
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 353 of file fmu3.cpp.
References get_directional_derivative_, casadi::FmuInternal::n_in(), and casadi::FmuInternal::n_out().
|
inherited |
Definition at line 1029 of file fmu.cpp.
References casadi::FmuMemory::osens_.
Referenced by casadi::FmuInternal::get_fwd().
|
inherited |
Definition at line 1035 of file fmu.cpp.
References casadi::FmuInternal::get_fwd(), and casadi::FmuInternal::ored_.
|
overridevirtual |
|
overridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_2bc
Implements casadi::FmuInternal.
Definition at line 461 of file fmu3.cpp.
References get_aux_impl(), casadi::FmuMemory::instance, casadi::FmuInternal::ired_, casadi::REG, casadi::Fmu3::Value::v_boolean, casadi::Fmu3::Value::v_integer, casadi::Fmu3::Value::v_real, casadi::Fmu3::Value::v_string, casadi::FmuInternal::value_in_, vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, and vn_aux_string_.
|
inherited |
Definition at line 60 of file generic_shared_internal.hpp.
|
inherited |
Definition at line 676 of file fmu.cpp.
References casadi::FmuInternal::hess_sp_, and casadi::Sparsity::sub().
|
inherited |
Definition at line 645 of file fmu.cpp.
References casadi::FmuInternal::scheme_in_.
Referenced by casadi::InputStruct::parse(), and casadi::OutputStruct::parse().
|
inherited |
Definition at line 655 of file fmu.cpp.
References casadi::FmuInternal::scheme_out_.
Referenced by casadi::InputStruct::parse(), and casadi::OutputStruct::parse().
|
overridevirtual |
Reimplemented from casadi::FmuInternal.
Definition at line 106 of file fmu3.cpp.
References casadi::FmuInternal::aux_, casadi::BOOLEAN, casadi::Variable::causality, casadi::ENUM, casadi::FmuInternal::init(), init_boolean_, init_integer_, init_real_, init_string_, casadi::INPUT, casadi::INTEGER, casadi::Variable::is_set(), casadi::DaeBuilderInternal::n_variables(), casadi::Variable::name, casadi::Variable::numel, casadi::PARAMETER, casadi::REAL, casadi::STRING, casadi::Variable::stringvalue, casadi::to_fmi2(), casadi::to_string(), casadi::Variable::type, casadi::Variable::value, casadi::Variable::value_reference, casadi::DaeBuilderInternal::variable(), vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, vn_aux_string_, vr_aux_boolean_, vr_aux_integer_, vr_aux_real_, vr_aux_string_, vr_boolean_, vr_integer_, vr_real_, and vr_string_.
|
overridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_2dr
Allocate numerical values for initial auxilliary variables
Reimplemented from casadi::FmuInternal.
Definition at line 39 of file fmu3.cpp.
References casadi::FmuInternal::init_mem(), vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, and vn_aux_string_.
|
inlineprotectedinherited |
Called in the constructor of singletons to avoid that the counter reaches zero
Definition at line 71 of file generic_shared_internal.hpp.
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 243 of file fmu3.cpp.
References casadi::FmuInternal::instance_name_, instantiate_model_exchange_, casadi::FmuInternal::instantiation_token_, log_message_callback(), casadi::FmuInternal::logging_on_, and casadi::FmuInternal::resource_loc_.
|
inherited |
Definition at line 665 of file fmu.cpp.
References casadi::FmuInternal::jac_sp_, and casadi::Sparsity::sub().
|
inherited |
Definition at line 357 of file fmu_impl.hpp.
References casadi::Importer::get_function(), casadi::FmuInternal::li_, and casadi::T.
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 205 of file fmu3.cpp.
References enter_continuous_time_mode_, enter_initialization_mode_, exit_initialization_mode_, free_instance_, get_adjoint_derivative_, get_boolean_, get_directional_derivative_, get_float64_, get_int32_, get_string_, instantiate_model_exchange_, casadi::FmuInternal::provides_adjoint_derivatives_, casadi::FmuInternal::provides_directional_derivatives_, reset_, set_boolean_, set_float64_, set_int32_, set_string_, set_time_, and update_discrete_states_.
|
static |
|
inlineinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_270
Definition at line 127 of file fmu_impl.hpp.
Referenced by get_adjoint_derivative(), casadi::Fmu2::get_directional_derivative(), and get_directional_derivative().
|
inlineinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_26o
Definition at line 132 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::eval(), get_adjoint_derivative(), casadi::Fmu2::get_directional_derivative(), and get_directional_derivative().
|
inherited |
Definition at line 1213 of file fmu.cpp.
References casadi::FmuMemory::omarked_, casadi::FmuInternal::ored_, and casadi::FmuMemory::wrt_.
|
inherited |
Definition at line 1073 of file fmu.cpp.
References casadi::FmuInternal::ired_, and casadi::FmuInternal::request_adj().
|
inherited |
Definition at line 1064 of file fmu.cpp.
References casadi::FmuMemory::imarked_, and casadi::FmuMemory::wrt_.
Referenced by casadi::FmuInternal::request_adj().
|
inherited |
Definition at line 1285 of file fmu.cpp.
References casadi::FmuInternal::ored_, and casadi::FmuInternal::request_fwd().
|
inherited |
Definition at line 1276 of file fmu.cpp.
References casadi::FmuMemory::omarked_, and casadi::FmuMemory::wrt_.
Referenced by casadi::FmuInternal::request_fwd().
int casadi::Fmu3::reset | ( | void * | instance | ) |
|
inherited |
Definition at line 1371 of file fmu.cpp.
References casadi::FmuInternal::serialize_body(), and casadi::FmuInternal::serialize_type().
|
overridevirtual |
Reimplemented from casadi::FmuInternal.
Definition at line 564 of file fmu3.cpp.
References init_boolean_, init_integer_, init_real_, init_string_, casadi::SerializingStream::pack(), casadi::FmuInternal::serialize_body(), casadi::SerializingStream::version(), vn_aux_boolean_, vn_aux_integer_, vn_aux_real_, vn_aux_string_, vr_aux_boolean_, vr_aux_integer_, vr_aux_real_, vr_aux_string_, vr_boolean_, vr_integer_, vr_real_, and vr_string_.
|
virtualinherited |
Definition at line 1376 of file fmu.cpp.
References casadi::SharedObjectInternal::class_name(), and casadi::SerializingStream::pack().
Referenced by casadi::FmuInternal::serialize().
|
inherited |
Definition at line 1192 of file fmu.cpp.
References casadi::FmuMemory::ibuf_, casadi::FmuMemory::imarked_, and casadi::FmuInternal::ired_.
|
inherited |
Definition at line 1045 of file fmu.cpp.
References casadi::FmuMemory::omarked_, and casadi::FmuMemory::osens_.
Referenced by casadi::FmuInternal::set_adj().
|
inherited |
Definition at line 1054 of file fmu.cpp.
References casadi::FmuInternal::ored_, and casadi::FmuInternal::set_adj().
|
inherited |
Definition at line 1257 of file fmu.cpp.
References casadi::FmuMemory::imarked_, and casadi::FmuMemory::isens_.
Referenced by casadi::FmuInternal::set_fwd().
|
inherited |
Definition at line 1266 of file fmu.cpp.
References casadi::FmuInternal::ired_, and casadi::FmuInternal::set_fwd().
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 329 of file fmu3.cpp.
References casadi::FmuInternal::has_independent_, set_float64_, set_time_, and casadi::FmuInternal::vr_in_.
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 369 of file fmu3.cpp.
References casadi::get_ptr(), init_boolean_, init_integer_, init_real_, init_string_, set_boolean_, set_float64_, set_int32_, set_string_, casadi::str(), vr_boolean_, vr_integer_, vr_real_, and vr_string_.
|
inlineprotectedinherited |
Definition at line 83 of file generic_shared_internal.hpp.
|
inlineprotectedinherited |
Definition at line 92 of file generic_shared_internal.hpp.
|
overridevirtual |
|
overridevirtual |
Implements casadi::FmuInternal.
Definition at line 305 of file fmu3.cpp.
References casadi::EventMemory::discrete_states_need_update, casadi::EventMemory::next_event_time, casadi::EventMemory::next_event_time_defined, casadi::EventMemory::nominals_of_continuous_states_changed, casadi::EventMemory::terminate_simulation, update_discrete_states_, and casadi::EventMemory::values_of_continuous_states_changed.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_1ai
Definition at line 67 of file generic_shared_internal.hpp.
|
protectedinherited |
Definition at line 294 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::Fmu2::init(), init(), and casadi::FmuInternal::serialize_body().
Value casadi::Fmu3::aux_value_ |
Definition at line 122 of file fmu3.hpp.
Referenced by finalize(), and get_aux().
|
protectedinherited |
Definition at line 318 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 353 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::Fmu2::get_real(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
fmi3EnterContinuousTimeModeTYPE* casadi::Fmu3::enter_continuous_time_mode_ |
Definition at line 100 of file fmu3.hpp.
Referenced by enter_continuous_time_mode(), Fmu3(), and load_functions().
fmi3EnterInitializationModeTYPE* casadi::Fmu3::enter_initialization_mode_ |
Definition at line 98 of file fmu3.hpp.
Referenced by enter_initialization_mode(), Fmu3(), and load_functions().
fmi3ExitInitializationModeTYPE* casadi::Fmu3::exit_initialization_mode_ |
Definition at line 99 of file fmu3.hpp.
Referenced by exit_initialization_mode(), Fmu3(), and load_functions().
|
protectedinherited |
Definition at line 300 of file fmu_impl.hpp.
Referenced by enter_initialization_mode(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::Fmu2::instantiate(), and casadi::FmuInternal::serialize_body().
fmi3FreeInstanceTYPE* casadi::Fmu3::free_instance_ |
Definition at line 96 of file fmu3.hpp.
Referenced by Fmu3(), free_instance(), and load_functions().
fmi3GetAdjointDerivativeTYPE* casadi::Fmu3::get_adjoint_derivative_ |
Definition at line 111 of file fmu3.hpp.
Referenced by Fmu3(), get_adjoint_derivative(), and load_functions().
fmi3GetBooleanTYPE* casadi::Fmu3::get_boolean_ |
Definition at line 104 of file fmu3.hpp.
Referenced by get_aux_impl(), and load_functions().
fmi3GetDirectionalDerivativeTYPE* casadi::Fmu3::get_directional_derivative_ |
Definition at line 110 of file fmu3.hpp.
Referenced by Fmu3(), get_directional_derivative(), and load_functions().
fmi3GetFloat64TYPE* casadi::Fmu3::get_float64_ |
Definition at line 102 of file fmu3.hpp.
Referenced by Fmu3(), get_aux_impl(), get_real(), and load_functions().
fmi3GetInt32TYPE* casadi::Fmu3::get_int32_ |
Definition at line 106 of file fmu3.hpp.
Referenced by get_aux_impl(), and load_functions().
fmi3GetStringTYPE* casadi::Fmu3::get_string_ |
Definition at line 108 of file fmu3.hpp.
Referenced by load_functions().
|
protectedinherited |
Definition at line 327 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::FmuInternal::serialize_body(), casadi::Fmu2::set_real(), and set_real().
|
protectedinherited |
Definition at line 343 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::hess_sparsity(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 324 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::FmuInternal::init_mem(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 324 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
std::vector<fmi3Boolean> casadi::Fmu3::init_boolean_ |
Definition at line 85 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
std::vector<fmi3Int32> casadi::Fmu3::init_integer_ |
Definition at line 84 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
std::vector<fmi3Float64> casadi::Fmu3::init_real_ |
Definition at line 83 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
std::vector<std::string> casadi::Fmu3::init_string_ |
Definition at line 86 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
|
protectedinherited |
Definition at line 303 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::Fmu2::instantiate(), instantiate(), and casadi::FmuInternal::serialize_body().
fmi3InstantiateModelExchangeTYPE* casadi::Fmu3::instantiate_model_exchange_ |
Definition at line 95 of file fmu3.hpp.
Referenced by Fmu3(), instantiate(), and load_functions().
|
protectedinherited |
Definition at line 306 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::Fmu2::instantiate(), instantiate(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 340 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::all_nominal_in(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::get_adj(), casadi::Fmu2::get_stats(), get_stats(), casadi::FmuInternal::init(), casadi::FmuInternal::request_adj(), casadi::FmuInternal::serialize_body(), casadi::FmuInternal::set(), and casadi::FmuInternal::set_fwd().
|
protectedinherited |
Definition at line 343 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::FmuInternal::jac_sparsity(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 321 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), and casadi::FmuInternal::load_function().
|
protectedinherited |
Definition at line 309 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::Fmu2::instantiate(), instantiate(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 332 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::desc_in(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 332 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 331 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::desc_in(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 331 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 287 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::disp(), casadi::FmuInternal::FmuInternal(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 330 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::all_nominal_in(), casadi::FmuInternal::desc_in(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 330 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::all_nominal_out(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 312 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 351 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::Fmu2::get_real(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 324 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::FmuInternal::init_mem(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 324 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 340 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::all_nominal_out(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::get(), casadi::FmuInternal::get_fwd(), casadi::FmuInternal::init(), casadi::FmuInternal::request(), casadi::FmuInternal::request_fwd(), casadi::FmuInternal::serialize_body(), and casadi::FmuInternal::set_adj().
|
protectedinherited |
Definition at line 315 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), load_functions(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 315 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), casadi::Fmu2::load_functions(), load_functions(), and casadi::FmuInternal::serialize_body().
fmi3ResetTYPE* casadi::Fmu3::reset_ |
Definition at line 97 of file fmu3.hpp.
Referenced by Fmu3(), load_functions(), and reset().
|
protectedinherited |
Definition at line 284 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 297 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), casadi::Fmu2::instantiate(), and instantiate().
|
protectedinherited |
Definition at line 291 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 290 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::index_in(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 290 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::index_out(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
fmi3SetBooleanTYPE* casadi::Fmu3::set_boolean_ |
Definition at line 105 of file fmu3.hpp.
Referenced by Fmu3(), load_functions(), and set_values().
fmi3SetFloat64TYPE* casadi::Fmu3::set_float64_ |
Definition at line 103 of file fmu3.hpp.
Referenced by Fmu3(), load_functions(), set_real(), and set_values().
fmi3SetInt32TYPE* casadi::Fmu3::set_int32_ |
Definition at line 107 of file fmu3.hpp.
Referenced by load_functions(), and set_values().
fmi3SetStringTYPE* casadi::Fmu3::set_string_ |
Definition at line 109 of file fmu3.hpp.
Referenced by get_aux_impl(), load_functions(), and set_values().
fmi3SetTimeTYPE* casadi::Fmu3::set_time_ |
Definition at line 101 of file fmu3.hpp.
Referenced by Fmu3(), load_functions(), and set_real().
fmi3UpdateDiscreteStatesTYPE* casadi::Fmu3::update_discrete_states_ |
Definition at line 112 of file fmu3.hpp.
Referenced by Fmu3(), load_functions(), and update_discrete_states().
|
protectedinherited |
Definition at line 337 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), casadi::FmuInternal::FmuInternal(), casadi::Fmu2::get_stats(), get_stats(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
std::vector<std::string> casadi::Fmu3::vn_aux_boolean_ |
Definition at line 89 of file fmu3.hpp.
Referenced by finalize(), Fmu3(), get_stats(), init(), init_mem(), and serialize_body().
std::vector<std::string> casadi::Fmu3::vn_aux_integer_ |
Definition at line 89 of file fmu3.hpp.
Referenced by finalize(), Fmu3(), get_stats(), init(), init_mem(), and serialize_body().
std::vector<std::string> casadi::Fmu3::vn_aux_real_ |
Definition at line 89 of file fmu3.hpp.
Referenced by finalize(), Fmu3(), get_stats(), init(), init_mem(), and serialize_body().
std::vector<std::string> casadi::Fmu3::vn_aux_string_ |
Definition at line 89 of file fmu3.hpp.
Referenced by finalize(), Fmu3(), get_stats(), init(), init_mem(), and serialize_body().
|
protectedinherited |
Definition at line 333 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::desc_in(), casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
|
protectedinherited |
Definition at line 333 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::eval_fd(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_aux_boolean_ |
Definition at line 90 of file fmu3.hpp.
Referenced by Fmu3(), get_aux_impl(), init(), and serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_aux_integer_ |
Definition at line 90 of file fmu3.hpp.
Referenced by Fmu3(), get_aux_impl(), init(), and serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_aux_real_ |
Definition at line 90 of file fmu3.hpp.
Referenced by Fmu3(), get_aux_impl(), init(), and serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_aux_string_ |
Definition at line 90 of file fmu3.hpp.
Referenced by Fmu3(), get_aux_impl(), init(), and serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_boolean_ |
Definition at line 82 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
|
protectedinherited |
Definition at line 334 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::finalize(), casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::gather_io(), casadi::FmuInternal::init(), casadi::FmuInternal::serialize_body(), casadi::Fmu2::set_real(), and set_real().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_integer_ |
Definition at line 82 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
|
protectedinherited |
Definition at line 334 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::FmuInternal(), casadi::FmuInternal::gather_io(), casadi::FmuInternal::init(), and casadi::FmuInternal::serialize_body().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_real_ |
Definition at line 82 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
std::vector<fmi3ValueReference> casadi::Fmu3::vr_string_ |
Definition at line 82 of file fmu3.hpp.
Referenced by Fmu3(), init(), serialize_body(), and set_values().
|
mutableprotectedinherited |
Definition at line 345 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::discrete_states_iter(), and casadi::FmuInternal::finalize().
|
mutableprotectedinherited |
Definition at line 349 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::discrete_states_iter(), and casadi::FmuInternal::finalize().
|
mutableprotectedinherited |
Definition at line 347 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::discrete_states_iter(), and casadi::FmuInternal::finalize().
|
mutableprotectedinherited |
Definition at line 346 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::discrete_states_iter(), and casadi::FmuInternal::finalize().
|
mutableprotectedinherited |
Definition at line 348 of file fmu_impl.hpp.
Referenced by casadi::FmuInternal::discrete_states_iter(), and casadi::FmuInternal::finalize().