Offline preparation

The offline preparation process is based on two tools assisted by a PowerShell script:

The place-holder [vv.n.xxxxx] refers to the version number of PTV Optima.

Installation (required only once)

  1. Create your working folder [workingFolder] for the offline preparation of PTV Optima Micro.
  2. In the Optima Zip archive:

    1. Copy Offline-[XX.X.XXXXX].zip to [workingFolder].
    2. Extract the contents into to subfolder \offline.
    3. Copy GenerateCostFile-[XX.X.XXXXX].zip to [workingFolder].
    4. Extract the contents into the subfolder \GenerateCostFile.

  3. Copy [workingFolder]\offline\PtvOptimaMicroOfflineToolChain.ps1 to [workingFolder]

Configuration and execution

  1. Edit the file [workingFolder]\PtvOptimaMicroOfflineToolChain.ps1

    Read carefully the first part of the comment section.

  2. According with your needs, set the parameters:

    • $DeliveryFolder
    • $VisumNetFileName
  3. Copy the latest PTV Visum model and .rim files to $DeliveryFolder\Visum_Model.

    Tip:  The .rim files must have the naming pattern DayTypeID.rim (see → Result of the process).

  4. Copy the latest PTV Vissim models subfolders to $DeliveryFolder\Vissim_Model.

  5. Run [workingFolder]\PtvOptimaMicroOfflineToolChain.ps1.

    Important:  The PowerShell instance must have writing privileges within [WorkingFolder]

    Tip:  This may take many hours because for every subnetwork and day type, multiple random seeds (4 by default) with 24-hours simulations are performed. You can set it in [workingFolder]\GenerateCostFile\config-templates\GenerateCostFileSettings.xml.

    Tip:  Consider setting the parameter $SkipGenerateCostFiles to $true until the offline.exe part finishes without [WRN] or [ERR] entries. The offline.exe part highlights network coding mistakes, while the generateCostFile.exe part is rather unlikely to rise more mistakes but takes a long time to calculate.

  6. If you run the tool with the default configuration, it opens two instances of Vissim in parallel. The number of parallel Vissims can be set in [workingFolder]\GenerateCostFile\config-templates\GenerateCostFileSettings.xml

    Important:  Make sure that your license allows to open the number of Vissims because otherwise the script fails.

  7. Check the log file [WorkingFolder]\PtvOptimaMicroOfflineToolChain-vv.n.xxxxx.txt.

    Important:  In the offline.exe section, check for [WRN] and [ERR] entries, that can indicate flaws in the coding of the nodes and edges in PTV Vissim (see → Node extent and position).

    If the process end without [WRN] or [ERR] (or if the related log entries are expected and explainable), the new folders

    [workingFolder]\Vissim_Model\DayType[DayTypeId]

    contain PTV Vissim models with .weg and .bew files covering the route choice and demand of the 24 hours of the corresponding typical days.

The content of these folders can be deployed as-is for usage within PTV Optima Micro:

It is better to remove unnecessary files (.ver, .anm, .layx, etc.) from the folder for the final deployment, to reduce network over-load and to increase the performance.

Tip:  In particular, .layx files should be without start page and without background map in PTV Vissim (if required), in order to minimize the risk for additional connection requests and time-outs.