SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SUMOVehicleParameter.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Structure representing possible vehicle parameter
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef SUMOVehicleParameter_h
24 #define SUMOVehicleParameter_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include "SUMOVehicleClass.h"
38 #include "RGBColor.h"
39 #include "SUMOTime.h"
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class OutputDevice;
46 class OptionsCont;
47 
48 // ===========================================================================
49 // value definitions
50 // ===========================================================================
51 const int VEHPARS_COLOR_SET = 1;
52 const int VEHPARS_VTYPE_SET = 2;
53 const int VEHPARS_DEPARTLANE_SET = 2 << 2;
54 const int VEHPARS_DEPARTPOS_SET = 2 << 3;
55 const int VEHPARS_DEPARTSPEED_SET = 2 << 4;
56 const int VEHPARS_PERIODNUM_SET = 2 << 5;
57 const int VEHPARS_PERIODFREQ_SET = 2 << 6;
58 const int VEHPARS_ROUTE_SET = 2 << 7;
59 const int VEHPARS_ARRIVALLANE_SET = 2 << 8;
60 const int VEHPARS_ARRIVALPOS_SET = 2 << 9;
61 const int VEHPARS_ARRIVALSPEED_SET = 2 << 10;
62 const int VEHPARS_LINE_SET = 2 << 11;
63 const int VEHPARS_TAZ_SET = 2 << 12;
64 const int VEHPARS_FORCE_REROUTE = 2 << 13;
65 
66 const int STOP_INDEX_END = -1;
67 const int STOP_INDEX_FIT = -2;
68 
69 
70 // ===========================================================================
71 // enum definitions
72 // ===========================================================================
86 };
87 
88 
108 };
109 
110 
136 };
137 
138 
154 };
155 
156 
170 };
171 
172 
188 };
189 
190 
204 };
205 
206 
207 // ===========================================================================
208 // struct definitions
209 // ===========================================================================
221 public:
227 
228 
233  bool wasSet(int what) const {
234  return (setParameter & what) != 0;
235  }
236 
237 
245  void writeAs(const std::string& xmlElem, OutputDevice& dev,
246  const OptionsCont& oc) const;
247 
248 
254  bool defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const ;
255 
256 
257 
260 
265  static bool departlaneValidate(const std::string& val) ;
266 
267 
272  static bool departposValidate(const std::string& val) ;
273 
274 
279  static bool departspeedValidate(const std::string& val) ;
280 
281 
286  static bool arrivallaneValidate(const std::string& val) ;
287 
288 
293  static bool arrivalposValidate(const std::string& val) ;
294 
295 
300  static bool arrivalspeedValidate(const std::string& val) ;
302 
303 
304 
306  std::string id;
307 
309  std::string routeid;
311  std::string vtypeid;
313  mutable RGBColor color;
314 
315 
318 
336 
337 
340 
354 
355 
358 
364 #ifdef HAVE_SUBSECOND_TIMESTEPS
366 #else
368 #endif
369 
370 
371 
373  std::string line;
374 
376  std::string fromTaz;
377 
379  std::string toTaz;
380 
384  struct Stop {
386  std::string lane;
388  std::string busstop;
398  bool triggered;
400  bool parking;
402  int index;
403  };
404 
406  std::vector<Stop> stops;
407 
410 
411 };
412 
413 #endif
414 
415 /****************************************************************************/
416