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

Parameter class for the linear car-following model. More...

#include <p_linear.h>

Inheritance diagram for p_linear:
params

Public Member Functions

 p_linear ()
 Default constructor for p_linear.
 
 p_linear (double V, double c1, double c2, double c3, double sr, double tau)
 Constructor with custom parameter values.
 
- Public Member Functions inherited from params
 params ()
 Default constructor for the params class.
 

Public Attributes

double V = 120 / 3.6
 Free-flow speed in m/s (default value: 120 km/h).
 
double c1 = 1.0 / 20.0
 Coefficient for speed difference sensitivity.
 
double c2 = 93.0 / 160.0
 Coefficient for follower's speed difference sensitivity.
 
double c3 = 9.0 / 64.0
 Coefficient for spacing sensitivity.
 
double sr = 220.0 / 9
 Jam spacing (minimum distance between vehicles when stopped).
 
double tau = 4.0 / 6
 Driver's reaction time in seconds.
 

Detailed Description

Parameter class for the linear car-following model.

This class stores the parameters used in the linear car-following model. These parameters include:

  • Free-flow speed (V): The desired speed when no vehicles are ahead.
  • Coefficients (c1, c2, c3): Constants that control the sensitivity to speed and spacing differences.
  • Jam spacing (sr): The minimum distance maintained between vehicles when stopped.
  • Reaction time (tau): The time it takes for the driver to react to changes in the vehicle ahead.

These parameters are essential for simulating vehicle behavior in traffic flow.

Constructor & Destructor Documentation

◆ p_linear() [1/2]

p_linear::p_linear ( )

Default constructor for p_linear.

Initializes the parameters with default values based on typical traffic conditions: Free-flow speed = 120 km/h, reaction time = 4/6 seconds, and default coefficients for speed and spacing.

◆ p_linear() [2/2]

p_linear::p_linear ( double V,
double c1,
double c2,
double c3,
double sr,
double tau )

Constructor with custom parameter values.

This constructor allows setting custom values for the linear model parameters.

Parameters
VFree-flow speed in m/s.
c1Coefficient for speed difference sensitivity.
c2Coefficient for follower's speed difference sensitivity.
c3Coefficient for spacing sensitivity.
srJam spacing in meters.
tauDriver's reaction time in seconds.

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