[−][src]Struct sim::mechanics::parking::InfiniteParkingSimState
This assigns infinite private parking to all buildings and none anywhere else. This effectively disables the simulation of parking entirely, making driving trips just go directly between buildings. Useful for maps without good parking data (which is currently all of them) and experiments where parking contention skews results and just gets in the way.
Fields
parked_cars: BTreeMap<CarID, ParkedCar>
occupants: BTreeMap<ParkingSpot, CarID>
reserved_spots: BTreeMap<ParkingSpot, CarID>
driving_to_offstreet: MultiMap<LaneID, (BuildingID, Distance)>
blackholed_building_redirects: BTreeMap<BuildingID, BuildingID>
events: Vec<Event>
Implementations
impl InfiniteParkingSimState
[src]
fn new(map: &Map) -> InfiniteParkingSimState
[src]
fn get_free_bldg_spot(&self, b: BuildingID) -> ParkingSpot
[src]
Trait Implementations
impl Clone for InfiniteParkingSimState
[src]
fn clone(&self) -> InfiniteParkingSimState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for InfiniteParkingSimState
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<InfiniteParkingSimState> for ParkingSimState
[src]
fn from(v: InfiniteParkingSimState) -> ParkingSimState
[src]
impl ParkingSim for InfiniteParkingSimState
[src]
fn handle_live_edits(
&mut self,
map: &Map,
_: &mut Timer<'_>
) -> (Vec<ParkedCar>, Vec<CarID>)
[src]
&mut self,
map: &Map,
_: &mut Timer<'_>
) -> (Vec<ParkedCar>, Vec<CarID>)
fn get_free_onstreet_spots(&self, _: LaneID) -> Vec<ParkingSpot>
[src]
fn get_free_offstreet_spots(&self, b: BuildingID) -> Vec<ParkingSpot>
[src]
fn get_free_lot_spots(&self, _: ParkingLotID) -> Vec<ParkingSpot>
[src]
fn reserve_spot(&mut self, spot: ParkingSpot, car: CarID)
[src]
fn remove_parked_car(&mut self, p: ParkedCar)
[src]
fn add_parked_car(&mut self, p: ParkedCar)
[src]
fn get_draw_cars(&self, _: LaneID, _: &Map) -> Vec<DrawCarInput>
[src]
fn get_draw_cars_in_lots(&self, _: LaneID, _: &Map) -> Vec<DrawCarInput>
[src]
fn get_draw_car(&self, _: CarID, _: &Map) -> Option<DrawCarInput>
[src]
fn canonical_pt(&self, id: CarID, map: &Map) -> Option<Pt2D>
[src]
fn get_all_draw_cars(&self, _: &Map) -> Vec<DrawCarInput>
[src]
fn is_free(&self, spot: ParkingSpot) -> bool
[src]
fn get_car_at_spot(&self, spot: ParkingSpot) -> Option<&ParkedCar>
[src]
fn get_all_free_spots(
&self,
driving_pos: Position,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Vec<(ParkingSpot, Position)>
[src]
&self,
driving_pos: Position,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Vec<(ParkingSpot, Position)>
fn spot_to_driving_pos(
&self,
spot: ParkingSpot,
_: &Vehicle,
map: &Map
) -> Position
[src]
&self,
spot: ParkingSpot,
_: &Vehicle,
map: &Map
) -> Position
fn spot_to_sidewalk_pos(&self, spot: ParkingSpot, map: &Map) -> Position
[src]
fn get_owner_of_car(&self, id: CarID) -> Option<PersonID>
[src]
fn lookup_parked_car(&self, id: CarID) -> Option<&ParkedCar>
[src]
fn get_all_parking_spots(&self) -> (Vec<ParkingSpot>, Vec<ParkingSpot>)
[src]
fn path_to_free_parking_spot(
&self,
start: LaneID,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Option<(Vec<PathStep>, ParkingSpot, Position)>
[src]
&self,
start: LaneID,
vehicle: &Vehicle,
target: BuildingID,
map: &Map
) -> Option<(Vec<PathStep>, ParkingSpot, Position)>
fn collect_events(&mut self) -> Vec<Event>
[src]
fn all_parked_car_positions(&self, map: &Map) -> Vec<(Position, PersonID)>
[src]
fn bldg_to_parked_cars(&self, b: BuildingID) -> Vec<CarID>
[src]
impl Serialize for InfiniteParkingSimState
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl TryInto<InfiniteParkingSimState> for ParkingSimState
[src]
Auto Trait Implementations
impl RefUnwindSafe for InfiniteParkingSimState
impl Send for InfiniteParkingSimState
impl Sync for InfiniteParkingSimState
impl Unpin for InfiniteParkingSimState
impl UnwindSafe for InfiniteParkingSimState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,