Struct synthpop::TrafficCounts [−][src]
pub struct TrafficCounts {
pub map: MapName,
pub description: String,
pub per_road: Counter<RoadID>,
pub per_intersection: Counter<IntersectionID>,
}
Expand description
This represents the number of vehicles (or trips, or something else) crossing roads and intersections over some span of time. The data could represent real observations or something from a simulation.
There’s some nice UIs in other crates to compare counts.
Fields
map: MapName
description: String
per_road: Counter<RoadID>
per_intersection: Counter<IntersectionID>
Implementations
pub fn from_path_requests(
map: &Map,
description: String,
requests: &[(PathRequest, usize)],
params: RoutingParams,
cache_custom: PathfinderCaching,
timer: &mut Timer<'_>
) -> Self
pub fn from_path_requests(
map: &Map,
description: String,
requests: &[(PathRequest, usize)],
params: RoutingParams,
cache_custom: PathfinderCaching,
timer: &mut Timer<'_>
) -> Self
Run pathfinding on all of the requests, then count the throughput on every road and
intersection. Each request has the count it should contribute – use
PathRequest::deduplicate
to easily generate this.
Print a comparison of counts. Only look at roads/intersections in self
.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for TrafficCounts
impl Send for TrafficCounts
impl Sync for TrafficCounts
impl Unpin for TrafficCounts
impl UnwindSafe for TrafficCounts
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self