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.dev/sumo
3 // Copyright (C) 2001-2024 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 are made available under the
7 // terms of the Eclipse Public License 2.0 which is available at
8 // https://www.eclipse.org/legal/epl-2.0/
9 // This Source Code may also be made available under the following Secondary
10 // Licenses when the conditions for such availability set forth in the Eclipse
11 // Public License 2.0 are satisfied: GNU General Public License, version 2
12 // or later which is available at
13 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15 /****************************************************************************/
22 // Generates trips to work and to school
23 /****************************************************************************/
24 #pragma once
25 #include <config.h>
26 
29 #include "AGActivity.h"
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
35 class AGWorkAndSchool : public AGActivity {
36 public:
37  AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) :
38  AGActivity(hh, das, prevTrips, 1) {};
39 
43  bool generateTrips();
44 
48  //void buildDestinations();
50  void buildWorkDestinations();
51 
56  void carAllocation();
57 
61  bool carsToTrips();
62 
66  bool isThereUnusedCar();
67 
74 
80 
84  void generateListTrips();
85 
91 
97  std::string getUnusedCar();
98 
99 private:
105  //std::list<Position> childrenCarAccompaniment;
110  //std::list<Position> adultCarAccompaniment;
111  std::list<AGAdult> adultNeedingCarAccompaniment;
116  //std::list<Position> workDestinations;
117  std::list<AGAdult> workingPeoplePossCar;
121  //std::list<Position> carDestinations;
122  std::list<AGAdult> personsDrivingCars;
127  std::list<AGAdult> notNeedingDrivers;
132  std::list<AGTrip> tempAccTrip;
133  std::list<AGTrip> tempTrip;
134 };
std::list< AGAdult > personsDrivingCars
bool checkAndBuildTripConsistancy()
void buildWorkDestinations()
std::list< AGTrip > tempTrip
std::list< AGAdult > adultNeedingCarAccompaniment
std::list< AGAdult > notNeedingDrivers
std::list< AGTrip > tempAccTrip
std::list< AGAdult > workingPeoplePossCar
std::list< AGChild > childrenNeedingCarAccompaniment
void makePossibleDriversDrive()
AGWorkAndSchool(AGHousehold *hh, AGDataAndStatistics *das, std::list< AGTrip > *prevTrips)
bool checkDriversScheduleMatching()
void buildChildrenAccompaniment()
std::string getUnusedCar()