SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODDistrict.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // A district (origin/destination)
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2002-2014 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ODDistrict_h
22 #define ODDistrict_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <string>
36 #include <utility>
37 #include <utils/common/Named.h>
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
52 class ODDistrict : public Named {
53 public:
58  ODDistrict(const std::string& id);
59 
60 
62  ~ODDistrict();
63 
64 
78  void addSource(const std::string& id, SUMOReal weight);
79 
80 
94  void addSink(const std::string& id, SUMOReal weight);
95 
96 
105  std::string getRandomSource() const;
106 
107 
116  std::string getRandomSink() const;
117 
118 
123  unsigned int sinkNumber() const;
124 
125 
130  unsigned int sourceNumber() const;
131 
132 
133 private:
136 
139 
140 
141 private:
143  ODDistrict(const ODDistrict& s);
144 
146  ODDistrict& operator=(const ODDistrict& s);
147 
148 
149 };
150 
151 
152 #endif
153 
154 /****************************************************************************/
155