16#define PICK(x,y) (((x)==nullptr)?(y):(x))
Base class for different types of trajectories.
Definition trajectory.h:26
Abstract class for lane-changing models.
Definition model.h:129
virtual bool lch_left(point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars=nullptr, params *lcmpars=nullptr)=0
Determine if the vehicle should change lanes to the left.
model * _cf
Car-following model used in conjunction with lane-changing decisions.
Definition model.h:131
params * _lcpars
Lane-changing model parameters.
Definition model.h:132
virtual bool is_lch_possible(point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars, params *lcmpars)=0
Check if a lane change is possible.
virtual bool lch_right(point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars=nullptr, params *lcmpars=nullptr)=0
Determine if the vehicle should change lanes to the right.
Abstract car-following model class.
Definition model.h:30
virtual point * new_point(point *leader, point *follower, params *p=nullptr)
Compute the next point for a vehicle.
params * pars
Parameters for the car-following model.
Definition model.h:47
virtual double free_flow_speed(params *p=nullptr)=0
Get the free-flow speed of the model.
virtual void validate_parameters(params *p=nullptr)
Validate the model parameters.
virtual double wave_speed(point *leader, point *follower, params *p)=0
Compute the wave speed of a traffic flow disturbance.
virtual point * new_point(generalized_trajectory *leader, trajectory *follower, params *p=nullptr)
Compute the next point for a vehicle using trajectories.
virtual double equil_spcg(double vl, double vf, params *p=nullptr)=0
Compute the equilibrium spacing between vehicles.
virtual double accel(point *leader, point *follower, params *p)=0
Compute a vehicle's acceleration based on its leader.
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
Represents a dynamic trajectory of a moving object.
Definition trajectory.h:59
File for the clock class definition (short description).
File for the params and params_cust classes definitions (short description).
File for the point class definition.
Contains definitions for the generalized_trajectory, static_trajectory, and trajectory classes.