Autopysta
Loading...
Searching...
No Matches
results Class Reference

The results class manages and processes simulation results. More...

#include <results.h>

Public Member Functions

 results (vector< trajectory * > *r)
 Constructor that initializes the results object with a list of trajectories.
 
vector< trajectory * > * porpista (int c)
 Splits a vehicle's trajectory by lane.
 
vector< trajectory * > * by_lane (int l)
 Retrieves all trajectories in a specific lane.
 
vector< trajectory * > * all_lanes ()
 Retrieves all trajectories across all lanes.
 
vector< trajectory * > * get_all_t ()
 Gets all vehicle trajectories.
 
vector< vector< double > * > * edie (double ta, double tb, double dt, double xa, double xb, int l)
 Computes Edie's flow and density for a specific time interval and distance.
 
vector< point * > * passes_on_t (double t, int l)
 Retrieves the list of points where vehicles pass at a specific time in a given lane.
 
vector< point * > * passes_on_x (double x, int l)
 Retrieves the list of points where vehicles pass at a specific distance in a given lane.
 

Detailed Description

The results class manages and processes simulation results.

This class stores and organizes the trajectories of vehicles by lane, and provides methods to analyze the data, such as computing Edie's flow and density, or getting vehicle positions at specific times or distances.

Constructor & Destructor Documentation

◆ results()

results::results ( vector< trajectory * > * r)

Constructor that initializes the results object with a list of trajectories.

Parameters
rA vector of trajectories from the simulation.

Member Function Documentation

◆ all_lanes()

vector< trajectory * > * results::all_lanes ( )

Retrieves all trajectories across all lanes.

Returns
A vector containing all trajectories in the simulation.

◆ by_lane()

vector< trajectory * > * results::by_lane ( int l)

Retrieves all trajectories in a specific lane.

Parameters
lLane number.
Returns
A vector of trajectories in the specified lane.

◆ edie()

vector< vector< double > * > * results::edie ( double ta,
double tb,
double dt,
double xa,
double xb,
int l )

Computes Edie's flow and density for a specific time interval and distance.

This method analyzes the trajectory data to calculate flow and density values within a specified time-space region.

Parameters
taStart time.
tbEnd time.
dtTime step size.
xaStart distance.
xbEnd distance.
lLane number.
Returns
A vector of vectors containing the computed flow and density values.

◆ get_all_t()

vector< trajectory * > * results::get_all_t ( )

Gets all vehicle trajectories.

Returns
A vector containing the trajectories of all vehicles.

◆ passes_on_t()

vector< point * > * results::passes_on_t ( double t,
int l )

Retrieves the list of points where vehicles pass at a specific time in a given lane.

Parameters
tThe time at which to check vehicle positions.
lThe lane number.
Returns
A vector of points representing vehicle positions at the specified time and lane.

◆ passes_on_x()

vector< point * > * results::passes_on_x ( double x,
int l )

Retrieves the list of points where vehicles pass at a specific distance in a given lane.

Parameters
xThe distance at which to check vehicle positions.
lThe lane number.
Returns
A vector of points representing vehicle positions at the specified distance and lane.

◆ porpista()

vector< trajectory * > * results::porpista ( int c)

Splits a vehicle's trajectory by lane.

This method processes the trajectory of a specific vehicle and splits it into separate trajectories based on lane changes.

Parameters
cIndex of the vehicle trajectory.
Returns
A vector of trajectories split by lane.

The documentation for this class was generated from the following file: