Skip to content

Aimsun Next API Management Actions

Activate a Speed Reduction Action on a section

In C++ and Python

Explanation

Activate a change speed action in one section per a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void *AKIActionAddSpeedAction (int sectionId, double newSpeed, int vehTypePos, double compliance)
void *AKIActionAddSpeedActionByID(int idAction, int nbSections, int *sectionIDs, double newSpeed, int vehTypePos, double compliance, bool considerSpeedAcceptance)
Parameters
  • sectionId: The section identifier.
  • newSpeed: The new speed expressed in the model units (either Km/h or Mph).
  • vehTypePos: The position of the vehicle type in the list of vehicles types being used. 0 is used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • compliance: is the compliance level (defined between 0 to 1).
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionIDs: A list of sections (identified using their ids) where the action should be applied.
  • nbSections: Size of the list of sections where the action should be applied.
  • considerSpeedAcceptance: true when the new speed overrides the section speed limit and false when the new speed overrides the section speed limit x vehicle's speed limit acceptance. In this second case, no vehicle will drive faster than the new speed no matter the value of its speed limit acceptance.
Output
  • !=NULL: pointer to the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Change Speed Action for one section lane or segment

In C++ and Python

Explanation

Activate a change speed action in one section for just one lane or one segment per a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
    void *AKIActionAddDetailedSpeedAction(int sectionId, int laneId, int segmentId, double newSpeed, int vehTypePos, double compliance, bool considerSpeedAcceptance)
    void *AKIActionAddDetailedSpeedActionByID(int idAction, int nbSections, int *sectionIDs, int laneId, int fromSegmentId, int toSegmentId, double newSpeed, int vehTypePos, double compliance, bool considerSpeedAcceptance)
