From b74614e534cdc13bb650cd8848349ace58dc1488 Mon Sep 17 00:00:00 2001 From: dabreegster Date: Thu, 10 Nov 2022 15:28:21 +0000 Subject: [PATCH] deploy: 717e97ccd1fc0107861432adc669dd976278dbc2 --- rustdoc/geom/polygon/fn.from_multi.html | 2 +- rustdoc/geom/polygon/index.html | 2 +- rustdoc/geom/polygon/struct.Polygon.html | 26 +++++++------- rustdoc/geom/struct.Polygon.html | 26 +++++++------- rustdoc/geom/struct.Tessellation.html | 4 +-- rustdoc/geom/tessellation/fn.downsize.html | 2 +- rustdoc/geom/tessellation/index.html | 2 +- .../tessellation/struct.Tessellation.html | 4 +-- .../built_info/constant.BUILT_TIME_UTC.html | 2 +- rustdoc/sim/analytics/struct.Analytics.html | 6 ++-- rustdoc/sim/events/enum.Event.html | 6 ++-- .../sim/fn.count_parked_cars_per_bldg.html | 2 +- rustdoc/sim/fn.fork_rng.html | 2 +- rustdoc/sim/make/load/fn.parse_modifiers.html | 2 +- rustdoc/sim/make/load/struct.SimFlags.html | 4 +-- rustdoc/sim/make/load/type.ModifierList.html | 2 +- rustdoc/sim/make/spawner/enum.TripSpec.html | 2 +- rustdoc/sim/make/spawner/fn.driving_goal.html | 2 +- .../make/spawner/fn.end_sidewalk_spot.html | 2 +- .../make/spawner/fn.start_sidewalk_spot.html | 2 +- rustdoc/sim/prebake/fn.prebake.html | 2 +- .../sim/prebake/struct.PrebakeSummary.html | 2 +- .../sim/recorder/struct.TrafficRecorder.html | 4 +-- .../fn.count_parked_cars_per_bldg.html | 2 +- rustdoc/sim/sim/scenario/fn.get_vehicles.html | 2 +- rustdoc/sim/sim/struct.Sim.html | 8 ++--- rustdoc/sim/struct.Analytics.html | 6 ++-- rustdoc/sim/struct.BorderSpawnOverTime.html | 6 ++-- rustdoc/sim/struct.Person.html | 4 +-- rustdoc/sim/struct.ScenarioGenerator.html | 6 ++-- rustdoc/sim/struct.Sim.html | 8 ++--- rustdoc/sim/struct.SimFlags.html | 4 +-- rustdoc/sim/struct.SpawnOverTime.html | 6 ++-- rustdoc/sim/struct.TripInfo.html | 10 +++--- rustdoc/sim/trips/struct.Person.html | 4 +-- rustdoc/sim/trips/struct.TripInfo.html | 10 +++--- rustdoc/sim/trips/struct.TripManager.html | 4 +-- rustdoc/src/geom/polygon.rs.html | 36 +++++++++++++++++-- rustdoc/src/geom/tessellation.rs.html | 20 ++++++++++- .../out/built.rs.html | 2 +- 40 files changed, 149 insertions(+), 99 deletions(-) diff --git a/rustdoc/geom/polygon/fn.from_multi.html b/rustdoc/geom/polygon/fn.from_multi.html index d8218c02d8..18c404ee89 100644 --- a/rustdoc/geom/polygon/fn.from_multi.html +++ b/rustdoc/geom/polygon/fn.from_multi.html @@ -1 +1 @@ -from_multi in geom::polygon - Rust
pub(crate) fn from_multi(multi: MultiPolygon) -> Result<Vec<Polygon>>
\ No newline at end of file +from_multi in geom::polygon - Rust
pub(crate) fn from_multi(multi: MultiPolygon) -> Result<Vec<Polygon>>
\ No newline at end of file diff --git a/rustdoc/geom/polygon/index.html b/rustdoc/geom/polygon/index.html index 3ff9da33fb..8f3d5921c8 100644 --- a/rustdoc/geom/polygon/index.html +++ b/rustdoc/geom/polygon/index.html @@ -1 +1 @@ -geom::polygon - Rust
\ No newline at end of file +geom::polygon - Rust
\ No newline at end of file diff --git a/rustdoc/geom/polygon/struct.Polygon.html b/rustdoc/geom/polygon/struct.Polygon.html index 03288a92a2..19e9d2fcf6 100644 --- a/rustdoc/geom/polygon/struct.Polygon.html +++ b/rustdoc/geom/polygon/struct.Polygon.html @@ -1,7 +1,7 @@ Polygon in geom::polygon - Rust
pub struct Polygon {
     pub(crate) rings: Vec<Ring>,
     pub(crate) tessellation: Option<Tessellation>,
-}

Fields

rings: Vec<Ring>tessellation: Option<Tessellation>

Implementations

Does this polygon contain the point in its interior?

+}

Fields

rings: Vec<Ring>tessellation: Option<Tessellation>

Implementations

Does this polygon contain the point in its interior?

Transformations must preserve Rings.

When factor is small, this may collapse Rings and thus fail.

When factor is known to be over 1, then scaling can’t fail.

@@ -15,25 +15,25 @@ Note this will panic if width or height is 0.

Top-left at the origin. Doesn’t take Distance, because this is usually pixels, actually. If it’s not possible to apply the specified radius, fallback to a regular rectangle.

Union all of the polygons into one geo::MultiPolygon

-

Find the “pole of inaccessibility” – the most distant internal point from the polygon +

Find the “pole of inaccessibility” – the most distant internal point from the polygon outline

-

Do two polygons intersect at all?

-

Does this polygon intersect a polyline?

-

Creates the outline around the polygon (both the exterior and holes), with the thickness +

Do two polygons intersect at all?

+

Does this polygon intersect a polyline?

+

Creates the outline around the polygon (both the exterior and holes), with the thickness half straddling the polygon and half of it just outside.

Returns a Tessellation that may union together the outline from the exterior and multiple holes. Callers that need a Polygon must call to_outline on the individual Rings.

-

Usually m^2, unless the polygon is in screen-space

-

Doesn’t handle multiple crossings in and out.

-

Optionally map the world-space points back to GPS.

-

Extracts all polygons from raw bytes representing a GeoJSON file, along with the string +

Usually m^2, unless the polygon is in screen-space

+

Doesn’t handle multiple crossings in and out.

+

Optionally map the world-space points back to GPS.

+

Extracts all polygons from raw bytes representing a GeoJSON file, along with the string key/value properties. Only the first polygon from multipolygons is returned. If require_in_bounds is set, then the polygon must completely fit within the gps_bounds.

-

