Step 3: Adding standalone and Feeder DRT using eqasim - Hussein-Mahfouz/matsim-drt GitHub Wiki
Adding Standalone DRT
I am following the instruction in the eqasim library for DRT. See the documentation here. I will go through the steps of adding a basic DRT service (not a feeder), and then go through the feeder. This is because the feeder builds on the basic implementation.
Step 1: Create DRT vehicle fleet (or multiple)
-
CreateDRTVehicles
is used to create vehicles and add them at initial positions in the network -
Implementation
-
Notes on configuration
-
Notes on parameters
- Shapefile polygon should be one contiguous polygon. It cannot be disconnected polygons
- You can use
serviceBeginTime
andServiceEndTime
to create multiple fleets that operate in the same area at different times of day. For example, if the service area has 40 vehicles from 8am - 11am, and then 20 vehicles from 11am - 2pm, this can be configured by creating a different drt xml file for each. You would only change the time parameters and thevehiclesNumber
parameter
Step 2: Adapt config for Drt
-
AdaptConfigForDrt
is used to edit the config so that it works with the eqasim DRT extension -
Implementation
Step 3: Add to Mode Choice Module
-
Mode Choice components
- Add a cost model for Drt
- Add DRT cost parameters to
LeedsCostParameters
- Create
LeedsDrtCostModel
- Add DRT cost parameters to
- Add a utility module
- Add drt parameters to
LeedsModeParameters
(I have used PT values for now) - Create
LeedsDrtUtilityEstimator
- Add drt parameters to
- Add a cost model for Drt
-
ModeAvailability
- Keep
LeedsModeAvailability
as is - Create
LeedsDrtModeAvailability
. This uses LeedsModeAvailability and adds Drt as an available mode for people that have walk in their available modes - There is also a default [DrtModeAvailabilityWrapper] https://github.com/eqasim-org/eqasim-java/blob/38a4c7ac93d06cd911890677977ab955d74bcdb1/core/src/main/java/org/eqasim/core/simulation/modes/drt/mode_choice/DrtModeAvailabilityWrapper.java#L13
- Keep
Step 4: Run the simulation
- Create
LeedsDrtModule
(same as corsica). This sets up the necessary components for DRT simulation, including utility estimators, cost models, and predictors- Add LeedsDrtModeAvailability to
LeedsDrtModule
- Add LeedsDrtModeAvailability to
- Create RunDMCSimulationDrt to run the simulation
Adding Feeder DRT
Use the same DRT fleet created above
Step 2: Adapt config for Feeder Drt
-
AdaptConfigForFeederDrt
takes a config created by AdaptConfigForDrt, and edits it to work with FeederDrt. -
Implementation
- Create wrapper class around
AdaptConfigForFeederDrt
- Run it using a bash script
- Create wrapper class around
Step 3: Update ModeAvailability
In LeedsModeChoiceModule
-
Add the
FeederDrtModeAvailabilityWrapper
to theLeedsModeChoiceModule
as a wrapper around the pre-existing ModeAvailability (see here -
Give the mode availability a name (see here)
-
bind it to the FeederDrtModeAvailabilityWrapper class (see here)
Step 4: Utility Estimation
Option A: To use the DefaultFeederDrtUtilityEstimator class
Step 1: Edit the LeedsModeChoiceModule
- Give the utility estimator a name (see here)
- bind it to the DefaultFeederDrtUtilityEstimator class (see here)
Step 2: Edit LeedsDrtModule
- bind utility estimator for feederDRT to the specified estimator (see here)
Step 3: Edit the config
- edit eqasim::estimator for all feeder DRTs to DefaultFeederDrtUtilityEstimator (see here)
Option B: Create your own FeederDrtUtilityEstimatror class
- Create my own LeedsPtDrtUtilityEstimator
- Use both pt and drt predictors to get trip attributes
- Calculate Utility based on how much each mode is used in a trip (similar to utility based on bus + rail)
- Question: Will the router return trips that use both PT and DRT? Which part of the config allows this combination to happen?
- Is it multimodeFeederDrt::accessEgressModeName? (see here)
- If that is the case, do I need to specify this mode name (drtA / drtB) when writing my utility estimator? Or can I just use "drt"?