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
AGHousehold.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// A household contains the people and cars of the city: roughly represents
10
// families with their address, cars, adults and possibly children
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2012 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 HOUSEHOLD_H
26
#define HOUSEHOLD_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 <iostream>
39
#include <list>
40
#include "
AGPerson.h
"
41
#include "
AGAdult.h
"
42
#include "
AGChild.h
"
43
#include "
AGCar.h
"
44
#include "
AGStreet.h
"
45
#include "
AGPosition.h
"
46
#include "
AGCity.h
"
47
48
49
// ===========================================================================
50
// class declarations
51
// ===========================================================================
52
class
AGCity
;
53
54
55
// ===========================================================================
56
// class definitions
57
// ===========================================================================
58
class
AGHousehold
{
59
public
:
60
AGHousehold
(
AGPosition
pos,
AGCity
* city,
int
idHouseholds) :
61
location
(pos),
62
myCity
(city),
63
idHH
(idHouseholds) {};
64
AGHousehold
(
AGStreet
* str,
AGCity
* city,
int
idHouseholds) :
65
location
(*str),
66
myCity
(city),
67
idHH
(idHouseholds) {};
76
void
generatePeople
();
77
int
getPeopleNbr
();
78
int
getAdultNbr
();
82
bool
isCloseFromPubTransport
(std::list<AGPosition> *pubTransport);
83
bool
isCloseFromPubTransport
(std::map<int, AGPosition> *pubTransport);
91
void
regenerate
();
96
bool
allocateChildrenSchool
();
101
bool
allocateAdultsWork
();
105
void
generateCars
(
SUMOReal
rate);
106
int
getCarNbr
();
110
void
addACar
();
114
AGCity
*
getTheCity
();
118
bool
retiredHouseholders
();
122
AGPosition
getPosition
();
123
std::list<AGAdult>
adults
;
124
std::list<AGChild>
children
;
125
std::list<AGCar>
cars
;
126
127
private
:
128
129
bool
decisionProba
(
SUMOReal
p);
130
131
AGCity
*
myCity
;
132
AGPosition
location
;
133
int
numberOfPeople
;
134
int
numberOfCars
;
135
int
idHH
;
136
};
137
138
#endif
139
140
/****************************************************************************/
tmp
buildd
sumo-0.15.0~dfsg
src
activitygen
city
AGHousehold.h
Generated on Sun May 27 2012 14:52:03 for SUMO - Simulation of Urban MObility by
1.8.1