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
AGActivity.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Parent object for all activities. Derived classes generate trips for each
10
// household.
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
14
// activitygen module
15
// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
16
/****************************************************************************/
17
//
18
// This file is part of SUMO.
19
// SUMO is free software: you can redistribute it and/or modify
20
// it under the terms of the GNU General Public License as published by
21
// the Free Software Foundation, either version 3 of the License, or
22
// (at your option) any later version.
23
//
24
/****************************************************************************/
25
#ifndef AGACTIVITY_H
26
#define AGACTIVITY_H
27
28
29
// ===========================================================================
30
// included modules
31
// ===========================================================================
32
#ifdef _MSC_VER
33
#include <
windows_config.h
>
34
#else
35
#include <
config.h
>
36
#endif
37
38
#include "
AGTrip.h
"
39
#include "../city/AGHousehold.h"
40
#include "../city/AGDataAndStatistics.h"
41
42
43
// ===========================================================================
44
// class definitions
45
// ===========================================================================
46
class
AGActivity
{
47
public
:
48
AGActivity
(
AGHousehold
* hh,
AGDataAndStatistics
* das, std::list<AGTrip>* prevTrips,
int
prio) :
49
myHousehold
(hh),
50
myStatData
(das),
51
myPreviousTrips
(prevTrips),
52
activityPriority
(prio),
53
genDone
(false),
54
timePerKm
(das->speedTimePerKm),
55
carPreference
(das->
carPreference
) {};
56
60
bool
isGenerated
();
61
66
virtual
bool
generateTrips
() = 0;
67
76
int
possibleTranspMean
(
AGPosition
destination);
77
87
int
availableTranspMeans
(
AGPosition
from,
AGPosition
to);
88
92
int
timeToDrive
(
AGPosition
from,
AGPosition
to);
93
98
int
depHour
(
AGPosition
from,
AGPosition
to,
int
arrival);
99
int
arrHour
(
AGPosition
from,
AGPosition
to,
int
departure);
100
104
int
randomTimeBetween
(
int
begin,
int
end);
105
106
std::list<AGTrip>&
getPartialActivityTrips
();
107
108
protected
:
109
AGHousehold
*
myHousehold
;
110
111
AGDataAndStatistics
*
myStatData
;
112
113
std::list<AGTrip>*
myPreviousTrips
;
114
std::list<AGTrip>
myPartialActivityTrips
;
115
int
activityPriority
;
116
bool
genDone
;
117
SUMOReal
timePerKm
;
121
SUMOReal
carPreference
;
122
123
};
124
125
#endif
126
127
/****************************************************************************/
build
buildd
sumo-0.17.1~dfsg
src
activitygen
activities
AGActivity.h
Generated on Sun Jun 16 2013 17:30:14 for SUMO - Simulation of Urban MObility by
1.8.3.1