If simplification fails, just keep the original polygon

-

An arbitrary placeholder value, when Option types aren’t worthwhile

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used +

If simplification fails, just keep the original polygon

+

An arbitrary placeholder value, when Option types aren’t worthwhile

+

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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

Returns the argument unchanged.

+sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/rustdoc/geom/struct.Polygon.html b/rustdoc/geom/struct.Polygon.html index 51f4c4e27d..f1c6d6bf70 100644 --- a/rustdoc/geom/struct.Polygon.html +++ b/rustdoc/geom/struct.Polygon.html @@ -1,7 +1,7 @@ Polygon in geom - Rust
pub struct Polygon {
     pub(crate) rings: Vec<Ring>,
     pub(crate) tessellation: Option<Tessellation>,
-}

Fields

rings: Vec<Ring>tessellation: Option<Tessellation>

Implementations

Does this polygon contain the point in its interior?

+}

Fields

rings: Vec<Ring>tessellation: Option<Tessellation>

Implementations

Does this polygon contain the point in its interior?

Transformations must preserve Rings.

When factor is small, this may collapse Rings and thus fail.

When factor is known to be over 1, then scaling can’t fail.

@@ -15,25 +15,25 @@ Note this will panic if width or height is 0.

Top-left at the origin. Doesn’t take Distance, because this is usually pixels, actually. If it’s not possible to apply the specified radius, fallback to a regular rectangle.

Union all of the polygons into one geo::MultiPolygon

-

Find the “pole of inaccessibility” – the most distant internal point from the polygon +

Find the “pole of inaccessibility” – the most distant internal point from the polygon outline

-

Do two polygons intersect at all?

-

Does this polygon intersect a polyline?

-

Creates the outline around the polygon (both the exterior and holes), with the thickness +

Do two polygons intersect at all?

+

Does this polygon intersect a polyline?

+

Creates the outline around the polygon (both the exterior and holes), with the thickness half straddling the polygon and half of it just outside.

Returns a Tessellation that may union together the outline from the exterior and multiple holes. Callers that need a Polygon must call to_outline on the individual Rings.

-

Usually m^2, unless the polygon is in screen-space

-

Doesn’t handle multiple crossings in and out.

-

Optionally map the world-space points back to GPS.

-

Extracts all polygons from raw bytes representing a GeoJSON file, along with the string +

Usually m^2, unless the polygon is in screen-space

+

Doesn’t handle multiple crossings in and out.

+

Optionally map the world-space points back to GPS.

+

Extracts all polygons from raw bytes representing a GeoJSON file, along with the string key/value properties. Only the first polygon from multipolygons is returned. If require_in_bounds is set, then the polygon must completely fit within the gps_bounds.

-

If simplification fails, just keep the original polygon

-

An arbitrary placeholder value, when Option types aren’t worthwhile

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used +

If simplification fails, just keep the original polygon

+

An arbitrary placeholder value, when Option types aren’t worthwhile

+

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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

Returns the argument unchanged.

+sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

diff --git a/rustdoc/geom/struct.Tessellation.html b/rustdoc/geom/struct.Tessellation.html index 6296651600..d3b8cd3b27 100644 --- a/rustdoc/geom/struct.Tessellation.html +++ b/rustdoc/geom/struct.Tessellation.html @@ -5,13 +5,13 @@

Fields

points: Vec<Pt2D>

These points aren’t in any meaningful order. It’s not generally possible to reconstruct a Polygon from this.

indices: Vec<u16>

Groups of three indices make up the triangles

-

Implementations

The points are not necessarily a Ring, which has strict requirements about no duplicate +

Implementations

The points are not necessarily a Ring, which has strict requirements about no duplicate points. We can render various types of invalid polygon.

Returns (points, indices) for rendering

Equivalent to self.scale(scale).translate(translate_x, translate_y).rotate_around(rotate, pivot), but modifies the polygon in-place and is faster.

Produces a GeoJSON multipolygon consisting of individual triangles. Optionally map the world-space points back to GPS.

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used +

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

diff --git a/rustdoc/geom/tessellation/fn.downsize.html b/rustdoc/geom/tessellation/fn.downsize.html index b7f631b046..39db784aed 100644 --- a/rustdoc/geom/tessellation/fn.downsize.html +++ b/rustdoc/geom/tessellation/fn.downsize.html @@ -1 +1 @@ -downsize in geom::tessellation - Rust
fn downsize(input: Vec<usize>) -> Vec<u16>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
\ No newline at end of file +downsize in geom::tessellation - Rust
fn downsize(input: Vec<usize>) -> Vec<u16>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
\ No newline at end of file diff --git a/rustdoc/geom/tessellation/index.html b/rustdoc/geom/tessellation/index.html index 73fed93206..cd2d7881db 100644 --- a/rustdoc/geom/tessellation/index.html +++ b/rustdoc/geom/tessellation/index.html @@ -1 +1 @@ -geom::tessellation - Rust

Structs

A tessellated polygon, ready for rendering.

Functions

downsize 🔒
\ No newline at end of file +geom::tessellation - Rust

Structs

A tessellated polygon, ready for rendering.

Functions

downsize 🔒
\ No newline at end of file diff --git a/rustdoc/geom/tessellation/struct.Tessellation.html b/rustdoc/geom/tessellation/struct.Tessellation.html index e5122e9ae2..7a5104ff25 100644 --- a/rustdoc/geom/tessellation/struct.Tessellation.html +++ b/rustdoc/geom/tessellation/struct.Tessellation.html @@ -5,13 +5,13 @@

Fields

points: Vec<Pt2D>

These points aren’t in any meaningful order. It’s not generally possible to reconstruct a Polygon from this.

indices: Vec<u16>

Groups of three indices make up the triangles

-

Implementations

The points are not necessarily a Ring, which has strict requirements about no duplicate +

Implementations

The points are not necessarily a Ring, which has strict requirements about no duplicate points. We can render various types of invalid polygon.

Returns (points, indices) for rendering

Equivalent to self.scale(scale).translate(translate_x, translate_y).rotate_around(rotate, pivot), but modifies the polygon in-place and is faster.

Produces a GeoJSON multipolygon consisting of individual triangles. Optionally map the world-space points back to GPS.

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used +

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

diff --git a/rustdoc/map_gui/tools/title_screen/built_info/constant.BUILT_TIME_UTC.html b/rustdoc/map_gui/tools/title_screen/built_info/constant.BUILT_TIME_UTC.html index 23e7c3d314..7d47414e2d 100644 --- a/rustdoc/map_gui/tools/title_screen/built_info/constant.BUILT_TIME_UTC.html +++ b/rustdoc/map_gui/tools/title_screen/built_info/constant.BUILT_TIME_UTC.html @@ -1,2 +1,2 @@ -BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust
pub const BUILT_TIME_UTC: &'static str = r"Wed, 09 Nov 2022 12:11:28 +0000";
Expand description

