|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // Generates trips to work and to school 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00011 // activitygen module 00012 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) 00013 /****************************************************************************/ 00014 // 00015 // This program is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation; either version 2 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef AGWORKANDSCHOOL_H 00022 #define AGWORKANDSCHOOL_H 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include "../city/AGHousehold.h" 00035 #include "../city/AGPosition.h" 00036 #include "AGActivity.h" 00037 00038 00039 // =========================================================================== 00040 // class definitions 00041 // =========================================================================== 00042 class AGWorkAndSchool : public AGActivity { 00043 public: 00044 AGWorkAndSchool(AGHousehold* hh, AGDataAndStatistics* das, std::list<AGTrip>* prevTrips) : 00045 AGActivity(hh, das, prevTrips, 1) {}; 00046 00050 bool generateTrips(); 00051 00055 //void buildDestinations(); 00056 void buildChildrenAccompaniment(); 00057 void buildWorkDestinations(); 00058 00063 void carAllocation(); 00064 00068 bool carsToTrips(); 00069 00073 bool isThereUnusedCar(); 00074 00080 bool checkAndBuildTripConsistancy(); 00081 00086 bool checkDriversScheduleMatching(); 00087 00091 void generateListTrips(); 00092 00097 void makePossibleDriversDrive(); 00098 00104 std::string getUnusedCar(); 00105 00106 private: 00112 //std::list<Position> childrenCarAccompaniment; 00113 std::list<AGChild> childrenNeedingCarAccompaniment; 00117 //std::list<Position> adultCarAccompaniment; 00118 std::list<AGAdult> adultNeedingCarAccompaniment; 00123 //std::list<Position> workDestinations; 00124 std::list<AGAdult> workingPeoplePossCar; 00128 //std::list<Position> carDestinations; 00129 std::list<AGAdult> personsDrivingCars; 00134 std::list<AGAdult> notNeedingDrivers; 00139 std::list<AGTrip> tempAccTrip; 00140 std::list<AGTrip> tempTrip; 00141 }; 00142 00143 #endif 00144 00145 /****************************************************************************/