-
Notifications
You must be signed in to change notification settings - Fork 0
Road.gaml
Loïc SADOU edited this page Sep 25, 2020
·
6 revisions
Road.gaml is a species that represents the links of network graph.
-
Attributes
- type (string): refers to OpenStreetMap roads data tag. It represents whats kind of road it is.
- urban_context (string): shows if this road is more in an urban or interurban context. Used with type attributes it can provides accurate information about speed limit when it is not given by OpenStreetMap data.
- junction (string): information collected from OpenStreetMap roads data. It tells if this road is part of a roundabout or not.
- start_node (Crossroad): entry crossroad of the road.
- end_node (Crossroad): exit crossroad of the road.
- max_speed (float): road speed limit, obtained from OpenStreetMap roads data or collected from road_speed map presents in Constants.gaml using road type, weather and urban_context.
- avg_speed (float): road average speed. This value allows to agregate roads infrastructures impacting traffic speed. This value is computed using coefficient from road_speed_avg_coef map presents in Constants.gaml.
- nb_lanes (int): the number of lane in the road.
- one_way (string): information collected from OpenStreetMap roads data. It tells if this road is oneway or not.
- foot (string): information collected from OpenStreetMap roads data. It tells if this road can be used by pedestrians or not.
- bicycle (string): information collected from OpenStreetMap roads data. It tells if this road can be used by bikes or not.
- access (string): information collected from OpenStreetMap roads data. It tells if this road can be used by cars or not.
- bus (string): information collected from OpenStreetMap roads data. It tells if this road can be used by buses or not.
- parking_lane (string): information collected from OpenStreetMap roads data. It tells if there is parking spots on this road or not.
- sidewalk (string): information collected from OpenStreetMap roads data. It tells if there is a sidewalk or not.
- cycleway (string): information collected from OpenStreetMap roads data. It tells if there is a bicycle way on the side of the road.
- size (float): information collected from OpenStreetMap roads data. This is the size of the road (in meter).
- output_flow_capacity (float): the minimal time between two vehicules leaving the road (in second). This value is collected from output_flow map presents in Constants.gaml using road type.
- max_capacity (float): the road maximum storage capacity (in meter). This value is computed like max_capacity = size * nb_lanes. This capacity can't be less than 15meters so even the largest transports can drive on it.
- current_capacity (float): the actual road storage capacity (in meter). This value is computed using max_capacity decreased by each transports size present on the road.
- is_jammed (bool): equals true if the road is jammed equals false if not. A road is jammed if occupation_ratio is greater than jam_threshold (a value presents in Parameters.gaml).
- occupation_ratio (float): value computed like: occupation_ratio = current_capacity / max_capacity .
- present_pedestrians (list<Walk>): stores all the pedestrians using this road, it could be seen as the sidewalk.
- present_bikes (list<Bike>): stores all the bikes using this road.
- present_transports (Queue): stores transports in a queue with FIFO behaviour.
- present_buses (Queue): stores buses in a queue with FIFO behaviour.
- waiting_transports (SortedMap): stores entering requests sorted by received times.
-
Reflex
-
Action
- void enterRequest (Transport t, float request_time): action called by transports when they want to enter in the road. This action check if there is enough capacity to accept t. If the road don't have the capacity to store t then t is registered in waiting_transports with its request_time.
- void acceptTransport (float entry_time): action called when a transport leave the road and then free space on the road. acceptTransport will notify the oldest transport stored in waiting_transports that it can now enter the road. The action let enter transports until the road is full.
- void queueInRoad (Transport t, float entry_time): action called by transports when they were notified by the road they can enter it. This action store t in the right structure depending on its type, for exemple, if t is a Bike, it will be stored in present_bikes.
- void leave (Transport t, float signal_time): action called by transports when they leave the road. This action free space and call acceptTransport.
- float getHeadPresentTransportLeaveTime(void): return the minimal time the transport at the head of the road (present_transports head) can leave the road.
- Transport getHeadPresentTransport (void): return the transport at the head of the road (present_transports head).
- float getHeadPresentBusLeaveTime(void): return the minimal time at the bus at the head of the road (present_transports head) can leave the road.
- Bus getHeadPresentBus (void): return the bus at the head of the bus lane (present_buses head).
- float getWaitingTimeRequest (int index): return the request_time (given in enterRequest) of the transport presents at index in waiting_transports.
- Transport getWaitingTransport(int index): return the transport presents at index in waiting_transports.
- bool hasCapacity (float capacity): return true if current_capacity > capacity, return false if not.
-
Experiment