Skip to content

Configuration and data preparation for Smart Mobility Controller

smart-fm edited this page Nov 9, 2018 · 1 revision

Here are the list of the things need to be addressed before running Smart Mobility Controller in SimMobility

Network Preparation

Before you run the simulation you must check the network consistency and it is particularly important for running the controller branch.

Network Consistency Check Under simmobility\dev\tools\check_network_consistency you can find the script. Please click here to download the script.

Run Supply_Check_RoadNetwork_Consistency.py
Steps: 1. Provide the connection detail to database (e.g.: database name, host id, password, username) 2. Input the table names.

Run find_closed_nodes.py
Steps: 1. Provides database connection. 2. studyArea = True or False: False (full network will be loaded, output: node_new.csv) - provides: table_node, Storedprocedure_link, Storedprocedure_turninggroup True (study area network will be loaded, output: blackisted_node.csv) - provides: Storedprocedure_StudyArea_node, Storedprocedure_StudyArea_link, Storedprocedure_StudyArea_turninggroup

Loop Node Identification

The following stored procedure must be supplied for identifying the loop nodes

xml <mapping name="loop_nodes" procedure="get_loop_nodes()" />

Here is the sql statement for creating this stored procedure

CREATE OR REPLACE FUNCTION get_loop_nodes(
    OUT id bigint,
    OUT node_type bigint)
  RETURNS SETOF record AS
$BODY$
SELECT distinct
 from_node.id,
 from_node.node_type 
FROM
 supply.link,
 supply.node from_node,
 supply.node to_node
WHERE
 link.from_node = from_node.id AND
 link.to_node = to_node.id
 and from_node.id = to_node.id;
$BODY$
  LANGUAGE sql VOLATILE
  COST 1
  ROWS 1000;
ALTER FUNCTION get_loop_nodes()
  OWNER TO postgres;

Taxi fleet Table

Taxi fleet table contains the following info. Please note that Taxi start point should be in lat lon format and the code must convert it to the correct CRS (in which the supply CRS is provided) **we are in the process of changing it but until then need to take care of this

vehicle_no
driver_id
longtitude_at_start_point
latitude_at_start_point
start_time
index
subscribed_controllers
shift_duration

Filter the demand

The DAS should not contain any node which is type 1,9 or loop node. Please check the DAS for this exception. Please Note: Node assignment at the end of the Pre-day will exclude these type of nodes for the flexible location and the Postcode node mapping should exclude these type of nodes

Before running the simulation do a quick check that none of these type nodes are in the demand.

Please note that in shared-ftr-amod-ctrlr-maxAggregatedRequests-to-be-merged-with-master these nodes are already filtered while running pre-day

Configuration

  • Controller Setting
  <controller id="5" type="7" tripSupportMode = "|SMS|SMS_Pool|Rail_SMS|Rail_SMS_Pool|" vehicleIds="" scheduleComputationPeriod="1" maxFleetSize="20000" maxAggregatedRequests="6" studyAreaEnabledController="false" toleratedExtraTime="1800" maxWaitingTime = "1800"/>

<controller id="2" type="7" tripSupportMode = "|AMOD|| AMOD _Pool|Rail_AMOD |Rail_AMOD _Pool|" vehicleIds="" scheduleComputationPeriod="1" maxFleetSize="3600" maxAggregatedRequests="6" studyAreaEnabledController="true" toleratedExtraTime="1800" maxWaitingTime = "1800"/>

controller id: Identification of the controller. Please note that this controller id is used in the database for the fleet data and the parking data.

tripSupportMode:What are the modes supported by the controller. So the fleets under the designated controller will serve only these trip modes.

scheduleComputationPeriod:The interval of the controller for computing it's schedule to assign the driver to the request.

maxFleetSize:Fleet table in the database will hold the number of vehicles for each controller id. This configuration will limit the number of vehicles for each controller. Please note that if this number is greater than the database rows of that type of controller then the minimum of the two will be the actual fleet size to be used in the simulation.

maxAggregatedRequests: Maximum number of people sharing a single vehicle

studyAreaEnabledController:SimMobility is capable of running the vehicles under a particular controller with the study area. In this case pre-day need to run with study-area enabled so that all the pickup/drop off demand for that trip mode will be in that area only.

toleratedExtraTime:Maximum accepted delay time for the pickup.

maxWaitingTime:Maximum allowed waiting time by the passenger.

**parkingEnabled="true": Vehicles will be parked if true otherwise they will roam. Please note that if this is set to true then need to supply parking stored procedure get_parking() in the simrun_Midterm.xml file

Clone this wiki locally