Package org.matsim.contrib.cadyts.pt

Integrates automatic calibration upon public transport line occupancies using Cadyts into MATSim.

Entry point / How to use

  • Use org.matsim.contrib.cadyts.pt.CadytsPtPlanStrategy as a replanning strategy.
  • Add the following configuration parameters (approximately; this has changed since inception; check auto-generated config comments; use second config dump for that):
     <module name="cadytsPt">
       <param name="startTime" value="05:00:00" />
    
       <param name="endTime" value="21:00:00" />
    
       <!-- Comma-separated list of transit lines to be calibrated. ->
       <param name="calibratedLines" value="M44" />
    
       <param name="writeAnalysisFile" value="false" />
    
       <!-- see cadyts documentation for the meaning of the following values. -->
       <param name="regressionInertia" value="0.95" />
       <param name="minFlowStddevVehH" value="8.0" />
       <param name="freezeIteration" value="2147483647" />
       <param name="preparatoryIterations" value="1" />
       <param name="varianceScale" value="1.0" />
       <param name="useBruteForce" value="true" />
    
     </module>
    These parameters are defined in CadytsConfigGroup
  • There also needs to be a ptCounts entry, something like:
            <module name="ptCounts">
                    <param name="inputOccupancyCountsFile" value="path-to-counts-file" />
            </module>
    And (obviously) a working ptCounts file.
  • It is a unfortunate that the counts file takes measurements in hourly values, while cadyts takes arbitrary time spans. (The cadyts convention seems more powerful, thus we did not want to reduce it to the "Counts" convention.) As long as the cadytsPt timeBinSize is set to 3600, things should be straightforward, and there is also (I think) no problem if there are measurements for times outside the cadytsPt startTime/endTime interval. yyyy Unfortunately, I cannot remember how the counts file is interpreted once the cadytsPt timeBinSize is set to something different: Does the Counts file than think in terms of time bins rather than in terms of hours? In fact, I think not; rather, it is probably as follows: Counts still refer to hours. If, say, you use timeBinSize of 7200 and start/endTime as 05:00/09:00, then the code will aggregate counts from the 6th and 7th hour into one time bin, etc. If things do not correspond, the code will probably complain. See CadytsBuilder.buildCalibrator, since there are some consistency checks. (kai, oct'12)
  • Typically, org.matsim.contrib.cadyts.pt.CadytsPtPlanStrategy should be the only plan strategy being used. So it is advised to first run the simulation until every agent has a few (different) plans, and then do some iterations using only the calibration strategy.