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 /****************************************************************************/
18 // Generates trips to work and to school
19 /****************************************************************************/
20 #ifndef AGWORKANDSCHOOL_H
21 #define AGWORKANDSCHOOL_H
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include "../city/AGHousehold.h"
30 #include "../city/AGPosition.h"
31 #include "AGActivity.h"
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
37 class AGWorkAndSchool : public AGActivity {
38 public:
39  AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
40  AGActivity(hh, das, prevTrips, 1) {};
41 
45  bool generateTrips();
46 
50  //void buildDestinations();
52  void buildWorkDestinations();
53 
58  void carAllocation();
59 
63  bool carsToTrips();
64 
68  bool isThereUnusedCar();
69 
76 
82 
86  void generateListTrips();
87 
93 
99  std::string getUnusedCar();
100 
101 private:
107  //std::list<Position> childrenCarAccompaniment;
112  //std::list<Position> adultCarAccompaniment;
113  std::list<AGAdult> adultNeedingCarAccompaniment;
118  //std::list<Position> workDestinations;
119  std::list<AGAdult> workingPeoplePossCar;
123  //std::list<Position> carDestinations;
124  std::list<AGAdult> personsDrivingCars;
129  std::list<AGAdult> notNeedingDrivers;
134  std::list<AGTrip> tempAccTrip;
135  std::list<AGTrip> tempTrip;
136 };
137 
138 #endif
139 
140 /****************************************************************************/
AGHousehold
Definition: AGHousehold.h:51
AGWorkAndSchool
Definition: AGWorkAndSchool.h:37
AGWorkAndSchool::adultNeedingCarAccompaniment
std::list< AGAdult > adultNeedingCarAccompaniment
Definition: AGWorkAndSchool.h:113
AGWorkAndSchool::getUnusedCar
std::string getUnusedCar()
Definition: AGWorkAndSchool.cpp:351
AGWorkAndSchool::makePossibleDriversDrive
void makePossibleDriversDrive()
Definition: AGWorkAndSchool.cpp:372
AGWorkAndSchool::generateTrips
bool generateTrips()
Definition: AGWorkAndSchool.cpp:42
AGWorkAndSchool::tempAccTrip
std::list< AGTrip > tempAccTrip
Definition: AGWorkAndSchool.h:134
AGWorkAndSchool::workingPeoplePossCar
std::list< AGAdult > workingPeoplePossCar
Definition: AGWorkAndSchool.h:119
AGDataAndStatistics
Definition: AGDataAndStatistics.h:40
AGWorkAndSchool::personsDrivingCars
std::list< AGAdult > personsDrivingCars
Definition: AGWorkAndSchool.h:124
AGWorkAndSchool::generateListTrips
void generateListTrips()
Definition: AGWorkAndSchool.cpp:269
AGWorkAndSchool::carAllocation
void carAllocation()
Definition: AGWorkAndSchool.cpp:122
AGWorkAndSchool::notNeedingDrivers
std::list< AGAdult > notNeedingDrivers
Definition: AGWorkAndSchool.h:129
AGActivity
Definition: AGActivity.h:44
AGWorkAndSchool::checkAndBuildTripConsistancy
bool checkAndBuildTripConsistancy()
Definition: AGWorkAndSchool.cpp:201
AGWorkAndSchool::buildChildrenAccompaniment
void buildChildrenAccompaniment()
Definition: AGWorkAndSchool.cpp:75
AGWorkAndSchool::childrenNeedingCarAccompaniment
std::list< AGChild > childrenNeedingCarAccompaniment
Definition: AGWorkAndSchool.h:108
AGActivity.h
config.h
AGWorkAndSchool::carsToTrips
bool carsToTrips()
Definition: AGWorkAndSchool.cpp:153
AGWorkAndSchool::checkDriversScheduleMatching
bool checkDriversScheduleMatching()
Definition: AGWorkAndSchool.cpp:242
AGWorkAndSchool::tempTrip
std::list< AGTrip > tempTrip
Definition: AGWorkAndSchool.h:135
AGWorkAndSchool::isThereUnusedCar
bool isThereUnusedCar()
Definition: AGWorkAndSchool.cpp:196
AGWorkAndSchool::AGWorkAndSchool
AGWorkAndSchool(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips)
Definition: AGWorkAndSchool.h:39
AGWorkAndSchool::buildWorkDestinations
void buildWorkDestinations()
Definition: AGWorkAndSchool.cpp:88