#include <Road.h>
Public Member Functions | |
void | setAllowLaneChanging (bool status) |
Sets whether or not lane changing is allowed. | |
bool | getAllowLaneChanging () |
Gets whether or not lane changing is allowed. | |
void | setPosOuputDetectorDirPos (int loc) |
Sets the position of output detector in the positive direction. | |
void | setPosOuputDetectorDirNeg (int loc) |
Sets the position of output detector in the negative direction. | |
void | setDetectors (std::vector< Detector * > detectors) |
Sets the detector properties. | |
void | initTruckGroup (string inFile, string outFile, WORD fileType) |
Initialises the file handler. | |
void | setNoLanesDirPos (int nlpos) |
Sets the number of lanes in the positive direction. | |
void | setNoLanesDirNeg (int nlneg) |
Sets the number of lanes in the negative direction. | |
void | setNoDirections (int nd) |
Sets the number of directions. | |
void | setNoLanes (int nl) |
Sets the number of lanes. | |
void | setRoadLength (int L) |
Sets the length of the road. | |
void | setTrafFileNoLanesDirPos (int nl) |
Sets the number of lanes in the positive direction in the traffic file. | |
void | setTrafFileNoLanesDirNeg (int nl) |
Sets the number of lanes in the negative direction in the traffic file. | |
void | setIDMParams_Car (CIDMParameterSet *Params) |
Sets the Car IDM Parameter Set. | |
void | setIDMParams_SmallTruck (CIDMParameterSet *Params) |
Sets the Small Truck IDM Parameter Set. | |
void | setIDMParams_LargeTruck (CIDMParameterSet *Params) |
Sets the Large Truck IDM Parameter Set. | |
void | setIDMParams_Crane (CIDMParameterSet *Params) |
Sets the Crane IDM Parameter Set. | |
void | setIDMParams_Lowloader (CIDMParameterSet *Params) |
Sets the Lowloader IDM Parameter Set. | |
double | getLength () |
Gets the length of the road. | |
M2D | getVehicles () |
Gets all the vehicles on the road. | |
void | populate (double step, double CurrentTime) |
Populates the road. | |
double | init () |
Initialises the road. | |
Road () | |
Constructor. | |
virtual | ~Road () |
Destructor. | |
bool | update (double step) |
Updates the properties of the road. | |
Private Member Functions | |
void | MapTrafLaneToSimLane (Vehicle *pVeh) |
Maps vehicles to appropriate lanes. | |
void | setIDMDriverModel (Vehicle *pVeh) |
Sets a vehicle's drivermodel. | |
Private Attributes | |
int | m_PosOutputDetectorDirPos |
int | m_PosOutputDetectorDirNeg |
CIDMParameterSet * | m_pIDMParams_Car |
CIDMParameterSet * | m_pIDMParams_SmallTruck |
CIDMParameterSet * | m_pIDMParams_LargeTruck |
CIDMParameterSet * | m_pIDMParams_Crane |
CIDMParameterSet * | m_pIDMParams_Lowloader |
Direction | DirectionPos |
Direction | DirectionNeg |
TruckGroup * | m_TruckGroup |
FileHandler * | m_FileHandler |
int | m_TrafFileNoLanesDirPos |
int | m_TrafFileNoLanesDirNeg |
std::vector< Truck * > | m_BufferVehicles |
std::vector< Lane * > | m_vLanes |
std::vector< Detector * > | m_vDetectorsPos |
std::vector< Detector * > | m_vDetectorsNeg |
std::string | filename |
bool | m_bEndOfFile |
bool | m_AllowLaneChanging |
int | m_NoLanesDirPos |
int | m_NoLanesDirNeg |
int | m_NoDirections |
int | m_NoLanes |
int | m_RoadLength |
Road::Road | ( | ) |
Constructor.
Road::~Road | ( | ) | [virtual] |
Destructor.
void Road::setAllowLaneChanging | ( | bool | status | ) |
Sets whether or not lane changing is allowed.
status | Whether or not lane changing is allowed |
bool Road::getAllowLaneChanging | ( | ) |
Gets whether or not lane changing is allowed.
void Road::setPosOuputDetectorDirPos | ( | int | loc | ) |
Sets the position of output detector in the positive direction.
loc | The position of output detector |
void Road::setPosOuputDetectorDirNeg | ( | int | loc | ) |
Sets the position of output detector in the negative direction.
loc | The position of output detector |
void Road::setDetectors | ( | std::vector< Detector * > | detectors | ) |
Sets the detector properties.
detectors | The vector of detectors to use |
void Road::initTruckGroup | ( | string | inFile, | |
string | outFile, | |||
WORD | fileType | |||
) |
Initialises the file handler.
inFile | The input file to read from | |
outFile | The output file to write to | |
fileType | The type of file |
void Road::setNoLanesDirPos | ( | int | nlpos | ) |
Sets the number of lanes in the positive direction.
nlpos | The number of lanes in the positive direction |
void Road::setNoLanesDirNeg | ( | int | nlneg | ) |
Sets the number of lanes in the negative direction.
nlneg | The number of lanes in the negative direction |
void Road::setNoDirections | ( | int | nd | ) |
Sets the number of directions.
nd | The number of directions |
void Road::setNoLanes | ( | int | nl | ) |
Sets the number of lanes.
nl | The number of lanes |
void Road::setRoadLength | ( | int | L | ) |
Sets the length of the road.
L | The length of the road |
void Road::setTrafFileNoLanesDirPos | ( | int | nl | ) |
Sets the number of lanes in the positive direction in the traffic file.
nl | The number of lanes |
void Road::setTrafFileNoLanesDirNeg | ( | int | nl | ) |
Sets the number of lanes in the negative direction in the traffic file.
nl | The number of lanes |
void Road::setIDMParams_Car | ( | CIDMParameterSet * | Params | ) |
void Road::setIDMParams_SmallTruck | ( | CIDMParameterSet * | Params | ) |
void Road::setIDMParams_LargeTruck | ( | CIDMParameterSet * | Params | ) |
void Road::setIDMParams_Crane | ( | CIDMParameterSet * | Params | ) |
void Road::setIDMParams_Lowloader | ( | CIDMParameterSet * | Params | ) |
double Road::getLength | ( | ) |
Gets the length of the road.
M2D Road::getVehicles | ( | ) |
Gets all the vehicles on the road.
void Road::populate | ( | double | step, | |
double | CurrentTime | |||
) |
Populates the road.
step | The timestep | |
CurrentTime | The simulation's current time |
double Road::init | ( | ) |
Initialises the road.
bool Road::update | ( | double | step | ) |
Updates the properties of the road.
step | The timestep |
void Road::MapTrafLaneToSimLane | ( | Vehicle * | pVeh | ) | [private] |
Maps vehicles to appropriate lanes.
pVeh | The vehicle to map |
void Road::setIDMDriverModel | ( | Vehicle * | pVeh | ) | [private] |
Sets a vehicle's drivermodel.
pVeh | The vehicle to set |
int Road::m_PosOutputDetectorDirPos [private] |
int Road::m_PosOutputDetectorDirNeg [private] |
CIDMParameterSet* Road::m_pIDMParams_Car [private] |
CIDMParameterSet* Road::m_pIDMParams_SmallTruck [private] |
CIDMParameterSet* Road::m_pIDMParams_LargeTruck [private] |
CIDMParameterSet* Road::m_pIDMParams_Crane [private] |
CIDMParameterSet* Road::m_pIDMParams_Lowloader [private] |
Direction Road::DirectionPos [private] |
Direction Road::DirectionNeg [private] |
TruckGroup* Road::m_TruckGroup [private] |
FileHandler* Road::m_FileHandler [private] |
int Road::m_TrafFileNoLanesDirPos [private] |
int Road::m_TrafFileNoLanesDirNeg [private] |
std::vector<Truck*> Road::m_BufferVehicles [private] |
std::vector<Lane*> Road::m_vLanes [private] |
std::vector<Detector*> Road::m_vDetectorsPos [private] |
std::vector<Detector*> Road::m_vDetectorsNeg [private] |
std::string Road::filename [private] |
bool Road::m_bEndOfFile [private] |
bool Road::m_AllowLaneChanging [private] |
int Road::m_NoLanesDirPos [private] |
int Road::m_NoLanesDirNeg [private] |
int Road::m_NoDirections [private] |
int Road::m_NoLanes [private] |
int Road::m_RoadLength [private] |