Eclipse 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-2019 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 /****************************************************************************/
AGHousehold
Definition: AGHousehold.h:52
AGWorkAndSchool
Definition: AGWorkAndSchool.h:38
AGWorkAndSchool::adultNeedingCarAccompaniment
std::list< AGAdult > adultNeedingCarAccompaniment
Definition: AGWorkAndSchool.h:114
AGWorkAndSchool::getUnusedCar
std::string getUnusedCar()
Definition: AGWorkAndSchool.cpp:352
AGWorkAndSchool::makePossibleDriversDrive
void makePossibleDriversDrive()
Definition: AGWorkAndSchool.cpp:373
AGWorkAndSchool::generateTrips
bool generateTrips()
Definition: AGWorkAndSchool.cpp:43
AGWorkAndSchool::tempAccTrip
std::list< AGTrip > tempAccTrip
Definition: AGWorkAndSchool.h:135
AGWorkAndSchool::workingPeoplePossCar
std::list< AGAdult > workingPeoplePossCar
Definition: AGWorkAndSchool.h:120
AGDataAndStatistics
Definition: AGDataAndStatistics.h:41
AGWorkAndSchool::personsDrivingCars
std::list< AGAdult > personsDrivingCars
Definition: AGWorkAndSchool.h:125
AGWorkAndSchool::generateListTrips
void generateListTrips()
Definition: AGWorkAndSchool.cpp:270
AGWorkAndSchool::carAllocation
void carAllocation()
Definition: AGWorkAndSchool.cpp:123
AGWorkAndSchool::notNeedingDrivers
std::list< AGAdult > notNeedingDrivers
Definition: AGWorkAndSchool.h:130
AGActivity
Definition: AGActivity.h:45
AGWorkAndSchool::checkAndBuildTripConsistancy
bool checkAndBuildTripConsistancy()
Definition: AGWorkAndSchool.cpp:202
AGWorkAndSchool::buildChildrenAccompaniment
void buildChildrenAccompaniment()
Definition: AGWorkAndSchool.cpp:76
AGWorkAndSchool::childrenNeedingCarAccompaniment
std::list< AGChild > childrenNeedingCarAccompaniment
Definition: AGWorkAndSchool.h:109
AGActivity.h
config.h
AGWorkAndSchool::carsToTrips
bool carsToTrips()
Definition: AGWorkAndSchool.cpp:154
AGWorkAndSchool::checkDriversScheduleMatching
bool checkDriversScheduleMatching()
Definition: AGWorkAndSchool.cpp:243
AGWorkAndSchool::tempTrip
std::list< AGTrip > tempTrip
Definition: AGWorkAndSchool.h:136
AGWorkAndSchool::isThereUnusedCar
bool isThereUnusedCar()
Definition: AGWorkAndSchool.cpp:197
AGWorkAndSchool::AGWorkAndSchool
AGWorkAndSchool(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips)
Definition: AGWorkAndSchool.h:40
AGWorkAndSchool::buildWorkDestinations
void buildWorkDestinations()
Definition: AGWorkAndSchool.cpp:89