pub enum Variability {
Constant,
Fixed,
Tunable,
Discrete,
Continuous,
}
Expand description
Enumeration that defines the time dependency of the variable, in other words, it defines the time instants when a variable may be changed by the importer or may change its value due to FMU internal computations, depending on their causality.
See [https://fmi-standard.org/docs/3.0.1/#variability]
Variants§
Constant
The value of the variable never changes.
Fixed
The value of the variable is fixed in super state Initialized, in other words, after
[exit_initialization_mode()
] was called the variable value does not change anymore. The
default for variables of causality Causality::Parameter
,
[Causality::StructuredParameter
] or Causality::CalculatedParameter
is Fixed
.
Tunable
The value of the variable is constant between events (ME and CS if Event Mode is supported) and between communication points (CS and SE). A parameter with variability = tunable may be changed only in Event Mode or, if Event Mode is not supported, at communication points (CS and SE).
Discrete
- Model Exchange: The value of the variable may change only in Event Mode.
- Co-Simulation: If Event Mode is used (see
event_mode_used
), the value of the variable may only change in Event Mode. If Event Mode is not used, the value may change at communication points and the FMU must detect and handle such events internally. During Intermediate Update Mode, discrete variables are not allowed to change. - Scheduled Execution: The value may change only at communication points.
Continuous
Only variables of type FmiFloat32
or FmiFloat64
may be continuous. The default for
variables of type FmiFloat32
and FmiFloat64
and causality other than
Causality::Parameter
, [Causality::StructuredParameter
] or
Causality::CalculatedParameter
is continuous. Variables with variability continuous
may change in Initialization Mode and in super state Initialized.
Trait Implementations§
Source§impl Clone for Variability
impl Clone for Variability
Source§fn clone(&self) -> Variability
fn clone(&self) -> Variability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Variability
impl Debug for Variability
Source§impl Default for Variability
impl Default for Variability
Source§fn default() -> Variability
fn default() -> Variability
Source§impl PartialEq for Variability
impl PartialEq for Variability
Source§impl YaDeserialize for Variability
impl YaDeserialize for Variability
fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>
Source§impl YaSerialize for Variability
impl YaSerialize for Variability
fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>
fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>
impl Copy for Variability
impl StructuralPartialEq for Variability
Auto Trait Implementations§
impl Freeze for Variability
impl RefUnwindSafe for Variability
impl Send for Variability
impl Sync for Variability
impl Unpin for Variability
impl UnwindSafe for Variability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more