Parameters
  • sectionId: The section identifier
  • laneId: The lane identifier (-1 for all lanes, 1 for the rightmost lane, and N, where N is the number of lanes in the section, for the leftmost lane.
  • segmentId: The segment identifier if just one segment in the section will be affected by the action (-1 for all the segments, 1 for the first segment the vehicles face when crossing the section, and N, where N is the number of segments, for the last segment the vehicles face when crossing the section.
  • newSpeed: The new speed expressed in the model units (either Km/h or Mph)
  • vehTypePos: The 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.
  • compliance: The compliance level (defined between 0 to 1)
  • considerSpeedAcceptance: true when the new speed overrides the section speed limit and false when the new speed overrides the section speed limit and the vehicle's speed limit acceptance. In this second case, no vehicle will drive faster than the new speed no matter the value of its speed limit acceptance.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionIDs: A list of sections (identified using their ids) where the action should be applied.
  • nbSections: Size of the list of sections where the action should be applied.
Output
  • !=NULL: pointer to the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Speed Reduction Action for a turn

In C++ and Python

Explanation

Activate a change speed action in one turn per a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void *AKIActionAddTurnSpeedActionByID(int idAction, int nbTurns, int * turnIDs, double newSpeed, int vehTypePos, double compliance, bool considerSpeedAcceptance)
Parameters
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • nbTurns: Size of the list of turns where the action should be applied.
  • turnIDs: A list of turns (identified using their ids) where the action should be applied.
  • newSpeed: The new speed expressed in the model units (either Km/h or Mph).
  • vehTypePos: The position of the vehicle type in the list of vehicles types being used. 0 is used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • compliance: is the compliance level (defined between 0 to 1).
  • considerSpeedAcceptance: true when the new speed overrides the section speed limit and false when the new speed overrides the section speed limit x vehicle's speed limit acceptance. In this second case, no vehicle will drive faster than the new speed no matter the value of its speed limit acceptance.
Output
  • !=NULL: pointer to the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Lane Closure Action

In C++ and Python

Explanation

Activate a lane closure action in one section for a specific vehicle type. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on. When using this function, the lane closure created will consider the 2-lanes car-following model. If this is not the required action, refer to the AKIActionCloseLaneDetailedAction function instead.

Format
void *AKIActionCloseLaneAction (int sectionId, int alane, int vehTypePos)
void * AKIActionCloseLaneActionByID(int idAction, int sectionId, int alane, int vehTypePos);
Parameters
  • sectionId: The section identifier
  • alane: The id of the lane to close (1 rightmost lane, n is the left most lane)
  • vehTypePos: The position of the vehicle type in the list of vehicles types being used. 0 is used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Lane Closure Action specifying whether to apply the 2-lanes car-following model

In C++ and Python

Explanation

Activate a lane closure action in one section per a specific vehicle type. In the case that the vehicle type is 0, the action is applied to all vehicle types. It can be also specified whether the 2-lanes car following model is to be applied or not. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void * AKIActionCloseLaneDetailedAction(int sectionId, int alane, int VehTypePos, bool apply2LanesCF, double visibilityDistance );
void * AKIActionCloseLaneDetailedActionByID(int idAction, int sectionId, int alane, int vehTypePos, bool apply2LanesCF, double visibilityDistance );
Parameters
  • sectionId: The section identifier
  • alane: The id of the lane to close
  • vehTypePos: The 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.
  • apply2LanesCF: True if the 2-lanes car following model is to be considered and false otherwise.
  • visibilityDistance: The distance at which the lane closure will start to be visible for vehicles. 200 meters is the default value when creating a lane closure action using the graphical user interface.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Lane Closure Action for a segment

In C++ and Python

Explanation

Activate a lane closure action in one section for a specific vehicle type and for a group of segments. In the case that the vehicle type is 0, the action is applied to all vehicle types. It can be also specified whether the 2-lanes car following model is to be applied or not. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void *AKIActionCloseLaneActionBySegment (int sectionId, int alane, int segmentFromId, int segmentToId, int vehTypePos, bool apply2LanesCF, double visibilityDistance )
void * AKIActionCloseLaneActionBySegmentByID(int idAction, int sectionId, int alane, int ang_segmentFromId, int ang_segmentToId, int vehTypePos, bool apply2LanesCF, double visibilityDistance);
Parameters
  • sectionId: The section identifier
  • alane: The id of the lane to close
  • segmentFromId: The position of the first segment (from 0 to number of segments -) where the close lane action will be applied.
  • segmentToId: The position of the last segment (from 0 to number of segments -) where the close lane action will be applied.
  • vehTypePos: The 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.
  • apply2LanesCF: True if the 2-lanes car following model is to be considered and false otherwise.
  • visibilityDistance: The distance at which the lane closure will start to be visible for vehicles. 200 meters is the default value when creating a lane closure action using the graphical user interface.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Force Next Turn Action

In C++ and Python

Explanation

Activate a "force next turn" action in one section for a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format

void * AKIActionAddForceTurningODActionByID( int idAction, int sectionId, const std::vector& aNextSections, int aOrigin, int aDest, int vehType, int aSectionInPath, double aComplianceLevel, double visibilityDistance ) void * AKIActionAddForceTurningODSubPathActionByID( int idAction, int sectionId, const std::vector& aNextSections,, int aOrigin, int aDest, int vehType, int aSectionInPath, double aComplianceLevel, double visibilityDistance )

void * AKIActionAddForceTurningResultActionByID( int idAction, int sectionId, int aOldNextSection, const std::vector& aNewNextSections, int vehType, double aComplianceLevel ) void * AKIActionAddForceTurningResultSubPathActionByID( int idAction, int sectionId, const std::vector& aNewNextSections, int vehType, double aComplianceLevel )

Obsolete functions that should be updated with the ones above:

void * AKIActionAddNextTurningODAction (int fromSectionId, int toSectionId, int originCent, int destCent, int vehTypePos, int sectionInPath, double compliance, double visibilityDistance)
void * AKIActionAddNextTurningODActionByID(int idAction, int sectionId, int anextSection, int aOrigin, int aDest, int VehType, int asectionInPath, double acomplianceLevel, double visibilityDistance);
void * AKIActionAddNextTurningResultAction (int fromSectionId, int oldToSectionId, int toSectionId, int vehTypePos, double compliance)
void * AKIActionAddNextTurningResultActionByID(int idAction, int sectionId, int aoldNextSection, int anewNextSection, int VehType, double acomplianceLevel);

The AKIActionAddForceTurningODActionByID and AKIActionAddForceTurningODSubPathActionByID (as well as the former AKIActionAddNextTurningODAction and AKIActionAddNextTurningODActionByID) functions are used when the traffic demand is based on OD Matrices. The AKIActionAddForceTurningResultActionByID and AKIActionAddForceTurningResultSubPathActionByID (as well as the former AKIActionAddNextTurningResultAction and AKIActionAddNextTurningResultActionByID) functions are used when the traffic demand is based on traffic states.

Parameters
  • fromSectionId: The section identifier origin of the turn.
  • toSectionId: The new next section identifier destination of the turn.
  • oldToSectionId: The destination section identifier of the vehicles that will be affected by these change (-1 means do not consider the current turn of the vehicle).
  • originCent: The origin centroid identifier to force the next turn. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin).
  • destCent: The destination centroid identifier to force the next turn. All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination).
  • vehTypePos: The 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.
  • sectionInPath: The section identifier that means (only using OD’s) the action is applied when this section is in the vehicle path (-1 means do not consider any specific section).
  • compliance: The compliance level, defined as probability between 0 and 1.
  • visibilityDistance: The distance at which the force turn will start to be visible for vehicles. 200 meters is the default value when creating a force turn action using the graphical user interface.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Force Next Turn Action following a sub-route

