Struct sim::pandemic::model::PandemicModel[][src]

pub struct PandemicModel {
    pop: BTreeMap<PersonID, State>,
    bldgs: SharedSpace<BuildingID>,
    bus_stops: SharedSpace<BusStopID>,
    buses: SharedSpace<CarID>,
    person_to_bus: BTreeMap<PersonID, CarID>,
    rng: XorShiftRng,
    initialized: bool,
}

Fields

pop: BTreeMap<PersonID, State>bldgs: SharedSpace<BuildingID>bus_stops: SharedSpace<BusStopID>buses: SharedSpace<CarID>person_to_bus: BTreeMap<PersonID, CarID>rng: XorShiftRnginitialized: bool

Implementations

impl PandemicModel[src]

pub fn new(rng: XorShiftRng) -> PandemicModel[src]

pub(crate) fn initialize(
    &mut self,
    population: &Vec<Person>,
    _scheduler: &mut Scheduler
)
[src]

pub fn count_sane(&self) -> usize[src]

pub fn count_exposed(&self) -> usize[src]

pub fn count_infected(&self) -> usize[src]

pub fn count_recovered(&self) -> usize[src]

pub fn count_dead(&self) -> usize[src]

pub fn count_total(&self) -> usize[src]

pub(crate) fn handle_event(
    &mut self,
    now: Time,
    ev: &Event,
    scheduler: &mut Scheduler
)
[src]

pub(crate) fn handle_cmd(
    &mut self,
    _now: Time,
    cmd: Cmd,
    _scheduler: &mut Scheduler
)
[src]

pub fn get_time(&self, person: PersonID) -> Option<Time>[src]

pub fn is_sane(&self, person: PersonID) -> bool[src]

pub fn is_infectious(&self, person: PersonID) -> bool[src]

pub fn is_exposed(&self, person: PersonID) -> bool[src]

pub fn is_recovered(&self, person: PersonID) -> bool[src]

pub fn is_dead(&self, person: PersonID) -> bool[src]

fn infectious_contact(
    &self,
    person: PersonID,
    other: PersonID
) -> Option<PersonID>
[src]

fn transmission(
    &mut self,
    now: Time,
    person: PersonID,
    other_occupants: Vec<(PersonID, Duration)>,
    scheduler: &mut Scheduler
)
[src]

fn transition(
    &mut self,
    now: Time,
    person: PersonID,
    _scheduler: &mut Scheduler
)
[src]

fn become_exposed(
    &mut self,
    now: Time,
    overlap: Duration,
    person: PersonID,
    _scheduler: &mut Scheduler
)
[src]

Trait Implementations

impl Clone for PandemicModel[src]

Auto Trait Implementations

impl RefUnwindSafe for PandemicModel

impl Send for PandemicModel

impl Sync for PandemicModel

impl Unpin for PandemicModel

impl UnwindSafe for PandemicModel

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,