Traffic micro-simulation calibration and validation
Sommaire
How to use VISSIM via a python script
As found in the VISSIM manual, an external program can communicate with VISSIM via the COM interface, which is basically a Window's built-in interface designed to have programs interacting with each other in a such a way that the user only need to know how the action he wants to use in the other program is called. The rest is taken care of by each program's COM interface. So far as using COM with python, you will need to run the win32com package, which is part of the PyWin32 Extension. The package you will need to import is win32com.client.
import win32com.client
For more information about what is a COM interface: http://msdn.microsoft.com/en-us/library/windows/desktop/ff485850(v=vs.85).aspx.
Getting PyWin32: http://starship.python.net/~skippy/win32/Downloads.html.
Starting Vissim
Two commands can be used to start Vissim: Dispatch and dynamic.Dispatch. The former will prompt a new Vissim instance to open and assign it to the variable you specified. If a Vissim instance is already open, it will ignore it. This can be problematic if you count on using more than one instance in parallel, since a single Vissim license can only handle 4 instances at a time. To avoid such a problem, you can use the dynamic.Dispatch command, which will first assign already opened Vissim instances before opening new ones.
Regardless of which of the two options is picked, the call needs to specify the version of Vissim to start. The version number is obtained by multiplying the real Vissim version by 100. Following this rule, version 5.4 becomes 540 and 6.0 becomes 600. The Following script exemple starts (or assigns an already opened) instance of Vissim 6.0:
def startVissim(): try: return win32com.client.dynamic.Dispatch('Vissim.Vissim.600') except: return 'StartError'
Loading a Network
def loadNetwork(Vissim, Inpx_path): try: return win32com.client.dynamic.Dispatch('Vissim.Vissim.600') except: return 'StartError'
The Evaluation, Simulation and Graphic classes
Modifying parameters values
Starting the simulation
Closing Vissim
Resources
- Microscopic Simulation Model Calibration and Validation http://cts.virginia.edu/SimCalVal.htm
- European project Methods and tools for supporting the Use caLibration and validaTIon of Traffic simUlation moDEls http://www.multitude-project.eu/, in particular all the guidelines on the topic http://dl.dropbox.com/u/21489630/Guidelines/Guidelines.rar
- Section 3.3 in Mohamed El Esawey's PhD thesis Travel time estimation in urban areas using neighbour links data