Autopysta
Loading...
Searching...
No Matches
fixed_state_creator.h
Go to the documentation of this file.
1
11#ifndef FIXED_STATE_CREATOR_H
12#define FIXED_STATE_CREATOR_H
13
14#include "creator.h"
15
16using namespace std;
17
26private:
27 double spacing;
28 double initial_speed;
29
39 point* ideal_conditions(point*) override;
40
41public:
48 void validate_creator() override;
49
61 fixed_state_creator(model* _model, double _spacing, double _initial_speed, int maxvehs);
62
72 fixed_state_creator(model* _model, double _spacing, double _initial_speed);
73
83 vehicle* create_no_leader(int lane) override;
84};
85
86#endif
Base class for generating vehicles in a traffic simulation.
Definition creator.h:33
Vehicle creator that injects vehicles with a fixed state (spacing and speed).
Definition fixed_state_creator.h:25
fixed_state_creator(model *_model, double _spacing, double _initial_speed)
Constructs a fixed-state vehicle creator.
fixed_state_creator(model *_model, double _spacing, double _initial_speed, int maxvehs)
Constructs a fixed-state vehicle creator.
vehicle * create_no_leader(int lane) override
Creates a new vehicle in a lane without a leader.
void validate_creator() override
Validates the parameters of the fixed-state vehicle creator.
Abstract car-following model class.
Definition model.h:30
Represents a point in time for a vehicle in a traffic simulation.
Definition point.h:23
Class representing a moving vehicle on the road.
Definition vehicle.h:67
Defines the creator class for generating vehicles in traffic simulations.