 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
68 myTransformToPerson(
nullptr),
69 myTransformToPersonFlow(
nullptr) {
71 myPerson->buildPopupHeader(
this, app);
73 myPerson->buildCenterPopupEntry(
this);
74 myPerson->buildPositionCopyEntry(
this,
false);
76 new FXMenuCommand(
this, (
"Copy " + myPerson->getTagStr() +
" name to clipboard").c_str(),
nullptr,
this,
MID_COPY_NAME);
77 new FXMenuCommand(
this, (
"Copy " + myPerson->getTagStr() +
" typed name to clipboard").c_str(),
nullptr,
this,
MID_COPY_TYPED_NAME);
78 new FXMenuSeparator(
this);
80 myPerson->getViewNet()->buildSelectionACPopupEntry(
this, myPerson);
81 myPerson->buildShowParamsPopupEntry(
this);
85 FXMenuPane* transformOperation =
new FXMenuPane(
this);
86 this->insertMenuPaneChild(transformOperation);
87 new FXMenuCascade(
this,
"transform to",
nullptr, transformOperation);
93 myTransformToPerson->disable();
95 myTransformToPersonFlow->disable();
106 if (obj == myTransformToPerson) {
108 }
else if (obj == myTransformToPersonFlow) {
122 mySelectedPersons(selectedPerson),
123 myTransformToPerson(nullptr),
124 myTransformToPersonFlow(nullptr) {
131 new FXMenuCommand(
this, (
"Copy " + person->
getTagStr() +
" name to clipboard").c_str(),
nullptr,
this,
MID_COPY_NAME);
133 new FXMenuSeparator(
this);
140 FXMenuPane* transformOperation =
new FXMenuPane(
this);
142 new FXMenuCascade(
this,
"transform to",
nullptr, transformOperation);
156 for (
const auto& i : mySelectedPersons) {
157 if ((obj == myTransformToPerson) &&
158 (i->getTagProperty().getTag() == myPersonTag)) {
160 }
else if ((obj == myTransformToPersonFlow) &&
161 (i->getTagProperty().getTag() == myPersonTag)) {
174 {}, {}, {}, {}, {pType}, {}, {}, {}, {}, {}),
187 std::string departStr;
194 departStr.reserve(20 - departStr.size());
196 for (
int i = (
int)departStr.size(); i < 20; i++) {
197 departStr.insert(departStr.begin(),
'0');
240 i->writeDemandElement(device);
329 std::vector<personPlanSegment> personPlanSegments;
334 if (personPlan->getTagProperty().isPersonStop()) {
338 segment.
stops.push_back(personPlan);
346 personPlanSegments.push_back(segment);
349 for (
const auto& j : personPlan->getDemandElementParents().at(1)->getEdgeParents()) {
355 if (busStop && (&busStop->
getLaneParents().front()->getParentEdge() == segment.
edge)) {
356 segment.
busStops.push_back(busStop);
359 if (personPlan->getTagProperty().hasAttribute(
SUMO_ATTR_ARRIVALPOS) && (personPlan->getDemandElementParents().at(1)->getEdgeParents().back() == j)) {
363 personPlanSegments.push_back(segment);
367 for (
const auto& j : personPlan->getEdgeParents()) {
373 if (busStop && (&busStop->
getLaneParents().front()->getParentEdge() == segment.
edge)) {
374 segment.
busStops.push_back(busStop);
377 if (personPlan->getTagProperty().hasAttribute(
SUMO_ATTR_ARRIVALPOS) && (personPlan->getEdgeParents().back() == j)) {
381 personPlanSegments.push_back(segment);
386 auto it = personPlanSegments.begin();
388 while ((it != personPlanSegments.end()) && (it != (personPlanSegments.end() - 1))) {
390 if (it->edge == (it + 1)->edge) {
392 it->busStops.insert(it->busStops.end(), (it + 1)->busStops.begin(), (it + 1)->busStops.end());
394 it->stops.insert(it->stops.end(), (it + 1)->
stops.begin(), (it + 1)->
stops.end());
396 personPlanSegments.erase(it + 1);
398 it = personPlanSegments.begin();
404 for (
auto personPlanSegmentsIT = personPlanSegments.begin(); personPlanSegmentsIT != personPlanSegments.end(); personPlanSegmentsIT++) {
407 GNELane* firstLane = personPlanSegmentsIT->edge->getLaneByVClass(vClassOfPersonPlanSegmentsIT);
411 if ((personPlanSegmentsIT + 1) != personPlanSegments.end()) {
413 nextLane = personPlanSegmentsIT->edge->getLaneByVClass(vClassOfNextPersonPlanSegmentsIT);
415 if (personPlanSegmentsIT->stops.size() > 0) {
417 for (
const auto& stop : personPlanSegmentsIT->stops) {
421 for (
const auto& shapesStopPos : shapesStop.first) {
423 if (shapesStopPos == shapesStop.first.back()) {
430 if ((personPlanSegmentsIT + 1) != personPlanSegments.end()) {
432 for (
const auto& shapesStopPos : shapesStop.second) {
437 }
else if (personPlanSegmentsIT->busStops.size() > 0) {
439 for (
const auto& busStop : personPlanSegmentsIT->busStops) {
443 for (
const auto& shapeBusStopPos : shapesBusStop.first) {
445 if (shapeBusStopPos == shapesBusStop.first.back()) {
452 if ((personPlanSegmentsIT + 1) != personPlanSegments.end()) {
454 for (
const auto& shapeBusStopPos : shapesBusStop.second) {
459 }
else if (personPlanSegmentsIT->arrivalPos != -1) {
463 for (
const auto& shapeArrivalPos : shapeArrival.first) {
465 if ((shapeArrivalPos == shapeArrival.first.back()) && (shapeArrival.first.size() > 0) && (shapeArrival.second.size() > 0)) {
472 for (
const auto& shapeArrivalPos : shapeArrival.second) {
477 GNELane* lane = personPlanSegmentsIT->edge->getLaneByVClass(vClassOfPersonPlanSegmentsIT);
494 if ((personPlanSegmentsIT + 1) != personPlanSegments.end()) {
524 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
552 personBoundary =
Boundary(-0.1, -0.1, 0.1, 0.1);
554 personBoundary.
grow(20);
555 return personBoundary;
580 personPosition =
getDemandElementChildren().front()->getDemandElementParents().at(1)->getEdgeParents().front()->getLanes().front()->getGeometry().shape.front();
583 personPosition =
getDemandElementChildren().front()->getEdgeParents().front()->getLanes().front()->getGeometry().shape.front();
585 glTranslated(personPosition.
x(), personPosition.
y(),
getType());
586 glRotated(90, 0, 0, 1);
590 glScaled(exaggeration, exaggeration, 1);
749 return canParse<RGBColor>(value);
751 double dummyDepartPos;
755 return error.empty();
759 if (canParse<double>(value)) {
760 return (parse<double>(value) >= 0);
767 if (canParse<double>(value)) {
768 return (parse<double>(value) >= 0);
775 }
else if (canParse<double>(value)) {
776 return (parse<double>(value) >= 0);
783 }
else if (canParse<double>(value)) {
784 return (parse<double>(value) > 0);
791 }
else if (canParse<double>(value)) {
792 return (parse<double>(value) > 0);
799 }
else if (canParse<double>(value)) {
800 return (parse<double>(value) >= 0);
805 if (canParse<int>(value)) {
806 return (parse<int>(value) >= 0);
812 return canParse<bool>(value);
922 for (
const auto& i :
via) {
999 result += i.first +
"=" + i.second +
"|";
1002 if (!result.empty()) {
1009 std::vector<std::pair<std::string, std::string> >
1011 std::vector<std::pair<std::string, std::string> > result;
1014 result.push_back(std::make_pair(i.first, i.second));
1025 std::vector<std::string> parsedValues;
1028 parsedValues.push_back(stValues.
next());
1031 for (
auto i : parsedValues) {
1032 std::vector<std::string> parsedParameters;
1035 parsedParameters.push_back(stParam.
next());
1039 setParameter(parsedParameters.front(), parsedParameters.back());
1049 personPlan(_personPlan),
1056 personPlan(nullptr),
1077 color = parse<RGBColor>(value);
1101 std::string oldDepart =
getBegin();
1130 if (parse<bool>(value)) {
1166 for (
const auto& i : smoothShape) {
1172 std::pair<PositionVector, PositionVector>
1175 std::pair<PositionVector, PositionVector> result;
1183 for (
const auto& i : splittedFirstLaneShape.first) {
1184 result.first.push_back(i);
1187 result.first.push_back(firstBusStopShapePosition);
1196 result.second.push_back(lastBusStopShapePosition);
1198 for (
const auto& i : splittedLastLaneShape.second) {
1199 result.second.push_back(i);
1206 std::pair<PositionVector, PositionVector>
1213 std::pair<PositionVector, PositionVector> result;
1218 for (
const auto& i : splittedFirstLaneShape.first) {
1219 result.first.push_back(i);
1230 for (
const auto& i : splittedLastLaneShape.second) {
1231 result.second.push_back(i);
1239 std::pair<PositionVector, PositionVector>
1242 if ((previousLane == nextLane) && (previousLane !=
nullptr)) {
1247 std::pair<PositionVector, PositionVector> solution;
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
bool wasSet(int what) const
Returns whether the given parameter was set.
An Element which don't belongs to GNENet but has influency in the simulation.
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
An Element which don't belongs to GNENet but has influency in the simulation.
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
double getAttributeDouble(SumoXMLAttr key) const
static const double personShapes
details for draw person as person shapes
GNEPerson(SumoXMLTag tag, GNEViewNet *viewNet, GNEDemandElement *pType, const SUMOVehicleParameter &personparameters)
constructor for persons
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color)
std::string getGenericParametersStr() const
return generic parameters in string format
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
const std::string getID() const
function to support debugging
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
void calculatePartialShapeRotationsAndLengths()
calculate partial shape, rotations and lengths
const std::string DEFAULT_PEDTYPE_ID
virtual double getColorValue(const GUIVisualizationSettings &, int) const
RGBColor color
The vehicle's color, TraCI may change this.
PositionVector shape
The shape of the additional element.
void compute()
compute demand element
Static storage of an output device and its base (abstract) implementation.
void calculateSmoothPersonPlanConnection(const GNEDemandElement *personPlanElement, const GNEEdge *edgeFrom, const GNEEdge *edgeTo)
calculate smooth shape between personPlans
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
double angle
The current view rotation angle.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
std::string getBegin() const
get begin time of demand element
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
void insertEdgeSegment(const GNEDemandElement *element, const GNEEdge *edge, const Position pos, const bool visible, const bool valid)
insert edge segment
bool hasNext()
returns the information whether further substrings exist
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
void clearDemandElementSegmentGeometry()
clear demand element geometry
friend class GNEChange_EnableAttribute
std::string vtypeid
The vehicle's type id.
const int VEHPARS_NUMBER_SET
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
PositionVector computeSmoothShape(const PositionVector &begShape, const PositionVector &endShape, int numPoints, bool isTurnaround, double extrapolateBeg, double extrapolateEnd, NBNode *recordError=0, int shapeFlag=0) const
Compute a smooth curve between the given geometries.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
static const double personTriangles
details for draw person as triangles
const RGBColor & getColor() const
get color
double arrivalPos
arrival position
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GUIColorer personColorer
The person colorer.
static OptionsCont & getOptions()
Retrieves the options.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
bool showDemandElements() const
check if show demand elements checkbox is enabled
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
static void transformToPerson(GNEPerson *originalPerson)
transform person functions
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
double length() const
Returns the length.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
Structure representing possible vehicle parameter.
Copy object name - popup entry.
description of a vehicle type
void writeDemandElement(OutputDevice &device) const
writte demand element element into a xml file
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool isDemandElementValid() const
check if current demand element is valid to be writed into XML (by default true, can be reimplemented...
FXDEFMAP(GNEPerson::GNEPersonPopupMenu) personPopupMenuMap[]
const int VEHPARS_PROB_SET
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
PositionVector shape
The shape of the netElement element.
double scaledSize(double scale, double constFactor=0.1) const
get scale size
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
SumoXMLTag tag
The vehicle tag.
weights: time range begin
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A road/street connecting two junctions (netedit-version)
friend class GNEChange_Attribute
declare friend class
const std::vector< GNELane * > & getLaneParents() const
get lanes of VSS
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
void changeDemandElementID(const std::string &newID)
change ID of demand element
GNENet * getNet() const
get the net object
const DemandElementGeometry & getDemandElementGeometry() const
get demand element geometry
SumoXMLTag getTagSynonym() const
get tag synonym
const AdditionalGeometry & getAdditionalGeometry() const
obtain AdditionalGeometry
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionStop(GNELane *previousLane, GNEDemandElement *stop, GNELane *nextLane)
return two shapes used for calculate person plan conections between stops
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionBusStop(GNELane *previousLane, GNEAdditional *busStop, GNELane *nextLane)
return two shapes used for calculate person plan conections between busStops
std::vector< double > shapeRotations
The rotations of the single shape parts.
PositionVector shape
The shape of the additional element.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
NBNode * getToNode() const
Returns the destination node of the edge.
void insertJunctionSegment(const GNEDemandElement *element, const GNEJunction *junction, const Position pos, const bool visible, const bool valid)
insert junction segment
a flow definitio nusing a from-to edges instead of a route (used by router)
GUIVisualizationDetailSettings detailSettings
detail settings
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
void selectAttributeCarrier(bool changeFlag=true)
inherited from GNEAttributeCarrier
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
std::string getDepart() const
obtain depart parameter in string format
NBEdge * getNBEdge() const
returns the internal NBEdge
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
GNEEdge * getFromEdge() const
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
virtual double getAttributeDouble(SumoXMLAttr key) const =0
const int VEHPARS_COLOR_SET
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
vehicle is a passenger car (a "normal" car)
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
std::string id
The vehicle's id.
GUIGlID getGlID() const
Returns the numerical id of the object.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
A class that stores a 2D geometrical boundary.
int getNumLanes() const
Returns the number of lanes.
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionArrivalPos(GNELane *previousLane, double arrivalPosPersonPlan, GNELane *nextLane)
return two shapes used for calculate person plan conections between arrival position
double repetitionProbability
The probability for emitting a vehicle per second.
begin/end of the description of an edge
double arrivalPos
(optional) The position the vehicle shall arrive on
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position ¢er, const double width, const double height, const double rotation=0, const double offsetX=0, const double offsetY=0)
draw a dotted contour around the given Position with certain width and height
double scale
information about a lane's width (temporary, used for a single view)
void changeDemandElementParent(GNEShape *shapeTobeChanged, const std::string &newDemandElementParentID, int demandElementParentIndex)
change first demand element parent of a shape
Supermode currentSupermode
the current supermode
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
static const double personExaggeration
Exaggeration for persons (only used in NETEDIT)
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
std::string time2string(SUMOTime t)
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error)
Validates a given depart value.
void setEnabledAttribute(const int enabledAttributes)
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute)
GUIVisualizationSizeSettings personSize
void updateDemandElementBegin(const std::string &oldBegin, GNEDemandElement *demandElement)
update demand element begin in container
transform person to another person type (ej: person to personflow)
std::string getDepartPos() const
obtain depart pos parameter in string format
SUMOTime string2time(const std::string &r)
const int VEHPARS_VPH_SET
const NetElementGeometry & getGeometry() const
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
std::pair< PositionVector, PositionVector > splitAt(double where, bool use2D=false) const
Returns the two lists made when this list vector is splitted at the given point.
GNEViewNet * getViewNet() const
get view net
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
void write(OutputDevice &dev, const OptionsCont &oc, const SumoXMLTag tag=SUMO_TAG_VEHICLE, const std::string &typeID="") const
Writes the parameters as a beginning element.
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
bool geometryDeprecated
mark geometry as deprecated (used to avoid multiple updates)
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
bool showNonInspectedDemandElements(const GNEDemandElement *demandElement) const
check if non inspected element has to be hidden
GNEJunction * getGNEJunctionSource() const
returns the source-junction
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const int VEHPARS_VTYPE_SET
void insertEdgeLengthRotSegment(const GNEDemandElement *element, const GNEEdge *edge, const Position pos, double length, double rotation, const bool visible, const bool valid)
insert edge segment with length and rotation (used to avoid unnecessary calculation in calculateParti...
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes
DemandElementSegmentGeometry myDemandElementSegmentGeometry
demand element segment geometry
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators)
double y() const
Returns the y-position.
std::vector< std::string > via
List of the via-edges the vehicle must visit.
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
GNEEdge * getToEdge() const
obtain to edge of this demand element
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators)
Demanding mode (Routes, Vehicles etc..)
const int VEHPARS_DEPARTPOS_SET
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children)
std::vector< GNEDemandElement * > stops
stops placed in this segment
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
DepartPosDefinition
Possible ways to choose the departure position.
GUISelectedStorage gSelected
A global holder of selected objects.
const std::string & getDemandElementID() const
returns DemandElement ID
personPlanSegment()
constructor
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
static void transformToPersonFlow(GNEPerson *originalPerson)
transform routeFlow over an existent route
void clearParameter()
Clears the parameter map.
GUIVisualizationTextSettings personValue
GUIVisualizationTextSettings personName
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
static void drawAction_drawAsCircle(const double lenght, const double width)
Boundary & grow(double by)
extends the boundary by the given amount
std::vector< GNEAdditional * > busStops
busStops placed in this segment
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
const int VEHPARS_PERIOD_SET
void endGeometryMoving()
end geometry movement
void removeLockedObject(const GUIGlObjectType type)
set object unselected
bool isRide() const
return true if tag correspond to a ride element
const std::string & getTagStr() const
get tag assigned to this object in string format
Copy typed object name - popup entry.
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
Stores the information about how to visualize structures.
GNELane * getLaneByVClass(const SUMOVehicleClass vClass) const
return the first lane that allow a vehicle of type vClass (or the first lane, if none was found)
static void drawAction_drawAsImage(const double angle, const double lenght, const double width, const std::string &file, const SUMOVehicleShape guiShape, const double exaggeration)
static void drawAction_drawAsTriangle(const double angle, const double lenght, const double width)
const int VEHPARS_END_SET
void updateGeometry()
update pre-computed geometry information
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators)
std::string getParentName() const
Returns the name of the parent object.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
std::string getAttribute(SumoXMLAttr key) const
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
const T getColor(const double value) const
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool isAttributeEnabled(SumoXMLAttr key) const
void startGeometryMoving()
double departPos
(optional) The position the vehicle shall depart from
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
a single trip definition (used by router)
void deselect(GUIGlID id)
Deselects the object with the given id.
GNEViewParent * getViewParent() const
get the net object
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
static const double personCircles
details for draw person as circles
Position getPositionInView() const
Returns position of demand element in view.
std::vector< double > shapeLengths
The lengths of the single shape parts.
void addedLockedObject(const GUIGlObjectType type)
set object selected