In C++ only

Explanation

Activate a "force next turn" action in one section per a specific vehicle type and a compliance level. Vehicles will follow the sub-route defined. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void * AKIActionAddNextSubPathODAction(int sectionId, int nbNextSections , int * nextSections, int originCent, int destCent, int vehTypePos, int sectionInPath, double compliance, double visibilityDistance);
void * AKIActionAddNextSubPathODActionByID(int actionId, int ang_sectionId, int nbNextSections, int * anextSections, int aOrigin, int aDest, int VehType, int asectionInPath, double acomplianceLevel, double visibilityDistance);
void * AKIActionAddNextSubPathResultAction(int sectionId, int nbNextSections, int * nextSections, int vehTypePos, double compliance);
void * AKIActionAddNextSubPathResultActionByID(int actionId, int ang_sectionId, int nbNextSections, int * anextSections, int VehType, double acomplianceLevel);

The AKIActionAddNextSubPathODAction and AKIActionAddNextSubPathODActionByID functions are used when the traffic demand is based on OD Matrices. The AKIActionAddNextSubPathResultAction and AKIActionAddNextSubPathResultActionByID function is used when the traffic demand is based on traffic states.

Parameters
  • sectionId: The section identifier.
  • nextSections: A list of consecutive sections (identified using their ids) that define the route the vehicle will follow once diverted.
  • originCent: The origin centroid identifier to force the next turn. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin)
  • destCent: The destination centroid identifier to force the next turn All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination).
  • vehTypePos: The 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.
  • sectionInPath: The section identifier that means the action is applied when this section is in the vehicle path - only if the vehicles are using OD traffic demand.
  • compliance: The compliance level (defined between 0 to 1).
  • visibilityDistance: The distance at which the force turn will start to be visible for vehicles. 200 meters is the default value when creating a force turn action using the graphical user interface.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Change Destination Centroid Action

In C++ and Python

Explanation

Activate a "change the destination centroid action" in one section per a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void *AKIActionAddChangeDestAction (int sectionId, int anewDest, int originCent, int destCent, int vehTypePos, double compliance)
void *AKIActionAddChangeDestActionByID (int idAction, int sectionId, const std::vector<A2KDestinationProportion*>& aNextSections, int originCent, int destCent, int vehTypePos, double compliance)
Parameters
  • sectionId: The section identifier.
  • anewDest: The new destination centroid identifier.
  • originCent: The origin centroid identifier to apply the action. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin).
  • destCent: The destination centroid identifier to apply the action. All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination).
  • vehTypePos: The 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.
  • compliance: The compliance level (defined between 0 to 1).
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • nbNewDests: The number of items in the list of destination proportions.
  • newDests: List of destination centroid proportions.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Change Destination Park and Ride Action

In C++ only

Explanation

Activate a "change the destination park and ride action" in one section for a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the specified ID to deactivate the action later on.

Format

void *AKIActionAddChangeDestParkRideActionByID(int idAction, int sectionId, const std::vector& aNextSections, int originCent, int destCent, int vehTypePos, double compliance, double scaleFactor)

Parameters
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionId: The section identifier.
  • nbNewDests: The number of items in the list of destination proportions.
  • newDests: List of destination centroid proportions.
  • originCent: The origin centroid identifier to apply the action. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin).
  • destCent: The destination centroid identifier to apply the action. All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination).
  • vehTypePos: The 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.
  • compliance: The compliance level (defined between 0 to 1).
  • scaleFactor: The logit scale factor to calculate choice probabilities.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Activate a Change Turn Probability Action

In C++ only

Explanation

Activate a change of turn probability in one section per a specific vehicle type. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the specified ID to deactivate the action later on. To use this function the demand has to be composed of traffic states.

Format
void *AKIActionChangeTurningProbAction (int sectionId, int nbnewProb, int *anextSection, int *anewProb, int vehTypePos)
Parameters
  • sectionId: The section identifier.
  • nbnewProb: The number of probabilities to change. This must match the number of turns exiting the section.
  • anextSection: An array that contains the identifiers of the next sections (the size of the array must be equal to nbnewProb).
  • anewProb: An array that contains the new probabilities to the next sections (the size of the array must be equal to nbnewProb). Probabilities must be between 0 and 1.
  • vehTypePos: The 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.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action later on.
  • = NULL: Error

Add a Deactivate Reserved Lane Action

In C++ and Python

Explanation

Activate a Deactivate Reserved Lane action in one section for a specific lane and segment. The returned void * has to be used to deactivate the action in C++. In Python use the ByID function and use the specified ID to deactivate the action later on.

Format
void * AKIActionDisableReservedLaneAction(int sectionId, int alane, int ang_segmentId);
void * AKIActionDisableReservedLaneActionByID(int idAction, int sectionId, int alane, int ang_segmentId);
Parameters
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionId: The section identifier
  • alane: The id of the reserved lane to deactivate
  • ang_segmentId: The position of the segment (from 0 to number of segments - 1, or -1 for all of them) where the deactivate reserved lane action will be applied.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action later on in C++.
  • = NULL: Error

Add a Force Path Update Action

In C++ and Python

Explanation

Activate a Force Path Update action in one section for a specific vehicle type and a compliance level. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the specified ID to deactivate the action later on.

Format
    void *AKIActionAddEnRouteAssignmentAction(int idAction, int sectionId, int sectionInPath, int originCent, int destCent, int vehTypePos, double compliance, bool reevaluateAction, int routeChoiceType, double routeChoiceParam1, double routeChoiceParam2, double routeChoiceParam3)
Parameters
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionId: The section identifier
  • sectionInPath: The section identifier indicating that the action is applied when this section is in the vehicle path - only if the vehicles are using OD traffic demand.
  • originCent: The origin centroid identifier to force the path update. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin).
  • destCent: The destination centroid identifier to force the path update. All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination).
  • vehTypePos: The 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.
  • compliance: The compliance level, defined as probability between 0 and 1.
  • reevaluateAction: The option to update vehicles' path every time the travel time is updated.
  • routeChoiceType: The route choice type (0 for fixed distribution, 1 for fixed time, 2 for binomial, 3 for proportional, 4 for Logit, 5 for C-Logit, 6 for user defined, and 7 for DUE).
  • routeChoiceParam1: First route choice parameter (e.g. probability for binomial route choice type or scale attribute for Logit and C-Logit).
  • routeChoiceParam2: Second route choice parameter (e.g. alpha in C-Logit route choice type) - set to 0 if irrelevant for the input route choice type.
  • routeChoiceParam3: Third route choice parameter (e.g. gamma in C-Logit route choice type) - set to 0 if irrelevant for the input route choice type.
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action later on.
  • = NULL: Error

Activate a Close Turn Action

