pub trait ExecutorStateLocal<D: Domain> {
// Required methods
fn create_initial_state(&self) -> D::State;
fn init_task_queue(&self, state: &D::State) -> ActiveTasks<D>;
// Provided method
fn keep_agent(&self, _tick: u64, _state: &D::State, _agent: AgentId) -> bool { ... }
}
Expand description
User-defined methods for the executor, where world and planner states are similar.
This trait is used with the SimpleExecutor. You must implement at least create_initial_state and init_task_queue, to create the initial state and build the initial list of tasks from it.
Required Methods§
Sourcefn create_initial_state(&self) -> D::State
fn create_initial_state(&self) -> D::State
Creates the initial world state.
Sourcefn init_task_queue(&self, state: &D::State) -> ActiveTasks<D>
fn init_task_queue(&self, state: &D::State) -> ActiveTasks<D>
Fills the initial queue of tasks.