SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AGWorkAndSchool.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Generates trips to work and to school
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2013 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 AGWORKANDSCHOOL_H
25 #define AGWORKANDSCHOOL_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 "../city/AGHousehold.h"
38 #include "../city/AGPosition.h"
39 #include "AGActivity.h"
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
45 class AGWorkAndSchool : public AGActivity {
46 public:
47  AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
48  AGActivity(hh, das, prevTrips, 1) {};
49 
53  bool generateTrips();
54 
58  //void buildDestinations();
60  void buildWorkDestinations();
61 
66  void carAllocation();
67 
71  bool carsToTrips();
72 
76  bool isThereUnusedCar();
77 
84 
90 
94  void generateListTrips();
95 
101 
107  std::string getUnusedCar();
108 
109 private:
115  //std::list<Position> childrenCarAccompaniment;
120  //std::list<Position> adultCarAccompaniment;
121  std::list<AGAdult> adultNeedingCarAccompaniment;
126  //std::list<Position> workDestinations;
127  std::list<AGAdult> workingPeoplePossCar;
131  //std::list<Position> carDestinations;
132  std::list<AGAdult> personsDrivingCars;
137  std::list<AGAdult> notNeedingDrivers;
142  std::list<AGTrip> tempAccTrip;
143  std::list<AGTrip> tempTrip;
144 };
145 
146 #endif
147 
148 /****************************************************************************/
AGWorkAndSchool(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips)
void makePossibleDriversDrive()
std::list< AGAdult > notNeedingDrivers
std::list< AGTrip > tempAccTrip
std::list< AGAdult > adultNeedingCarAccompaniment
std::list< AGAdult > personsDrivingCars
bool checkDriversScheduleMatching()
std::list< AGAdult > workingPeoplePossCar
std::list< AGChild > childrenNeedingCarAccompaniment
std::list< AGTrip > tempTrip
void buildChildrenAccompaniment()
void buildWorkDestinations()
std::string getUnusedCar()
bool checkAndBuildTripConsistancy()