NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime Class Reference

#include <NLBuilder.h>

Inheritance diagram for NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime:

SAXWeightsHandler::EdgeFloatTimeLineRetriever

Detailed Description

Obtains edge efforts from a weights handler and stores them within the edges.

Obtains edge travel times from a weights handler and stores them within the edges.

See also:
SAXWeightsHandler::EdgeFloatTimeLineRetriever

Definition at line 175 of file NLBuilder.h.


Public Member Functions

void addEdgeWeight (const std::string &id, SUMOReal val, SUMOReal beg, SUMOReal end) const throw ()
 Adds a travel time for a given edge and time period.
 EdgeFloatTimeLineRetriever_EdgeTravelTime (MSNet &net) throw ()
 Constructor.
 ~EdgeFloatTimeLineRetriever_EdgeTravelTime () throw ()
 Destructor.

Private Attributes

MSNetmyNet
 The network edges shall be obtained from.

Constructor & Destructor Documentation

NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::EdgeFloatTimeLineRetriever_EdgeTravelTime ( MSNet net  )  throw () [inline]

Constructor.

Definition at line 178 of file NLBuilder.h.

00178 : myNet(net) {}

NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::~EdgeFloatTimeLineRetriever_EdgeTravelTime (  )  throw () [inline]

Destructor.

Definition at line 181 of file NLBuilder.h.

00181 { }


Member Function Documentation

void NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight ( const std::string &  id,
SUMOReal  val,
SUMOReal  beg,
SUMOReal  end 
) const throw () [virtual]

Adds a travel time for a given edge and time period.

Parameters:
[in] id The id of the object to add a weight for
[in] val The travel time
[in] beg The begin of the interval the weight is valid for
[in] end The end of the interval the weight is valid for
See also:
SAXWeightsHandler::EdgeFloatTimeLineRetriever::addEdgeWeight

Implements SAXWeightsHandler::EdgeFloatTimeLineRetriever.

Definition at line 91 of file NLBuilder.cpp.

References MSEdge::dictionary(), MsgHandler::getErrorInstance(), and MsgHandler::inform().

00092                                                                           {
00093     MSEdge *edge = MSEdge::dictionary(id);
00094     if (edge!=0) {
00095         myNet.getWeightsStorage().addTravelTime(edge, begTime, endTime, value);
00096     } else {
00097         MsgHandler::getErrorInstance()->inform("Trying to set the travel time for the unknown edge '" + id + "'.");
00098     }
00099 }


Field Documentation

The network edges shall be obtained from.

Definition at line 196 of file NLBuilder.h.


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

Generated on Wed May 5 00:06:56 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6