/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGCity.h16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @author Michael Behrisch20/// @date July 201021///22// City class that contains all other objects of the city: in particular23// streets, households, bus lines, work positions and schools24/****************************************************************************/25#pragma once26#include <config.h>2728#include <iostream>29#include <vector>30#include <list>31#include "AGPosition.h"32#include "AGDataAndStatistics.h"33#include "AGSchool.h"34#include "AGBusLine.h"35#include "AGWorkPosition.h"36#include "AGHousehold.h"373839// ===========================================================================40// class declarations41// ===========================================================================42class AGHousehold;43class RONet;444546// ===========================================================================47// class definitions48// ===========================================================================49class AGCity {50public:51AGCity(RONet* net) :52statData(AGDataAndStatistics::getDataAndStatistics()),53net(net),54streetsCompleted(false) {};5556/**57* generates streets: complete the "streets" vector using the DataAndStat's map edges.58*/59void completeStreets();60void generateWorkPositions();61void completeBusLines();62//void generateSchools();63void generatePopulation();64void schoolAllocation();65void workAllocation();66void carAllocation();6768/**69* manipulation functions70*/71const AGStreet& getStreet(const std::string& edge);72/**73* returns a random street74*/75const AGStreet& getRandomStreet();7677AGDataAndStatistics& statData;78std::vector<AGStreet*> streets;79std::vector<AGStreet*> passengerStreets;80std::vector<AGWorkPosition> workPositions;81std::list<AGSchool> schools;82std::list<AGBusLine> busLines;83std::list<AGHousehold> households;84std::vector<AGPosition> cityGates;85std::list<AGAdult> peopleIncoming;8687private:88AGSchool closestSchoolTo(AGPosition pos);89/**90* generates workpositions on the city's gates (entrances) for the outgoing work traffic.91*/92void generateOutgoingWP();93/**94* generates people from outside the city for incoming traffic generation95*/96void generateIncomingPopulation();9798// @brief network of the city99RONet* net;100/**101* false until the function completeStreets is called102* this function completes streets and turn this parameter to true103*/104bool streetsCompleted;105106int nbrCars;107108private:109/// @brief invalidated assignment operator110AGCity& operator=(const AGCity&);111};112113114