Documentation

This is the documentation of TC. Methods for the configuration, deployment and use of TC are given. The main features are:

  • Environment design and build: Definition of positions and roads connecting them.
  • Set current vehicles positions: The current position of each vehicle is set.
  • Set goal vehicles positions: The desired goal position for each vehicle is set.
  • Retrieve next vehicles positions: Returns the next positions of the vehicles.
  • Specify dynamic obstacles: If any, dynamic obstacles obstructing the previously defined
    roads are indicated.
  • Compute solutions: The optimal trajectory is computed for each vehicle .

It is assumed that TC will be integrated into an application specific vehicles manager software/system. In the application tailored solution, the TC will be used as a module that is in charge of the traffic control. A processor with high processing capabilities and instructions per seconds rate is desirable (i.e. high clock speeds). The number of available cores is not relevant, since
a TC is a single threaded process.

Preliminary notes

The expected timeout period and needed RAM memory will depend on the final application in which TC is deployed, the environment (including the presence of obstacles) and the system reaction timings. On-site or simulation based assessment is highly recommended.

The hardware platform in which TC is deployed and run plays an important role. Its real-time response is closely related with its computational capabilities. It shall be verified that TC meets the expected performance and behavior on the target application.

Installation

TC can be installed and run on both Windows and GNU/Linux systems (x86 architecture). It could also be compatible
with other operating systems. The installation can simply done by:

  1. Creating a directory and/or changing current directory to a desired workspace path.
  2. Copying the binary executable file and giving execution permissions. In GNU/Linux, an Ada runtime system (i.e. gnat) shall be present.

TC can be executed by running the launcher binary: ./tc-launcher_<os>. Standard input and output is used to pass commands and retrieve data. The TC programming interface is divided into different parts aligned with its use cases.

Settings

First, TC settings can be adjusted, specifically, the maximum available RAM, CPU time and logging feature. The expected timeout period and needed RAM memory will depend on the final application in which TC is deployed, the environment (including the presence of obstacles) and the system reaction timings.

MethodDescriptionArgumentsReturn
Settings_Set_Max_RAMSets the maximum available RAMNatural[none]
Settings_Set_TimeoutSets the maximum available CPU time (in milliseconds) before a timeout is raisedNatural[none]
Settings Enable LoggingEnables logging feature (a tc.log file is created).[none][none]
Settings Disable LoggingDisables logging [none][none]
Settings methods

Initialization & Mission

Once configured, TC can be initialized and build and major versions information retrieved. Before missions can be carried out, the environment needs to be build up and vehicles current and goals positions defined.

MethodDescriptionArgumentsReturn
TC_InitInitializes TC[none][none]
TC_GenerationPrints TC generation, the major version, specifically, the year of development.[none]String
TC_Build_VersionPrints the build version[none]String
TC_Start_MissionMission starts, it automatically computes the solution. Returns true if successful.[none]Boolean
TC_Get_Num_StepRetrieves the number of steps to reach the goal[none]Natural
TC_End_MissionMission end[none][none]
Initialization & mission methods

Environment

The environment can be determined and built up following next methods. The maximum number of positions and roads are statically defined and fixed during compilation. This measure is applied to avoid systematic errors and internal data inconsistencies. The environment needs to be firstly cleared.

MethodDescriptionArgumentsReturn
Environment_CleanCleans the current environment model.[none][none]
Environment_BuildThe environment is built. The
model is created. For any change, a clean shall be done.
[none][none]
Environment_Get_Max_PosReturns the number of maximum positions that can be defined in the environment[none]Natural
Environment_Get_Max_RoadsReturns the number of maximum roads that can be defined in the environment[none]Natural
Environment_Add_One_Way RoadA one way road is added from position (argument 1) to position (argument 2)Pos_ID
Pos_ID
[none]
Environment_Add_Two_Way_Road_One_LaneA two way road (one lane) is added from position (argument 1) to position (argument 2). A single vehicle
can go through each time
Pos_ID
Pos_ID
[none]
Environment_Add_Two
_Way_Road_Two_Lanes
A one way road (two lane) is added from position (argument 1) to position (argument 2) Two vehicles can go through in each direction each time. Pos_ID
Pos_ID
[none]
Environment methods

Vehicle

Following methods enable the vehicle management. Current and desired goal positions of the vehicles are specified. Once the solution is computed, the next position of each vehicle can be retrieved. Optionally the distance of a vehicle to a given position
can also be obtained. When goal is suddenly reached, the same position as the desired one will be returned.

MethodDescriptionArgumentsReturn
Vehicle_Set_Current_PosSets the current position for a given vehicleVehicle_ID
Pos_ID
[none]
Vehicle_Get_Current_PosProvides the current position for a vehicleVehicle_IDPos_ID
Vehicle_Get_Dis_To_PosReturns the distance of the vehicle to the positionVehicle_ID
Pos_ID
Natural
Vehicle_Set_Goal_PosSets the goal position of a vehicleVehicle_ID
Pos_ID
[none]
Vehicle_Get_Next_PosProvides the next position of a given vehicle.Vehicle_IDPos_ID
Vehicle_Get_Step_PosProvides the position of the vehicle at a given step.Vehicle_ID
Natural
Pos_ID
Vehicle_Moved_ForwardThe vehicles are moved forward following the previously computed path. Returns true if Goal reached.[none]Boolean
Vehicle_Goal_ReachedCheck if goal positions reached. True if yes . Otherwise, false[none]Boolean
Vehicle methods

Obstacles

Current obstacles present in the environment, if any, are specified. This procedure will of course depend on the number detected and identified obstacles. This task is out of scope of TC. For this purpose, environment sensing systems and methods should be used, such as vision systems or movement detection sensors.

MethodDescriptionArgumentsReturn
Obstacles_CleanThe list of obstacles is cleared[none][none]
Obstacles_Add_ObstacleNew obstacle detected between positions 1 (1st argument) to position 2 is indicated (2nd argument)Pos_ID
Pos_ID
[none]
Obstacles_Get_NumThe number of obstacles is retrieved.[none]Natural
Obstacles_PresentIndicates if an obstacles has been defined between two positions.Pos_ID
Pos_ID
Boolean
Obstables_ConfirmObstacles are confirmed, the paths are recomputed. Returns true if successful.[none]Boolean
Obstacles methods

Monitoring

During execution, the current CPU time employed can be obtained. In addition, the number of statically configured vehicles can be retrieved. The collection of this data is not mandatory, although advised to monitor the performance of TC.

MethodDescriptionArgumentsReturn
Monitoring_Get_Num_VehiclesReturns the number of statically configured vehicles[none]Natural
Monitoring_Get_CPU_TimeReturns current CPU time
(in seconds) employed for
the computation of the solution
[none]Float
Monitoring methods