The build time in RFC2822, UTC.

+BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust
pub const BUILT_TIME_UTC: &'static str = r"Thu, 10 Nov 2022 15:26:44 +0000";
Expand description

The build time in RFC2822, UTC.

\ No newline at end of file diff --git a/rustdoc/sim/analytics/struct.Analytics.html b/rustdoc/sim/analytics/struct.Analytics.html index 14334fd296..e8755b5ab0 100644 --- a/rustdoc/sim/analytics/struct.Analytics.html +++ b/rustdoc/sim/analytics/struct.Analytics.html @@ -7,7 +7,7 @@ pub passengers_boarding: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID, Duration)>>, pub passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>, pub started_trips: BTreeMap<TripID, Time>, - pub finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>, + pub finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>, pub problems_per_trip: BTreeMap<TripID, Vec<(Time, Problem)>>, pub trip_log: Vec<(Time, TripID, Option<PathRequest>, TripPhaseType)>, pub intersection_delays: BTreeMap<IntersectionID, Vec<(u8, Time, Duration, AgentType)>>, @@ -25,13 +25,13 @@ running the simulation, and compare the live Analytics to the prebaked baseline

Fields

road_thruput: TimeSeriesCount<RoadID>intersection_thruput: TimeSeriesCount<IntersectionID>traffic_signal_thruput: TimeSeriesCount<CompressedMovementID>demand: BTreeMap<MovementID, usize>

Most fields in Analytics are cumulative over time, but this is just for the current moment in time.

bus_arrivals: Vec<(Time, CarID, TransitRouteID, TransitStopID)>passengers_boarding: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID, Duration)>>

For each passenger boarding, how long did they wait at the stop?

-
passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>started_trips: BTreeMap<TripID, Time>finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>

Finish time, ID, mode, trip duration if successful (or None if cancelled)

+
passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>started_trips: BTreeMap<TripID, Time>finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>

Finish time, ID, mode, trip duration if successful (or None if cancelled)

problems_per_trip: BTreeMap<TripID, Vec<(Time, Problem)>>

Record different problems that each trip encounters.

trip_log: Vec<(Time, TripID, Option<PathRequest>, TripPhaseType)>intersection_delays: BTreeMap<IntersectionID, Vec<(u8, Time, Duration, AgentType)>>

Only for traffic signals. The u8 is the movement index from a CompressedMovementID.

parking_lane_changes: BTreeMap<LaneID, Vec<(Time, bool)>>

Per parking lane or lot, when does a spot become filled (true) or free (false)

parking_lot_changes: BTreeMap<ParkingLotID, Vec<(Time, bool)>>alerts: Vec<(Time, AlertLocation, String)>record_anything: bool

For benchmarking, we may want to disable collecting data.

Implementations

Ignores the current time. Returns None for cancelled trips.

-

Returns pairs of trip times for finished trips in both worlds. (ID, before, after, mode)

+

Returns pairs of trip times for finished trips in both worlds. (ID, before, after, mode)

If calling on prebaked Analytics, be careful to pass in an unedited map, to match how the simulation was originally run. Otherwise the paths may be nonsense.

Returns the free spots over time

diff --git a/rustdoc/sim/events/enum.Event.html b/rustdoc/sim/events/enum.Event.html index a3a9c13b1b..cd6484ae3b 100644 --- a/rustdoc/sim/events/enum.Event.html +++ b/rustdoc/sim/events/enum.Event.html @@ -16,11 +16,11 @@ IntersectionDelayMeasured(TripID, TurnID, AgentID, Duration), TripFinished { trip: TripID, - mode: TripMode, + mode: TripMode, total_time: Duration, blocked_time: Duration, }, - TripCancelled(TripID, TripMode), + TripCancelled(TripIDTripMode), TripPhaseStarting(TripIDPersonIDOption<PathRequest>, TripPhaseType), PathAmended(Path), Alert(AlertLocationString), @@ -35,7 +35,7 @@ has no performance impact.

PersonEntersMap(PersonIDAgentID, IntersectionID)

PedReachedParkingSpot(PedestrianIDParkingSpot)

BikeStoppedAtSidewalk(CarID, LaneID)

ProblemEncountered(TripIDProblem)

AgentEntersTraversable(AgentIDOption<TripID>, Traversable, Option<usize>)

If the agent is a transit vehicle, then include a count of how many passengers are on board.

IntersectionDelayMeasured(TripID, TurnID, AgentID, Duration)

TripID, TurnID (Where the delay was encountered), Time spent waiting at that turn

-

TripFinished

Fields

trip: TripID
mode: TripMode
total_time: Duration
blocked_time: Duration

TripCancelled(TripID, TripMode)

TripPhaseStarting(TripIDPersonIDOption<PathRequest>, TripPhaseType)

PathAmended(Path)

Just use for parking replanning. Not happy about copying the full path in here, but the way +

TripFinished

Fields

trip: TripID
mode: TripMode
total_time: Duration
blocked_time: Duration

TripCancelled(TripIDTripMode)

TripPhaseStarting(TripIDPersonIDOption<PathRequest>, TripPhaseType)

PathAmended(Path)

Just use for parking replanning. Not happy about copying the full path in here, but the way to plumb info into Analytics is Event.

Alert(AlertLocationString)

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always diff --git a/rustdoc/sim/fn.count_parked_cars_per_bldg.html b/rustdoc/sim/fn.count_parked_cars_per_bldg.html index 62cd7c2de0..bc672ac510 100644 --- a/rustdoc/sim/fn.count_parked_cars_per_bldg.html +++ b/rustdoc/sim/fn.count_parked_cars_per_bldg.html @@ -1 +1 @@ -count_parked_cars_per_bldg in sim - Rust
pub fn count_parked_cars_per_bldg(scenario: &Scenario) -> Counter<BuildingID>
\ No newline at end of file +count_parked_cars_per_bldg in sim - Rust
pub fn count_parked_cars_per_bldg(scenario: &Scenario) -> Counter<BuildingID>
\ No newline at end of file diff --git a/rustdoc/sim/fn.fork_rng.html b/rustdoc/sim/fn.fork_rng.html index f468b42e6f..745ae18240 100644 --- a/rustdoc/sim/fn.fork_rng.html +++ b/rustdoc/sim/fn.fork_rng.html @@ -1,3 +1,3 @@ -fork_rng in sim - Rust

Function sim::fork_rng

[]
pub fn fork_rng(base_rng: &mut XorShiftRng) -> XorShiftRng
Expand description

