SUMO - Simulation of Urban MObility
MSCFModel_Kerner.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // car-following model by B. Kerner
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef MSCFModel_Kerner_h
00022 #define MSCFModel_Kerner_h
00023 
00024 // ===========================================================================
00025 // included modules
00026 // ===========================================================================
00027 #ifdef _MSC_VER
00028 #include <windows_config.h>
00029 #else
00030 #include <config.h>
00031 #endif
00032 
00033 #include <microsim/MSCFModel.h>
00034 #include <utils/xml/SUMOXMLDefinitions.h>
00035 
00036 
00037 // ===========================================================================
00038 // class definitions
00039 // ===========================================================================
00044 class MSCFModel_Kerner : public MSCFModel {
00045 public:
00052     MSCFModel_Kerner(const MSVehicleType* vtype, SUMOReal accel, SUMOReal decel, SUMOReal headwayTime, SUMOReal k, SUMOReal phi);
00053 
00054 
00056     ~MSCFModel_Kerner();
00057 
00058 
00061 
00070     SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
00071 
00072 
00080     SUMOReal stopSpeed(const MSVehicle* const veh, SUMOReal gap2pred) const;
00081 
00082 
00087     int getModelID() const {
00088         return SUMO_TAG_CF_BKERNER;
00089     }
00091 
00092 
00093 
00098     MSCFModel* duplicate(const MSVehicleType* vtype) const;
00099 
00100 
00101 private:
00107     SUMOReal _v(SUMOReal speed, SUMOReal vfree, SUMOReal gap, SUMOReal predSpeed) const;
00108 
00109 
00110 
00111 private:
00115     SUMOReal myK;
00116 
00118     SUMOReal myPhi;
00119 
00121     SUMOReal myTauDecel;
00123 
00124 };
00125 
00126 #endif  /* MSCFModel_Kerner_H */
00127 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines