Activating external driver model via Driver Model DLL file

You can replace the driver model with an external, user-defined driver model using Vissim. The external driver model can be used for all or part of the vehicles in a simulation.

During the simulation, the DLL file is called up in each time step for each vehicle for which an external driver model is available. The DLL file then controls the behavior of the vehicle. Vissim transfers data to the DLL file:

  • the current state of the vehicle
  • the current state of the vehicle environment, e.g. the number and state of priority rule (1 = blocked, 3 = free), if closer to current vehicle than the next signal head downstream.
  • World coordinate of the front edge and rear edge of neighboring vehicles
  • Spline of the middle line of the lane the Ego vehicle is using on its route or path within the line of sight
  • Data of conflict areas
  • Values of user-defined vehicle attributes can be transferred to the DLL and changed by it.

The acceleration, deceleration and lane changing behavior are calculated in the DLL file. The result is returned to Vissim.

You activate the external driver model for the desired vehicle type (Using vehicle types).

External driver model DLL-files can be used in simulation runs with multiple cores. For this purpose, each driver model DLL-file must confirm that it supports multithreading. This does not apply in the following cases, in which the DLL file must be programmed accordingly:

  • There is only one externally controlled vehicle.
  • All externally controlled vehicles are on the same link.

The external driver model must be implemented as a DLL file in the programming language C or C++. The structure is described in the documentation. If strings are transferred, they must be encoded in UTF-8.

Documentation in English

  • ..\Program Files\PTV Vision\PTV Vissim 2024\API\DriverModel_DLL\Interface_Description.pdf
Example file
  • ..\Program Files\PTV Vision\PTV Vissim 2024\API\DriverModel_DLL\DriverModel.cpp

Superordinate topic:

Programming interfaces (API)

Related topics:

Using the COM Interface