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
AGTrip.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Class containing all information of a given trip (car, bus)
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13
// activitygen module
14
// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
15
/****************************************************************************/
16
//
17
// This file is part of SUMO.
18
// SUMO is free software: you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation, either version 3 of the License, or
21
// (at your option) any later version.
22
//
23
/****************************************************************************/
24
#ifndef AGTRIP_H
25
#define AGTRIP_H
26
27
28
// ===========================================================================
29
// included modules
30
// ===========================================================================
31
#ifdef _MSC_VER
32
#include <
windows_config.h
>
33
#else
34
#include <
config.h
>
35
#endif
36
37
#include <list>
38
#include "../city/AGPosition.h"
39
#include "../city/AGCar.h"
40
#include "../city/AGBus.h"
41
42
43
// ===========================================================================
44
// class definitions
45
// ===========================================================================
46
class
AGTrip
{
47
public
:
48
/*Trip() :
49
atTime(-1)
50
{};*/
51
AGTrip
(
AGPosition
from
,
AGPosition
to
,
int
at) :
//vehicle not specified
52
from(from),
53
to(to),
54
atTime
(at),
55
type
(
"default"
),
56
day
(0) {};
57
AGTrip
(
AGPosition
from
,
AGPosition
to
,
AGCar
c,
int
at) :
58
from(from),
59
to(to),
60
atTime
(at),
61
vehicle
(c.getName()),
62
type
(
"default"
),
63
day
(0) {};
64
AGTrip
(
AGPosition
from
,
AGPosition
to
,
AGBus
b,
int
at) :
65
from(from),
66
to(to),
67
atTime
(at),
68
vehicle
(b.getName()),
69
type
(
"bus"
),
70
day
(0) {};
71
AGTrip
(
AGPosition
from
,
AGPosition
to
, std::string v,
int
at) :
72
from(from),
73
to(to),
74
atTime
(at),
75
vehicle
(v),
76
type
(
"default"
),
77
day
(0) {};
78
AGTrip
(
AGPosition
from
,
AGPosition
to
, std::string v,
int
at,
int
day
) :
79
from(from),
80
to(to),
81
atTime
(at),
82
vehicle
(v),
83
type
(
"default"
),
84
day(day) {};
85
void
print
();
86
bool
operator<
(
AGTrip
& trip);
87
88
void
addLayOver
(
AGPosition
by);
89
void
addLayOver
(
AGTrip
& trip);
90
void
addLayOverWithoutDestination
(
AGTrip
& trip);
91
92
AGPosition
getDep
();
93
AGPosition
getArr
();
94
int
getTime
();
95
void
setDepTime
(
int
time);
96
std::string
getVehicleName
();
97
void
setVehicleName
(std::string name);
98
void
setArr
(
AGPosition
arrival);
99
void
setDep
(
AGPosition
departure);
100
int
getDay
();
101
void
setDay
(
int
day
);
102
std::string
getType
();
103
void
setType
(std::string
type
);
104
std::list<AGPosition>*
getPassed
();
105
111
int
getRideBackArrTime
(
SUMOReal
secPerKm);
116
int
getArrTime
(
SUMOReal
secPerKm);
122
int
getTimeTrip
(
SUMOReal
secPerKm);
127
int
estimateDepTime
(
int
arrTime,
SUMOReal
secPerKm);
131
bool
isDaily
();
132
133
private
:
134
int
atTime
;
135
AGPosition
from
;
136
AGPosition
to
;
137
std::string
vehicle
;
138
std::list<AGPosition>
passBy
;
143
int
day
;
148
std::string
type
;
149
};
150
151
#endif
152
153
/****************************************************************************/
tmp
buildd
sumo-0.15.0~dfsg
src
activitygen
activities
AGTrip.h
Generated on Sun May 27 2012 14:52:03 for SUMO - Simulation of Urban MObility by
1.8.1