Need to explain this trick – basically keeps consistency between two different simulations when +fork_rng in sim - Rust

Function sim::fork_rng

source · []
pub fn fork_rng(base_rng: &mut XorShiftRng) -> XorShiftRng
Expand description

Need to explain this trick – basically keeps consistency between two different simulations when each one might make slightly different sequences of calls to the RNG.

\ No newline at end of file diff --git a/rustdoc/sim/make/load/fn.parse_modifiers.html b/rustdoc/sim/make/load/fn.parse_modifiers.html index b4c969a01c..c2887e3809 100644 --- a/rustdoc/sim/make/load/fn.parse_modifiers.html +++ b/rustdoc/sim/make/load/fn.parse_modifiers.html @@ -1 +1 @@ -parse_modifiers in sim::make::load - Rust
fn parse_modifiers(x: &str) -> Result<Vec<ScenarioModifier>>
\ No newline at end of file +parse_modifiers in sim::make::load - Rust
fn parse_modifiers(x: &str) -> Result<Vec<ScenarioModifier>>
\ No newline at end of file diff --git a/rustdoc/sim/make/load/struct.SimFlags.html b/rustdoc/sim/make/load/struct.SimFlags.html index 8e3a8a688b..a8122a2416 100644 --- a/rustdoc/sim/make/load/struct.SimFlags.html +++ b/rustdoc/sim/make/load/struct.SimFlags.html @@ -1,7 +1,7 @@ SimFlags in sim::make::load - Rust
pub struct SimFlags {
     load_path: Option<String>,
     pub load: String,
-    pub scenario_modifiers: Vec<ScenarioModifier>,
+    pub scenario_modifiers: Vec<ScenarioModifier>,
     pub rng_seed: u64,
     pub opts: SimOptions,
 }
Expand description

SimFlags specifies a simulation to setup. After parsing from structopt, you must call @@ -14,7 +14,7 @@

load: String

The same as load_path, but with a default value filled out. Call initialize to set this up.

-
scenario_modifiers: Vec<ScenarioModifier>

A JSON list of modifiers to transform the scenario. These can be generated with the GUI.

+
scenario_modifiers: Vec<ScenarioModifier>

A JSON list of modifiers to transform the scenario. These can be generated with the GUI.

rng_seed: u64

An arbitrary number to seed the random number generator. This is input to the deterministic simulation, so different values affect results.

opts: SimOptions

Implementations

Loads a map and simulation. Not appropriate for use in the UI or on web.

diff --git a/rustdoc/sim/make/load/type.ModifierList.html b/rustdoc/sim/make/load/type.ModifierList.html index b4150eb6bf..800244ef58 100644 --- a/rustdoc/sim/make/load/type.ModifierList.html +++ b/rustdoc/sim/make/load/type.ModifierList.html @@ -1 +1 @@ -ModifierList in sim::make::load - Rust

Type Definition sim::make::load::ModifierList

source · []
type ModifierList = Vec<ScenarioModifier>;
\ No newline at end of file +ModifierList in sim::make::load - Rust

Type Definition sim::make::load::ModifierList

source · []
type ModifierList = Vec<ScenarioModifier>;
\ No newline at end of file diff --git a/rustdoc/sim/make/spawner/enum.TripSpec.html b/rustdoc/sim/make/spawner/enum.TripSpec.html index 14193d833f..a06aca70c8 100644 --- a/rustdoc/sim/make/spawner/enum.TripSpec.html +++ b/rustdoc/sim/make/spawner/enum.TripSpec.html @@ -34,7 +34,7 @@
retry_if_no_room: bool

Can be used to spawn from a border or anywhere for interactive debugging.

SpawningFailure

Fields

use_vehicle: Option<CarID>
error: String

Something went wrong spawning the trip.

UsingParkedCar

Fields

car: CarID

This must be a currently parked vehicle owned by the person.

-
start_bldg: BuildingID

JustWalking

Fields

start: SidewalkSpot

UsingBike

Fields

bike: CarID
start: BuildingID

UsingTransit

Fields

start: SidewalkSpot
route: TransitRouteID
stop1: TransitStopID
maybe_stop2: Option<TransitStopID>

Implementations

Turn an origin/destination pair and mode into a specific plan for instantiating a trip. +

start_bldg: BuildingID

JustWalking

Fields

start: SidewalkSpot

UsingBike

Fields

bike: CarID
start: BuildingID

UsingTransit

Fields

start: SidewalkSpot
route: TransitRouteID
stop1: TransitStopID
maybe_stop2: Option<TransitStopID>

Implementations

Turn an origin/destination pair and mode into a specific plan for instantiating a trip. Decisions like how to use public transit happen here.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always diff --git a/rustdoc/sim/make/spawner/fn.driving_goal.html b/rustdoc/sim/make/spawner/fn.driving_goal.html index 43b0f08f94..8b9af64b8f 100644 --- a/rustdoc/sim/make/spawner/fn.driving_goal.html +++ b/rustdoc/sim/make/spawner/fn.driving_goal.html @@ -1 +1 @@ -driving_goal in sim::make::spawner - Rust
fn driving_goal(
    endpt: TripEndpoint,
    constraints: PathConstraints,
    map: &Map
) -> Result<DrivingGoal>
\ No newline at end of file +driving_goal in sim::make::spawner - Rust
fn driving_goal(
    endpt: TripEndpoint,
    constraints: PathConstraints,
    map: &Map
) -> Result<DrivingGoal>
\ No newline at end of file diff --git a/rustdoc/sim/make/spawner/fn.end_sidewalk_spot.html b/rustdoc/sim/make/spawner/fn.end_sidewalk_spot.html index d10d935901..fd50ed8704 100644 --- a/rustdoc/sim/make/spawner/fn.end_sidewalk_spot.html +++ b/rustdoc/sim/make/spawner/fn.end_sidewalk_spot.html @@ -1 +1 @@ -end_sidewalk_spot in sim::make::spawner - Rust
fn end_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot>
\ No newline at end of file +end_sidewalk_spot in sim::make::spawner - Rust
fn end_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot>
\ No newline at end of file diff --git a/rustdoc/sim/make/spawner/fn.start_sidewalk_spot.html b/rustdoc/sim/make/spawner/fn.start_sidewalk_spot.html index b658d302e8..e8e8323a13 100644 --- a/rustdoc/sim/make/spawner/fn.start_sidewalk_spot.html +++ b/rustdoc/sim/make/spawner/fn.start_sidewalk_spot.html @@ -1 +1 @@ -start_sidewalk_spot in sim::make::spawner - Rust
fn start_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot>
\ No newline at end of file +start_sidewalk_spot in sim::make::spawner - Rust
fn start_sidewalk_spot(endpt: TripEndpoint, map: &Map) -> Result<SidewalkSpot>
\ No newline at end of file diff --git a/rustdoc/sim/prebake/fn.prebake.html b/rustdoc/sim/prebake/fn.prebake.html index 1efd95e6b4..d348be4a38 100644 --- a/rustdoc/sim/prebake/fn.prebake.html +++ b/rustdoc/sim/prebake/fn.prebake.html @@ -1,3 +1,3 @@ -prebake in sim::prebake - Rust
pub fn prebake(
    map: &Map,
    scenario: Scenario,
    timer: &mut Timer<'_>
) -> PrebakeSummary
Expand description

