103 bool add(
double vehicleNumber,
const std::pair<SUMOTime, SUMOTime>& beginEnd,
104 const std::string& origin,
const std::string& destination,
105 const std::string& vehicleType,
106 const bool originIsEdge =
false,
const bool destinationIsEdge =
false);
119 bool add(
const std::string&
id,
const SUMOTime depart,
120 const std::string& fromTaz,
const std::string& toTaz,
121 const std::string& vehicleType,
122 const bool originIsEdge =
false,
const bool destinationIsEdge =
false);
132 const ODCell*
const cell);
163 const bool differSourceSink,
const bool noVtype,
164 const std::string& prefix,
const bool stepLog,
165 bool pedestrians,
bool persontrips,
166 const std::string& modes);
182 const std::string& prefix,
183 bool asProbability =
false,
bool pedestrians =
false,
bool persontrips =
false,
184 const std::string& modes =
"");
224 std::string vehType,
bool matrixHasVehType);
230 std::string vehType,
bool matrixHasVehType);
261 void addTazRelWeight(
const std::string intervalID,
const std::string& from,
const std::string& to,
262 double val,
double beg,
double end);
310 int& vehName, std::vector<ODVehicle>& into,
311 const bool uniform,
const bool differSourceSink,
312 const std::string& prefix);
331 std::vector<ODCell*>& newCells);
361 std::map<const std::pair<const std::string, const std::string>, std::vector<ODCell*> >
myShortCut;
440 return p1.
id > p2.
id;
Retrieves a file linewise and reports the lines to a handler.
A container for districts.
Used for sorting the cells by the begin time they describe.
int operator()(ODCell *p1, ODCell *p2) const
Comparing operator.
cell_by_begin_comparator()
constructor
Used for sorting vehicles by their departure (latest first)
descending_departure_comperator()
constructor
bool operator()(const ODVehicle &p1, const ODVehicle &p2) const
Comparing operator.
An O/D (origin/destination) matrix.
double getNumLoaded() const
Returns the number of loaded vehicles.
void readV(LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the V Format
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)
Builds a single cell from the given values, verifying them.
double readFactor(LineReader &lr, double scale)
ODMatrix(const ODDistrictCont &dc)
Constructor.
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".
const std::vector< ODCell * > & getCells()
void addTazRelWeight(const std::string intervalID, const std::string &from, const std::string &to, double val, double beg, double end)
SUMOTime myBegin
parsed time bounds
SUMOTime parseSingleTime(const std::string &time)
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.
void applyCurve(const Distribution_Points &ps)
Splits the stored cells dividing them on the given time line.
std::map< const std::pair< const std::string, const std::string >, std::vector< ODCell * > > myShortCut
The loaded cells indexed by origin and destination.
std::pair< SUMOTime, SUMOTime > readTime(LineReader &lr)
void readO(LineReader &lr, double scale, std::string vehType, bool matrixHasVehType)
read a VISUM-matrix with the O Format
std::set< std::string > myMissingDistricts
The missing districts already warned about.
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.
const ODDistrictCont & myDistricts
The districts to retrieve sources/sinks from.
Distribution_Points parseTimeLine(const std::vector< std::string > &def, bool timelineDayInHours)
split the given timeline
void writeDefaultAttrs(OutputDevice &dev, const bool noVtype, const ODCell *const cell)
Helper function for flow and trip output writing the depart and arrival attributes.
double myNumLoaded
Number of loaded vehicles.
double myNumWritten
Number of written vehicles.
SUMOTime getBegin() const
void loadMatrix(OptionsCont &oc)
read a matrix in one of several formats
void loadRoutes(OptionsCont &oc, SUMOSAXHandler &handler)
read SUMO routes
double getNumWritten() const
Returns the number of written vehicles.
std::vector< ODCell * > myContainer
The loaded cells.
double myNumDiscarded
Number of discarded vehicles.
ODMatrix & operator=(const ODMatrix &s)=delete
invalid assignment operator
double getNumDiscarded() const
Returns the number of discarded vehicles.
std::string myVType
user-defined vType
ODMatrix(const ODMatrix &s)
invalid copy constructor
std::string getNextNonCommentLine(LineReader &lr)
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
Interface for a class which obtains read weights for named edges.
SAX-handler base for SUMO-files.
A single O/D-matrix cell.
std::string destination
Name of the destination district.
std::string origin
Name of the origin district.
SUMOTime begin
The begin time this cell describes.
An internal representation of a single vehicle.
SUMOTime depart
The departure time of the vehicle.
std::string from
The edge the vehicles shall start at.
ODCell * cell
The cell of the ODMatrix which generated the vehicle.
std::string to
The edge the vehicles shall end at.
std::string id
The id of the vehicle.