[−][src]Struct asi_core0::StandardRuntime
Standard runtime for running an agent.
This runtime permits setting a memory limit. A sleeping agent can also be interrupted.
The runtime keeps track of actions that are waiting for confirmation.
Fields
agent: Option<Agent<I, O, T, D>>
Stores agent data.
This is set to None
before the runtime is loaded.
wait: f64
The number of seconds to wait before performing the next action.
actions: VecDeque<(Action, bool)>
Actions of sending or retrieving inputs and outputs. The flag tells whether this is done or not.
memory_limit: Option<usize>
A limit to the amount of memory states.
Implementations
impl<I, O, T, D> StandardRuntime<I, O, T, D>
[src]
pub fn new() -> StandardRuntime<I, O, T, D>
[src]
Creates a new standard runtime with an agent with no sensors, actuators or memory.
Trait Implementations
impl<I, O, T, D> Runtime for StandardRuntime<I, O, T, D> where
D: DecisionMaker<T>,
I: Sensor<T>,
O: Actuator<T>,
T: Default,
[src]
D: DecisionMaker<T>,
I: Sensor<T>,
O: Actuator<T>,
T: Default,
type Agent = Agent<I, O, T, D>
The type of agent.
pub fn load(&mut self, agent: Agent<I, O, T, D>)
[src]
pub fn start(&mut self)
[src]
pub fn is_running(&self) -> bool
[src]
pub fn kill(&mut self)
[src]
pub fn shut_down(&mut self, dt: f64) -> f64
[src]
pub fn is_sleeping(&self) -> bool
[src]
pub fn wake_up(&mut self)
[src]
pub fn update(&mut self, dt: f64)
[src]
Auto Trait Implementations
impl<I, O, T, D> RefUnwindSafe for StandardRuntime<I, O, T, D> where
D: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
I: RefUnwindSafe,
O: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, O, T, D> Send for StandardRuntime<I, O, T, D> where
D: Send,
I: Send,
O: Send,
T: Send,
D: Send,
I: Send,
O: Send,
T: Send,
impl<I, O, T, D> Sync for StandardRuntime<I, O, T, D> where
D: Sync,
I: Sync,
O: Sync,
T: Sync,
D: Sync,
I: Sync,
O: Sync,
T: Sync,
impl<I, O, T, D> Unpin for StandardRuntime<I, O, T, D> where
D: Unpin,
I: Unpin,
O: Unpin,
T: Unpin,
D: Unpin,
I: Unpin,
O: Unpin,
T: Unpin,
impl<I, O, T, D> UnwindSafe for StandardRuntime<I, O, T, D> where
D: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
I: UnwindSafe,
O: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,