SimState

Struct SimState 

Source
pub struct SimState<Inst>
where Inst: FmiInstance,
{ /* private fields */ }

Implementations§

Source§

impl<'a> SimState<InstanceCS<'a>>

Source

pub fn main_loop(&mut self) -> Result<SimStats, Fmi2Error>

Main loop of the co-simulation

Source§

impl<'a> SimState<InstanceCS<'a>>

Source

pub fn main_loop(&mut self) -> Result<SimStats, Error>

Main loop of the co-simulation

Trait Implementations§

Source§

impl SimApplyStartValues<Instance<'_, CS>> for SimState<InstanceCS<'_>>

Source§

fn apply_start_values( &mut self, start_values: &StartValues<<InstanceCS<'_> as FmiInstance>::ValueRef>, ) -> Result<(), Error>

Source§

impl SimApplyStartValues<Instance<'_, CS>> for SimState<InstanceCS<'_>>

Source§

fn apply_start_values( &mut self, start_values: &StartValues<<InstanceCS<'_> as FmiInstance>::ValueRef>, ) -> Result<(), Error>

Source§

impl SimApplyStartValues<Instance<'_, ME>> for SimState<InstanceME<'_>>

Source§

fn apply_start_values( &mut self, start_values: &StartValues<<InstanceME<'_> as FmiInstance>::ValueRef>, ) -> Result<(), Error>

Source§

impl SimApplyStartValues<Instance<'_, ME>> for SimState<InstanceME<'_>>

Source§

fn apply_start_values( &mut self, start_values: &StartValues<<InstanceME<'_> as FmiInstance>::ValueRef>, ) -> Result<(), Error>

Source§

impl SimDefaultInitialize for SimState<InstanceCS<'_>>

Source§

impl SimDefaultInitialize for SimState<InstanceCS<'_>>

Source§

impl SimDefaultInitialize for SimState<InstanceME<'_>>

Source§

impl SimDefaultInitialize for SimState<InstanceME<'_>>

Source§

impl<Inst> SimHandleEvents for SimState<Inst>

Source§

fn handle_events( &mut self, time: f64, input_event: bool, terminate_simulation: &mut bool, ) -> Result<bool, Error>

Source§

impl SimInitialize<Instance<'_, CS>> for SimState<InstanceCS<'_>>

Source§

fn initialize<P: AsRef<Path>>( &mut self, start_values: StartValues<<InstanceCS<'_> as FmiInstance>::ValueRef>, initial_fmu_state_file: Option<P>, ) -> Result<(), Error>

Source§

impl SimInitialize<Instance<'_, CS>> for SimState<InstanceCS<'_>>

Source§

fn initialize<P: AsRef<Path>>( &mut self, start_values: StartValues<<InstanceCS<'_> as FmiInstance>::ValueRef>, initial_fmu_state_file: Option<P>, ) -> Result<(), Error>

Source§

impl SimInitialize<Instance<'_, ME>> for SimState<InstanceME<'_>>

Source§

fn initialize<P: AsRef<Path>>( &mut self, start_values: StartValues<<InstanceME<'_> as FmiInstance>::ValueRef>, initial_fmu_state_file: Option<P>, ) -> Result<(), Error>

Source§

impl SimInitialize<Instance<'_, ME>> for SimState<InstanceME<'_>>

Source§

fn initialize<P: AsRef<Path>>( &mut self, start_values: StartValues<<InstanceME<'_> as FmiInstance>::ValueRef>, initial_fmu_state_file: Option<P>, ) -> Result<(), Error>

Source§

impl<Inst> SimMe<Inst> for SimState<Inst>

Source§

fn main_loop<S>(&mut self, solver_params: S::Params) -> Result<SimStats, Error>
where S: Solver<Inst>,

Main loop of the model-exchange simulation
Source§

impl<'a> SimStateTrait<'a, Instance<'a, CS>, Fmi2Import> for SimState<InstanceCS<'a>>

Source§

fn new( import: &'a Fmi2Import, sim_params: SimParams, input_state: InputState<InstanceCS<'a>>, recorder_state: RecorderState<InstanceCS<'a>>, ) -> Result<Self, Error>

Source§

impl<'a> SimStateTrait<'a, Instance<'a, CS>, Fmi3Import> for SimState<InstanceCS<'a>>

Source§

fn new( import: &'a Fmi3Import, sim_params: SimParams, input_state: InputState<InstanceCS<'a>>, output_state: RecorderState<InstanceCS<'a>>, ) -> Result<Self, Error>

Source§

impl<'a> SimStateTrait<'a, Instance<'a, ME>, Fmi2Import> for SimState<InstanceME<'a>>

Source§

fn new( import: &'a Fmi2Import, sim_params: SimParams, input_state: InputState<InstanceME<'a>>, recorder_state: RecorderState<InstanceME<'a>>, ) -> Result<Self, Error>

Source§

impl<'a> SimStateTrait<'a, Instance<'a, ME>, Fmi3Import> for SimState<InstanceME<'a>>

Source§

fn new( import: &'a Fmi3Import, sim_params: SimParams, input_state: InputState<InstanceME<'a>>, recorder_state: RecorderState<InstanceME<'a>>, ) -> Result<Self, Error>

Auto Trait Implementations§

§

impl<Inst> Freeze for SimState<Inst>
where Inst: Freeze,

§

impl<Inst> !RefUnwindSafe for SimState<Inst>

§

impl<Inst> Send for SimState<Inst>
where Inst: Send, <Inst as FmiInstance>::ValueRef: Send,

§

impl<Inst> Sync for SimState<Inst>
where Inst: Sync, <Inst as FmiInstance>::ValueRef: Sync,

§

impl<Inst> Unpin for SimState<Inst>
where Inst: Unpin, <Inst as FmiInstance>::ValueRef: Unpin,

§

impl<Inst> !UnwindSafe for SimState<Inst>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,