Skip to content

Aimsun Next API Manage simulation (Meso)

Force to finish the simulation

In C++ and Python

Explanation

Force the simulation to finish. It removes all pending events waiting to be resolved.

Format
int AMesoForceFinishSimulation (void * simhandler);
Parameters
  • simhandler: simulator handler
Output
  • None

Functions to add event synchronization events

Add a new meso event every x seconds

In C++ and Python

Explanation

In the mesoscopic simulation there isn't any simulation step, this function can be used to add like a simulation step or any synchronization point between the simulation and the api.

Format
void AMesoAddCycleEvent (void * simhandler, int cycleEventId, int cycleTimeInSeconds);
Parameters
  • simhandler: simulator handler
  • cycleEventId: event id. This id is controller or managed by the api. It's up to the user to set the proper ids for each synchronization event.
  • cycleTimeInSeconds: event cycle time in seconds. For example 1 seconds, 5 seconds, 60 (1 min), ...
Output
  • None

Changes event cycle time

In C++ and Python

Explanation

This function can be used to change a predefined event cycle time using the corresponding event id. It will change the cycle time for all events with the event id equals to the event id set in the list of parameters.

Format
bool AMesoChangeCycleEventTime (void * simhandler, int cycleEventId, int cycleTimeInSeconds);
Parameters
  • simhandler: simulator handler
  • cycleEventId: event id. And event id.
  • cycleTimeInSeconds: event cycle time in seconds. For example 1 seconds, 5 seconds, 60 (1 min), ...
Output
  • False if the event id wasn't found in the list of api synchronization events, True otherwise.