Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDemandElementPlan Class Reference

#include <GNEDemandElementPlan.h>

Inheritance diagram for GNEDemandElementPlan:
[legend]
Collaboration diagram for GNEDemandElementPlan:
[legend]

Protected Member Functions

std::string getPersonPlanProblem () const
 get plan problem
GUIGLObjectPopupMenugetPlanPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu.
 GNEDemandElementPlan (GNEDemandElement *planElement, const double departPosition, const double arrivalPosition)
 constructor
GNEDemandElement::Problem isPlanPersonValid () const
 check if plan is valid
void writeLocationAttributes (OutputDevice &device) const
 write plan element common attributes
void writeOriginStop (OutputDevice &device) const
 write initial stop stage if plan starts at a stopping place
path functions
GNELanegetFirstPlanPathLane () const
 get first plan path lane
GNELanegetLastPlanPathLane () const
 get last plan path lane
void computePlanPathElement ()
 compute plan pathElement
geometry functions
void updatePlanGeometry ()
 update pre-computed geometry information
Boundary getPlanCenteringBoundary () const
 get plan centering boundary
void updatePlanCenteringBoundary (const bool updateGrid)
 update plan centering boundary
Position getPlanPositionInView () const
 Returns position of additional in view.
attribute functions
std::string getPlanAttribute (SumoXMLAttr key) const
 get plan attribute string
double getPlanAttributeDouble (SumoXMLAttr key) const
 get plan attribute double
Position getPlanAttributePosition (SumoXMLAttr key) const
 get plan attribute position