Simulate a curated list of scenarios to completion, and save the analytics as “prebaked +prebake in sim::prebake - Rust

pub fn prebake(
    map: &Map,
    scenario: Scenario,
    timer: &mut Timer<'_>
) -> PrebakeSummary
Expand description

Simulate a curated list of scenarios to completion, and save the analytics as “prebaked results,” to later compare simulation metrics against the baseline without map edits.

\ No newline at end of file diff --git a/rustdoc/sim/prebake/struct.PrebakeSummary.html b/rustdoc/sim/prebake/struct.PrebakeSummary.html index 3610c147f8..954297cf2a 100644 --- a/rustdoc/sim/prebake/struct.PrebakeSummary.html +++ b/rustdoc/sim/prebake/struct.PrebakeSummary.html @@ -4,7 +4,7 @@ pub finished_trips: usize, pub cancelled_trips: usize, pub total_trip_duration_seconds: f64, -}

Fields

map: Stringscenario: Stringfinished_trips: usizecancelled_trips: usizetotal_trip_duration_seconds: f64

Implementations

Trait Implementations

Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can +}

Fields

map: Stringscenario: Stringfinished_trips: usizecancelled_trips: usizetotal_trip_duration_seconds: f64

Implementations

Trait Implementations

Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/recorder/struct.TrafficRecorder.html b/rustdoc/sim/recorder/struct.TrafficRecorder.html index bb78ba1f18..f5cc2efb4e 100644 --- a/rustdoc/sim/recorder/struct.TrafficRecorder.html +++ b/rustdoc/sim/recorder/struct.TrafficRecorder.html @@ -1,11 +1,11 @@ TrafficRecorder in sim::recorder - Rust
pub(crate) struct TrafficRecorder {
     capture_points: BTreeSet<IntersectionID>,
-    trips: Vec<IndividTrip>,
+    trips: Vec<IndividTrip>,
     seen_trips: BTreeSet<TripID>,
 }
Expand description

Records trips beginning and ending at a specified set of intersections. This can be used to capture and reproduce behavior in a gridlock-prone chunk of the map, without simulating everything.

-

Fields

capture_points: BTreeSet<IntersectionID>trips: Vec<IndividTrip>seen_trips: BTreeSet<TripID>

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can +

Fields

capture_points: BTreeSet<IntersectionID>trips: Vec<IndividTrip>seen_trips: BTreeSet<TripID>

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/sim/scenario/fn.count_parked_cars_per_bldg.html b/rustdoc/sim/sim/scenario/fn.count_parked_cars_per_bldg.html index 1dcf43785a..64ae9dae9d 100644 --- a/rustdoc/sim/sim/scenario/fn.count_parked_cars_per_bldg.html +++ b/rustdoc/sim/sim/scenario/fn.count_parked_cars_per_bldg.html @@ -1 +1 @@ -count_parked_cars_per_bldg in sim::sim::scenario - Rust
pub fn count_parked_cars_per_bldg(scenario: &Scenario) -> Counter<BuildingID>
\ No newline at end of file +count_parked_cars_per_bldg in sim::sim::scenario - Rust
pub fn count_parked_cars_per_bldg(scenario: &Scenario) -> Counter<BuildingID>
\ No newline at end of file diff --git a/rustdoc/sim/sim/scenario/fn.get_vehicles.html b/rustdoc/sim/sim/scenario/fn.get_vehicles.html index 20a9b3bec0..4f07089fbb 100644 --- a/rustdoc/sim/sim/scenario/fn.get_vehicles.html +++ b/rustdoc/sim/sim/scenario/fn.get_vehicles.html @@ -1 +1 @@ -get_vehicles in sim::sim::scenario - Rust
fn get_vehicles(
    person: &PersonSpec,
    rng: &mut XorShiftRng
) -> (Vec<VehicleSpec>, Vec<(usize, BuildingID)>, Vec<Option<usize>>)
\ No newline at end of file +get_vehicles in sim::sim::scenario - Rust
fn get_vehicles(
    person: &PersonSpec,
    rng: &mut XorShiftRng
) -> (Vec<VehicleSpec>, Vec<(usize, BuildingID)>, Vec<Option<usize>>)
\ No newline at end of file diff --git a/rustdoc/sim/sim/struct.Sim.html b/rustdoc/sim/sim/struct.Sim.html index ab30831211..5aa2aac44e 100644 --- a/rustdoc/sim/sim/struct.Sim.html +++ b/rustdoc/sim/sim/struct.Sim.html @@ -23,23 +23,23 @@

Only call for active agents, will panic otherwise

If trip is finished, returns (total time, total waiting time, total distance)

For every parked car, (position of parking spot, position of owner)

-

For every agent that’s currently not moving, figure out how long they’ve been waiting and +

For every agent that’s currently not moving, figure out how long they’ve been waiting and why they’re blocked.

(bus, stop index it’s coming from, percent to next stop, location)

For intersections with an agent waiting beyond some threshold, return when they started waiting. Sorted by earliest waiting (likely the root cause of gridlock).

(number of vehicles in the lane, penalty if a bike or other slow vehicle is present)

-

Returns the best-case time for a trip in a world with no traffic or intersection delays. +

Returns the best-case time for a trip in a world with no traffic or intersection delays. Might fail in some cases where the real trip succeeds, but the single-mode path can’t be found. Assumes the TripID exists.

Returns people / m^2. Roads have up to two sidewalks and intersections have many crossings – take the max density along any one.

This does not include transit riders. Some callers need those in addition, but the rendering ones don’t.

-

If retry_if_no_room is false, any vehicles that fail to spawn because of something else in +

If retry_if_no_room is false, any vehicles that fail to spawn because of something else in the way will just wind up as cancelled trips.

(Filled, available)

-

Respond to arbitrary map edits without resetting the simulation. Returns the number of +

Respond to arbitrary map edits without resetting the simulation. Returns the number of (trips cancelled, parked cars displaced).

Returns (trips affected, number of parked cars displaced)

Only one at a time supported.

