Eclipse SUMO - Simulation of Urban MObility
AGActivityGen.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2010-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 /****************************************************************************/
23 // Main class that handles City, Activities and Trips
24 /****************************************************************************/
25 #pragma once
26 #include <config.h>
27 
28 #include "city/AGCity.h"
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class OutputDevice;
35 class RONet;
36 class AGTrip;
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
47 public:
48  //AGActivityGen() {};
55  AGActivityGen(std::string input, OutputDevice& output, RONet* net) :
56  inputFile(input),
57  outputFile(output),
58  net(net),
59  //activities(),
60  city(net) {};
66  void importInfoCity();
67 
81  void makeActivityTrips(int days = 1, int beginTime = 0, int endTime = 0);
82 
83 protected:
84  // @brief xml file statistics on the city and generated routes
85  std::string inputFile;
88  // @brief network of the city
90  //Activities activities;
91  // @brief city object containing all households and vehicles
93  // @brief time of beginning and ending of the simulation and the duration of the simulation in days (min 1 day (beginning and end in the same day)
95 
104  bool timeTripValidation(const AGTrip& trip) const;
110  void generateOutputFile(std::list<AGTrip>& trips);
116  void varDepTime(AGTrip& trip) const;
117 
118 private:
121 };
Central object handling City, Activities and Trips.
Definition: AGActivityGen.h:46
AGActivityGen(std::string input, OutputDevice &output, RONet *net)
Constructor.
Definition: AGActivityGen.h:55
bool timeTripValidation(const AGTrip &trip) const
validation: compatibility of the given trip
std::string inputFile
Definition: AGActivityGen.h:85
void generateOutputFile(std::list< AGTrip > &trips)
generate the output file (trips or routes) using a trip list
AGActivityGen & operator=(const AGActivityGen &)
invalidated assignment operator
void importInfoCity()
build the internal city
void varDepTime(AGTrip &trip) const
OutputDevice & outputFile
The generated routes.
Definition: AGActivityGen.h:87
void makeActivityTrips(int days=1, int beginTime=0, int endTime=0)
build activities and trips of the population and generate routes
Definition: AGCity.h:50
Definition: AGTrip.h:38
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
The router's network representation.
Definition: RONet.h:62