void setPlanAttribute (SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
 set plan attribute
bool isPlanValid (SumoXMLAttr key, const std::string &value)
 check if plan attribute is valid
bool isPlanAttributeEnabled (SumoXMLAttr key) const
 check if plan attribute is enabled
void setPlanAttribute (SumoXMLAttr key, const std::string &value)
 set plan attribute (intern)
std::string getPlanHierarchyName () const
 get plan Hierarchy Name (Used in AC Hierarchy)
drawing functions
bool checkDrawPersonPlan () const
 check if person plan can be drawn
bool checkDrawContainerPlan () const
 check if container plan can be drawn
void drawPlanGL (const bool drawPlan, const GUIVisualizationSettings &s, const RGBColor &planColor, const RGBColor &planSelectedColor) const
 draw plan
void drawPlanLanePartial (const bool drawPlan, const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront, const double planWidth, const RGBColor &planColor, const RGBColor &planSelectedColor) const
 draw plan partial lane
void drawPlanJunctionPartial (const bool drawPlan, const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront, const double planWidth, const RGBColor &planColor, const RGBColor &planSelectedColor) const
 draw plan partial junction

Protected Attributes

double myArrivalPosition
 arrival position (used in all plans over edges)
double myDepartPosition
 depart position (used in tranships)
GNEMoveElementPlanmyMoveElementPlan = nullptr
 move element plan
Boundary myPlanBoundary
 plan boundary
GNEContour myPlanContour
 variable used for draw central contour
GNEContour myPlanContourEnd
 variable used for draw contour end

Private Member Functions

void drawEndPosition (const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double endPosRadius) const
 draw to arrow
void drawFromArrow (const GUIVisualizationSettings &s, const GNELane *lane, const GNESegment *segment) const
 draw from arrow
void drawToArrow (const GUIVisualizationSettings &s, const GNELane *lane, const GNESegment *segment) const
 draw to arrow
double getEndPosRadius (const GUIVisualizationSettings &s, const GNESegment *segment, const bool drawHalfWidth) const
 get end position radius
 GNEDemandElementPlan (const GNEDemandElementPlan &)=delete
 Invalidated copy constructor.
GNEDemandElementPlanoperator= (const GNEDemandElementPlan &)=delete
 Invalidated assignment operator.
void replacePlanParent (const std::string &newParentID)
 replace plan parent

Private Attributes

GNEDemandElementmyPlanElement
 pointer to plan element

Static Private Attributes

static const double myArrivalPositionDiameter = SUMO_const_halfLaneWidth
 arrival position diameter

Detailed Description

Definition at line 45 of file GNEDemandElementPlan.h.

Constructor & Destructor Documentation

◆ GNEDemandElementPlan() [1/2]

GNEDemandElementPlan::GNEDemandElementPlan ( GNEDemandElement * planElement,
const double departPosition,
const double arrivalPosition )
protected

constructor

Definition at line 41 of file GNEDemandElementPlan.cpp.

References myArrivalPosition, myDepartPosition, myMoveElementPlan, and myPlanElement.

Referenced by GNEDemandElementPlan(), and operator=().

Here is the caller graph for this function:

◆ GNEDemandElementPlan() [2/2]

GNEDemandElementPlan::GNEDemandElementPlan ( const GNEDemandElementPlan & )
privatedelete

Invalidated copy constructor.

References GNEDemandElementPlan().

Member Function Documentation

◆ checkDrawContainerPlan()

bool GNEDemandElementPlan::checkDrawContainerPlan ( ) const
protected

check if container plan can be drawn

Definition at line 895 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_PARENT, and myPlanElement.

Referenced by GNEStopPlan::drawGL(), GNETranship::drawGL(), GNETransport::drawGL(), GNETranship::drawJunctionPartialGL(), GNETransport::drawJunctionPartialGL(), GNETranship::drawLanePartialGL(), and GNETransport::drawLanePartialGL().

Here is the caller graph for this function:

◆ checkDrawPersonPlan()

bool GNEDemandElementPlan::checkDrawPersonPlan ( ) const
protected

check if person plan can be drawn

Definition at line 858 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_PARENT, and myPlanElement.

Referenced by GNEPersonTrip::drawGL(), GNERide::drawGL(), GNEStopPlan::drawGL(), GNEWalk::drawGL(), GNEPersonTrip::drawJunctionPartialGL(), GNERide::drawJunctionPartialGL(), GNEWalk::drawJunctionPartialGL(), GNEPersonTrip::drawLanePartialGL(), GNERide::drawLanePartialGL(), and GNEWalk::drawLanePartialGL().

Here is the caller graph for this function:

◆ computePlanPathElement()

void GNEDemandElementPlan::computePlanPathElement ( )
protected

compute plan pathElement

Definition at line 199 of file GNEDemandElementPlan.cpp.

References myPlanElement, and updatePlanGeometry().

Referenced by GNEPersonTrip::computePathElement(), GNERide::computePathElement(), GNETranship::computePathElement(), GNETransport::computePathElement(), and GNEWalk::computePathElement().

Here is the caller graph for this function:

◆ drawEndPosition()

void GNEDemandElementPlan::drawEndPosition ( const GUIVisualizationSettings & s,
const GUIVisualizationSettings::Detail d,
const double endPosRadius ) const
private

◆ drawFromArrow()

void GNEDemandElementPlan::drawFromArrow ( const GUIVisualizationSettings & s,
const GNELane * lane,
const GNESegment * segment ) const
private

draw from arrow

Definition at line 1267 of file GNEDemandElementPlan.cpp.

References GUIGeometry::drawChildLine(), GNELane::getLaneShape(), GNESegment::getNextLane(), myPlanElement, GLHelper::popMatrix(), GLHelper::pushMatrix(), and RGBColor::RED.

Referenced by drawPlanLanePartial().

Here is the caller graph for this function:

◆ drawPlanGL()

◆ drawPlanJunctionPartial()

void GNEDemandElementPlan::drawPlanJunctionPartial ( const bool drawPlan,
const GUIVisualizationSettings & s,
const GNESegment * segment,
const double offsetFront,
const double planWidth,
const RGBColor & planColor,
const RGBColor & planSelectedColor ) const
protected

draw plan partial junction

Definition at line 1105 of file GNEDemandElementPlan.cpp.

References GUIVisualizationSettings::addSize, GNEContour::calculateContourExtrudedShape(), GNEContour::checkDrawPathContour(), GUIVisualizationSettings::dottedContourSettings, GUIVisualizationSettings::drawBoundaries, GLHelper::drawBoundary(), GLHelper::drawBoxLines(), GNEContour::drawDottedContours(), GUIVisualizationSettings::drawForViewObjectsHandler, GUIGeometry::drawGeometry(), GUIGlObject::drawGL(), GNEViewNetHelper::LockIcon::drawLockIcon(), GNELane2laneConnection::exist(), GNESegment::getContour(), GUIVisualizationSettings::getDetailLevel(), GUIVisualizationSizeSettings::getExaggeration(), GNESegment::getJunction(), GNESegment::getLane(), GNELane::getLane2laneConnections(), GNELane2laneConnection::getLane2laneGeometry(), GNELane::getLaneShape(), GNESegment::getNextLane(), getPlanCenteringBoundary(), GNEDemandElement::getPreviousChildDemandElement(), GNESegment::getPreviousLane(), GUIGeometry::getShape(), gViewObjectsHandler, myPlanElement, GLHelper::popMatrix(), GLHelper::pushMatrix(), RGBColor::RED, GUIVisualizationDottedContourSettings::segmentWidth, and GLHelper::setColor().

Referenced by GNEPersonTrip::drawJunctionPartialGL(), GNERide::drawJunctionPartialGL(), GNETranship::drawJunctionPartialGL(), GNETransport::drawJunctionPartialGL(), and GNEWalk::drawJunctionPartialGL().

Here is the caller graph for this function:

◆ drawPlanLanePartial()

void GNEDemandElementPlan::drawPlanLanePartial ( const bool drawPlan,
const GUIVisualizationSettings & s,
const GNESegment * segment,
const double offsetFront,
const double planWidth,
const RGBColor & planColor,
const RGBColor & planSelectedColor ) const
protected

draw plan partial lane

Definition at line 993 of file GNEDemandElementPlan.cpp.

References GUIVisualizationSettings::addName, GUIVisualizationSettings::addSize, GNEContour::calculateContourExtrudedShape(), GUIVisualizationSettings::checkDrawContainer(), GNEContour::checkDrawPathContour(), GUIVisualizationSettings::checkDrawPerson(), GUIVisualizationSettings::dottedContourSettings, GUIVisualizationSettings::drawBoundaries, GLHelper::drawBoundary(), GNEContour::drawDottedContours(), drawFromArrow(), GUIGeometry::drawGeometry(), GUIGlObject::drawGL(), drawToArrow(), GNESegment::getContour(), GUIVisualizationSettings::getDetailLevel(), getEndPosRadius(), GUIVisualizationSizeSettings::getExaggeration(), GNESegment::getLane(), GNELane::getLaneGeometry(), GNELane::getLaneShape(), GNELane::getParentEdge(), getPlanAttributeDouble(), getPlanAttributePosition(), getPlanCenteringBoundary(), GNEDemandElement::getPreviousChildDemandElement(), GUIGeometry::getShape(), GNE_ATTR_PLAN_GEOMETRY_ENDPOS, GNE_ATTR_PLAN_GEOMETRY_STARTPOS, gViewObjectsHandler, Position::INVALID, GNESegment::isFirstSegment(), GNESegment::isLastSegment(), myPlanContourEnd, myPlanElement, GLHelper::popMatrix(), GLHelper::pushMatrix(), GUIVisualizationSettings::scale, GUIVisualizationDottedContourSettings::segmentWidth, GLHelper::setColor(), and GUIGeometry::updateGeometry().

Referenced by GNEPersonTrip::drawLanePartialGL(), GNERide::drawLanePartialGL(), GNETranship::drawLanePartialGL(), GNETransport::drawLanePartialGL(), and GNEWalk::drawLanePartialGL().

Here is the caller graph for this function:

◆ drawToArrow()

void GNEDemandElementPlan::drawToArrow ( const GUIVisualizationSettings & s,
const GNELane * lane,
const GNESegment * segment ) const
private

draw to arrow

Definition at line 1287 of file GNEDemandElementPlan.cpp.

References GUIGeometry::drawChildLine(), GNELane::getLaneShape(), GNESegment::getPreviousLane(), myPlanElement, GLHelper::popMatrix(), GLHelper::pushMatrix(), and RGBColor::RED.

Referenced by drawPlanLanePartial().

Here is the caller graph for this function:

◆ getEndPosRadius()

double GNEDemandElementPlan::getEndPosRadius ( const GUIVisualizationSettings & s,
const GNESegment * segment,
const bool drawHalfWidth ) const
private

get end position radius

Definition at line 1254 of file GNEDemandElementPlan.cpp.

References GNESegment::isLastSegment(), GUIVisualizationSettings::laneWidthExaggeration, MIN2(), and myArrivalPositionDiameter.

Referenced by drawPlanLanePartial().

Here is the caller graph for this function:

◆ getFirstPlanPathLane()

GNELane * GNEDemandElementPlan::getFirstPlanPathLane ( ) const
protected

get first plan path lane

Definition at line 153 of file GNEDemandElementPlan.cpp.

References myPlanElement.

Referenced by GNEPersonTrip::getFirstPathLane(), GNERide::getFirstPathLane(), GNEStopPlan::getFirstPathLane(), GNETranship::getFirstPathLane(), GNETransport::getFirstPathLane(), and GNEWalk::getFirstPathLane().

Here is the caller graph for this function:

◆ getLastPlanPathLane()

GNELane * GNEDemandElementPlan::getLastPlanPathLane ( ) const
protected

get last plan path lane

Definition at line 176 of file GNEDemandElementPlan.cpp.

References myPlanElement.

Referenced by GNEPersonTrip::getLastPathLane(), GNERide::getLastPathLane(), GNEStopPlan::getLastPathLane(), GNETranship::getLastPathLane(), GNETransport::getLastPathLane(), and GNEWalk::getLastPathLane().

Here is the caller graph for this function:

◆ getPersonPlanProblem()

std::string GNEDemandElementPlan::getPersonPlanProblem ( ) const
protected

get plan problem

Definition at line 1221 of file GNEDemandElementPlan.cpp.

References myPlanElement, and TLF.

Referenced by GNEPersonTrip::getDemandElementProblem(), GNERide::getDemandElementProblem(), GNEStopPlan::getDemandElementProblem(), GNETranship::getDemandElementProblem(), GNETransport::getDemandElementProblem(), and GNEWalk::getDemandElementProblem().

Here is the caller graph for this function:

◆ getPlanAttribute()

◆ getPlanAttributeDouble()

double GNEDemandElementPlan::getPlanAttributeDouble ( SumoXMLAttr key) const
protected

◆ getPlanAttributePosition()

Position GNEDemandElementPlan::getPlanAttributePosition ( SumoXMLAttr key) const
protected

◆ getPlanCenteringBoundary()

Boundary GNEDemandElementPlan::getPlanCenteringBoundary ( ) const
protected

get plan centering boundary

Definition at line 338 of file GNEDemandElementPlan.cpp.

References myPlanBoundary.

Referenced by drawPlanGL(), drawPlanJunctionPartial(), drawPlanLanePartial(), GNEPersonTrip::getCenteringBoundary(), GNERide::getCenteringBoundary(), GNEStopPlan::getCenteringBoundary(), GNETranship::getCenteringBoundary(), GNETransport::getCenteringBoundary(), and GNEWalk::getCenteringBoundary().

Here is the caller graph for this function:

◆ getPlanHierarchyName()

std::string GNEDemandElementPlan::getPlanHierarchyName ( ) const
protected

get plan Hierarchy Name (Used in AC Hierarchy)

Definition at line 792 of file GNEDemandElementPlan.cpp.

References myPlanElement.

Referenced by GNEPersonTrip::getHierarchyName(), GNERide::getHierarchyName(), GNEStopPlan::getHierarchyName(), GNETranship::getHierarchyName(), GNETransport::getHierarchyName(), and GNEWalk::getHierarchyName().

Here is the caller graph for this function:

◆ getPlanPopUpMenu()

GUIGLObjectPopupMenu * GNEDemandElementPlan::getPlanPopUpMenu ( GUIMainWindow & app,
GUISUMOAbstractView & parent )
protected

Returns an own popup-menu.

Definition at line 142 of file GNEDemandElementPlan.cpp.

References GUIDesigns::buildFXMenuCommand(), getPlanPositionInView(), myPlanElement, and toString().

Referenced by GNEPersonTrip::getPopUpMenu(), GNERide::getPopUpMenu(), GNETranship::getPopUpMenu(), GNETransport::getPopUpMenu(), and GNEWalk::getPopUpMenu().

Here is the caller graph for this function:

◆ getPlanPositionInView()

Position GNEDemandElementPlan::getPlanPositionInView ( ) const
protected

Returns position of additional in view.

Definition at line 386 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_TAZ_CENTROID, myPlanElement, and SUMO_ATTR_CENTER.

Referenced by getPlanPopUpMenu(), GNEPersonTrip::getPositionInView(), GNERide::getPositionInView(), GNEStopPlan::getPositionInView(), GNETranship::getPositionInView(), GNETransport::getPositionInView(), and GNEWalk::getPositionInView().

Here is the caller graph for this function:

◆ isPlanAttributeEnabled()

◆ isPlanPersonValid()

GNEDemandElement::Problem GNEDemandElementPlan::isPlanPersonValid ( ) const
protected

check if plan is valid

Definition at line 1188 of file GNEDemandElementPlan.cpp.

References GNEDemandElement::DISCONNECTED_PLAN, myPlanElement, and GNEDemandElement::OK.

Referenced by GNEPersonTrip::isDemandElementValid(), GNERide::isDemandElementValid(), GNEStopPlan::isDemandElementValid(), GNETranship::isDemandElementValid(), GNETransport::isDemandElementValid(), and GNEWalk::isDemandElementValid().

Here is the caller graph for this function:

◆ isPlanValid()

bool GNEDemandElementPlan::isPlanValid ( SumoXMLAttr key,
const std::string & value )
protected

check if plan attribute is valid

Definition at line 686 of file GNEDemandElementPlan.cpp.

References GNEAttributeCarrier::canParse(), GNE_ATTR_PARENT, invalid_return< std::string >::value, myPlanElement, GNEAttributeCarrier::parse(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_DEPARTPOS, and SUMO_ATTR_ENDPOS.

Referenced by GNEPersonTrip::isValid(), GNERide::isValid(), GNEStopPlan::isValid(), GNETranship::isValid(), GNETransport::isValid(), and GNEWalk::isValid().

Here is the caller graph for this function:

◆ operator=()

GNEDemandElementPlan & GNEDemandElementPlan::operator= ( const GNEDemandElementPlan & )
privatedelete

Invalidated assignment operator.

References GNEDemandElementPlan().

◆ replacePlanParent()

void GNEDemandElementPlan::replacePlanParent ( const std::string & newParentID)
private

replace plan parent

Definition at line 1324 of file GNEDemandElementPlan.cpp.

References NamespaceIDs::containers, myPlanElement, and NamespaceIDs::persons.

Referenced by setPlanAttribute().

Here is the caller graph for this function:

◆ setPlanAttribute() [1/2]

void GNEDemandElementPlan::setPlanAttribute ( SumoXMLAttr key,
const std::string & value )
protected

◆ setPlanAttribute() [2/2]

void GNEDemandElementPlan::setPlanAttribute ( SumoXMLAttr key,
const std::string & value,
GNEUndoList * undoList )
protected

◆ updatePlanCenteringBoundary()

void GNEDemandElementPlan::updatePlanCenteringBoundary ( const bool updateGrid)
protected

update plan centering boundary

Definition at line 344 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_TAZ_CENTROID, myPlanBoundary, myPlanElement, SUMO_ATTR_CENTER, and SUMO_TAG_TAZ.

Referenced by GNEPersonTrip::GNEPersonTrip(), GNERide::GNERide(), GNEStopPlan::GNEStopPlan(), GNETranship::GNETranship(), GNETransport::GNETransport(), GNEWalk::GNEWalk(), and updatePlanGeometry().

Here is the caller graph for this function:

◆ updatePlanGeometry()

void GNEDemandElementPlan::updatePlanGeometry ( )
protected

update pre-computed geometry information

Definition at line 277 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_TAZ_CENTROID, Position::INVALID, myPlanElement, SUMO_ATTR_CENTER, and updatePlanCenteringBoundary().

Referenced by computePlanPathElement(), GNEPersonTrip::updateGeometry(), GNERide::updateGeometry(), GNETranship::updateGeometry(), GNETransport::updateGeometry(), and GNEWalk::updateGeometry().

Here is the caller graph for this function:

◆ writeLocationAttributes()

◆ writeOriginStop()

void GNEDemandElementPlan::writeOriginStop ( OutputDevice & device) const
protected

write initial stop stage if plan starts at a stopping place

Definition at line 117 of file GNEDemandElementPlan.cpp.

References OutputDevice::closeTag(), myPlanElement, OutputDevice::openTag(), SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_DURATION, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_TRAIN_STOP, SUMO_TAG_STOP, and OutputDevice::writeAttr().

Referenced by GNEPersonTrip::writeDemandElement(), GNERide::writeDemandElement(), GNETranship::writeDemandElement(), GNETransport::writeDemandElement(), and GNEWalk::writeDemandElement().

Here is the caller graph for this function:

Field Documentation

◆ myArrivalPosition

double GNEDemandElementPlan::myArrivalPosition
protected

arrival position (used in all plans over edges)

Definition at line 164 of file GNEDemandElementPlan.h.

Referenced by getPlanAttribute(), getPlanAttributeDouble(), getPlanAttributePosition(), GNEDemandElementPlan(), setPlanAttribute(), and writeLocationAttributes().

◆ myArrivalPositionDiameter

const double GNEDemandElementPlan::myArrivalPositionDiameter = SUMO_const_halfLaneWidth
staticprivate

arrival position diameter

Definition at line 186 of file GNEDemandElementPlan.h.

Referenced by getEndPosRadius().

◆ myDepartPosition

double GNEDemandElementPlan::myDepartPosition
protected

depart position (used in tranships)

Definition at line 161 of file GNEDemandElementPlan.h.

Referenced by getPlanAttribute(), getPlanAttributeDouble(), GNEDemandElementPlan(), setPlanAttribute(), and writeLocationAttributes().

◆ myMoveElementPlan

◆ myPlanBoundary

Boundary GNEDemandElementPlan::myPlanBoundary
protected

plan boundary

Definition at line 58 of file GNEDemandElementPlan.h.

Referenced by getPlanCenteringBoundary(), and updatePlanCenteringBoundary().

◆ myPlanContour

GNEContour GNEDemandElementPlan::myPlanContour
protected

variable used for draw central contour

Definition at line 52 of file GNEDemandElementPlan.h.

Referenced by drawPlanGL().

◆ myPlanContourEnd

GNEContour GNEDemandElementPlan::myPlanContourEnd
protected

variable used for draw contour end

Definition at line 55 of file GNEDemandElementPlan.h.

Referenced by drawPlanGL(), and drawPlanLanePartial().

◆ myPlanElement


The documentation for this class was generated from the following files: