Skip to content

Aimsun Next API Past Costs

Read the number of intervals of Past Costs Read

In C++ and Python

Explanation

Read the number of Past Costs previously read. If the value returned is 0, then there is no Past Cost previously read.

Format
int AKIPastCostGetNbIntervalsReaded()
Parameters

Node.

Output
  • ≥ 0: No error.
  • < 0: Error.

Read whether the Past Costs are read per Vehicle Type

In C++ and Python

Explanation

Read whether the Past Costs has been read per vehicle type.

Format
int AKIPastCostAreCostsPerVehicleType()
Parameters

None.

Output
  • ≥ 0: 1 means Past Cost per Vehicle Type and 0 otherwise.
  • < 0: Error.

Read the Initial Time of the PastCost Read

In C++ and Python

Explanation

Read the initial time of the Past Costs read.

Format
double AKIPastCostGetIniTimeReaded()
Parameters

None.

Output
  • ≥ 0: No Error.
  • < 0: Error.

Read the Time Interval of the PastCost Read

In C++ and Python

Explanation

Read the time interval of the Past Costs read.

Format
double AKIPastCostGetIntervalReaded()
Parameters

None.

Output
  • ≥ 0: No Error
  • < 0: Error

Read Past Cost

In C++ and Python

Explanation:

Read the past costs (the past cost and the output past cost) of a link.

Format
double AKIPastCostGetPastCost( int sectorig, int sectdest, double aTime, int idVehType );
double AKIPastCostGetPastOutputCost( int sectorig, int sectdest, double aTime, int idVehType );
Parameters
  • sectorig: Origin section identifier of the link.
  • sectdest: Destination section identifier of the link.
  • aTime: The time of the Past Cost.
  • idVehType: The Vehicle Type ID.
Output
  • ≥ 0: No Error.
  • < 0: Error.

Modify Past Cost

In C++ and Python

Explanation

Modify the Past Cost. If the Vehtype is NULL or “all”, the past cost read does not distinguish per vehicle type.

Format
int AKIPastCostSetPastCost( int sectorig, int sectdest, double aTime, int idVehType, double acost, double aocost );
Parameters
  • sectorig: Origin section identifier of the link.
  • sectdest: Destination section identifier of the link.
  • aTime: The time of the Past Cost.
  • idVehType: The Vehicle Type ID.
  • acost: The new Past Cost.
  • aocost: The new Past Output Cost.
Output
  • = 0: No Error
  • < 0: Error