diff --git a/rustdoc/sim/struct.Analytics.html b/rustdoc/sim/struct.Analytics.html index 567ef4ce8b..10d62b6911 100644 --- a/rustdoc/sim/struct.Analytics.html +++ b/rustdoc/sim/struct.Analytics.html @@ -7,7 +7,7 @@ pub passengers_boarding: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID, Duration)>>, pub passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>, pub started_trips: BTreeMap<TripID, Time>, - pub finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>, + pub finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>, pub problems_per_trip: BTreeMap<TripID, Vec<(Time, Problem)>>, pub trip_log: Vec<(Time, TripID, Option<PathRequest>, TripPhaseType)>, pub intersection_delays: BTreeMap<IntersectionID, Vec<(u8, Time, Duration, AgentType)>>, @@ -25,13 +25,13 @@ running the simulation, and compare the live Analytics to the prebaked baseline

Fields

road_thruput: TimeSeriesCount<RoadID>intersection_thruput: TimeSeriesCount<IntersectionID>traffic_signal_thruput: TimeSeriesCount<CompressedMovementID>demand: BTreeMap<MovementID, usize>

Most fields in Analytics are cumulative over time, but this is just for the current moment in time.

bus_arrivals: Vec<(Time, CarID, TransitRouteID, TransitStopID)>passengers_boarding: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID, Duration)>>

For each passenger boarding, how long did they wait at the stop?

-
passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>started_trips: BTreeMap<TripID, Time>finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>

Finish time, ID, mode, trip duration if successful (or None if cancelled)

+
passengers_alighting: BTreeMap<TransitStopID, Vec<(Time, TransitRouteID)>>started_trips: BTreeMap<TripID, Time>finished_trips: Vec<(Time, TripID, TripMode, Option<Duration>)>

Finish time, ID, mode, trip duration if successful (or None if cancelled)

problems_per_trip: BTreeMap<TripID, Vec<(Time, Problem)>>

Record different problems that each trip encounters.

trip_log: Vec<(Time, TripID, Option<PathRequest>, TripPhaseType)>intersection_delays: BTreeMap<IntersectionID, Vec<(u8, Time, Duration, AgentType)>>

Only for traffic signals. The u8 is the movement index from a CompressedMovementID.

parking_lane_changes: BTreeMap<LaneID, Vec<(Time, bool)>>

Per parking lane or lot, when does a spot become filled (true) or free (false)

parking_lot_changes: BTreeMap<ParkingLotID, Vec<(Time, bool)>>alerts: Vec<(Time, AlertLocation, String)>record_anything: bool

For benchmarking, we may want to disable collecting data.

Implementations

Ignores the current time. Returns None for cancelled trips.

-

Returns pairs of trip times for finished trips in both worlds. (ID, before, after, mode)

+

Returns pairs of trip times for finished trips in both worlds. (ID, before, after, mode)

If calling on prebaked Analytics, be careful to pass in an unedited map, to match how the simulation was originally run. Otherwise the paths may be nonsense.

Returns the free spots over time

diff --git a/rustdoc/sim/struct.BorderSpawnOverTime.html b/rustdoc/sim/struct.BorderSpawnOverTime.html index b9d8b53b58..f2954565c0 100644 --- a/rustdoc/sim/struct.BorderSpawnOverTime.html +++ b/rustdoc/sim/struct.BorderSpawnOverTime.html @@ -1,4 +1,4 @@ -BorderSpawnOverTime in sim - Rust
pub struct BorderSpawnOverTime {
+BorderSpawnOverTime in sim - Rust
pub struct BorderSpawnOverTime {
     pub num_peds: usize,
     pub num_cars: usize,
     pub num_bikes: usize,
@@ -6,8 +6,8 @@
     pub start_time: Time,
     pub stop_time: Time,
     pub start_from_border: IntersectionID,
-    pub goal: Option<TripEndpoint>,
-}

Fields

num_peds: usizenum_cars: usizenum_bikes: usizepercent_use_transit: f64start_time: Timestop_time: Timestart_from_border: IntersectionIDgoal: Option<TripEndpoint>

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can + pub goal: Option<TripEndpoint>, +}

Fields

num_peds: usizenum_cars: usizenum_bikes: usizepercent_use_transit: f64start_time: Timestop_time: Timestart_from_border: IntersectionIDgoal: Option<TripEndpoint>

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/struct.Person.html b/rustdoc/sim/struct.Person.html index a271e7f47b..639715412a 100644 --- a/rustdoc/sim/struct.Person.html +++ b/rustdoc/sim/struct.Person.html @@ -1,6 +1,6 @@ Person in sim - Rust
pub struct Person {
     pub id: PersonID,
-    pub orig_id: Option<OrigPersonID>,
+    pub orig_id: Option<OrigPersonID>,
     pub trips: Vec<TripID>,
     pub state: PersonState,
     pub ped: PedestrianID,
@@ -8,7 +8,7 @@
     pub vehicles: Vec<Vehicle>,
     delayed_trips: Vec<(TripID, StartTripArgs)>,
     on_bus: Option<CarID>,
-}

Fields

id: PersonIDorig_id: Option<OrigPersonID>trips: Vec<TripID>state: PersonStateped: PedestrianIDped_speed: Speedvehicles: Vec<Vehicle>

Both cars and bikes

+}

Fields

id: PersonIDorig_id: Option<OrigPersonID>trips: Vec<TripID>state: PersonStateped: PedestrianIDped_speed: Speedvehicles: Vec<Vehicle>

Both cars and bikes

delayed_trips: Vec<(TripID, StartTripArgs)>on_bus: Option<CarID>

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/struct.ScenarioGenerator.html b/rustdoc/sim/struct.ScenarioGenerator.html index de7123b13f..4c3edefe61 100644 --- a/rustdoc/sim/struct.ScenarioGenerator.html +++ b/rustdoc/sim/struct.ScenarioGenerator.html @@ -1,10 +1,10 @@ -ScenarioGenerator in sim - Rust
pub struct ScenarioGenerator {
+ScenarioGenerator in sim - Rust
pub struct ScenarioGenerator {
     pub scenario_name: String,
     pub only_seed_buses: Option<BTreeSet<String, Global>>,
     pub spawn_over_time: Vec<SpawnOverTime, Global>,
     pub border_spawn_over_time: Vec<BorderSpawnOverTime, Global>,
-}

Fields

scenario_name: Stringonly_seed_buses: Option<BTreeSet<String, Global>>spawn_over_time: Vec<SpawnOverTime, Global>border_spawn_over_time: Vec<BorderSpawnOverTime, Global>

Implementations

Designed in https://github.com/a-b-street/abstreet/issues/154

-

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can +}

