SUMO - Simulation of Urban MObility
AGBusLine.h
Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Bus line of the city: contains all the buses of this line
00010 /****************************************************************************/
00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00013 // activitygen module
00014 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
00015 /****************************************************************************/
00016 //
00017 //   This file is part of SUMO.
00018 //   SUMO is free software: you can redistribute it and/or modify
00019 //   it under the terms of the GNU General Public License as published by
00020 //   the Free Software Foundation, either version 3 of the License, or
00021 //   (at your option) any later version.
00022 //
00023 /****************************************************************************/
00024 #ifndef AGBUSLINE_H
00025 #define AGBUSLINE_H
00026 
00027 
00028 // ===========================================================================
00029 // included modules
00030 // ===========================================================================
00031 #ifdef _MSC_VER
00032 #include <windows_config.h>
00033 #else
00034 #include <config.h>
00035 #endif
00036 
00037 #include <iostream>
00038 #include <string>
00039 #include <list>
00040 #include "AGBus.h"
00041 #include "AGPosition.h"
00042 #include "AGDataAndStatistics.h"
00043 
00044 
00045 // ===========================================================================
00046 // class definitions
00047 // ===========================================================================
00048 class AGBusLine {
00049 public:
00050     AGBusLine(std::string lineNr) :
00051         lineNumber(lineNr) {};
00052     void setMaxTripTime(int time);
00053     void setBusNames();
00054     int nbrBuses();
00055     void locateStation(AGPosition pos);
00056     void locateRevStation(AGPosition pos);
00057     void generateBuses(int start, int stop, int rate);
00058     void printBuses();
00059 
00060     std::list<AGPosition> stations;
00061     std::list<AGPosition> revStations;
00062     std::list<AGBus> buses;
00063     std::list<AGBus> revBuses;
00064 
00065 private:
00069     std::string createName();
00070 
00075     int getReady(int time);
00076 
00077     std::string lineNumber;
00078     int maxTripTime;
00079     int busNbr;
00080 };
00081 
00082 #endif
00083 
00084 /****************************************************************************/
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines