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
/****************************************************************************/
10
// A household contains the people and cars of the city: roughly represents
11
// families with their address, cars, adults and possibly children
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 HOUSEHOLD_H
27
#define HOUSEHOLD_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 <iostream>
40
#include <list>
41
#include "
AGPerson.h
"
42
#include "
AGAdult.h
"
43
#include "
AGChild.h
"
44
#include "
AGCar.h
"
45
#include "
AGStreet.h
"
46
#include "
AGPosition.h
"
47
#include "
AGCity.h
"
48
49
50
// ===========================================================================
51
// class declarations
52
// ===========================================================================
53
class
AGCity
;
54
55
56
// ===========================================================================
57
// class definitions
58
// ===========================================================================
59
class
AGHousehold
{
60
public
:
61
AGHousehold
(
AGPosition
pos,
AGCity
* city,
int
idHouseholds) :
62
myCity
(city),
63
myLocation
(pos),
64
myId
(idHouseholds) {};
65
AGHousehold
(
AGStreet
* str,
AGCity
* city,
int
idHouseholds) :
66
myCity
(city),
67
myLocation
(*str),
68
myId
(idHouseholds) {};
72
void
generatePeople
(
int
numAdults,
int
numChilds,
bool
firstRetired);
73
unsigned
int
getPeopleNbr
();
74
unsigned
int
getAdultNbr
();
75
const
std::list<AGAdult>&
getAdults
()
const
;
76
const
std::list<AGChild>&
getChildren
()
const
;
77
const
std::list<AGCar>&
getCars
()
const
;
81
bool
isCloseFromPubTransport
(std::list<AGPosition>* pubTransport);
82
bool
isCloseFromPubTransport
(std::map<int, AGPosition>* pubTransport);
90
void
regenerate
();
95
bool
allocateChildrenSchool
();
100
bool
allocateAdultsWork
();
104
void
generateCars
(
SUMOReal
rate);
105
int
getCarNbr
();
109
void
addACar
();
113
AGCity
*
getTheCity
();
117
bool
retiredHouseholders
();
121
AGPosition
getPosition
();
122
123
private
:
124
AGCity
*
myCity
;
125
AGPosition
myLocation
;
126
int
myNumberOfCars
;
127
int
myId
;
128
129
private
:
130
std::list<AGAdult>
myAdults
;
131
std::list<AGChild>
myChildren
;
132
std::list<AGCar>
myCars
;
133
};
134
135
#endif
136
137
/****************************************************************************/
tmp
buildd
sumo-0.21.0+dfsg
src
activitygen
city
AGHousehold.h
Generated on Thu Nov 20 2014 19:49:52 for SUMO - Simulation of Urban MObility by
1.8.1.2