Fields

scenario_name: Stringonly_seed_buses: Option<BTreeSet<String, Global>>spawn_over_time: Vec<SpawnOverTime, Global>border_spawn_over_time: Vec<BorderSpawnOverTime, Global>

Implementations

Designed in https://github.com/a-b-street/abstreet/issues/154

+

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/struct.Sim.html b/rustdoc/sim/struct.Sim.html index 802d6f63af..48955ff20f 100644 --- a/rustdoc/sim/struct.Sim.html +++ b/rustdoc/sim/struct.Sim.html @@ -23,23 +23,23 @@

Only call for active agents, will panic otherwise

If trip is finished, returns (total time, total waiting time, total distance)

For every parked car, (position of parking spot, position of owner)

-

For every agent that’s currently not moving, figure out how long they’ve been waiting and +

For every agent that’s currently not moving, figure out how long they’ve been waiting and why they’re blocked.

(bus, stop index it’s coming from, percent to next stop, location)

For intersections with an agent waiting beyond some threshold, return when they started waiting. Sorted by earliest waiting (likely the root cause of gridlock).

(number of vehicles in the lane, penalty if a bike or other slow vehicle is present)

-

Returns the best-case time for a trip in a world with no traffic or intersection delays. +

Returns the best-case time for a trip in a world with no traffic or intersection delays. Might fail in some cases where the real trip succeeds, but the single-mode path can’t be found. Assumes the TripID exists.

Returns people / m^2. Roads have up to two sidewalks and intersections have many crossings – take the max density along any one.

This does not include transit riders. Some callers need those in addition, but the rendering ones don’t.

-

If retry_if_no_room is false, any vehicles that fail to spawn because of something else in +

If retry_if_no_room is false, any vehicles that fail to spawn because of something else in the way will just wind up as cancelled trips.

(Filled, available)

-

Respond to arbitrary map edits without resetting the simulation. Returns the number of +

Respond to arbitrary map edits without resetting the simulation. Returns the number of (trips cancelled, parked cars displaced).

Returns (trips affected, number of parked cars displaced)

Only one at a time supported.

diff --git a/rustdoc/sim/struct.SimFlags.html b/rustdoc/sim/struct.SimFlags.html index 59ae9c6dc1..d15bf99ac3 100644 --- a/rustdoc/sim/struct.SimFlags.html +++ b/rustdoc/sim/struct.SimFlags.html @@ -1,7 +1,7 @@ SimFlags in sim - Rust
pub struct SimFlags {
     load_path: Option<String>,
     pub load: String,
-    pub scenario_modifiers: Vec<ScenarioModifier>,
+    pub scenario_modifiers: Vec<ScenarioModifier>,
     pub rng_seed: u64,
     pub opts: SimOptions,
 }
Expand description

SimFlags specifies a simulation to setup. After parsing from structopt, you must call @@ -14,7 +14,7 @@

load: String

The same as load_path, but with a default value filled out. Call initialize to set this up.

-
scenario_modifiers: Vec<ScenarioModifier>

A JSON list of modifiers to transform the scenario. These can be generated with the GUI.

+
scenario_modifiers: Vec<ScenarioModifier>

A JSON list of modifiers to transform the scenario. These can be generated with the GUI.

rng_seed: u64

An arbitrary number to seed the random number generator. This is input to the deterministic simulation, so different values affect results.

opts: SimOptions

Implementations

Loads a map and simulation. Not appropriate for use in the UI or on web.

diff --git a/rustdoc/sim/struct.SpawnOverTime.html b/rustdoc/sim/struct.SpawnOverTime.html index 6143926cba..9fa48f796b 100644 --- a/rustdoc/sim/struct.SpawnOverTime.html +++ b/rustdoc/sim/struct.SpawnOverTime.html @@ -1,12 +1,12 @@ -SpawnOverTime in sim - Rust
pub struct SpawnOverTime {
+SpawnOverTime in sim - Rust
pub struct SpawnOverTime {
     pub num_agents: usize,
     pub start_time: Time,
     pub stop_time: Time,
-    pub goal: Option<TripEndpoint>,
+    pub goal: Option<TripEndpoint>,
     pub percent_driving: f64,
     pub percent_biking: f64,
     pub percent_use_transit: f64,
-}

Fields

num_agents: usizestart_time: Timestop_time: Timegoal: Option<TripEndpoint>percent_driving: f64percent_biking: f64percent_use_transit: f64

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can +}

Fields

num_agents: usizestart_time: Timestop_time: Timegoal: Option<TripEndpoint>percent_driving: f64percent_biking: f64percent_use_transit: f64

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/struct.TripInfo.html b/rustdoc/sim/struct.TripInfo.html index eb945675cc..5aa6709113 100644 --- a/rustdoc/sim/struct.TripInfo.html +++ b/rustdoc/sim/struct.TripInfo.html @@ -1,13 +1,13 @@ TripInfo in sim - Rust
pub struct TripInfo {
     pub departure: Time,
-    pub mode: TripMode,
-    pub start: TripEndpoint,
-    pub end: TripEndpoint,
-    pub purpose: TripPurpose,
+    pub mode: TripMode,
+    pub start: TripEndpoint,
+    pub end: TripEndpoint,
+    pub purpose: TripPurpose,
     pub modified: bool,
     pub cancellation_reason: Option<String>,
 }

Fields

departure: Time

Scheduled departure; the start may be delayed if the previous trip is taking too long.

-
mode: TripModestart: TripEndpointend: TripEndpointpurpose: TripPurposemodified: bool

Did a ScenarioModifier apply to this?

+
mode: TripModestart: TripEndpointend: TripEndpointpurpose: TripPurposemodified: bool

Did a ScenarioModifier apply to this?

cancellation_reason: Option<String>

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/trips/struct.Person.html b/rustdoc/sim/trips/struct.Person.html index 468702d9ca..919b7f31be 100644 --- a/rustdoc/sim/trips/struct.Person.html +++ b/rustdoc/sim/trips/struct.Person.html @@ -1,6 +1,6 @@ Person in sim::trips - Rust
pub struct Person {
     pub id: PersonID,
-    pub orig_id: Option<OrigPersonID>,
+    pub orig_id: Option<OrigPersonID>,
     pub trips: Vec<TripID>,
     pub state: PersonState,
     pub ped: PedestrianID,
@@ -8,7 +8,7 @@
     pub vehicles: Vec<Vehicle>,
     delayed_trips: Vec<(TripID, StartTripArgs)>,
     on_bus: Option<CarID>,
-}

Fields

id: PersonIDorig_id: Option<OrigPersonID>trips: Vec<TripID>state: PersonStateped: PedestrianIDped_speed: Speedvehicles: Vec<Vehicle>

