78 void set_empty_points_queue(std::vector<double> hist_X, std::vector<int> lanes);
87 void update(
point* new_point);
97 void check_dt(
point* new_point);
124 vehicle(std::vector<double> x, std::vector<int> l);
Class representing a fixed object on the road.
Definition vehicle.h:209
void update(road_object *ro) override
Update the state of the fixed object.
point * current() override
Get the current position of the fixed object.
fixed_object(point *pos)
Constructor for the fixed_object class.
Base class for different types of trajectories.
Definition trajectory.h:26
Abstract car-following model class.
Definition model.h:30
Base class for car-following model parameters.
Definition params.h:24
Represents a point in time for a vehicle in a traffic simulation.
Definition point.h:23
Abstract base class representing any object on the road.
Definition vehicle.h:29
virtual point * current()=0
Get the current point of the object.
std::queue< point * > defined_t
A queue of defined trajectory points provided by the user.
Definition vehicle.h:33
virtual ~road_object()
Virtual destructor for the road_object class.
Definition vehicle.h:38
model * m
Pointer to the model associated with the object (optional).
Definition vehicle.h:31
virtual void update(road_object *leader)=0
Update the object's state based on another road object.
generalized_trajectory * traj
Object's trajectory, which defines its movement and positions over time.
Definition vehicle.h:32
Class representing a moving vehicle on the road.
Definition vehicle.h:67
void initialize_vehicle()
Initialize the vehicle’s trajectory with real points.
vehicle(std::vector< double > x, int l)
Create a vehicle with a predefined trajectory and a single lane.
bool needs_initialization
Flag indicating if the vehicle requires initialization within the simulation.
Definition vehicle.h:100
vehicle(model *m, double x, double v, int l)
Create a vehicle with a model, initial position, speed, and lane.
vehicle(std::vector< double > x, std::vector< int > l)
Create a vehicle with a predefined trajectory across multiple lanes.
vehicle(std::vector< point * > p)
Create a vehicle with a predefined trajectory based on points.
void update(road_object *leader) override
Update the vehicle's state based on a leader vehicle.
point * current() override
Get the current point of the vehicle.
std::vector< point * > placeholder_points
A vector of placeholder points used before simulation starts.
Definition vehicle.h:101
~vehicle()
Destructor for the vehicle class.
params * p()
Get the model parameters associated with the vehicle.
vehicle(model *m, point *p)
Create a vehicle with a model and a starting point.
Defines the example_car class, a simple car-following model.
File for the model and lcm classes definitions (short description).
File for the point class definition.
Contains definitions for the generalized_trajectory, static_trajectory, and trajectory classes.