Skip to content

Split SimulationAgentLogic into different traits #203

@paulheinr

Description

@paulheinr

Currently, the SimulationAgentLogic consists of more and more functions necessary for any part of the simulation. I think it makes sense to split the functions into separate traits. E.g.

fn curr_act(&self) -> &InternalActivity;
fn next_act(&self) -> &InternalActivity;
fn curr_leg(&self) -> &InternalLeg;
fn next_leg(&self) -> Option<&InternalLeg>;
fn advance_plan(&mut self);
fn state(&self) -> SimulationAgentState;

Are general logic functions that should stay in this trait, but

fn wakeup_time(&self, now: u32) -> u32;
fn curr_link_id(&self) -> Option<&Id<Link>>;
fn peek_next_link_id(&self) -> Option<&Id<Link>>;

are either leg or activity related and should not be part of the same trait.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions