SUMO - Simulation of Urban MObility
AGWorkAndSchool.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 /****************************************************************************/
7 //
8 // This program and the accompanying materials
9 // are made available under the terms of the Eclipse Public License v2.0
10 // which accompanies this distribution, and is available at
11 // http://www.eclipse.org/legal/epl-v20.html
12 //
13 /****************************************************************************/
21 // Generates trips to work and to school
22 /****************************************************************************/
23 #ifndef AGWORKANDSCHOOL_H
24 #define AGWORKANDSCHOOL_H
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include "../city/AGHousehold.h"
37 #include "../city/AGPosition.h"
38 #include "AGActivity.h"
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
44 class AGWorkAndSchool : public AGActivity {
45 public:
46  AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
47  AGActivity(hh, das, prevTrips, 1) {};
48 
52  bool generateTrips();
53 
57  //void buildDestinations();
59  void buildWorkDestinations();
60 
65  void carAllocation();
66 
70  bool carsToTrips();
71 
75  bool isThereUnusedCar();
76 
83 
89 
93  void generateListTrips();
94 
100 
106  std::string getUnusedCar();
107 
108 private:
114  //std::list<Position> childrenCarAccompaniment;
119  //std::list<Position> adultCarAccompaniment;
120  std::list<AGAdult> adultNeedingCarAccompaniment;
125  //std::list<Position> workDestinations;
126  std::list<AGAdult> workingPeoplePossCar;
130  //std::list<Position> carDestinations;
131  std::list<AGAdult> personsDrivingCars;
136  std::list<AGAdult> notNeedingDrivers;
141  std::list<AGTrip> tempAccTrip;
142  std::list<AGTrip> tempTrip;
143 };
144 
145 #endif
146 
147 /****************************************************************************/
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()