In C++ and Python

Explanation

Activate a turn closure in one turn movement per a specific vehicle type. In the case that the vehicle type is 0, the action is applied to all vehicle types. The returned void * has to be used to deactivate the action in C++. In Python use the specified ID in the ByID function to deactivate the action later on.

Format
void * AKIActionAddCloseTurningODAction(int fromSectionId, int toSectionId, int aOrigin, int aDest, int vehTypePos, double compliance, double visibilityDistance, bool localEffect, int sectionAffectingPathCostId );
void * AKIActionAddCloseTurningODActionByID(int idAction, int sectionId, int anewSection2Close, int aOrigin, int aDest, int vehType, double acomplianceLevel, double visibilityDistance, bool localEffect, int sectionAffectingPathCostId );
Parameters
  • fromSectionId: The turn origin section identifier.
  • toSectionId: The turn destination section identifier.
  • originCent: The origin centroid identifier to force the turn closing. All vehicles with this origin can follow the action depending on the compliance level (-1 means do not consider the origin)
  • destCent: The destination centroid identifier to force the turn closing. All vehicles with this destination can follow the action depending on the compliance level (-1 means do not consider the destination)
  • vehTypePos: The position of the vehicle type in the list of vehicles types being used. 0 is used for all vehicle types and a value from 1 to AKIVehGetNbVehTypes (), for a specific vehicle type.
  • compliance: is the compliance level (defined between 0 to 1).
  • visibilityDistance: The distance at which the close turn will start to be visible for vehicles. 200 meters is the default value when creating a close turn action using the graphical user interface.
  • localEffect: True when the action will not affect the route choice calculations directly, as vehicle will notice the turn is closed when reaching it. It is false when there is a global knowledge about the turn being closed so that it is considered in the route calculation. It is true by default.
  • idAction: A unique identifier for the action that will be used when deactivating it. Make sure the ID specified does not belong to any other action already existing.
  • sectionAffectingPathCostId: Identifier to the section meant to affect the path calculation cost when the path comes from it (-1 means do not consider a specific section)
Output
  • !=NULL: pointer of the action, which will be necessary to disable the action or modify its compliance level later on.
  • = NULL: Error

Disable an Action

In C++ and Python

Explanation

Disable an action previously activated. The parameter required is the pointer returned when the action is enabled.

Format
void AKIActionRemoveAction (void *anaction)
void AKIActionRemoveActionByID (int idAction)
Parameters
  • anaction: The pointer to the action returned when the action was activated.
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
Output
  • none

Disable all activated Actions

In C++ and Python

Explanation

Disable all actions previously activated.

Format
void AKIActionReset ()
Parameters
  • none
Output
  • none

Modify the compliance level of a Force Next Turn Action

In C++ and Python

Explanation

Modifies the compliance level of a previously activated force next turn action. The void * returned when activating the action has to be used to modify the compliance level of the action in C++. In Python use the specified ID in the ByID function when creating it to modify the compliance level.

Format
void AKIActionModifyNextTurningODAction( void * action, double compliance);
void AKIActionModifyNextTurningODActionByID( int idAction, double compliance);
void AKIActionModifyNextTurningResultAction( void * action, double compliance);
void AKIActionModifyNextTurningResultActionByID( int idAction, double compliance);

The AKIActionModifyNextTurningODAction function is used when the traffic demand is based on OD Matrices and the AKIActionModifyNextTurningResultAction function is used when the traffic demand is based on traffic states.

Parameters
  • action The pointer to the action that was returned when activating the action.
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
  • compliance The new compliance level (defined between 0 to 1).
Output

None

Modify the compliance level of a Force Next Turn Action following a sub-route

In C++ and Python

Explanation

Modifies the compliance level of a previously activated force next turn action following a sub-route. The void * returned when activating the action has to be used to modify the compliance level of the action in C++. In Python use the specified ID in the ByID function when creating it to modify the compliance level.

Format
void AKIActionModifyNextSubPathODAction ( void * action, double compliance);
void AKIActionModifyNextSubPathODActionByID ( int idAction, double compliance);
void AKIActionModifyNextSubPathResultAction ( void * action, double compliance);
void AKIActionModifyNextSubPathResultActionByID ( int idAction, double compliance);

