Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ODMatrix Class Reference

An O/D (origin/destination) matrix. More...

#include <ODMatrix.h>

Inheritance diagram for ODMatrix:
[legend]
Collaboration diagram for ODMatrix:
[legend]

Data Structures

class  cell_by_begin_comparator
 Used for sorting the cells by the begin time they describe. More...
 
class  descending_departure_comperator
 Used for sorting vehicles by their departure (latest first) More...
 
struct  ODVehicle
 An internal representation of a single vehicle. More...
 

Public Member Functions

bool add (const SUMOVehicleParameter &veh, bool originIsEdge=false, bool destinationIsEdgeconst=false)
 Adds a single vehicle with departure time.
 
bool add (double vehicleNumber, const std::pair< SUMOTime, SUMOTime > &beginEnd, const std::string &origin, const std::string &destination, const std::string &vehicleType, const bool originIsEdge=false, const bool destinationIsEdge=false, bool noScaling=false)
 Builds a single cell from the given values, verifying them.
 
virtual void addEdgeRelWeight (const std::string &from, const std::string &to, double val, double beg, double end) const
 
virtual void addEdgeWeight (const std::string &id, double val, double beg, double end) const
 Adds a weight for a given edge and time period.
 
void addTazRelWeight (const std::string intervalID, const std::string &from, const std::string &to, double val, double beg, double end)
 
void applyCurve (const Distribution_Points &ps)
 Splits the stored cells dividing them on the given time line.
 
SUMOTime getBegin () const
 
const std::vector< ODCell * > & getCells ()
 
SUMOTime getEnd () const
 
double getNumDiscarded () const
 Returns the number of discarded vehicles.
 
double getNumLoaded () const
 Returns the number of loaded vehicles.
 
double getNumWritten () const
 Returns the number of written vehicles.
 
void loadMatrix (OptionsCont &oc)
 read a matrix in one of several formats
 
void loadRoutes (OptionsCont &oc, SUMOSAXHandler &handler)
 read SUMO routes
 
 ODMatrix (const ODDistrictCont &dc, double scale)
 Constructor.
 
Distribution_Points parseTimeLine (const std::vector< std::string > &def, bool timelineDayInHours)
 split the given timeline
 
