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();
122 mySelectedPersons(selectedPerson),
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);
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);
840 }
else if (newParametersSet & VEHPARS_END_SET) {
842 }
else if (newParametersSet & VEHPARS_NUMBER_SET) {
853 }
else if (newParametersSet & VEHPARS_END_SET) {
855 }
else if (newParametersSet & VEHPARS_NUMBER_SET) {
866 }
else if (newParametersSet & VEHPARS_END_SET) {
868 }
else if (newParametersSet & VEHPARS_NUMBER_SET) {
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),
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;
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
static const double personCircles
details for draw person as circles
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionArrivalPos(GNELane *previousLane, double arrivalPosPersonPlan, GNELane *nextLane)
return two shapes used for calculate person plan conections between arrival position ...
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag ...
Copy object name - popup entry.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
SumoXMLTag
Numbers representing SUMO-XML - element names.
RGBColor color
The vehicle's color, TraCI may change this.
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionStop(GNELane *previousLane, GNEDemandElement *stop, GNELane *nextLane)
return two shapes used for calculate person plan conections between stops
SumoXMLTag getTagSynonym() const
get tag synonym
double scale
information about a lane's width (temporary, used for a single view)
description of a vehicle type
void addedLockedObject(const GUIGlObjectType type)
set object selected
PositionVector shape
The shape of the netElement element.
std::vector< GNEAdditional * > busStops
busStops placed in this segment
static const double personShapes
details for draw person as person shapes
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
std::string vtypeid
The vehicle's type id.
GUIVisualizationTextSettings personValue
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
GUIVisualizationTextSettings personName
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
a flow definitio nusing a from-to edges instead of a route (used by router)
static const double personExaggeration
Exaggeration for persons (only used in NETEDIT)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const int VEHPARS_PROB_SET
Stores the information about how to visualize structures.
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.
void endGeometryMoving()
end geometry movement
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
GNEViewParent * getViewParent() const
get the net object
double y() const
Returns the y-position.
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
bool geometryDeprecated
mark geometry as deprecated (used to avoid multiple updates)
double repetitionProbability
The probability for emitting a vehicle per second.
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color) ...
std::string time2string(SUMOTime t)
double x() const
Returns the x-position.
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)
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...
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
weights: time range begin
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static void transformToPerson(GNEPerson *originalPerson)
transform person functions
virtual double getAttributeDouble(SumoXMLAttr key) const =0
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void changeDemandElementID(const std::string &newID)
change ID of demand element
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
bool hasNext()
returns the information whether further substrings exist
PositionVector shape
The shape of the additional element.
const int VEHPARS_NUMBER_SET
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
const AdditionalGeometry & getAdditionalGeometry() const
obtain AdditionalGeometry
A class that stores a 2D geometrical boundary.
static void drawAction_drawAsCircle(const double lenght, const double width)
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
static OptionsCont & getOptions()
Retrieves the options.
personPlanSegment()
constructor
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
friend class GNEChange_EnableAttribute
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
bool isRide() const
return true if tag correspond to a ride element
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
double getAttributeDouble(SumoXMLAttr key) const
const DemandElementGeometry & getDemandElementGeometry() const
get demand element geometry
void selectAttributeCarrier(bool changeFlag=true)
inherited from GNEAttributeCarrier
std::string getGenericParametersStr() const
return generic parameters in string format
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
NBEdge * getNBEdge() const
returns the internal NBEdge
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
SUMOVehicleParameter()
Constructor.
std::vector< double > shapeRotations
The rotations of the single shape parts.
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
const RGBColor & getColor() const
get color
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
int getNumLanes() const
Returns the number of lanes.
std::string getDepartPos() const
obtain depart pos parameter in string format
A point in 2D or 3D with translation and scaling methods.
PositionVector shape
The shape of the additional element.
DemandElementSegmentGeometry myDemandElementSegmentGeometry
demand element segment geometry
GNEEdge * getToEdge() const
obtain to edge of this demand element
Supermode currentSupermode
the current supermode
double scaledSize(double scale, double constFactor=0.1) const
get scale size
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeLockedObject(const GUIGlObjectType type)
set object unselected
friend class GNEChange_Attribute
declare friend class
std::string getAttribute(SumoXMLAttr key) const
void changeDemandElementParent(GNEShape *shapeTobeChanged, const std::string &newDemandElementParentID, int demandElementParentIndex)
change first demand element parent of a shape
const std::vector< GNELane * > & getLaneParents() const
get lanes of VSS
void calculatePartialShapeRotationsAndLengths()
calculate partial shape, rotations and lengths
void startGeometryMoving()
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
SUMOTime string2time(const std::string &r)
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.
const std::string & getDemandElementID() const
returns DemandElement ID
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
GUIColorer personColorer
The person colorer.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
Boundary & grow(double by)
extends the boundary by the given amount
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void insertEdgeSegment(const GNEDemandElement *element, const GNEEdge *edge, const Position pos, const bool visible, const bool valid)
insert edge segment
void updateGeometry()
update pre-computed geometry information
const std::string getID() const
function to support debugging
static const double personTriangles
details for draw person as triangles
double angle
The current view rotation angle.
void clearDemandElementSegmentGeometry()
clear demand element geometry
const NetElementGeometry & getGeometry() const
const T getColor(const double value) const
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
const int VEHPARS_PERIOD_SET
void setEnabledAttribute(const int enabledAttributes)
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute) ...
GNEJunction * getGNEJunctionSource() const
returns the source-junction
const int VEHPARS_COLOR_SET
FXDEFMAP(GNEPerson::GNEPersonPopupMenu) personPopupMenuMap[]
vehicle is a passenger car (a "normal" car)
std::vector< double > shapeLengths
The lengths of the single shape parts.
const int VEHPARS_END_SET
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
begin/end of the description of an edge
double arrivalPos
(optional) The position the vehicle shall arrive on
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
std::vector< std::string > via
List of the via-edges the vehicle must visit.
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
A road/street connecting two junctions (netedit-version)
GUIVisualizationDetailSettings detailSettings
detail settings
Position getPositionInView() const
Returns position of demand element in view.
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
bool showNonInspectedDemandElements(const GNEDemandElement *demandElement) const
check if non inspected element has to be hidden
static void transformToPersonFlow(GNEPerson *originalPerson)
transform routeFlow over an existent route
double departPos
(optional) The position the vehicle shall depart from
void updateDemandElementBegin(const std::string &oldBegin, GNEDemandElement *demandElement)
update demand element begin in container
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
bool showDemandElements() const
check if show demand elements checkbox is enabled
Structure representing possible vehicle parameter.
void deselect(GUIGlID id)
Deselects the object with the given id.
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
double length() const
Returns the length.
bool isDemandElementValid() const
check if current demand element is valid to be writed into XML (by default true, can be reimplemented...
bool isAttributeEnabled(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes ...
std::vector< GNEDemandElement * > stops
stops placed in this segment
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
const std::string DEFAULT_PEDTYPE_ID
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.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
virtual double getColorValue(const GUIVisualizationSettings &, int) const
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
const std::string & getTagStr() const
get tag assigned to this object in string format
Demanding mode (Routes, Vehicles etc..)
double arrivalPos
arrival position
SumoXMLTag tag
The vehicle tag.
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children) ...
GUIVisualizationSizeSettings personSize
GNENet * getNet() const
get the net object
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
bool wasSet(int what) const
Returns whether the given parameter was set.
GUIGlID getGlID() const
Returns the numerical id of the object.
const int VEHPARS_VTYPE_SET
GNEPerson(SumoXMLTag tag, GNEViewNet *viewNet, GNEDemandElement *pType, const SUMOVehicleParameter &personparameters)
constructor for persons
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
GNEEdge * getFromEdge() const
void writeDemandElement(OutputDevice &device) const
writte demand element element into a xml file
const int VEHPARS_VPH_SET
a single trip definition (used by router)
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
std::string getDepart() const
obtain depart parameter in string format
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
const int VEHPARS_DEPARTPOS_SET
void compute()
compute demand element
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void calculateSmoothPersonPlanConnection(const GNEDemandElement *personPlanElement, const GNEEdge *edgeFrom, const GNEEdge *edgeTo)
calculate smooth shape between personPlans
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
transform person to another person type (ej: person to personflow)
DepartPosDefinition
Possible ways to choose the departure position.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
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.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
GUISelectedStorage gSelected
A global holder of selected objects.
Copy typed object name - popup entry.
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) ...
std::string getParentName() const
Returns the name of the parent object.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
NBNode * getToNode() const
Returns the destination node of the edge.
const GNEDemandElement * personPlan
person plan
void insertJunctionSegment(const GNEDemandElement *element, const GNEJunction *junction, const Position pos, const bool visible, const bool valid)
insert junction segment
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
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 moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string id
The vehicle's id.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
An Element which don't belongs to GNENet but has influency in the simulation.
GNEViewNet * getViewNet() const
get view net
std::pair< PositionVector, PositionVector > calculatePersonPlanConnectionBusStop(GNELane *previousLane, GNEAdditional *busStop, GNELane *nextLane)
return two shapes used for calculate person plan conections between busStops
void clearParameter()
Clears the parameter map.
std::string getBegin() const
get begin time of demand element