Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
GNEMoveOperationgetPlanMoveOperation ()
 get move operation
 
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)
 
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.
 
bool 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 44 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 43 of file GNEDemandElementPlan.cpp.

◆ GNEDemandElementPlan() [2/2]

GNEDemandElementPlan::GNEDemandElementPlan ( const GNEDemandElementPlan )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ checkDrawContainerPlan()

bool GNEDemandElementPlan::checkDrawContainerPlan ( ) const
protected

◆ checkDrawPersonPlan()

◆ computePlanPathElement()

◆ 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 1292 of file GNEDemandElementPlan.cpp.

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

Referenced by drawPlanLanePartial().

Here is the caller graph for this function:

◆ drawPlanGL()

void GNEDemandElementPlan::drawPlanGL ( const bool  drawPlan,
const GUIVisualizationSettings s,
const RGBColor planColor,
const RGBColor planSelectedColor 
) const
protected

draw plan

Definition at line 957 of file GNEDemandElementPlan.cpp.

References GNEContour::calculateContourCircleShape(), GNEContour::calculateContourExtrudedShape(), GUIVisualizationSettings::checkDrawContainer(), GUIVisualizationSettings::checkDrawPerson(), GUIVisualizationSettings::dottedContourSettings, GUIVisualizationSettings::drawBoundaries, GLHelper::drawBoundary(), GNEContour::drawDottedContours(), GUIGeometry::drawGeometry(), GNEDemandElement::drawGL(), GNEAttributeCarrier::drawInLayer(), GLHelper::drawTriangleAtEnd(), GNEAttributeCarrier::drawUsingSelectColor(), GUIVisualizationSettings::getDetailLevel(), GNEViewNet::getInspectedElements(), GNEAttributeCarrier::getNet(), GNEHierarchicalElement::getParentDemandElements(), getPlanCenteringBoundary(), GNEDemandElement::getPreviousChildDemandElement(), GNEAttributeCarrier::getTagProperty(), GUIGlObject::getType(), GNENet::getViewNet(), GLO_TAZ, gViewObjectsHandler, GNEAttributeCarrier::isAttributeCarrierSelected(), GUIViewObjectsHandler::isObjectSelected(), GNEDemandElement::myDemandElementGeometry, myPlanContour, myPlanContourEnd, myPlanElement, GUIVisualizationWidthSettings::personTripWidth, GLHelper::popMatrix(), GLHelper::pushMatrix(), GUIVisualizationWidthSettings::rideWidth, GUIVisualizationDottedContourSettings::segmentWidth, GLHelper::setColor(), GUIVisualizationWidthSettings::walkWidth, and GUIVisualizationSettings::widthSettings.

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

Here is the caller graph for this function:

◆ 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 1130 of file GNEDemandElementPlan.cpp.

References GUIVisualizationSettings::addSize, GUIViewObjectsHandler::addToRedrawPathElements(), GNEContour::calculateContourExtrudedShape(), GNEContour::checkDrawPathContour(), GNEPathManager::PathDraw::checkDrawPathGeometry(), GUIVisualizationSettings::dottedContourSettings, GUIVisualizationSettings::drawBoundaries, GLHelper::drawBoundary(), GLHelper::drawBoxLines(), GNEContour::drawDottedContours(), GUIVisualizationSettings::drawForViewObjectsHandler, GUIGeometry::drawGeometry(), GNEDemandElement::drawGL(), GNEAttributeCarrier::drawInLayer(), GNEViewNetHelper::LockIcon::drawLockIcon(), GNEAttributeCarrier::drawUsingSelectColor(), GNELane2laneConnection::exist(), GNESegment::getContour(), GNENet::getDemandPathManager(), GUIVisualizationSettings::getDetailLevel(), GUIVisualizationSizeSettings::getExaggeration(), GNEViewNet::getInspectedElements(), GNESegment::getJunction(), GNESegment::getLane(), GNELane::getLane2laneConnections(), GNELane2laneConnection::getLane2laneGeometry(), GNELane::getLaneShape(), GNEAttributeCarrier::getNet(), GNESegment::getNextLane(), GNEHierarchicalElement::getParentDemandElements(), GNEHierarchicalElement::getParentJunctions(), GNEPathManager::getPathDraw(), getPlanCenteringBoundary(), GNEDemandElement::getPositionInView(), GNEDemandElement::getPreviousChildDemandElement(), GNESegment::getPreviousLane(), GUIGeometry::getShape(), GNEAttributeCarrier::getTagProperty(), GUIGlObject::getType(), GNENet::getViewNet(), gViewObjectsHandler, GUIViewObjectsHandler::isObjectSelected(), GUIViewObjectsHandler::isPathElementMarkForRedraw(), 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 1018 of file GNEDemandElementPlan.cpp.

