Trait cisat::AgentMethods[][src]

pub trait AgentMethods<S: Solution>: Send {
    fn new(id: usize, parameters: Parameters) -> Self;
fn iterate(&mut self);
fn get_best_solution_so_far(&mut self) -> S;
fn get_current_solution(&mut self) -> S;
fn communicate(&mut self, solutions: Vec<S>); }

This is a trait for implementing new agents

Required methods

fn new(id: usize, parameters: Parameters) -> Self[src]

Generates a new agent

fn iterate(&mut self)[src]

Iterates on the solution

fn get_best_solution_so_far(&mut self) -> S[src]

Gets the best solution found by the agent so far

fn get_current_solution(&mut self) -> S[src]

Gets the current solution of the agent

fn communicate(&mut self, solutions: Vec<S>)[src]

Agent accepts rival solutions and interacts

Loading content...

Implementors

impl<S: Solution> AgentMethods<S> for Agent<S>[src]

Loading content...