SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROLoader Class Reference

The data loader. More...

#include <ROLoader.h>

Data Structures

class  EdgeFloatTimeLineRetriever_EdgeTravelTime
 Obtains edge travel times from a weights handler and stores them within the edges. More...
 
class  EdgeFloatTimeLineRetriever_EdgeWeight
 Obtains edge weights from a weights handler and stores them within the edges. More...
 

Public Member Functions

virtual void loadNet (RONet &toFill, ROAbstractEdgeBuilder &eb)
 Loads the network. More...
 
bool loadWeights (RONet &net, const std::string &optionName, const std::string &measure, bool useLanes)
 Loads the net weights. More...
 
void openRoutes (RONet &net)
 Builds and opens all route loaders. More...
 
void processRoutes (SUMOTime start, SUMOTime end, RONet &net, SUMOAbstractRouter< ROEdge, ROVehicle > &router)
 Loads routes from all previously build route loaders. More...
 
 ROLoader (OptionsCont &oc, const bool emptyDestinationsAllowed, const bool logSteps)
 Constructor. More...
 
virtual ~ROLoader ()
 Destructor. More...
 

Protected Member Functions

bool openTypedRoutes (const std::string &optionName, RONet &net)
 Opens route handler of the given type. More...
 
void writeStats (SUMOTime time, SUMOTime start, int absNo)
 

Private Member Functions

ROLoaderoperator= (const ROLoader &src)
 Invalidated assignment operator. More...
 
 ROLoader (const ROLoader &src)
 Invalidated copy constructor. More...
 

Private Attributes

const bool myEmptyDestinationsAllowed
 Information whether empty destinations are allowed. More...
 
SUMORouteLoaderControl myLoaders
 List of route loaders. More...
 
const bool myLogSteps
 Information whether the routing steps should be logged. More...
 
OptionsContmyOptions
 Options to use. More...
 

Detailed Description

The data loader.

Loads the network and route descriptions using further classes.

Is capable to either load all routes in one step or go through them step wise.

Definition at line 62 of file ROLoader.h.

Constructor & Destructor Documentation

ROLoader::ROLoader ( OptionsCont oc,
const bool  emptyDestinationsAllowed,
const bool  logSteps 
)

Constructor.

Parameters
[in]ocThe options to use
[in]emptyDestinationsAllowedWhether trips may be given without destinations
Todo:
Recheck usage of emptyDestinationsAllowed

Definition at line 115 of file ROLoader.cpp.

ROLoader::~ROLoader ( )
virtual

Destructor.

Definition at line 123 of file ROLoader.cpp.

ROLoader::ROLoader ( const ROLoader src)
private

Invalidated copy constructor.

Member Function Documentation

bool ROLoader::loadWeights ( RONet net,
const std::string &  optionName,
const std::string &  measure,
bool  useLanes 
)
bool ROLoader::openTypedRoutes ( const std::string &  optionName,
RONet net 
)
protected

Opens route handler of the given type.

Checks whether the given option name is known, returns true if not (this means that everything's ok, though the according handler is not built).

Checks then whether the given option name is set and his value is one or a set of valid (existing) files. This is done via a call to "OptionsCont::isUsableFileList" (which generates a proper error message).

If the given files are valid, the proper instance(s) is built using "buildNamedHandler" and if this could be done, it is added to the list of route handlers to use ("myHandler")

Returns whether the wished handler(s) could be built.

Parameters
[in]optionNameThe name of the option that refers to which handler and which files shall be used
[in]netThe net to assign to the built handlers
Returns
Whether the wished handler(s) could be built

Definition at line 223 of file ROLoader.cpp.

References SUMORouteLoaderControl::add(), OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getStringVector(), OptionsCont::isSet(), OptionsCont::isUsableFileList(), myEmptyDestinationsAllowed, myLoaders, myOptions, and WRITE_ERROR.

Referenced by openRoutes().

ROLoader& ROLoader::operator= ( const ROLoader src)
private

Invalidated assignment operator.

void ROLoader::writeStats ( SUMOTime  time,
SUMOTime  start,
int  absNo 
)
protected

Definition at line 301 of file ROLoader.cpp.

References myLogSteps, SUMOReal, time2string(), and toString().

Referenced by processRoutes().

Field Documentation

const bool ROLoader::myEmptyDestinationsAllowed
private

Information whether empty destinations are allowed.

Definition at line 193 of file ROLoader.h.

Referenced by openTypedRoutes().

SUMORouteLoaderControl ROLoader::myLoaders
private

List of route loaders.

Definition at line 199 of file ROLoader.h.

Referenced by openRoutes(), openTypedRoutes(), and processRoutes().

const bool ROLoader::myLogSteps
private

Information whether the routing steps should be logged.

Definition at line 196 of file ROLoader.h.

Referenced by processRoutes(), and writeStats().

OptionsCont& ROLoader::myOptions
private

Options to use.

Definition at line 190 of file ROLoader.h.

Referenced by loadNet(), loadWeights(), openRoutes(), openTypedRoutes(), and processRoutes().


The documentation for this class was generated from the following files: