65 myCalibratorParent(calibratorDialog->getEditedCalibrator()),
66 myFlowID(calibratorDialog->getEditedCalibrator()->getViewNet()->getNet()->generateCalibratorFlowID()),
67 myVehicleType(calibratorDialog->getEditedCalibrator()->getCalibratorVehicleTypes().front()),
68 myRoute(calibratorDialog->getEditedCalibrator()->getCalibratorRoutes().front()),
88 myFlowType(GNE_CALIBRATORFLOW_VEHSPERHOUR) {}
92 const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
const std::string& departSpeed,
const std::string& arrivalLane,
93 const std::string& arrivalPos,
const std::string& arrivalSpeed,
const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
94 const std::string& departPosLat,
const std::string& arrivalPosLat,
double begin,
double end,
double vehsPerHour,
double period,
double probability,
300 return canParse<RGBColor>(value);
302 return canParse<double>(value) && (parse<double>(value) >= 0);
304 return canParse<double>(value) && (parse<double>(value) >= 0);
306 return canParse<double>(value) && (parse<double>(value) >= 0);
308 return canParse<double>(value) && (parse<double>(value) >= 0);
310 return canParse<double>(value) && (parse<double>(value) >= 0) && (parse<double>(value) <= 1);
312 return canParse<int>(value) && parse<int>(value) >= 0;
314 if ((value ==
"random") || (value ==
"free") || (value ==
"allowed") || (value ==
"best") || (value ==
"first")) {
320 if ((value ==
"random") || (value ==
"free") || (value ==
"random_free") || (value ==
"base") || (value ==
"last")) {
323 return canParse<double>(value);
326 if ((value ==
"random") || (value ==
"max")) {
329 return canParse<double>(value);
332 if (value ==
"current") {
338 if ((value ==
"random") || (value ==
"max")) {
341 return canParse<double>(value);
344 if (value ==
"current") {
347 return canParse<double>(value);
352 return canParse<int>(value) && parse<int>(value) >= 0;
354 return canParse<int>(value) && parse<int>(value) >= 0;
356 return canParse<bool>(value);
358 if ((value ==
"left") || (value ==
"right") || (value ==
"center") || (value ==
"compact") || (value ==
"nice") || (value ==
"arbitrary")) {
364 if ((value ==
"") || (value ==
"left") || (value ==
"right") || (value ==
"center")) {
367 return canParse<double>(value);
394 myColor = parse<RGBColor>(value);
397 myBegin = parse<double>(value);
400 myEnd = parse<double>(value);
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
RGBColor myColor
color of flow
GNECalibratorRoute * retrieveCalibratorRoute(const std::string &id, bool hardFail=true) const
Returns the named calibrator route.
a flow definition (used by router)
GNECalibratorVehicleType * retrieveCalibratorVehicleType(const std::string &id, bool hardFail=true) const
Returns the named calibrator vehicle type.
~GNECalibratorFlow()
destructor
bool isValid(SumoXMLAttr key, const std::string &value)
std::string myLine
line of bus/container stop
std::string myDepartPosLat
departPosLat
weights: time range begin
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
void setFlowType(GNECalibratorFlow::TypeOfFlow type)
set type of flow
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
int myNumber
number of flow
GNECalibratorFlow(GNECalibratorDialog *calibratorDialog)
constructor (used only in GNECalibratorDialog)
std::string myArrivalPos
arrival pos
double myEnd
time step end
std::string myArrivalPosLat
int myPersonNumber
number of person
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::string myDepartPos
depart position
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
GNECalibratorFlow::TypeOfFlow getFlowType() const
get type of flow
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::string myDepartLane
depart lane
std::string myArrivalLane
arrival lane
friend class GNEChange_Attribute
declare friend class
double myVehsPerHour
flows per hour
const std::string getID() const
function to support debugging
std::string myFlowID
ID of flow.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
int myContainerNumber
number of container
Dialog for edit calibrators.
void changeCalibratorFlowID(GNECalibratorFlow *flow, const std::string &oldID)
change Calibrator Flow ID
GNECalibratorFlow * retrieveCalibratorFlow(const std::string &id, bool hardFail=true) const
Returns the named calibrator flow.
double myProbability
probability
GNECalibrator * myCalibratorParent
pointer to calibrator parent
std::string myArrivalSpeed
arrival speed
std::string myDepartSpeed
depart speed
GNENet * getNet() const
get the net object
SumoXMLTag getTag() const
get XML Tag assigned to this object
TypeOfFlow myFlowType
type of flow
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
GNECalibratorVehicleType * myVehicleType
type of flow
void writeFlow(OutputDevice &device)
write Flow values into a XML
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
GNECalibratorRoute * myRoute
route in which this flow is used
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.