Bpp/Simulator
Urban_bus
Model
C++
 
 
DESCRIPTION
 

This module provides a simulation model for flows of customers in an urban bus network.

 
SOURCE FILES
 

This section allows you to access the C++ source files of the module.

 
PARENT MODULE
 

This module is part of Bpp/Simulator/Urban_bus.

 
INCLUDED FILES
 

The files listed below are included in the interface part of the module. So any module dependent of this module is also dependent of the files listed here.

  • <bpp/graph.hpp>

  • <bpp/simulation.hpp>

  • <bpp/statistics.hpp>

 
NEEDED FILES
 

The files listed below are needed by the implementation part of the module. But a module dependent of this module is not necessary dependent of the files listed here.

  • <jirk/bpp/graphic/arrowcomponent.hpp>

  • <jirk/bpp/graphic/imagecomponent.hpp>

  • <jirk/java/awt/color.hpp>

  • <jirk/java/lang/string.hpp>

  • <bpp/modules.hpp>

 
INTEGRATED NAMESPACES
 

The namespaces listed below are integrated in this module. That means any element declared in one of those namespaces can now be directly used by or from this module.

  • graph

  • simulation

  • statistics

 
ERRORS
 

Here are listed the errors that are supported or generated by the module. To use one of them, you do not have to specify the namespace of the module.

  • erInvalidBusLineNumber
    The bus line number is invalid.

  • erWrongBusLine
    The customer is affected to a wrong bus line.

 
FUNCTIONS
 

Here are listed the functions provided by the module. To use one of them, you have to specify the namespace of the module.

 
CLASSES
 

Here are listed the classes provided by the module. To use one of them, you have to specify the namespace of the module.

 
clBus
 
 
Declaration

class clBus : public clMobileObject

 
Description

Represents a bus in an urban network.

 
Types
  • type std_vector(clPath *) clTravel
    Type of the list of paths used by the bus.

 
Attributes
  • tyReal speed()
    Speed of the bus, i.e. the factor that is multiplied to the distance to get the time of travel of the bus. Reading and writing access.

  • clTravel travel()
    List of paths used by the bus. Reading and writing access.

  • tyCardinal lineNo()
    Number of the line the bus is serving. Reading access only.

  • tyCardinal size()
    Size of the bus, i.e. maximum number of customers inside the bus. Reading access only.

 
Methods
 
clCustomerMove
 
 
Declaration

class clCustomerMove

 
Description

Represents a move of a customer, i.e. which path and means it is using to move.

 
Types
  • enumeration { feet, bus } tyMeans
    Type of the means the customer can use.

  • type clStillObject * tySpot
    Type of the spots that the customer can cross and/or stay on.

  • type clPath * tyPath
    Type of the paths the customer can use.

 
Attributes
  • tyMeans means()
    Means used to move. Reading and writing access.

  • tyCardinal lineNo()
    If the means is a bus, the number of the line of this bus. Reading and writing access.

  • tySpot entry()
    If the means is a bus, the spot where the customer moves in the bus. Reading and writing access.

  • tyCardinal entryNo()
    If the means is a bus, the number of the spot where the customer moves in the bus. Reading and writing access.

  • tyReal travelTime()
    If the means is a bus, the time of travel. Reading and writing access.

  • tySpot exit()
    If the means is a bus, the spot where the customer moves out of the bus. Reading and writing access.

  • tyCardinal exitNo()
    If the means is a bus, the number of the spot where the customer moves out of the bus. Reading and writing access.

  • tyPath path()
    If the means is its feet, the path the customer must use. Reading and writing access.

  • tyCardinal pathNo()
    If the means is its feet, the number of the path the customer must use. Reading and writing access.

 
Methods
 
clCustomerTravel
 
 
Declaration

class clCustomerTravel

 
Description

Represents a travel of a customer, i.e. a list of consecutive moves.

 
Types
  • type std_vector(clCustomerMove) clMoveS
    Type of the list of moves.

  • type clPhysicalObject * tySource
    Type of the source spot of the travel.

 
Attributes
  • tySource source()
    Spot where the customer starts the travel. Reading and writing access.

  • clMoveS moves()
    List of moves that describes the travel. Reading and writing access.

  • tyCardinal number()
    Number of the travel. Reading and writing access.

  • tyReal minimumTime()
    Minimum time the customer can possibly take to make the whole travel. Reading and writing access.

  • tyReal maximumTime()
    Maximum time the customer can possibly take to make the whole travel. Reading and writing access.

  • clVarianceCollector effectiveTime()
    Statistical collector for the effective time the customer takes to make the whole travel. Reading and writing access.

 
Methods
 
clCustomer
 
 
Declaration

class clCustomer : public clMobileObject

 
Description

Represents a customer in an urban network.

 
Attributes
  • tyCardinal creationDate()
    Date of creation of the object. Reading access only.

  • tyReal speed()
    Speed of the customer, i.e. the factor that is multiplied to the distance to get the time of travel of the customer. Reading and writing access.

 
Methods
 
clCustomerFactory
 
 
Declaration

class clCustomerFactory : public clStillObject

 
Description

Represents a factory of customers. According to an exponential distribution, it creates customers that follow a specific travel.

 
Methods
 
clSpot
 
 
Declaration

class clSpot : public clStillObject

 
Description

Represents a spot in an urban network.

 
Attributes
  • tyReal positionX()
    X coordinate of the spot. Reading access only.

  • tyReal positionY()
    Y coordinate of the spot. Reading access only.

  • clVarianceCollector waitingTime()
    Statistical collector for the waiting time of the customers at the spot. Reading access only.

 
Methods
 
clModel
 
 
Declaration

class clModel : public clSimulator

 
Description

Represents a simulation model for flows of customers in an urban bus network.

 
Types
  • type clGraph<clNoData,clLocationData> clStreetGraph
    Type of the graph that represents the streets of the urban network.

 
Methods
 
 
Copyright (c) 1999-2016 - Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. See this license for more details (http://www.gnu.org).