Autopysta
Loading...
Searching...
No Matches
fixed_demand_creator.h
Go to the documentation of this file.
1
11#ifndef FIXED_DEMAND_CREATOR_H
12#define FIXED_DEMAND_CREATOR_H
13
14#include <cmath>
15#include "creator.h"
16
17using namespace std;
18
27private:
28 double headway;
29 double flow;
30
40 point* ideal_conditions(point*) override;
41
42public:
51 fixed_demand_creator(model* _model, double _flow);
52
63 fixed_demand_creator(model* _model, double _flow, int maxvehs);
64
71 void validate_creator() override;
72
82 vehicle* create_no_leader(int lane) override;
83};
84
85#endif
Base class for generating vehicles in a traffic simulation.
Definition creator.h:33
Vehicle creator that injects vehicles at a fixed rate (flow).
Definition fixed_demand_creator.h:26
void validate_creator() override
Validates the flow rate parameters of the fixed-demand vehicle creator.
fixed_demand_creator(model *_model, double _flow, int maxvehs)
Constructs a limited fixed-demand vehicle creator.
vehicle * create_no_leader(int lane) override
Creates a new vehicle in a lane without a leader.
fixed_demand_creator(model *_model, double _flow)
Constructs a fixed-demand 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.