 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef GNEDemandElement_h
18 #define GNEDemandElement_h
141 std::vector<Segment>::const_iterator
begin()
const;
144 std::vector<Segment>::const_iterator
end()
const;
216 const std::vector<GNEEdge*>& edgeParents,
217 const std::vector<GNELane*>& laneParents,
218 const std::vector<GNEShape*>& shapeParents,
219 const std::vector<GNEAdditional*>& additionalParents,
220 const std::vector<GNEDemandElement*>& demandElementParents,
221 const std::vector<GNEEdge*>& edgeChildren,
222 const std::vector<GNELane*>& laneChildren,
223 const std::vector<GNEShape*>& shapeChildren,
224 const std::vector<GNEAdditional*>& additionalChildren,
225 const std::vector<GNEDemandElement*>& demandElementChildren);
244 const std::vector<GNEEdge*>& edgeParents,
245 const std::vector<GNELane*>& laneParents,
246 const std::vector<GNEShape*>& shapeParents,
247 const std::vector<GNEAdditional*>& additionalParents,
248 const std::vector<GNEDemandElement*>& demandElementParents,
249 const std::vector<GNEEdge*>& edgeChildren,
250 const std::vector<GNELane*>& laneChildren,
251 const std::vector<GNEShape*>& shapeChildren,
252 const std::vector<GNEAdditional*>& additionalChildren,
253 const std::vector<GNEDemandElement*>& demandElementChildren);
316 virtual std::string
getBegin()
const;
465 static bool isRouteValid(
const std::vector<GNEEdge*>& edges,
bool report);
void markSegmentGeometryDeprecated()
mark demand element segment geometry as deprecated
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
void updateDijkstraRouter()
update DijkstraRoute (called when SuperMode Demand is selected)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
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 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
void calculatePartialShapeRotationsAndLengths()
calculate partial shape, rotations and lengths
const bool visible
visible
Static storage of an output device and its base (abstract) implementation.
void insertEdgeSegment(const GNEDemandElement *element, const GNEEdge *edge, const Position pos, const bool visible, const bool valid)
insert edge segment
void clearDemandElementSegmentGeometry()
clear demand element geometry
virtual void selectAttributeCarrier(bool changeFlag=true)=0
DemandElementGeometry myDemandElementGeometry
demand element geometry
A NBNetBuilder extended by visualisation and editing capabilities.
std::vector< Segment >::const_iterator end() const
end iterator
struct for pack all variables related with Demand Element moving
void calculateShapeRotationsAndLengths()
calculate shape rotations and lengths
virtual void writeDemandElement(OutputDevice &device) const =0
writte demand element element into a xml file
virtual std::vector< std::pair< std::string, std::string > > getGenericParameters() const =0
return generic parameters as vector of pairs format
const GNEDemandElement * element
element
const DemandElementSegmentGeometry & getDemandElementSegmentGeometry() const
get demand element segment geometry
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
An special type of Attribute carrier that owns hierarchical elements.
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
std::vector< double > shapeRotations
The rotations of the single shape parts.
SumoXMLTag
Numbers representing SUMO-XML - element names.
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
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.
const DemandElementGeometry & getDemandElementGeometry() const
get demand element geometry
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
PositionVector shape
The shape of the additional element.
GNEDemandElement(const std::string &id, GNEViewNet *viewNet, GUIGlObjectType type, SumoXMLTag tag, const std::vector< GNEEdge * > &edgeParents, const std::vector< GNELane * > &laneParents, const std::vector< GNEShape * > &shapeParents, const std::vector< GNEAdditional * > &additionalParents, const std::vector< GNEDemandElement * > &demandElementParents, const std::vector< GNEEdge * > &edgeChildren, const std::vector< GNELane * > &laneChildren, const std::vector< GNEShape * > &shapeChildren, const std::vector< GNEAdditional * > &additionalChildren, const std::vector< GNEDemandElement * > &demandElementChildren)
Constructor.
static RouteCalculator * myRouteCalculatorInstance
RouteCalculator instance.
virtual void updateGeometry()=0
update pre-computed geometry information
std::vector< Segment >::const_iterator begin() const
begin iterator
void insertJunctionSegment(const GNEDemandElement *element, const GNEJunction *junction, const Position pos, const bool visible, const bool valid)
insert junction segment
SUMOAbstractRouter< NBRouterEdge, NBVehicle > * myDijkstraRouter
SUMO Abstract DijkstraRouter.
virtual bool checkDemandElementChildRestriction() const
check restriction with the number of children
GNENet * myNet
pointer to net
DemandElementSegmentGeometry()
constructor
virtual std::string getAttribute(SumoXMLAttr key) const =0
const Position pos
position
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
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
std::vector< Segment > myShapeSegments
vector of segments that constitutes the shape
virtual void compute()=0
compute demand element (used by flows, trips, personPlans<from-to>,...)
virtual void openDemandElementDialog()
open DemandElement Dialog
struct for pack all variables related with geometry of stop
~RouteCalculator()
destructor
virtual std::string getGenericParametersStr() const =0
return generic parameters in string format
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
bool geometryDeprecated
mark geometry as deprecated (used to avoid multiple updates)
class used to calculate routes in nets
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...
bool areEdgesConsecutives(SUMOVehicleClass vClass, GNEEdge *from, GNEEdge *to) const
check if exist a route between the two given consecutives edges
DemandElementSegmentGeometry myDemandElementSegmentGeometry
demand element segment geometry
RouteCalculator(GNENet *net)
constructor
struct used for represent segments of demand element geometry
DemandElementGeometry()
constructor
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
Segment(const GNEDemandElement *_element, const GNEEdge *_edge, const Position _pos, const bool _visible, const bool _valid)
parameter constructor for edges
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(....
static bool isRouteValid(const std::vector< GNEEdge * > &edges, bool report)
check if a route is valid
static void deleteRouteCalculatorInstance()
delete instance of RouteCalculator
Segment & operator=(const Segment &other)=delete
Invalidated assignment operator.
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra route between a list of partial edges
struct for pack all variables related with geometry of elemements divided in segments
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
std::vector< double > shapeLengths
The lengths of the single shape parts.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void clearGeometry()
reset geometry
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...
virtual void setGenericParametersStr(const std::string &value)=0
set generic parameters in string format
~GNEDemandElement()
Destructor.
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNEDemandElement & operator=(const GNEDemandElement &)=delete
Invalidated assignment operator.
const GNEJunction * junction
junction
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.
An special type of Attribute carrier that owns hierarchical elements.
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
virtual GNEEdge * getToEdge() const =0
obtain to edge of this demand element