Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/od/ODCell.h
169667 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2002-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file ODCell.h
15
/// @author Peter Mieth
16
/// @author Daniel Krajzewicz
17
/// @author Yun-Pang Floetteroed
18
/// @date Sept 2002
19
///
20
// A single O/D-matrix cell
21
/****************************************************************************/
22
#pragma once
23
#include <config.h>
24
25
#include <vector>
26
#include <map>
27
#include <utils/common/SUMOTime.h>
28
#include <utils/vehicle/SUMOVehicleParameter.h>
29
30
31
// ===========================================================================
32
// class declarations
33
// ===========================================================================
34
class RORoute;
35
36
37
// ===========================================================================
38
// class definitions
39
// ===========================================================================
40
/**
41
* @struct ODCell
42
* @brief A single O/D-matrix cell
43
*
44
* A single cell within an O/D-matrix. Contains the information about the origin
45
* and destination via string-ids of the district, the begin and the end time
46
* for which this cell is valid, the id of the vehicle type to use, and the
47
* amount of vehicles to insert during the described interval.
48
*/
49
struct ODCell {
50
/// @brief The number of vehicles
51
double vehicleNumber;
52
53
/// @brief The begin time this cell describes
54
SUMOTime begin;
55
56
/// @brief The end time this cell describes
57
SUMOTime end;
58
59
/// @brief Name of the origin district
60
std::string origin;
61
62
/// @brief Name of the destination district
63
std::string destination;
64
65
/// @brief Name of the vehicle type
66
std::string vehicleType;
67
68
/// @brief the list of paths / routes
69
std::vector<RORoute*> pathsVector; // path_id, string of edges?
70
71
/// @brief mapping of departure times to departing vehicles, if already fixed
72
typedef std::map<SUMOTime, std::vector<SUMOVehicleParameter> > Departures;
73
Departures departures;
74
75
/// @brief the origin "district" is an edge id
76
bool originIsEdge = false;
77
78
/// @brief the destination "district" is an edge id
79
bool destinationIsEdge = false;
80
};
81
82