 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef GNEDemandElement_h
17 #define GNEDemandElement_h
120 const std::vector<GNEEdge*>& parentEdges,
121 const std::vector<GNELane*>& parentLanes,
122 const std::vector<GNEShape*>& parentShapes,
123 const std::vector<GNEAdditional*>& parentAdditionals,
124 const std::vector<GNEDemandElement*>& parentDemandElements,
125 const std::vector<GNEEdge*>& childEdges,
126 const std::vector<GNELane*>& childLanes,
127 const std::vector<GNEShape*>& childShapes,
128 const std::vector<GNEAdditional*>& childAdditionals,
129 const std::vector<GNEDemandElement*>& childDemandElements);
148 const std::vector<GNEEdge*>& parentEdges,
149 const std::vector<GNELane*>& parentLanes,
150 const std::vector<GNEShape*>& parentShapes,
151 const std::vector<GNEAdditional*>& parentAdditionals,
152 const std::vector<GNEDemandElement*>& parentDemandElements,
153 const std::vector<GNEEdge*>& childEdges,
154 const std::vector<GNELane*>& childLanes,
155 const std::vector<GNEShape*>& childShapes,
156 const std::vector<GNEAdditional*>& childAdditionals,
157 const std::vector<GNEDemandElement*>& childDemandElements);
213 virtual std::string
getBegin()
const;
372 static bool isRouteValid(
const std::vector<GNEEdge*>& edges,
bool report);
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
void updateDijkstraRouter()
update DijkstraRoute (called when SuperMode Demand is selected)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
GNELane * getLastAllowedVehicleLane() const
get first allowed vehicle lane
const GNEGeometry::Geometry & getDemandElementGeometry() const
get demand element geometry
An Element which don't belongs to GNENet but has influency in the simulation.
static void createRouteCalculatorInstance(GNENet *net)
create instance of RouteCalculator
An Element which don't belongs to GNENet but has influency in the simulation.
A window containing a gl-object's parameter.
virtual GNEEdge * getFromEdge() const =0
virtual void invalidatePath()=0
invalidate path
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
virtual std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
bool isValidDemandElementID(const std::string &newID) const
check if a new demand element ID is valid
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
std::string firstOriginalLanePosition
value for saving first original position over lane before moving
Static storage of an output device and its base (abstract) implementation.
virtual void selectAttributeCarrier(bool changeFlag=true)=0
const GNEGeometry::SegmentGeometry & getDemandElementSegmentGeometry() const
get demand element segment geometry
A NBNetBuilder extended by visualisation and editing capabilities.
struct for pack all variables related with Demand Element moving
GNELane * getFirstAllowedVehicleLane() const
get first allowed vehicle lane
virtual void writeDemandElement(OutputDevice &device) const =0
writte demand element element into a xml file
GNEDemandElement(const std::string &id, GNEViewNet *viewNet, GUIGlObjectType type, SumoXMLTag tag, const std::vector< GNEEdge * > &parentEdges, const std::vector< GNELane * > &parentLanes, const std::vector< GNEShape * > &parentShapes, const std::vector< GNEAdditional * > &parentAdditionals, const std::vector< GNEDemandElement * > &parentDemandElements, const std::vector< GNEEdge * > &childEdges, const std::vector< GNELane * > &childLanes, const std::vector< GNEShape * > &childShapes, const std::vector< GNEAdditional * > &childAdditionals, const std::vector< GNEDemandElement * > &childDemandElements)
Constructor.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
Position originalViewPosition
value for saving first original position over lane before moving
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
virtual Boundary getCenteringBoundary() const =0
Returns the boundary to which the view shall be centered in order to show the object.
virtual void startGeometryMoving()=0
SumoXMLTag
Numbers representing SUMO-XML - element names.
virtual void updatePartialGeometry(const GNEEdge *edge)=0
partial update pre-computed geometry information
An special type of Attribute carrier that owns hierarchical elements.
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GNEGeometry::SegmentGeometry myDemandElementSegmentGeometry
demand element segment geometry
virtual void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children)
A road/street connecting two junctions (netedit-version)
std::string secondOriginalPosition
value for saving second original position over lane before moving
void changeDemandElementID(const std::string &newID)
change ID of demand element
virtual Position getPositionInView() const =0
Returns position of demand element in view.
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
GNEDemandElement(const GNEDemandElement &)=delete
Invalidated copy constructor.
static RouteCalculator * myRouteCalculatorInstance
RouteCalculator instance.
struct for pack all variables related with geometry of elemements divided in segments
virtual void updateGeometry()=0
update pre-computed geometry information
SUMOAbstractRouter< NBRouterEdge, NBVehicle > * myDijkstraRouter
SUMO Abstract DijkstraRouter.
GNENet * myNet
pointer to net
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
virtual double getAttributeDouble(SumoXMLAttr key) const =0
virtual const RGBColor & getColor() const =0
get color
virtual void drawGL(const GUIVisualizationSettings &s) const =0
Draws the object.
A class that stores a 2D geometrical boundary.
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
void calculatePersonPlanPositionStartEndPos(Position &startPos, Position &endPos) const
calculate personPlan start and end positions
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
virtual void moveGeometry(const Position &offset)=0
change the position of the element geometry without saving in undoList
A point in 2D or 3D with translation and scaling methods.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
struct for pack all variables related with geometry of stop
virtual void openDemandElementDialog()
open DemandElement Dialog
virtual bool checkChildDemandElementRestriction() const
check restriction with the number of children
~RouteCalculator()
destructor
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes
class used to calculate routes in nets
void calculatePersonPlanLaneStartEndPos(double &startPos, double &endPos) const
calculate personPlan start and end positions over lanes
bool areEdgesConsecutives(SUMOVehicleClass vClass, GNEEdge *from, GNEEdge *to) const
check if exist a route between the two given consecutives edges
RouteCalculator(GNENet *net)
constructor
virtual void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)=0
split geometry
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
const std::string & getDemandElementID() const
returns DemandElement ID
virtual void commitGeometryMoving(GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(....
An special type of Attribute carrier that owns hierarchical elements.
static bool isRouteValid(const std::vector< GNEEdge * > &edges, bool report)
check if a route is valid
GNEGeometry::Geometry myDemandElementGeometry
demand element geometry
static void deleteRouteCalculatorInstance()
delete instance of RouteCalculator
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra route between a list of partial edges
virtual std::string getBegin() const
get begin time of demand element
Stores the information about how to visualize structures.
virtual void endGeometryMoving()=0
end geometry movement
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE)
virtual bool isDemandElementValid() const
check if current demand element is valid to be writed into XML (by default true, can be reimplemented...
~GNEDemandElement()
Destructor.
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNEDemandElement & operator=(const GNEDemandElement &)=delete
Invalidated assignment operator.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
virtual void computePath()=0
compute path
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
virtual void setAttribute(SumoXMLAttr key, const std::string &value)=0
method for setting the attribute and nothing else (used in GNEChange_Attribute)
virtual GNEEdge * getToEdge() const =0
obtain to edge of this demand element