Both cars and bikes

+}

Fields

id: PersonIDorig_id: Option<OrigPersonID>trips: Vec<TripID>state: PersonStateped: PedestrianIDped_speed: Speedvehicles: Vec<Vehicle>

Both cars and bikes

delayed_trips: Vec<(TripID, StartTripArgs)>on_bus: Option<CarID>

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/trips/struct.TripInfo.html b/rustdoc/sim/trips/struct.TripInfo.html index c9731d68d7..92ff6ff1a8 100644 --- a/rustdoc/sim/trips/struct.TripInfo.html +++ b/rustdoc/sim/trips/struct.TripInfo.html @@ -1,13 +1,13 @@ TripInfo in sim::trips - Rust
pub struct TripInfo {
     pub departure: Time,
-    pub mode: TripMode,
-    pub start: TripEndpoint,
-    pub end: TripEndpoint,
-    pub purpose: TripPurpose,
+    pub mode: TripMode,
+    pub start: TripEndpoint,
+    pub end: TripEndpoint,
+    pub purpose: TripPurpose,
     pub modified: bool,
     pub cancellation_reason: Option<String>,
 }

Fields

departure: Time

Scheduled departure; the start may be delayed if the previous trip is taking too long.

-
mode: TripModestart: TripEndpointend: TripEndpointpurpose: TripPurposemodified: bool

Did a ScenarioModifier apply to this?

+
mode: TripModestart: TripEndpointend: TripEndpointpurpose: TripPurposemodified: bool

Did a ScenarioModifier apply to this?

cancellation_reason: Option<String>

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot diff --git a/rustdoc/sim/trips/struct.TripManager.html b/rustdoc/sim/trips/struct.TripManager.html index a1c6a48428..596b113f4c 100644 --- a/rustdoc/sim/trips/struct.TripManager.html +++ b/rustdoc/sim/trips/struct.TripManager.html @@ -9,13 +9,13 @@ down into legs – for example, a driving trip might start with somebody walking to their car, driving somewhere, parking, and then walking to their final destination. https://a-b-street.github.io/tech/docs/trafficsim/trips.html describes some of the variations.

-

Fields

trips: Vec<Trip>people: Vec<Person>active_trip_mode: BTreeMap<AgentID, TripID>unfinished_trips: usizecar_id_counter: usizeevents: Vec<Event>

Implementations

This is idempotent to handle the case of cars retrying their spawning.

+

Fields

trips: Vec<Trip>people: Vec<Person>active_trip_mode: BTreeMap<AgentID, TripID>unfinished_trips: usizecar_id_counter: usizeevents: Vec<Event>

Implementations

This is idempotent to handle the case of cars retrying their spawning.

If no route is returned, the pedestrian boarded a bus immediately.

Cancel a trip before it’s started. The person will stay where they are.

Cancel a trip after it’s started. The person will be magically warped to their destination, along with their car, as if the trip had completed normally.

This will be None for parked cars and buses. Should always work for pedestrians.

-

Recreate the Scenario from an instantiated simulation. The results should match the +

Recreate the Scenario from an instantiated simulation. The results should match the original Scenario used.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be diff --git a/rustdoc/src/geom/polygon.rs.html b/rustdoc/src/geom/polygon.rs.html index cf8754deb9..751691ae8e 100644 --- a/rustdoc/src/geom/polygon.rs.html +++ b/rustdoc/src/geom/polygon.rs.html @@ -524,6 +524,22 @@ 524 525 526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542
use std::fmt;
 
 use anyhow::Result;
@@ -795,11 +811,27 @@
     }
 
     pub fn intersection(&self, other: &Self) -> Result<Vec<Self>> {
-        from_multi(self.to_geo().intersection(&other.to_geo()))
+        match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
+            from_multi(self.to_geo().intersection(&other.to_geo()))
+        })) {
+            Ok(result) => result,
+            Err(err) => {
+                println!("BooleanOps crashed: {err:?}");
+                bail!("BooleanOps crashed: {err}");
+            }
+        }
     }
 
     pub fn difference(&self, other: &Self) -> Result<Vec<Self>> {
-        from_multi(self.to_geo().difference(&other.to_geo()))
+        match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
+            from_multi(self.to_geo().difference(&other.to_geo()))
+        })) {
+            Ok(result) => result,
+            Err(err) => {
+                println!("BooleanOps crashed: {err:?}");
+                bail!("BooleanOps crashed: {err}");
+            }
+        }
     }
 
     pub fn convex_hull(list: Vec<Self>) -> Result<Self> {
diff --git a/rustdoc/src/geom/tessellation.rs.html b/rustdoc/src/geom/tessellation.rs.html
index f234758c1c..fd4a06cfed 100644
--- a/rustdoc/src/geom/tessellation.rs.html
+++ b/rustdoc/src/geom/tessellation.rs.html
@@ -253,6 +253,15 @@
 253
 254
 255
+256
+257
+258
+259
+260
+261
+262
+263
+264
 
use anyhow::Result;
 use serde::{Deserialize, Serialize};
 
@@ -493,7 +502,16 @@
     pub fn difference(&self, other: &Tessellation) -> Result<Vec<Polygon>> {
         use geo::BooleanOps;
 
-        crate::polygon::from_multi(self.to_geo().difference(&other.to_geo()))
+        // TODO Remove after https://github.com/georust/geo/issues/913
+        match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
+            crate::polygon::from_multi(self.to_geo().difference(&other.to_geo()))
+        })) {
+            Ok(result) => result,
+            Err(err) => {
+                println!("BooleanOps crashed: {err:?}");
+                bail!("BooleanOps crashed: {err}");
+            }
+        }
     }
 }
 
diff --git a/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-63c5bcb4b09cf8fd/out/built.rs.html b/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-63c5bcb4b09cf8fd/out/built.rs.html
index 0ab7ccaf33..6331d67843 100644
--- a/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-63c5bcb4b09cf8fd/out/built.rs.html
+++ b/rustdoc/src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-63c5bcb4b09cf8fd/out/built.rs.html
@@ -174,7 +174,7 @@
 pub const RUSTDOC_VERSION: &str = r"rustdoc 1.65.0 (897e37553 2022-11-02)";
 #[doc=r#"The build time in RFC2822, UTC."#]
 #[allow(dead_code)]
-pub const BUILT_TIME_UTC: &str = r"Wed, 09 Nov 2022 12:11:28 +0000";
+pub const BUILT_TIME_UTC: &str = r"Thu, 10 Nov 2022 15:26:44 +0000";
 #[doc=r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#]
 #[allow(dead_code)]
 pub const CFG_TARGET_ARCH: &str = r"x86_64";