 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
105 SUMOTime end,
const std::string& origin,
const std::string& destination,
106 const std::string& vehicleType,
107 const bool originIsEdge =
false,
const bool destinationIsEdge =
false);
120 bool add(
const std::string&
id,
const SUMOTime depart,
121 const std::string& fromTaz,
const std::string& toTaz,
122 const std::string& vehicleType,
123 const bool originIsEdge =
false,
const bool destinationIsEdge =
false);
133 const ODCell*
const cell);
164 const bool differSourceSink,
const bool noVtype,
165 const std::string& prefix,
const bool stepLog,
166 bool pedestrians,
bool persontrips);
182 const std::string& prefix,
183 bool asProbability =
false,
bool pedestrians =
false,
bool persontrips =
false);
223 std::string vehType,
bool matrixHasVehType);
229 std::string vehType,
bool matrixHasVehType);
298 int& vehName, std::vector<ODVehicle>& into,
299 const bool uniform,
const bool differSourceSink,
300 const std::string& prefix);
319 std::vector<ODCell*>& newCells);
349 std::map<const std::pair<const std::string, const std::string>, std::vector<ODCell*> >
myShortCut;
423 return p1.
id > p2.
id;
Distribution_Points parseTimeLine(const std::vector< std::string > &def, bool timelineDayInHours)
split the given timeline
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)
Writes the vehicles stored in the matrix assigning the sources and sinks.
ODMatrix(const ODDistrictCont &dc)
Constructor.
SAX-handler base for SUMO-files.
Static storage of an output device and its base (abstract) implementation.
const ODDistrictCont & myDistricts
The districts to retrieve sources/sinks from.
double myNumWritten
Number of written vehicles.
void loadMatrix(OptionsCont &oc)
read a matrix in one of several formats
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".
SUMOTime parseSingleTime(const std::string &time)
bool add(double vehicleNumber, SUMOTime begin, SUMOTime end, const std::string &origin, const std::string &destination, const std::string &vehicleType, const bool originIsEdge=false, const bool destinationIsEdge=false)
Builds a single cell from the given values, verifying them.
ODCell * cell
The cell of the ODMatrix which generated the vehicle.
void loadRoutes(OptionsCont &oc, SUMOSAXHandler &handler)
read SUMO routes
std::string id
The id of the vehicle.
A single O/D-matrix cell.
ODMatrix & operator=(const ODMatrix &s)
invalid assignment operator
SUMOTime depart
The departure time of the vehicle.
An internal representation of a single vehicle.
std::string destination
Name of the destination district.
int operator()(ODCell *p1, ODCell *p2) const
Comparing operator.
std::map< const std::pair< const std::string, const std::string >, std::vector< ODCell * > > myShortCut
The loaded cells indexed by origin and destination.
Used for sorting vehicles by their departure (latest first)
A storage for options typed value containers)
std::vector< ODCell * > myContainer
The loaded cells.
double myNumDiscarded
Number of discarded vehicles.
Retrieves a file linewise and reports the lines to a handler.
descending_departure_comperator()
constructor
An O/D (origin/destination) matrix.
double readFactor(LineReader &lr, double scale)
A container for districts.
bool operator()(const ODVehicle &p1, const ODVehicle &p2) const
Comparing operator.
std::string to
The edge the vehicles shall end at.
cell_by_begin_comparator()
constructor
double getNumLoaded() const
Returns the number of loaded vehicles.
std::pair< SUMOTime, SUMOTime > readTime(LineReader &lr)
std::string origin
Name of the origin district.
double getNumWritten() const
Returns the number of written vehicles.
std::string getNextNonCommentLine(LineReader &lr)
void readO(LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the O Format
double getNumDiscarded() const
Returns the number of discarded vehicles.
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)
Writes the flows stored in the matrix.
void applyCurve(const Distribution_Points &ps)
Splits the stored cells dividing them on the given time line.
void readV(LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the V Format
Used for sorting the cells by the begin time they describe.
SUMOTime begin
The begin time this cell describes.
double myNumLoaded
Number of loaded vehicles.
std::string from
The edge the vehicles shall start at.
void writeDefaultAttrs(OutputDevice &dev, const bool noVtype, const ODCell *const cell)
Helper function for flow and trip output writing the depart and arrival attributes.
const std::vector< ODCell * > & getCells()
std::set< std::string > myMissingDistricts
The missing districts already warned about.