Path: blob/main/src/activitygen/activities/AGActivities.h
169678 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-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 AGActivities.h16/// @author Piotr Woznica17/// @author Daniel Krajzewicz18/// @author Walter Bamberger19/// @date July 201020///21// Main class that manages activities taken in account and generates the22// inhabitants' trip list.23/****************************************************************************/24#pragma once25#include <config.h>2627#include <list>28#include "AGTrip.h"29#include <activitygen/city/AGCity.h>30#include <activitygen/city/AGBusLine.h>31#include <activitygen/city/AGHousehold.h>323334// ===========================================================================35// class definitions36// ===========================================================================37class AGActivities {38public:39AGActivities(AGCity* city, int days) :40myCity(city),41nbrDays(days) {};42void addTrip(AGTrip t, std::list<AGTrip>* tripSet);43void addTrips(std::list<AGTrip> t, std::list<AGTrip>* tripSet);44void generateActivityTrips();4546/**47* trips contains trips as well for one day as for every day,48* these trips will be regenerated with small variations49* by ActivityGen at the end of the simulation50* before generating the trip file51*/52std::list<AGTrip> trips;5354private:55bool generateTrips(AGHousehold& hh);56bool generateBusTraffic(AGBusLine bl);57bool generateInOutTraffic();58bool generateRandomTraffic();5960/**61* generates car names, given the unique (number, prefix)62*/63std::string generateName(int i, std::string prefix);6465AGCity* myCity;6667int nbrDays;6869};707172