Specifying the Short Term demand - smart-fm/simmobility-prod GitHub Wiki
SimMobilityST requires trip chains as input in order to simulate the agents at a microscopic level. The trip chains can be supplied using one of the following two sources:
- Database
- XML file
- Run SimMobility mid-term with trip_chain_output setting enabled to get trip_activities.csv and sub_trips.csv
- Import the trip_activities.csv and sub_trips.csv into trip_activities and sub_trips table in demand schema
Note: load_factor is not part of trip_activities.csv and sub_trips.csv, so the user has to take care of it while importing the trip_chain to database
-
Open the common settings configuration file
-
Ensure that the
databasesandcredentialssections contain the necessary information to connect to the database containing the road network components.Note: Information on the
databasesandcredentialssection can be found here -
Set
<load_agents order = “database”> -
Go to the definition of the
proc_mapthat you wish to use and set theprocedurefield of the mapping<mapping name = "trip_chains" procedure = "get_trip_chains"/>with the name of the stored procedure that returns the trip chainsNote: If the mapping name does not exist, add it with in the
proc_maptag
-
Set
<load_agents order = “drivers”> -
Define the trip chains in a separate XML file in the following format.
<?xml version="1.0" encoding="UTF-8"?> <trips> <trip> <!--mode: 'Car' or 'Taxi'--> <!--originNode/destNode: node ids within the selected network--> <!--time: start time in milliseconds after the simulation start time--> <subTrip mode = "Car" originNode = "20017" destNode = "14470" time = "10"/> </trip> . . . </trips>
-
Specify the name of this file in the
tripFilestag of the short-term specific configuration file as follows<tripFiles> <tripFile name = “CarTrips” fileName = "<file-path>" /> <tripFile name = “TruckTrips” fileName = "<file-path>" /> </tripFiles>