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