|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Structure representing possible vehicle parameter 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef SUMOVTypeParameter_h 00023 #define SUMOVTypeParameter_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <map> 00037 #include "SUMOVehicleClass.h" 00038 #include "RGBColor.h" 00039 #include "SUMOTime.h" 00040 00041 00042 // =========================================================================== 00043 // class declarations 00044 // =========================================================================== 00045 class OutputDevice; 00046 class OptionsCont; 00047 00048 00049 // =========================================================================== 00050 // value definitions 00051 // =========================================================================== 00052 const int VTYPEPARS_LENGTH_SET = 1; 00053 const int VTYPEPARS_MINGAP_SET = 2; 00054 const int VTYPEPARS_MAXSPEED_SET = 2 << 2; 00055 const int VTYPEPARS_PROBABILITY_SET = 2 << 3; 00056 const int VTYPEPARS_SPEEDFACTOR_SET = 2 << 4; 00057 const int VTYPEPARS_SPEEDDEVIATION_SET = 2 << 5; 00058 const int VTYPEPARS_EMISSIONCLASS_SET = 2 << 6; 00059 const int VTYPEPARS_COLOR_SET = 2 << 7; 00060 const int VTYPEPARS_VEHICLECLASS_SET = 2 << 8; 00061 const int VTYPEPARS_WIDTH_SET = 2 << 9; 00062 const int VTYPEPARS_SHAPE_SET = 2 << 10; 00063 00064 00065 // =========================================================================== 00066 // struct definitions 00067 // =========================================================================== 00072 class SUMOVTypeParameter { 00073 public: 00078 SUMOVTypeParameter() ; 00079 00080 00085 bool wasSet(int what) const { 00086 return (setParameter & what) != 0; 00087 } 00088 00089 00095 void write(OutputDevice& dev) const; 00096 00099 void validateCFParameter() const ; 00100 00101 00103 std::string id; 00104 00106 SUMOReal length; 00108 SUMOReal minGap; 00110 SUMOReal maxSpeed; 00112 SUMOReal defaultProbability; 00114 SUMOReal speedFactor; 00116 SUMOReal speedDev; 00118 SUMOEmissionClass emissionClass; 00120 RGBColor color; 00122 SUMOVehicleClass vehicleClass; 00123 00124 00127 00129 SUMOReal width; 00130 00132 SUMOVehicleShape shape; 00134 00135 00137 SumoXMLTag cfModel; 00138 00140 typedef std::map<SumoXMLAttr, SUMOReal> CFParams; 00141 CFParams cfParameter; 00142 00144 std::string lcModel; 00145 00147 int setParameter; 00148 00149 00151 mutable bool saved; 00152 00154 mutable bool onlyReferenced; 00155 00156 }; 00157 00158 #endif 00159 00160 /****************************************************************************/ 00161