visual transport modeller: macro section

  Back to version 2 walkthroughs     On to highway assignment

The walkthrough will now use some macros to illustrate some of the more advanced capabilities of Visual TM. The macros are just sets of pre-recorded commands for the software to follow so you can get a feel of the more advanced functions without being an expert user.

The data is built around the base model for Ashford that you have seen so far and sets up four scenarios for the future: the “do nothing” scenario, the addition of a bypass to the road network, the addition of a park and ride scheme and the addition of a guided bus scheme. The macros show how it is simple to construct all sorts of information from the output of Visual TM.

**Note** If you wish to run this set of macros more than once, then you must reset the test data to its initial state. The easiest way to do this is to delete the folder “TestData” in your Visual TM installation directory (The default is C:\Program files\Visual Transport Modeller\), then re-extract “TestData.zip” in the Visual TM installation directory as you did during the installation process.

To run the first macro in this set, go to Methods | Macro | Run Macro. All the macros can be found here. The first one is named “MACRO1-Scenario4Stage.xls”, double click on it to run it. If an alert box pops up, click “OK”.

This four-stage macro calculates the flows on the four scenario networks, in summary:

  • The four stages are iterated in this order: trip generation, trip distribution, mode choice, assignment.
  • The model carries out forty capacity restraint iterations.
  • Two modes are modelled: car and bus.
  • The data measures three market segments: car-available work trips (CAW), car-available other trips (CAO) and no car available (NCA).
  • In this strategic model there are sixty-six zones.

These results form the basis of the rest of the walkthrough.

The remaining macros populate some simple spreadsheets with this output data to demonstrate how simple it can be to produce all sorts of statistics from a Visual-tm model.

From the Visual-tm installation directory (The default is C:\Program files\Visual Transport Modeller\), go to \TestData\Ashtest\ScenarioRuns\ScenarioResults\ and open the file “Scenariosheet.xls”. You must enable macros to allow this spreadsheet to work. It simply calculates the percentage of journeys that are carried out using public transport in each scenario. Currently, it is zeroed over.

Back in Visual-tm, run the macro “MACRO2-ScenarioSheet.xls” using the same method as before and switch to the spreadsheet you just opened. You should see the spreadsheet being populated by the macro. When finished, the table should appear as it does below. The “%PT” row indicates the percentage of journeys carried out on public transport in each scenario.

The third macro demonstrates the ease with which the new DfT accessibility targets can be evaluated from a model in Visual TM. Run the macro “MACRO3-AccessibilityNEW.xls” in the same fashion as before. This finishes very quickly, and then go to Models | Accessibility, opening a window. Select the “Zone accessibility from skim” tab, which allows a simple calculation of the percentage of a population within a certain travel time from a “zone of interest”. The macro filled in all the fields for you, and by altering the “Range” and “Threshold Time” fields then clicking “Go” you can alter the percentage of the population of Ashford below the threshold. Try experimenting with this feature.

If you have MapInfo Professional on your PC, you can use some of the outputs of this macro to construct maps indicating the travel time from each zone in the model to your “zone of interest”. In MapInfo, go to Table | Import and browse to \TestData\Ashtest\Accessibility\ from your Visual TM installation directory. Open the file “66ZONESAsh_DoNothing5.MIF” and click “Save” in the next dialogue box. To open the map, go to Window | New Map Window, or press F3. A black and white map will appear.

To add colour to the map to indicate the travel time to your zone of interest, go to Map | Create Thematic Map or press F9. Complete the dialogue boxes to pick the colour scheme and ranges for your thematic map. The picture below shows how accessible the city centre is from each zone in the scenario where a bypass is built.

You can repeat this process for the other three scenarios using the other .MIF files in the same directory.

The final macro in the walkthrough is one to calculate the revenue that you would receive from both the car parking and public transport in each scenario. Run the macro “MACRO4-REVENUE.xls” as before to populate the spreadsheet then open the spreadsheet “Revenue.xls” in the folder \TestData\Ashtest\ScenarioRuns\ScenarioResults\ starting from your Visual TM installation directory.

The spreadsheet has used the number of journeys to calculate the expected revenue from each scenario, broken down into car park and additional public transport revenue.

 

  Back to version 2 walkthroughs     On to highway assignment