void readO (LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
 read a VISUM-matrix with the O Format
 
void readV (LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
 read a VISUM-matrix with the V Format
 
void sortByBeginTime ()
 
void write (SUMOTime begin, const SUMOTime end, OutputDevice &dev, const bool uniform, const bool differSourceSink, const bool noVtype, const std::string &prefix, const bool stepLog, bool pedestrians, bool persontrips, const std::string &modes)
 Writes the vehicles stored in the matrix assigning the sources and sinks.
 
void writeDefaultAttrs (OutputDevice &dev, const bool noVtype, const ODCell *const cell)
 Helper function for flow and trip output writing the depart and arrival attributes.
 
void writeFlows (const SUMOTime begin, const SUMOTime end, OutputDevice &dev, const bool noVtype, const std::string &prefix, bool asProbability=false, bool pedestrians=false, bool persontrips=false, const std::string &modes="")
 Writes the flows stored in the matrix.
 
 ~ODMatrix ()
 Destructor.
 

Protected Member Functions

void applyCurve (const Distribution_Points &ps, ODCell *cell, std::vector< ODCell * > &newCells)
 Splits the given cell dividing it on the given time line and storing the results in the given container.
 
double computeDeparts (ODCell *cell, int &vehName, std::vector< ODVehicle > &into, const bool uniform, const bool differSourceSink, const std::string &prefix)
 Computes the vehicle departs stored in the given cell and saves them in "into".
 

Private Member Functions

std::string getNextNonCommentLine (LineReader &lr)
 
 ODMatrix (const ODMatrix &s)
 invalid copy constructor
 
ODMatrixoperator= (const ODMatrix &s)=delete
 invalid assignment operator
 
SUMOTime parseSingleTime (const std::string &time)
 
double readFactor (LineReader &lr, double scale)
 
std::pair< SUMOTime, SUMOTimereadTime (LineReader &lr)
 

Private Attributes

SUMOTime myBegin
 parsed time bounds
 
std::vector< ODCell * > myContainer
 The loaded cells.
 
const ODDistrictContmyDistricts
 The districts to retrieve sources/sinks from.
 
SUMOTime myEnd
 
std::set< std::string > myMissingDistricts
 The missing districts already warned about.
 
double myNumDiscarded
 Number of discarded vehicles.
 
double myNumLoaded
 Number of loaded vehicles.
 
double myNumWritten
 Number of written vehicles.
 
double myScale
 the scaling factor for traffic
 
std::map< const std::pair< const std::string, const std::string >, std::vector< ODCell * > > myShortCut
 The loaded cells indexed by origin and destination.
 
std::string myVType
 user-defined vType
 

Detailed Description

An O/D (origin/destination) matrix.

This class is the internal representation of a loaded O/D-matrix. Beside being the storage for ODCells, the matrix also contains information about the numbers of loaded, discarded, and written vehicles.

The matrix has a reference to the container of districts stored. This allows to validate added cell descriptions in means that using existing origins/ destinations only is assured.

In addition of being a storage, the matrix is also responsible for writing the results and contains methods for splitting the entries over time.

Definition at line 68 of file ODMatrix.h.

Constructor & Destructor Documentation

◆ ODMatrix() [1/2]

ODMatrix::ODMatrix ( const ODDistrictCont dc,
double  scale 
)

Constructor.

Parameters
[in]dcThe district container to obtain referenced districts from

Definition at line 52 of file ODMatrix.cpp.

◆ ~ODMatrix()

ODMatrix::~ODMatrix ( )

Destructor.

Definition at line 63 of file ODMatrix.cpp.

References myContainer.

◆ ODMatrix() [2/2]

ODMatrix::ODMatrix ( const ODMatrix s)
private

invalid copy constructor

Member Function Documentation

◆ add() [1/2]

bool ODMatrix::add ( const SUMOVehicleParameter veh,
bool  originIsEdge = false,
bool  destinationIsEdgeconst = false 
)

Adds a single vehicle with departure time.

If there is no existing ODCell for the given parameters one is generated using add(...)

Parameters
[in]idThe id of the vehicle
[in]departThe departure time of the vehicle
[in]odThe origin and destination district to use for the cell's flows
[in]vehicleTypeThe vehicle type to use for the cell's flows
Returns
whether the vehicle could be added

Definition at line 130 of file ODMatrix.cpp.

References add(), SUMOVehicleParameter::depart, ODCell::departures, SUMOVehicleParameter::fromTaz, OptionsCont::getOptions(), myContainer, myMissingDistricts, myNumDiscarded, myNumLoaded, myShortCut, string2time(), SUMOVehicleParameter::toTaz, ODCell::vehicleNumber, and SUMOVehicleParameter::vtypeid.

◆ add() [2/2]

bool ODMatrix::add ( double  vehicleNumber,
const std::pair< SUMOTime, SUMOTime > &  beginEnd,
const std::string &  origin,
const std::string &  destination,
const std::string &  vehicleType,
const bool  originIsEdge = false,
const bool  destinationIsEdge = false,
bool  noScaling = false 
)

Builds a single cell from the given values, verifying them.

At first, the number of loaded vehicles (myNoLoaded) is incremented by vehicleNumber.

It is checked whether both the origin and the destination exist within the assigned district container (myDistricts). If one of them is missing, an error is generated, if both, a warning, because in the later case the described flow may lay completely beside the processed area. In both cases the given number of vehicles (vehicleNumber) is added to myNoDiscarded.

If the origin/destination districts are known, a cell is built using the given values. This cell is added to the list of known cells (myContainer).

Parameters
[in]vehicleNumberThe number of vehicles to store within the cell
[in]beginEndThe begin and the end of the interval the cell is valid for
[in]originThe origin district to use for the cell's flows
[in]destinationThe destination district to use for the cell's flows
[in]vehicleTypeThe vehicle type to use for the cell's flows
Returns
whether the cell could be added

Definition at line 75 of file ODMatrix.cpp.

References ODCell::begin, ODCell::destination, ODCell::destinationIsEdge, ODCell::end, NamedObjectCont< T >::get(), myBegin, myContainer, myDistricts, myEnd, myMissingDistricts, myNumDiscarded, myNumLoaded, myScale, ODCell::origin, ODCell::originIsEdge, ODDistrict::sinkNumber(), ODDistrict::sourceNumber(), TL, toString(), ODCell::vehicleNumber, ODCell::vehicleType, WRITE_ERRORF, and WRITE_WARNINGF.

Referenced by add(), addTazRelWeight(), ROMARouteHandler::myEndElement(), ODAmitranHandler::myStartElement(), readO(), and readV().

Here is the caller graph for this function:

◆ addEdgeRelWeight()

virtual void SAXWeightsHandler::EdgeFloatTimeLineRetriever::addEdgeRelWeight ( const std::string &  from,
const std::string &  to,
double  val,
double  beg,
double  end 
) const
inlinevirtualinherited

Reimplemented in GUINet::EdgeFloatTimeLineRetriever_GUI.

Definition at line 87 of file SAXWeightsHandler.h.

References UNUSED_PARAMETER.

◆ addEdgeWeight()

virtual void SAXWeightsHandler::EdgeFloatTimeLineRetriever::addEdgeWeight ( const std::string &  id,
double  val,
double  beg,
double  end 
) const
inlinevirtualinherited

Adds a weight for a given edge and time period.

Parameters
[in]idThe id of the object to add a weight for
[in]valThe weight
[in]begThe begin of the interval the weight is valid for
[in]endThe end of the interval the weight is valid for

Reimplemented in GUINet::EdgeFloatTimeLineRetriever_GUI, NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort, NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime, ROLoader::EdgeFloatTimeLineRetriever_EdgeWeight, and ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime.

Definition at line 80 of file SAXWeightsHandler.h.

References UNUSED_PARAMETER.

◆ addTazRelWeight()

void ODMatrix::addTazRelWeight ( const std::string  intervalID,
const std::string &  from,
const std::string &  to,
double  val,
double  beg,
double  end 
)
virtual
Note
: note sure why the other functions are const

Reimplemented from SAXWeightsHandler::EdgeFloatTimeLineRetriever.

Definition at line 711 of file ODMatrix.cpp.

References add(), myVType, and TIME2STEPS.

◆ applyCurve() [1/2]

void ODMatrix::applyCurve ( const Distribution_Points ps)

Splits the stored cells dividing them on the given time line.

Todo:
Describe

Definition at line 637 of file ODMatrix.cpp.

References applyCurve(), and myContainer.

Referenced by applyCurve(), computeRoutes(), and main().

Here is the caller graph for this function:

◆ applyCurve() [2/2]

void ODMatrix::applyCurve ( const Distribution_Points ps,
ODCell cell,
std::vector< ODCell * > &  newCells 
)
protected

Splits the given cell dividing it on the given time line and storing the results in the given container.

For the given cell, a list of clones is generated. The number of these is equal to the number of "areas" within the given distribution description (time line in this case) and each clone's vehicleNumber is equal to the given cell's vehicle number multiplied with the area's probability. The clones are stored in the given cell vector.

See also
Distribution_Points
Parameters
[in]psThe time line to apply
[in]cellThe cell to split
[out]newCellsThe storage to put generated cells into
Todo:
describe better!!!

Definition at line 621 of file ODMatrix.cpp.

References ODCell::begin, ODCell::destination, ODCell::end, RandomDistributor< T >::getOverallProb(), RandomDistributor< T >::getProbs(), RandomDistributor< T >::getVals(), ODCell::origin, TIME2STEPS, ODCell::vehicleNumber, and ODCell::vehicleType.

◆ computeDeparts()

double ODMatrix::computeDeparts ( ODCell cell,
int &  vehName,
std::vector< ODVehicle > &  into,
const bool  uniform,
const bool  differSourceSink,
const std::string &  prefix 
)
protected

Computes the vehicle departs stored in the given cell and saves them in "into".

At first, the number of vehicles to insert is computed using the integer value of the vehicleNumber information from the given cell. In the case vehicleNumber has a fraction, an additional vehicle may be added in the case a chosen random number is lower than this fraction.

If uniform is true, the departure times of the generated vehicles are spread uniformly, otherwise the departure time are chosen randomly from the interval.

The vehicle names are generated by putting the value of vehName after the given prefix. The value of vehName is incremented with each generated vehicle.

The number of left vehicles (the fraction if no additional vehicle was generated) is returned.

Parameters
[in]cellThe cell to use
[in,out]vehNameAn incremented index of the generated vehicle
[out]intoThe storage to put generated vehicles into
[in]uniformInformation whether departure times shallbe uniformly spread or random
[in]differSourceSinkwhether source and sink shall be different edges
[in]prefixA prefix for the vehicle names
Returns
The number of left vehicles to insert

Definition at line 168 of file ODMatrix.cpp.

References ODCell::begin, ODMatrix::ODVehicle::cell, ODMatrix::ODVehicle::depart, ODCell::destination, ODCell::end, ODMatrix::ODVehicle::from, NamedObjectCont< T >::get(), ODDistrictCont::getRandomSinkFromDistrict(), ODDistrictCont::getRandomSourceFromDistrict(), ODMatrix::ODVehicle::id, myDistricts, ODCell::origin, RandHelper::rand(), ODDistrict::sinkNumber(), ODDistrict::sourceNumber(), TL, ODMatrix::ODVehicle::to, toString(), ODCell::vehicleNumber, and WRITE_WARNINGF.

Referenced by write().

Here is the caller graph for this function:

◆ getBegin()

SUMOTime ODMatrix::getBegin ( ) const
inline

Definition at line 251 of file ODMatrix.h.

References myBegin.

Referenced by computeRoutes().

Here is the caller graph for this function:

◆ getCells()

const std::vector< ODCell * > & ODMatrix::getCells ( )
inline

Definition at line 245 of file ODMatrix.h.

References myContainer.

Referenced by computeRoutes(), ROMAAssignments::getKPaths(), ROMAAssignments::incremental(), ROMAAssignments::resetFlows(), and ROMAAssignments::sue().

Here is the caller graph for this function:

◆ getEnd()

SUMOTime ODMatrix::getEnd ( ) const
inline

Definition at line 255 of file ODMatrix.h.

References myEnd.

Referenced by computeRoutes().

Here is the caller graph for this function:

◆ getNextNonCommentLine()

std::string ODMatrix::getNextNonCommentLine ( LineReader lr)
private

@used in the functions readV and readO

Todo:
Describe

Definition at line 435 of file ODMatrix.cpp.

References LineReader::getFileName(), LineReader::good(), LineReader::hasMore(), StringUtils::prune(), LineReader::readLine(), and TLF.

Referenced by readFactor(), readO(), readTime(), and readV().

Here is the caller graph for this function:

◆ getNumDiscarded()

double ODMatrix::getNumDiscarded ( ) const

Returns the number of discarded vehicles.

Returns the value of myNoDiscarded

Returns
The number of discarded vehicles

Definition at line 615 of file ODMatrix.cpp.

References myNumDiscarded.

Referenced by main().

Here is the caller graph for this function:

◆ getNumLoaded()

double ODMatrix::getNumLoaded ( ) const

Returns the number of loaded vehicles.

Returns the value of myNoLoaded

Returns
The number of loaded vehicles

Definition at line 603 of file ODMatrix.cpp.

References myNumLoaded.

Referenced by main().

Here is the caller graph for this function:

◆ getNumWritten()

double ODMatrix::getNumWritten ( ) const

Returns the number of written vehicles.

Returns the value of myNoWritten

Returns
The number of written vehicles

Definition at line 609 of file ODMatrix.cpp.

References myNumWritten.

Referenced by main().

Here is the caller graph for this function:

◆ loadMatrix()

void ODMatrix::loadMatrix ( OptionsCont oc)

read a matrix in one of several formats

Todo:
Describe

Definition at line 650 of file ODMatrix.cpp.

References OptionsCont::getString(), OptionsCont::getStringVector(), LineReader::good(), FileHelpers::isReadable(), myVType, PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_FAILED_MESSAGE, LineReader::readLine(), readO(), readV(), XMLSubSys::runParser(), and TLF.

Referenced by main().

Here is the caller graph for this function:

◆ loadRoutes()

void ODMatrix::loadRoutes ( OptionsCont oc,
SUMOSAXHandler handler 
)

read SUMO routes

Todo:
Describe

Definition at line 718 of file ODMatrix.cpp.

References OptionsCont::getStringVector(), FileHelpers::isReadable(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_FAILED_MESSAGE, XMLSubSys::runParser(), and TLF.

Referenced by main().

Here is the caller graph for this function:

◆ operator=()

ODMatrix & ODMatrix::operator= ( const ODMatrix s)
privatedelete

invalid assignment operator

◆ parseSingleTime()

SUMOTime ODMatrix::parseSingleTime ( const std::string &  time)
private

@used in the functions readV and readO

Todo:
Describe

Definition at line 447 of file ODMatrix.cpp.

References TIME2STEPS, and StringUtils::toInt().

Referenced by readTime().

Here is the caller graph for this function:

◆ parseTimeLine()

Distribution_Points ODMatrix::parseTimeLine ( const std::vector< std::string > &  def,
bool  timelineDayInHours 
)

split the given timeline

Todo:
Describe

Definition at line 735 of file ODMatrix.cpp.

References RandomDistributor< T >::add(), StringTokenizer::next(), StringTokenizer::size(), TLF, StringUtils::toDouble(), and toString().

Referenced by computeRoutes(), and main().

Here is the caller graph for this function:

◆ readFactor()

double ODMatrix::readFactor ( LineReader lr,
double  scale 
)
private

@used in the functions readV and readO

Todo:
Describe

Definition at line 477 of file ODMatrix.cpp.

References getNextNonCommentLine(), TLF, and StringUtils::toDouble().

Referenced by readO(), and readV().

Here is the caller graph for this function:

◆ readO()

void ODMatrix::readO ( LineReader lr,
double  scale,
std::string  vehType,
bool  matrixHasVehType 
)

read a VISUM-matrix with the O Format

Todo:
Describe

Definition at line 558 of file ODMatrix.cpp.

References add(), LineReader::getFileName(), getNextNonCommentLine(), LineReader::hasMore(), StringTokenizer::next(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, StringUtils::prune(), readFactor(), readTime(), StringTokenizer::size(), TLF, StringUtils::toDouble(), StringUtils::toInt(), toString(), and StringTokenizer::WHITECHARS.

Referenced by loadMatrix().

Here is the caller graph for this function:

◆ readTime()

std::pair< SUMOTime, SUMOTime > ODMatrix::readTime ( LineReader lr)
private

@used in the functions readV and readO

Todo:
Describe

Definition at line 458 of file ODMatrix.cpp.

References getNextNonCommentLine(), StringTokenizer::next(), parseSingleTime(), time2string(), TLF, and StringTokenizer::WHITECHARS.

Referenced by readO(), and readV().

Here is the caller graph for this function:

◆ readV()

void ODMatrix::readV ( LineReader lr,
double  scale,
std::string  vehType,
bool  matrixHasVehType 
)

read a VISUM-matrix with the V Format

Todo:
Describe

Definition at line 489 of file ODMatrix.cpp.

References add(), LineReader::getFileName(), getNextNonCommentLine(), LineReader::hasMore(), StringTokenizer::hasNext(), StringTokenizer::next(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, StringUtils::prune(), readFactor(), readTime(), TL, TLF, StringUtils::toDouble(), StringUtils::toInt(), toString(), and StringTokenizer::WHITECHARS.

Referenced by loadMatrix().

Here is the caller graph for this function:

◆ sortByBeginTime()

void ODMatrix::sortByBeginTime ( )

Definition at line 760 of file ODMatrix.cpp.

References myContainer.

Referenced by computeRoutes(), write(), and writeFlows().

Here is the caller graph for this function:

◆ write()

void ODMatrix::write ( SUMOTime  begin,
const SUMOTime  end,
OutputDevice dev,
const bool  uniform,
const bool  differSourceSink,
const bool  noVtype,
const std::string &  prefix,
const bool  stepLog,
bool  pedestrians,
bool  persontrips,
const std::string &  modes 
)

Writes the vehicles stored in the matrix assigning the sources and sinks.

The cells stored in myContainer are sorted, first. Then, for each time step to generate vehicles for, it is checked whether the topmost cell is valid for this time step. If so, vehicles are generated from this cell's description using "computeDeparts" and stored in an internal vector. The pointer is moved and the check is repeated until the current cell is not valid for the current time or no further cells exist.

Then, for the current time step, the internal list of vehicles is sorted and all vehicles that start within this time step are written.

The left fraction of vehicles to insert is saved for each O/D-dependency over time and the number of vehicles to generate is increased as soon as this value is larger than 1, decrementing it.

Parameters
[in]beginThe begin time to generate vehicles for
[in]endThe end time to generate vehicles for
[in]devThe stream to write the generated vehicle trips to
[in]uniformInformation whether departure times shallbe uniformly spread or random
[in]differSourceSinkwhether source and sink shall be different edges
[in]noVtypeWhether vtype information shall not be written
[in]prefixA prefix for the vehicle names
[in]stepLogWhether processed time shall be written
[in]pedestriansWrites trips for pedestrians
[in]persontripsWrites trips for persontrips

Definition at line 236 of file ODMatrix.cpp.

References OutputDevice::closeTag(), computeDeparts(), DELTA_T, OptionsCont::getBool(), OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::isSet(), MAX2(), myContainer, myNumWritten, OutputDevice::openTag(), sortByBeginTime(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_DEPART, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_FROM, SUMO_ATTR_FROM_JUNCTION, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_ID, SUMO_ATTR_MODES, SUMO_ATTR_TO, SUMO_ATTR_TO_JUNCTION, SUMO_ATTR_TO_TAZ, SUMO_ATTR_TYPE, SUMO_TAG_PERSON, SUMO_TAG_PERSONTRIP, SUMO_TAG_TRIP, SUMO_TAG_WALK, time2string(), OutputDevice::writeAttr(), and writeDefaultAttrs().

Referenced by main().

Here is the caller graph for this function:

◆ writeDefaultAttrs()

void ODMatrix::writeDefaultAttrs ( OutputDevice dev,
const bool  noVtype,
const ODCell *const  cell 
)

Helper function for flow and trip output writing the depart and arrival attributes.

Parameters
[in]devThe stream to write the generated vehicle trips to
[in]noVtypeWhether vtype information shall not be written
[in]cellThe OD cell containing the vtype

Definition at line 207 of file ODMatrix.cpp.

References ODCell::destination, OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::isSet(), ODCell::origin, SUMO_ATTR_ARRIVALLANE, SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_ARRIVALSPEED, SUMO_ATTR_DEPARTLANE, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DEPARTSPEED, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_TO_TAZ, SUMO_ATTR_TYPE, ODCell::vehicleType, and OutputDevice::writeAttr().

Referenced by computeRoutes(), write(), and writeFlows().

Here is the caller graph for this function:

◆ writeFlows()

void ODMatrix::writeFlows ( const SUMOTime  begin,
const SUMOTime  end,
OutputDevice dev,
const bool  noVtype,
const std::string &  prefix,
bool  asProbability = false,
bool  pedestrians = false,
bool  persontrips = false,
const std::string &  modes = "" 
)

Writes the flows stored in the matrix.

Parameters
[in]beginThe begin time to generate vehicles for
[in]endThe end time to generate vehicles for
[in]devThe stream to write the generated vehicle trips to
[in]noVtypeWhether vtype information shall not be written
[in]prefixA prefix for the flow names
[in]asProbabilityWrite probability to spawn per second instead of number of vehicles
[in]pedestriansWrites flows for pedestrians
[in]persontripsWrites flows for persontrips

Definition at line 346 of file ODMatrix.cpp.

References ODCell::begin, OutputDevice::closeTag(), ODCell::destination, ODCell::end, myContainer, OutputDevice::openTag(), ODCell::origin, OutputDevice::setPrecision(), sortByBeginTime(), STEPS2TIME, SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_ID, SUMO_ATTR_MODES, SUMO_ATTR_NUMBER, SUMO_ATTR_PROB, SUMO_ATTR_TO_TAZ, SUMO_TAG_FLOW, SUMO_TAG_PERSONFLOW, SUMO_TAG_PERSONTRIP, SUMO_TAG_WALK, time2string(), TL, toString(), ODCell::vehicleNumber, WRITE_WARNINGF, OutputDevice::writeAttr(), and writeDefaultAttrs().

Referenced by main().

Here is the caller graph for this function:

Field Documentation

◆ myBegin

SUMOTime ODMatrix::myBegin
private

parsed time bounds

Definition at line 377 of file ODMatrix.h.

Referenced by add(), and getBegin().

◆ myContainer

std::vector<ODCell*> ODMatrix::myContainer
private

The loaded cells.

Definition at line 356 of file ODMatrix.h.

Referenced by add(), add(), applyCurve(), getCells(), sortByBeginTime(), write(), writeFlows(), and ~ODMatrix().

◆ myDistricts

const ODDistrictCont& ODMatrix::myDistricts
private

The districts to retrieve sources/sinks from.

Definition at line 362 of file ODMatrix.h.

Referenced by add(), and computeDeparts().

◆ myEnd

SUMOTime ODMatrix::myEnd
private

Definition at line 377 of file ODMatrix.h.

Referenced by add(), and getEnd().

◆ myMissingDistricts

std::set<std::string> ODMatrix::myMissingDistricts
private

The missing districts already warned about.

Definition at line 365 of file ODMatrix.h.

Referenced by add(), and add().

◆ myNumDiscarded

double ODMatrix::myNumDiscarded
private

Number of discarded vehicles.

Definition at line 374 of file ODMatrix.h.

Referenced by add(), add(), and getNumDiscarded().

◆ myNumLoaded

double ODMatrix::myNumLoaded
private

Number of loaded vehicles.

Definition at line 368 of file ODMatrix.h.

Referenced by add(), add(), and getNumLoaded().

◆ myNumWritten

double ODMatrix::myNumWritten
private

Number of written vehicles.

Definition at line 371 of file ODMatrix.h.

Referenced by getNumWritten(), and write().

◆ myScale

double ODMatrix::myScale
private

the scaling factor for traffic

Definition at line 383 of file ODMatrix.h.

Referenced by add().

◆ myShortCut

std::map<const std::pair<const std::string, const std::string>, std::vector<ODCell*> > ODMatrix::myShortCut
private

The loaded cells indexed by origin and destination.

Definition at line 359 of file ODMatrix.h.

Referenced by add().

◆ myVType

std::string ODMatrix::myVType
private

user-defined vType

Definition at line 380 of file ODMatrix.h.

Referenced by addTazRelWeight(), and loadMatrix().


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