pub struct MetroTrain {
pub first_hour: i64,
pub last_hour: i64,
pub leg_minutes: f64,
pub dwell_minutes: f64,
pub run_minutes: f64,
}Expand description
When the one train on a Metro line runs, in game time
(crowd::metro_train). Each hour from first_hour to last_hour it
comes out of the left tunnel, takes leg_minutes to each station, waits
at each, and leaves by the right tunnel. On a line of n stations it
waits min(dwell_minutes, floor((run_minutes - leg_minutes * (n + 1)) / n)) minutes, or, when that is under one, every leg and wait takes
run_minutes / (2n + 1).
Fields§
§first_hour: i64The first hour a train runs.
last_hour: i64The last hour a train runs; its run ends before the next.
leg_minutes: f64Minutes from a tunnel mouth, or the station before, to a station.
dwell_minutes: f64The longest wait at a station.
run_minutes: f64Minutes of each hour the run along a line may take.
Trait Implementations§
Source§impl Clone for MetroTrain
impl Clone for MetroTrain
Source§fn clone(&self) -> MetroTrain
fn clone(&self) -> MetroTrain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetroTrain
impl Debug for MetroTrain
Source§impl PartialEq for MetroTrain
impl PartialEq for MetroTrain
Source§fn eq(&self, other: &MetroTrain) -> bool
fn eq(&self, other: &MetroTrain) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MetroTrain
impl Serialize for MetroTrain
impl StructuralPartialEq for MetroTrain
Auto Trait Implementations§
impl Freeze for MetroTrain
impl RefUnwindSafe for MetroTrain
impl Send for MetroTrain
impl Sync for MetroTrain
impl Unpin for MetroTrain
impl UnsafeUnpin for MetroTrain
impl UnwindSafe for MetroTrain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more