Trait asi_core0::Runtime [] [src]

pub trait Runtime {
    type Agent;
    fn load(&mut self, agent: Self::Agent);
fn start(&mut self);
fn update(&mut self, dt: f64);
fn is_running(&self) -> bool;
fn shut_down(&mut self, dt: f64) -> f64;
fn kill(&mut self);
fn is_sleeping(&self) -> bool;
fn wake_up(&mut self); }

Implemented by runtimes for agents.

This controls the loading, starting, updating and shut down procedures.

Associated Types

The type of agent.

Required Methods

Loads a new agent as initial condition.

Starts the agent. This must be called before update to run the agent.

Move forward in time.

Returns true if the agent is still running or have not started yet.

Start shut down procedure, expected to complete in a number of seconds. Returns estimate from the decision maker. This is 0 if ready to shut down.

Terminate immediately even if the decision maker is not ready. This is called when the controller of the agent is impatient. (It does not morally kill the agent as it might be resurrected from backup memory).

Returns true if the agent is sleeping.

Wakes the agent up from sleep.

Implementors