SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
NIVissimExtendedEdgePoint.cpp
Go to the documentation of this file.
1
/****************************************************************************/
8
// -------------------
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2013 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
22
23
// ===========================================================================
24
// included modules
25
// ===========================================================================
26
#ifdef _MSC_VER
27
#include <
windows_config.h
>
28
#else
29
#include <
config.h
>
30
#endif
31
32
#include <
utils/common/VectorHelper.h
>
33
#include <
netbuild/NBEdge.h
>
34
#include "
NIVissimExtendedEdgePoint.h
"
35
#include "
NIVissimEdge.h
"
36
37
#ifdef CHECK_MEMORY_LEAKS
38
#include <
foreign/nvwa/debug_new.h
>
39
#endif // CHECK_MEMORY_LEAKS
40
41
42
// ===========================================================================
43
// method definitions
44
// ===========================================================================
45
NIVissimExtendedEdgePoint::NIVissimExtendedEdgePoint
(
46
int
edgeid,
const
std::vector<int>& lanes,
SUMOReal
position,
47
const
std::vector<int>& assignedVehicles)
48
: myEdgeID(edgeid), myLanes(lanes), myPosition(position),
49
myAssignedVehicles(assignedVehicles) {}
50
51
52
NIVissimExtendedEdgePoint::~NIVissimExtendedEdgePoint
() {}
53
54
55
int
56
NIVissimExtendedEdgePoint::getEdgeID
()
const
{
57
return
myEdgeID
;
58
}
59
60
61
SUMOReal
62
NIVissimExtendedEdgePoint::getPosition
()
const
{
63
return
myPosition
;
64
}
65
66
67
Position
68
NIVissimExtendedEdgePoint::getGeomPosition
()
const
{
69
return
70
NIVissimAbstractEdge::dictionary
(
myEdgeID
)->getGeomPosition(
myPosition
);
71
}
72
73
74
const
std::vector<int>&
75
NIVissimExtendedEdgePoint::getLanes
()
const
{
76
return
myLanes
;
77
}
78
79
80
void
81
NIVissimExtendedEdgePoint::recheckLanes
(
const
NBEdge
*
const
edge) {
82
// check whether an "all" indicator is there
83
bool
hadAll =
false
;
84
for
(std::vector<int>::const_iterator i =
myLanes
.begin(); !hadAll && i !=
myLanes
.end(); ++i) {
85
if
((*i) == -1) {
86
hadAll =
true
;
87
}
88
}
89
// no -> return
90
if
(!hadAll) {
91
return
;
92
}
93
// patch lane indices
94
myLanes
.clear();
95
for
(
int
i = 0; i < (
int
) edge->
getNumLanes
(); ++i) {
96
myLanes
.push_back(i);
97
}
98
}
99
100
101
/****************************************************************************/
102
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
netimport
vissim
tempstructs
NIVissimExtendedEdgePoint.cpp
Generated on Sun Jun 16 2013 07:08:03 for SUMO - Simulation of Urban MObility by
1.8.1.2