Skip to content

Aimsun Next API Detector Clickable Events

Enable the detector clickable events

In C++ and Python

Explanation

Enables the detector clickable events in all the detectors in the model.

Format
int AKIDetectorEventsEnable()
Parameters

No parameters required.

Output
  • = 0: OK
  • < 0: Error

Disable the detector clickable events

In C++ and Python

Explanation

Disables the detector clickable events in all the detectors in the model.

Format
int AKIDetectorEventsDisable()
Parameters

No parameters required.

Output:
  • = 0: OK
  • < 0: Error

Load the initial events of the detector

In C++ and Python:

Explanation

Loads the initial events of all the detectors in the model.

Format
int AKIDetectorEventsLoadInitialEvents();
Parameters

No parameters required.

Output
  • = 0: OK
  • < 0: Error

Save the detector events

In C++ and Python:

Explanation

Saves the events of all the detectors in the model.

Format
    int AKIDetectorEventsSaveEvents();
Parameters

No parameters required.

Output
  • = 0: OK
  • < 0: Error

Add a detector event

In C++ and Python

Explanation

Adds a detector event for an specified detector. This function has been deprecated in version 23.0.1. Use the AKIDetectorEventsAddEventRelativeTime function instead.

Format
void AKIDetectorEventsAddEvent(int iddet, double aIniTime, double aEndTime, int vehTypePos, double speed, double length, int idPTline);
Parameters
  • Iddet: Detector identifier
  • IniTime: Time of the simulation, in seconds from midnight, when the event will start (seconds).
  • Endtime: Time of the simulation, in seconds from midnight, when the event will finish (seconds).
  • vehTypePos: Position of the vehicle type in the list of vehicles types being used. 0 must be used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • Speed: Detected speed
  • Length: Detected length
  • idPTLine: If the vehicle was a ptVehicle, then the id of the PTLine. 0, otherwise
Output

No parameters required.

Add a detector event

In C++ and Python

Explanation

Adds a detector event for an specified detector

Format
void AKIDetectorEventsAddEventRelativeTime(int iddet, double aIniTime, double aEndTime, int vehTypePos, double speed, double length, int idPTline);
Parameters
  • Iddet: Detector identifier
  • IniTime: When the event will start (seconds), relative to the simulation start.
  • Endtime: When the event will finish (seconds), relative to the simulation start.
  • vehTypePos: Position of the vehicle type in the list of vehicles types being used. 0 must be used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • Speed: Detected speed
  • Length: Detected length
  • idPTLine: If the vehicle was a ptVehicle, then the id of the PTLine. 0, otherwise
Output

None.

Clear the detector clickable events

In C++ and Python

Explanation

Removes all clickable events of all detectors

Format
int AKIDetectorEventsClear();
Parameters

No parameters required.

Output
  • = 0: OK
  • < 0: Error