The results of the simulation are written to files or streamed to a network socket.

Possible formats are:

• xml-plain which is the default xml format
• plain a flat format (just numbers)

Note that if you are using the streaming mode or want to visualize the trajectories with jpsvis, the format should be xml-plain.

## XML

The file has three main sections: header, geometry and frames.

 <header version = "0.8">
<agents>1</agents>
<frameRate>8</frameRate>


where

• agents: The total number of agents at the beginning of the simulation.
• frameRate: Divide the total number of frames by the framerate to obtain the overall evacuation time.

The geometry can be completely embedded within the trajectories or a reference to a file can be supplied.

 <geometry>
<file location="corridor_geometry.xml"/>
</geometry>



The coordinates of the trajectory are defined in the session frames

 <frame ID="0">
<agent ID="1"	x="660.00"	y="333.00"	z="30.00"
rA="17.94"	rB="24.94"	eO="-168.61" eC="0"/>
</frame>
<frame ID="1">
<agent ID="1"	x="658.20"	y="332.86"	z="30.00"
rA="31.29"	rB="23.87"	eO="-175.41" eC="54"/>
</frame>

• ID the id of the pedestrians starting with 1.
• x, y, z the position of the agent.

• rA, rB The shape which is defined by a circle (ellipse) drawn around a human-like figure. radiusA and radiusB are respectively the semi major axis and the semi minor axis of the ellipse, if the modeled pedestrians’ shape is an ellipse. Otherwise, if it is a circle those values should be equal to the radius of the circle.
• eO, eC are the “ellipseOrientation” and the “ellipseColor”. “ellipseOrientation” is the angle between the major axis and the X-axis (zero for circle). A color can also be provided, for example for displaying change in velocity. The colours are in the range [0=red, 255=green] and define the proportion between the desired speed ($v_0$) and the instantaneous velocity.

A sample trajectory in the xml format is

 <?xml version="1.0" encoding="UTF-8"?>
<trajectories>
<agents>1</agents>
<frameRate>8</frameRate>

<geometry>
<file location="corridor_geometry.xml"/>
</geometry>

<frame ID="0">
<agent ID="1"	x="660.00"	y="333.00"	z="30.00"
rA="17.94"	rB="24.94"	eO="-168.61"	eC="0"/>
</frame>

<frame ID="1">
<agent ID="1"	x="658.20"	y="332.86"	z="30.00"
rA="31.29"	rB="23.87" 	eO="-175.41"	eC="54"/>
</frame>
</trajectories>


## TXT

The other format of the trajectory file is plain

A sample trajectory in the plain format is as follows:

 #description: simulation
#framerate: 16
#geometry: /home/sim/corridor.xml
#ID: the agent ID
#FR: the current frame
#X,Y,Z: the agents coordinates in metres

#ID	FR	X		Y		Z
1	0	28.21	131.57	0.00
2	0	38.41	133.42	0.00
1	1	28.21	131.57	0.00
2	1	38.41	133.42	0.00
1	2	28.24	131.57	0.00
2	2	38.44	133.42	0.00
1	3	28.29	131.57	0.00