
How to use Matrix Contents
March 2017: Marga Delgado shows you how to use Contents to group matrices into subfolders, which is particularly convenient when working with multiple matrices.
January 2015
Imagine that you have run a dynamic simulation (meso, micro or hybrid) that gives you accurate travel times for transit vehicles that take into account congestion, reserved lanes, signals and transit priority algorithms. Wouldn’t it be nice to use this information to get a more accurate estimation of the stop-to-stop travel time in a macroscopic transit assignment?
Thanks to the integrated modelling environment provided by Aimsun, this is possible. You just have to write a Public Transport Delay function that reads bus travel time from the time series produced by the dynamic simulation.
Public transport assignment
For example:
costCol = None def pdf( context, line, ptsection ): global costCol if costCol == None: model = ptsection.getModel() vehicleType = model.getType("GKVehicle") vehicleId = model.getCatalog().findByName("Bus", vehicleType).getId() costCol = model.getColumn("DYNAMIC::SRC_GKSection_travelTime_%i" % vehicleId) res = 0.0 fromStop = ptsection.getMaster().getOrigin() if fromStop != None: sectionLength = fromSection.length2D() fromSection = fromStop.getSection() fromFraction = (sectionLength - fromStop.getPosition()) / sectionLength else: fromSection = None toStop = ptsection.getMaster().getDestination() if toStop != None: toSection = toStop.getSection() toFraction = toStop.getPosition() / toSection.length2D() else: toSection = None for section in ptsection.getMaster().getRoute(): fraction = 1.0 if fromSection != None and section.getId() == fromSection.getId(): fraction = fromFraction elif toSection != None and section.getId() == toSection.getId(): fraction = toFraction ts = section.getDataValueTS(costCol) if ts != None: res += ts.getAggregatedValue()/60 * fraction if res == 0.0: print "No dynamic cost for PT Section %i" % ptsection.getId() res = 60.0 * ptsection.getDistance()/1000.0 / 20.0 #km/h return res
The function reads the travel time of the last simulation for the bus vehicle type from the section, and since the cost for PT assignment is expressed for PT Sections, i.e. for stop-to-stop segments, it adds it for all sections between stops, calculating a fraction for the first and last section, depending on the position of the bust stops.
An important application of this approach is estimating the effect on distribution and mode split of operational changes made to the transit system, such as the introduction of signal priority and reserved lanes along a corridor.
March 2017: Marga Delgado shows you how to use Contents to group matrices into subfolders, which is particularly convenient when working with multiple matrices.
Use this approach for estimating the effect on distribution and mode split of operational changes in the transit system, such as the introduction of signal priority and reserved lanes along a corridor.
SHARE