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
MSPModel_NonInteracting.h
Go to the documentation of this file.
1
/****************************************************************************/
7
// The pedestrian following model (prototype)
8
/****************************************************************************/
9
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10
// Copyright (C) 2014-2014 DLR (http://www.dlr.de/) and contributors
11
/****************************************************************************/
12
//
13
// This file is part of SUMO.
14
// SUMO is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU General Public License as published by
16
// the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
/****************************************************************************/
20
#ifndef MSPModel_NonInteracting_h
21
#define MSPModel_NonInteracting_h
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 <string>
33
#include <limits>
34
#include <
utils/common/SUMOTime.h
>
35
#include <
utils/common/Command.h
>
36
#include <
microsim/MSPerson.h
>
37
#include <
microsim/MSPModel.h
>
38
39
// ===========================================================================
40
// class declarations
41
// ===========================================================================
42
class
MSNet
;
43
class
MSLink
;
44
class
MSLane
;
45
class
MSJunction
;
46
47
48
// ===========================================================================
49
// class definitions
50
// ===========================================================================
56
class
MSPModel_NonInteracting
:
public
MSPModel
{
57
public
:
58
60
MSPModel_NonInteracting
(
const
OptionsCont
& oc,
MSNet
* net);
61
62
~MSPModel_NonInteracting
();
63
65
PedestrianState
*
add
(
MSPerson
* person,
MSPerson::MSPersonStage_Walking
* stage,
SUMOTime
now);
66
68
bool
blockedAtDist
(
const
MSLane
* lane,
SUMOReal
distToCrossing, std::vector<const MSPerson*>* collectBlockers);
69
70
private
:
71
class
MoveToNextEdge
:
public
Command
{
72
public
:
73
MoveToNextEdge
(
MSPerson
* person,
MSPerson::MSPersonStage_Walking
& walk) :
myParent
(walk),
myPerson
(person) {}
74
~MoveToNextEdge
() {}
75
SUMOTime
execute
(
SUMOTime
currentTime);
76
77
private
:
78
MSPerson::MSPersonStage_Walking
&
myParent
;
79
MSPerson
*
myPerson
;
80
private
:
82
MoveToNextEdge
&
operator=
(
const
MoveToNextEdge
&);
83
};
84
86
class
PState
:
public
PedestrianState
{
87
public
:
88
PState
() {};
89
92
SUMOReal
getEdgePos
(
const
MSPerson::MSPersonStage_Walking
& stage,
SUMOTime
now)
const
;
93
Position
getPosition
(
const
MSPerson::MSPersonStage_Walking
& stage,
SUMOTime
now)
const
;
94
SUMOReal
getAngle
(
const
MSPerson::MSPersonStage_Walking
& stage,
SUMOTime
now)
const
;
95
SUMOTime
getWaitingTime
(
const
MSPerson::MSPersonStage_Walking
& stage,
SUMOTime
now)
const
;
96
SUMOReal
getSpeed
(
const
MSPerson::MSPersonStage_Walking
& stage)
const
;
98
100
SUMOTime
computeWalkingTime
(
const
MSEdge
* prev,
const
MSPerson::MSPersonStage_Walking
& stage,
SUMOTime
currentTime);
101
102
103
private
:
104
SUMOTime
myLastEntryTime
;
105
SUMOTime
myCurrentDuration
;
106
SUMOReal
myCurrentBeginPos
;
107
SUMOReal
myCurrentEndPos
;
108
109
};
110
111
private
:
113
MSNet
*
myNet
;
114
115
};
116
117
118
#endif
/* MSPModel_NonInteracting_h */
119
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
MSPModel_NonInteracting.h
Generated on Thu Nov 20 2014 19:49:55 for SUMO - Simulation of Urban MObility by
1.8.1.2