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-2018 German Aerospace Center (DLR) and others.
4 // activitygen module
5 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 // SPDX-License-Identifier: EPL-2.0
11 /****************************************************************************/
19 // Generates trips to work and to school
20 /****************************************************************************/
21 #ifndef AGWORKANDSCHOOL_H
22 #define AGWORKANDSCHOOL_H
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #include <config.h>
29 
30 #include "../city/AGHousehold.h"
31 #include "../city/AGPosition.h"
32 #include "AGActivity.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
38 class AGWorkAndSchool : public AGActivity {
39 public:
40  AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
41  AGActivity(hh, das, prevTrips, 1) {};
42 
46  bool generateTrips();
47 
51  //void buildDestinations();
53  void buildWorkDestinations();
54 
59  void carAllocation();
60 
64  bool carsToTrips();
65 
69  bool isThereUnusedCar();
70 
77 
83 
87  void generateListTrips();
88 
94 
100  std::string getUnusedCar();
101 
102 private:
108  //std::list<Position> childrenCarAccompaniment;
113  //std::list<Position> adultCarAccompaniment;
114  std::list<AGAdult> adultNeedingCarAccompaniment;
119  //std::list<Position> workDestinations;
120  std::list<AGAdult> workingPeoplePossCar;
124  //std::list<Position> carDestinations;
125  std::list<AGAdult> personsDrivingCars;
130  std::list<AGAdult> notNeedingDrivers;
135  std::list<AGTrip> tempAccTrip;
136  std::list<AGTrip> tempTrip;
137 };
138 
139 #endif
140 
141 /****************************************************************************/
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()