110 SUMOTime end,
const std::string& origin,
const std::string& destination,
111 const std::string& vehicleType);
124 void add(
const std::string&
id,
const SUMOTime depart,
125 const std::string& origin,
const std::string& destination,
126 const std::string& vehicleType);
136 const ODCell*
const cell);
165 const bool differSourceSink,
const bool noVtype,
166 const std::string& prefix,
const bool stepLog);
179 const std::string& prefix);
219 std::string vehType,
bool matrixHasVehType);
225 std::string vehType,
bool matrixHasVehType);
294 size_t& vehName, std::vector<ODVehicle>& into,
295 const bool uniform,
const bool differSourceSink,
296 const std::string& prefix);
315 std::vector<ODCell*>& newCells);
428 return p1.
id > p2.
id;
SUMOReal getNoLoaded() const
Returns the number of loaded vehicles.
SUMOReal myNoLoaded
Number of loaded vehicles.
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()
Used for sorting the cells by the begin time they describe.
SUMOReal computeDeparts(ODCell *cell, size_t &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".
descending_departure_comperator()
constructor
int operator()(const ODCell *const c1, const ODCell *const c2) const
comparing operator
Retrieves a file linewise and reports the lines to a handler.
SUMOReal myNoWritten
Number of written vehicles.
int operator()(ODCell *p1, ODCell *p2) const
Comparing operator.
const ODDistrictCont & myDistricts
The districts to retrieve sources/sinks from.
An internal representation of a single vehicle.
void add(SUMOReal vehicleNumber, SUMOTime begin, SUMOTime end, const std::string &origin, const std::string &destination, const std::string &vehicleType)
Builds a single cell from the given values, verifying them.
SAX-handler base for SUMO-files.
std::string from
The edge the vehicles shall start at.
SUMOTime parseSingleTime(const std::string &time)
Sorts cells by their start time.
ODMatrix & operator=(const ODMatrix &s)
invalid assignment operator
void loadMatrix(OptionsCont &oc)
read a matrix in one of several formats
by_begin_sorter()
constructor
SUMOReal getNoDiscarded() const
Returns the number of discarded vehicles.
A single O/D-matrix cell.
void readV(LineReader &lr, SUMOReal scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the V Format
std::string origin
Name of the origin district.
An O/D (origin/destination) matrix.
void readO(LineReader &lr, SUMOReal scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the O Format
ODCell * cell
The cell of the ODMatrix which generated the vehicle.
void loadRoutes(OptionsCont &oc, SUMOSAXHandler &handler)
read SUMO routes
cell_by_begin_sorter()
constructor
A container for districts.
SUMOReal getNoWritten() const
Returns the number of written vehicles.
Used for sorting vehicles by their departure (latest first)
SUMOReal myNoDiscarded
Number of discarded vehicles.
std::vector< ODCell * > myContainer
The loaded cells.
SUMOTime begin
The begin time this cell describes.
void writeFlows(const SUMOTime begin, const SUMOTime end, OutputDevice &dev, const bool noVtype, const std::string &prefix)
Writes the flows stored in the matrix.
SUMOReal readFactor(LineReader &lr, SUMOReal scale)
std::pair< SUMOTime, SUMOTime > readTime(LineReader &lr)
std::string getNextNonCommentLine(LineReader &lr)
SUMOTime depart
The departure time of the vehicle.
A storage for options typed value containers)
void applyCurve(const Distribution_Points &ps)
Splits the stored cells dividing them on the given time line.
Static storage of an output device and its base (abstract) implementation.
std::string destination
Name of the destination district.
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)
Writes the vehicles stored in the matrix assigning the sources and sinks.
std::string to
The edge the vehicles shall end at.
ODMatrix(const ODDistrictCont &dc)
Constructor.
std::string id
The id of the vehicle.
bool operator()(const ODVehicle &p1, const ODVehicle &p2) const
Comparing operator.
Distribution_Points parseTimeLine(const std::vector< std::string > &def, bool timelineDayInHours)
split the given timeline