The AKIActionModifyNextSubPathODAction function is used when the traffic demand is based on OD Matrices and the AKIActionModifyNextSubPathResultAction function is used when the traffic demand is based on traffic states.

Parameters
  • action The pointer to the action that was returned when activating the action.
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
  • compliance The new compliance level (defined between 0 to 1).
Output
  • none

Modify the compliance level of a Change Destination Centroid Action

In C++ and Python

Explanation

Modifies the compliance level of a previously activated change destination centroid action. The void * returned when activating the action has to be used to modify the compliance level of the action in C++. In Python use the specified ID in the ByID function when creating it to modify the compliance level.

Format
void AKIActionModifyChangeDestAction ( void * action, double compliance);
void AKIActionModifyChangeDestActionByID ( int idAction, double compliance);
Parameters
  • action The pointer to the action that was returned when activating the action.
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
  • compliance The new compliance level (defined between 0 to 1).
Output

None

Modify the compliance level of a Close Turn Action

In C++ and Python

Explanation

Modifies the compliance level of a previously activated close turn action. The void * returned when activating the action has to be used to modify the compliance level of the action in C++. In Python use the specified ID in the ByID function when creating it to modify the compliance level.

Format
void AKIActionModifyCloseTurningODAction( void * action, double compliance);
void AKIActionModifyCloseTurningODActionByID( int idAction, double compliance);
Parameters
  • action: The pointer to the action that was returned when activating the action
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
  • compliance: The new compliance level (defined between 0 to 1)
Output

None

Modify the compliance level of a Force Path Update Action

In C++ and Python

Explanation

Modifies the compliance level of a previously activated Force Path Update action. The void * returned when activating the action has to be used to modify the compliance level of the action in C++. In Python use the specified ID in the ByID function when creating it to modify the compliance level.

Format
void AKIActionModifyEnRouteAssignmentAction( void * action, double compliance);
void AKIActionModifyEnRouteAssignmentActionByID( int idAction, double compliance);
Parameters
  • action: The pointer to the action that was returned when activating the action
  • idAction: The identifier of the action returned when the action was activated. If the action was created using a byID function, then it is the id specified on the action creation.
  • compliance: The new compliance level (defined between 0 to 1)
Output

None

Read the number of Scenario Actions

In C++ and Python

Explanation

Reads the number of traffic management actions that are selected in the current scenario.

Format
int AKIGetNbScenarioActions();
Output

The number of traffic management actions (incidents, turn closures, etc.) selected in the scenario (or the experiment, in case of strategies).

Read the Scenario Action identifiers

In C++ and Python

Explanation

Reads the traffic management action identifiers that are selected in the current scenario.

Format
int AKIGetScenarioActions ( int * actions );
Parameters
  • actions A vector of size AKIGetNbScenarioActions.
Output

Actions contains the traffic management actions identifers (incidents, turn closings, etc.) selected in the scenario (or the experiment, in case of strategies).

Read if a Traffic Management Action is active or not

In C++ and Python

Explanation

Reads whether the provided traffic management action is active or not.

Format
bool AKIIsActionActive( int actionId )
Parameters
  • actionId: The traffic management action identifier.
Output
  • True: the action is activated.
  • False: the action is not activated or not selected in the scenario.

Read the Traffic Management Action type

In C++ and Python

Explanation

Reads the traffic management action type.

Format
int AKIGetActionType( int actionId )
Parameters
  • actionId: The traffic management action identifier.
Output
  • The traffic management type.
    • -1: error
    • 0: Lane closure
    • 1: Speed Reduction
    • 2: Forced Turn
    • 3: Destination Change
    • 4: Section Incident
    • 6: Turn Closure
    • 7: Control Plan Change
    • 8: Periodic Section Incident
    • 9: Section Behavioral Parameters Change
    • 11: Reserved Lane Deactivation
    • 16: Force Path Update
    • 17: Turn Cooperation Model Activation
    • 18: Park and Ride Change