Useful hints using PARAMICS Progammer

-- based on the teleconference with Gordon Duncan

1. Debugging your plugin, using Microsoft Visual C++

- select "Project / Settings..." - click on the "Link tab" - set "Output file name" to make sure your DLL is built into the place where it will be used from, in the standard installtion this is "c:\Program Files\Paramics\plugins\windows\example1.dll", where "exmple1.dll" is replaced by whatever name you have chosen - click on the "Debug" tab - in "Executable for debug session", type "C:\Program Files\Paramics\modeller.exe" if you have installed Paramics in the standard place. If Paramics has been installed somewhere else, you can find out where by right-clicking on any shortcut to Paramics Modeller and selecting Properties. The "Target" location will show you where modeller.exe is stored. You can cut and paste the location from here to the MSVC Project / Settings / Debug box. - to insert a breakpoint in your plugin, place the cursor at the appropriate line in the source file, and select "Insert/Remove Breakpoint", which is a toolbar button with a hand icon, or press F9. - to start debugging, select Build / Start Debug / Go, or pressk F5. You will see a warning dialog box saying modeller.exe does not contain any debug symbols. This is OK. - Paramics Modeller will start, and when the flow of control reaches your plugin code, it will pause and allow you to examine variables etc. See the MSVC++ manuals for more information on debugging. Press F5 again to continue.

Note that running Paramics Modeller through MSVC can leave behind a lock file at location C:\tmp\paralock-m which stops the program from being restarted. This is a bug that has been fixed in V4. In V3, you will need to manually delete this file every time. Or, in the "Post build step" tab of the Project/Settings" dialog you can type "del c:\tmp\paralock-m" in the first line of the post build commands table. This will make sure teh file is deletd every time you build.

2. Setting signals without using the signal_action command

Code an intersection to be a priority junction (i.e. unsignalised) - use link_priority_set to set each turn individually at each timestep - in this way you can control the traffic movement as if it was signalised. In V3, the visualisation does not show the junction as being signalised, but this has been corrected in V4.

3. Exit from the API

Put the following line in your plugin code exit(0); This is a standard C function. It will cause the plugin to stop paramics modeller immediately. I notice from looking at the code that the file flushing and closing calls have been registered with atexit() so this should shut down the simulation as cleanly as possible.

4. Acceleration / deceleration model

The acceleration / deceleration model in Paramics is apparently not as good as in VISSIM. The maximum acceleration and deceleration is the same at all speeds. While this is probably valid for deceleration (braking) it is not valid for acceleration. If you have data on maximum and typical levels of acceleration I am sure Quadstone would be very interested in seeing these.

5. Other issues

(1) Apparently, you have seen discontinuities in speed of a vehicle at the point at which a vehicle transfers from one link to the next, with high values of acceleration or deceleration being applied. An example network would be useful.

(2) You would like the ability to "kill" a vehicle through the API. This will be added for V4, becaue it is needed for Udimode

(3) You would like to see a list of all plugins that have been developed, especially those that are available for use by other organisations

(4) You would like to see an improvement to the lane changing API so that the users model is not overriden by the merge model.

(5) You suggest that the move-left for on-ramp rule causes too much bunching of traffic towards the left most lanes, but I did not discover whether your opinion is based on subjective knowledge of freeway behaviour or hard data about lane distribution in US. If you have data on lane distribution I am sure Quadstone would be obliged if you would share it with them.

(6) Probably your biggest single concern is the lack of published information about the car-following and lane-changing models. You believe that the absence of material on this is limiting the extent to which paramics is gaining acceptability in the US. Perhaps Quadstone should consider publishing the technical notes on these models.