Struct synthpop::counts::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: MapNamedescription: Stringper_road: Counter<RoadID>per_intersection: Counter<IntersectionID>

Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.