References GUIVisualizationSettings::addName, GUIVisualizationSettings::addSize, GUIViewObjectsHandler::addToRedrawPathElements(), GNEContour::calculateContourCircleShape(), GNEContour::calculateContourExtrudedShape(), GUIVisualizationSettings::checkDrawContainer(), GNEContour::checkDrawPathContour(), GNEPathManager::PathDraw::checkDrawPathGeometry(), GUIVisualizationSettings::checkDrawPerson(), GUIVisualizationSettings::dottedContourSettings, GUIVisualizationSettings::drawBoundaries, GLHelper::drawBoundary(), GNEContour::drawDottedContours(), drawFromArrow(), GUIGeometry::drawGeometry(), GNEDemandElement::drawGL(), GNEAttributeCarrier::drawInLayer(), GUIGlObject::drawName(), drawToArrow(), GNEAttributeCarrier::drawUsingSelectColor(), Boundary::getCenter(), GUIGlObject::getCenteringBoundary(), GNESegment::getContour(), GNENet::getDemandPathManager(), GUIVisualizationSettings::getDetailLevel(), getEndPosRadius(), GUIVisualizationSizeSettings::getExaggeration(), GNEViewNet::getInspectedElements(), GNESegment::getLane(), GNELane::getLaneGeometry(), GNELane::getLaneShape(), GNEAttributeCarrier::getNet(), GNEHierarchicalElement::getParentDemandElements(), GNELane::getParentEdge(), GNEPathManager::getPathDraw(), getPlanAttributeDouble(), getPlanAttributePosition(), getPlanCenteringBoundary(), GNEDemandElement::getPreviousChildDemandElement(), GUIGeometry::getShape(), GNEAttributeCarrier::getTagProperty(), GUIGlObject::getType(), GNENet::getViewNet(), GNE_ATTR_PLAN_GEOMETRY_ENDPOS, GNE_ATTR_PLAN_GEOMETRY_STARTPOS, gViewObjectsHandler, Position::INVALID, GNEAttributeCarrier::isAttributeCarrierSelected(), GNESegment::isFirstSegment(), GNESegment::isLastSegment(), GUIViewObjectsHandler::isObjectSelected(), GUIViewObjectsHandler::isPathElementMarkForRedraw(), 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 1312 of file GNEDemandElementPlan.cpp.

References GUIGeometry::drawChildLine(), GNELane::getLaneShape(), GNESegment::getPreviousLane(), GNEAttributeCarrier::isAttributeCarrierSelected(), 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 1279 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

◆ getLastPlanPathLane()

GNELane * GNEDemandElementPlan::getLastPlanPathLane ( ) const
protected

◆ getPersonPlanProblem()

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

get plan problem

Definition at line 1246 of file GNEDemandElementPlan.cpp.

References GNEDemandElement::getLastPathLane(), GNEHierarchicalElement::getParentDemandElements(), 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()

◆ getPlanAttributePosition()

◆ getPlanCenteringBoundary()

Boundary GNEDemandElementPlan::getPlanCenteringBoundary ( ) const
protected

get plan centering boundary

Definition at line 363 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

◆ getPlanMoveOperation()

◆ getPlanPopUpMenu()

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

◆ getPlanPositionInView()

◆ isPlanAttributeEnabled()

◆ isPlanPersonValid()

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

◆ isPlanValid()

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

check if plan attribute is valid

Definition at line 711 of file GNEDemandElementPlan.cpp.

References GNE_ATTR_PARENT, GNEAttributeCarrier::isCommonValid(), myPlanElement, 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.

◆ replacePlanParent()

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

replace plan parent

Definition at line 1349 of file GNEDemandElementPlan.cpp.

References GNENet::getAttributeCarriers(), GNEAttributeCarrier::getNet(), GNETagProperties::isPlanPerson(), myPlanElement, GNEAttributeCarrier::myTagProperty, GNEDemandElement::replaceDemandElementParent(), GNENetHelper::AttributeCarriers::retrieveDemandElement(), SUMO_TAG_CONTAINER, SUMO_TAG_CONTAINERFLOW, SUMO_TAG_PERSON, and SUMO_TAG_PERSONFLOW.

Referenced by setPlanAttribute().

Here is the caller graph for this function:

◆ setPlanAttribute() [1/2]

◆ setPlanAttribute() [2/2]

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

◆ updatePlanCenteringBoundary()

◆ updatePlanGeometry()

◆ writeLocationAttributes()

◆ writeOriginStop()

void GNEDemandElementPlan::writeOriginStop ( OutputDevice device) const
protected

Field Documentation

◆ myArrivalPosition

◆ myArrivalPositionDiameter

const double GNEDemandElementPlan::myArrivalPositionDiameter = SUMO_const_halfLaneWidth
staticprivate

arrival position diameter

Definition at line 187 of file GNEDemandElementPlan.h.

Referenced by getEndPosRadius(), and getPlanMoveOperation().

◆ myDepartPosition

double GNEDemandElementPlan::myDepartPosition
protected

depart position (used in tranships)

Definition at line 162 of file GNEDemandElementPlan.h.

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

◆ myPlanBoundary

Boundary GNEDemandElementPlan::myPlanBoundary
protected

plan boundary

Definition at line 54 of file GNEDemandElementPlan.h.

Referenced by getPlanCenteringBoundary(), and updatePlanCenteringBoundary().

◆ myPlanContour

GNEContour GNEDemandElementPlan::myPlanContour
protected

variable used for draw central contour

Definition at line 48 of file GNEDemandElementPlan.h.

Referenced by drawPlanGL().

◆ myPlanContourEnd

GNEContour GNEDemandElementPlan::myPlanContourEnd
protected

variable used for draw contour end

Definition at line 51 of file GNEDemandElementPlan.h.

Referenced by drawPlanGL(), and drawPlanLanePartial().

◆ myPlanElement


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