# Traffic Arrivals¶

## Traffic Arrivals¶

A Traffic Arrival object is a reference to an ATA file which contains a list of all the vehicles generated in one dynamic simulation such that the same vehicles can be generated in another dynamic simulation. Alternately, a Traffic Arrival object can be generated by the modeler to create a specific, and customized, pattern of arrivals of vehicles into a simulation.

The vehicles specified in a Traffic Arrival are generated in addition to those generated from OD matrices. Hence if the OD matrices specified 100 vehicles for a trip and the Traffic Arrival specified 20 in the same period, then, the total released would be 120.

## Creating a Traffic Arrival¶

To create a new Traffic Arrival, select the New > Demand Data > Traffic Arrival option, either in the Project Menu of the main 2D window, or in the Project window. This will create a new Traffic Arrival in the Traffic Arrivals folder in the project window.

If a Traffic Arrival is to be created for a subnetwork, then it should be created using the New option in the context menu for that subnetwork. The subnetwork attribute for the Traffic Arrival will then be set to identify its parent network. This attribute is empty if the Traffic Arrival has been created for the entire network.

## Traffic Arrival Editor¶

The Traffic Arrival Editor main tab is used to edit the object's name and external ID and to identify the file where the data is stored. Information on the source of the data is provided. If the Auto Retrieve option is selected, the data is retrieved from the ATA file as the Aimsun Document is read, otherwise the data can be retrieved by selecting the Retrieve option in the Traffic Arrival context menu.

The Attributes tab shows the object's attributes, by default, this is the subnetwork which owns this Traffic Arrival.

The Profile tab shows the profile of arrivals in the network as a table and as a chart.

### Populating a Traffic Arrival File Using a Prior Simulation¶

A Traffic Arrival File can be populated with vehicles by collecting data from a dynamic simulation replication. The data collection is toggled on or off for a Replication as the Traffic Arrival logs the detailed arrival information for the specific individuals in the simulation and this data is unique to each replication. It must therefore be collected for each replication separately. The data collection is toggled on or off in the Replication Editor: Outputs to Generate tab. The Traffic Arrival data can be collected from a mesoscopic, hybrid, or microscopic replication.

### Creating a Traffic Arrival File From Alternate Sources¶

The ATA file can be edited by the modeler to specify a set of vehicle arrivals which detail a small set of additional vehicles which, for reasons connected to the model and the simulation requirements, must be introduced at a specific time and place. The ATA file is an XML file and can be generated externally from other sources than Aimsun Next. An externally generated file is linked to a Traffic Arrival object the same way as if it was to be generated by a simulation replication.

An example of the file is shown here:

<TrafficArrivals>
<trafficArrivalId>2759</trafficArrivalId>
<vehicleTypes>
<vehicleType id="53">
<modalId>0</modalId>
</vehicleType>
<vehicleType id="56">
<modalId>1</modalId>
</vehicleType>
</vehicleTypes>
<initialTime>28800</initialTime>
<duration>3600</duration>
<warmUp>0</warmUp>
<replication>2464</replication>
<arrivals>
<vehicleArrival id="1">
<modalId>53</modalId>
<timeGeneration>0.5593245537</timeGeneration>
<generationSeed>53761</generationSeed>
<selectionSeed>53761</selectionSeed>
<originId>2105</originId>
<destinationId>2090</destinationId>
<originSectionId>1952</originSectionId>
</vehicleArrival>
-------
<vehicleArrival id="8385">
<modalId>56</modalId>
<timeGeneration>3599.8620575932</timeGeneration>
<generationSeed>87300</generationSeed>
<selectionSeed>87300</selectionSeed>
<originId>2090</originId>
<destinationId>2096</destinationId>
<originSectionId>2056</originSectionId>
</vehicleArrival>
</arrivals>
<demandProfile>
<profileInterval>900</profileInterval>
<vehicleProfile id="53">1982 1979 1883 1909</vehicleProfile>
<vehicleProfile id="56">159 168 164 141</vehicleProfile>
</demandProfile>
</TrafficArrivals>


The file has four sections

##### Vehicle Types¶

The vehicle types that are used in the traffic arrival are defined using the tag vehicleType.

• id: The vehicle Type ID
• modalId: The internal index during the simulation. It is optional and its range goes from 0 to number of vehicle types -1.
##### General Information¶

The simulation information that generated the ATA file is provided

-initialTime: Defines the initial time of the simulation measured as the number of seconds from 00:00:00 in the above example 28800 corresponds to 08:00:00 AM. - duration:Defines the duration of the simulation not including the warm-up period - warmUp: Defines the warm-up duration. - replication: Defines the replicationIDthat was used to create the traffic arrivals. It must be an integer.

##### Vehicle Arrivals¶

For each arrival, the following information is present:

• modalId: Corresponds to the vehicle type id.
• timeGeneration Is the simulation time in seconds when the vehicle was generated relative to the start time. If there is a warm-up period, then vehicles with timeGeneration less than the warm-up duration are generated during the warm-up period.
• generationSeed: Is the random number seed used to generate the vehicle's physical attributes. For example, length, desired speed,...
• selectionSeed: Is the random number seed used to select the path that the vehicle will follow.
• originId and destinationId: Define the origin centroidIDand destination centroid ids.
• originSectionId: Defines the entrance section. This tag is optional. If it is not defined then the route choice model calculates the origin section based on the selected route choice model and centroid properties, otherwise the predefined section is used.
• destinationSectionId is used to define the exit section. Like the originSectionId, this tag is also optional.
##### Profile Summary¶

The final section is a summary of the profile of arrivals, as displayed in the Traffic Arrival Editor: Profile Tab.

## Including a Traffic Arrival in a Simulation¶

A Traffic Arrival is included in a Traffic Demand to add vehicles to those already specified by the OD matrices. The Traffic Demand must contain matrices for the vehicles used in the Traffic Arrival, but if the Traffic Arrival is to replace the OD demand, then the Current Demand Factor can be set to 0% for the OD matrix

Traffic Arrivals without the times for the OD matrices will be ignored.