00001 #ifndef _DRIVERMODEL_H 00002 #define _DRIVERMODEL_H 00003 00004 #include "stdafx.h" 00005 #include <math.h> 00006 #include "Constants.h" 00007 00010 class DriverModel 00011 { 00012 public: 00013 DriverModel(); 00014 virtual ~DriverModel(); 00015 00016 virtual double getDesiredVel() = 0; 00017 virtual double update(double vel, double dist) = 0; 00018 virtual void setVel(double vel) = 0; 00019 00020 virtual void ClearRestriction() {}; 00021 virtual void ClearGradient() {}; 00022 virtual void SetGradient(double gradient) {}; 00023 virtual void ClearSpeedLimit() {}; 00024 virtual void SetSpeedLimit(double limit) {}; 00025 00026 // double because we want to send back info to let the vehicle decide 00027 virtual double LaneChange( double GapToFront, 00028 double GapToBack, 00029 double FrontChangeAccel, 00030 double CurrentBackAccel, 00031 double ProposedBackAccel, 00032 bool overtake) = 0; 00033 00034 protected: 00035 00036 bool m_bInGradient; 00037 bool m_bInSpeedLimit; 00038 }; 00039 00040 #endif