63 myPersonPlanFrameParent(vehicleFrameParent) {
88 std::ostringstream information;
95 <<
"- Click over edges to\n" 100 <<
"- Click over an edge and\n" 101 <<
" a bus to create a trip.";
105 <<
"- Click over a sequenz of\n" 106 <<
" consecutive edges to\n" 107 <<
" create a walk.";
111 <<
"- Click over edges to\n" 112 <<
" create a walk.";
116 <<
"- Click over an edge and\n" 117 <<
" a bus to create a walk.";
121 <<
"- Click over a route";
125 <<
"- Click over edges to\n" 126 <<
" create a ride.";
130 <<
"- Click over an edge and\n" 131 <<
" a bus to create a ride";
137 information <<
"- There aren't persons or\n" 138 <<
" personFlows in network.";
175 std::string nameWithFirstCapitalizedLetter = name;
176 nameWithFirstCapitalizedLetter[0] = (char)toupper(nameWithFirstCapitalizedLetter.at(0));
177 setText((nameWithFirstCapitalizedLetter +
" creator").c_str());
200 for (
const auto& j : i->getLanes()) {
201 j->setSpecialColor(
nullptr);
205 myClickedEdges.clear();
221 for (
const auto& j : i->getLanes()) {
222 j->setSpecialColor(
nullptr);
226 myClickedEdges.clear();
261 std::vector<GNEEdge*>
267 const std::vector<GNEEdge*>&
405 GNEFrame(horizontalFrameParent, viewNet,
"PersonPlans") {
426 myPersonPlanTagSelector->setCurrentTagType(GNEAttributeCarrier::TagType::TAGTYPE_PERSONPLAN);
499 }
else if (requireEdge && objectsUnderCursor.
getEdgeFront()) {
599 std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_VTYPES]);
600 std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_MODES]);
614 std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_VTYPES]);
615 std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_MODES]);
617 if (busStop ==
nullptr) {
662 if (busStop ==
nullptr) {
681 if (route !=
nullptr) {
690 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_LINES]);
704 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_LINES]);
706 if (busStop ==
nullptr) {
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEPersonPlanFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void hideHelpCreation()
hide HelpCreation
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge *> &partialEdges) const
calculate Dijkstra route between a list of partial edges
SumoXMLTag
Numbers representing SUMO-XML - element names.
FXButton * myRemoveLastEdge
button for removing last edge
PersonPlanCreator()
FOX needs this.
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
bool isDemandElementSelectorShown() const
check if demand element selector is shown
void showTagSelector()
show item selector
void hideAttributesCreatorModul()
hide group box
bool personPlanCreated(GNEAdditional *busStop, GNEDemandElement *route)
finish person plan creation
void update() const
Mark the entire GNEViewNet to be repainted later.
void refreshDemandElementSelector()
refresh demand element selector
static void buildRideFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, const std::vector< std::string > &lines, double arrivalPos)
build ride using a from-to edges
FXDEFMAP(GNEPersonPlanFrame::PersonPlanCreator) PersonPlanCreatorMap[]
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal vehicle attributes
void drawTemporalRoute() const
draw temporal route
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to PersonPlan Frame Parent
GNEViewParent * getViewParent() const
get the net object
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show AttributesCreator modul
~PersonPlanCreator()
destructor
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
static const RGBColor ORANGE
bool addEdge(GNEEdge *edge)
add edge to route
FXButton * myAbortCreationButton
button for abort route creation
remove last inserted element in path
void updateHelpCreation()
update HelpCreation
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove last inserted edge".
std::vector< GNEEdge * > myClickedEdges
current clicked edges
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
bool isPersonTrip() const
return true if tag correspond to a person trip
FXLabel * myInformationLabel
Label with creation information.
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
begin/end of the description of a route
static void buildRideBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, GNEAdditional *busStop, const std::vector< std::string > &lines)
build ride using a from edge and a busStop
void enableUndoRedo()
disable undo-redo
HelpCreation * myHelpCreation
Help creation.
bool areValuesValid() const
check if parameters of attributes are valid
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
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) ...
FXLabel * myCurrentBeginElementLabel
Label with current begin element.
void disableUndoRedo(const std::string &reason)
disable undo-redo giving a string with the reason
GNEViewNet * myViewNet
View Net.
void refreshAttributeCarrierHierarchy()
refresh AttributeCarrierHierarchy
long onCmdFinishPersonPlanCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Finish route creation".
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
void hideTagSelector()
hide item selector
GNEDemandElement * getCurrentDemandElement() const
get current demand element
void tagSelected()
Tag selected in TagSelector.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
void refreshPersonPlanCreator()
show PersonPlanCreator
void abortPersonPlanCreation()
abort person plan creation
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show ...
const std::vector< GNELane * > & getLaneParents() const
get lanes of VSS
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
void showAttributeCarrierHierarchy(GNEAttributeCarrier *AC)
show AttributeCarrierHierarchy
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
finish edge path creation
class used to group all variables related with objects under cursor after a click over view ...
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
static void buildWalkFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, double arrivalPos)
build walk using a from-to edges
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
vehicle is a passenger car (a "normal" car)
PersonPlanCreator * myPersonPlanCreator
Person Plan Creator.
std::vector< GNEEdge * > myTemporalEdgePath
vector with temporal edge path
void removeLastAddedElement()
remove last added element
#define GUIDesignLabelCenterThick
label extended over frame with thick and with text justify to center and height of 23 ...
A road/street connecting two junctions (netedit-version)
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
void hidePersonPlanCreator()
show PersonPlanCreator
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
personPlan selector
void hideAttributeCarrierHierarchy()
hide AttributeCarrierHierarchy
virtual void show()
show Frame
~GNEPersonPlanFrame()
Destructor.
const std::vector< GNEEdge * > & getEdgePath() const
get current edge path
static void buildWalkRoute(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEDemandElement *routeParent, double arrivalPos)
build walk using a list of consecutive edges
An Element which don't belongs to GNENet but has influency in the simulation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
std::vector< GNEEdge * > getClickedEdges() const
get clicked edges
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to Person Plan Frame Parent
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
void edgePathCreatorName(const std::string &name)
update PersonPlanCreator name
virtual void hide()
hide Frame
void showPersonPlanCreator()
show PersonPlanCreator
~HelpCreation()
destructor
GNENet * getNet() const
get the net object
void setStatusBarText(const std::string &text)
set staturBar text
static void buildWalkBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, GNEAdditional *busStop)
build walk using a form edge an a busStop
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
static void buildPersonTripFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, const std::vector< std::string > &types, const std::vector< std::string > &modes, double arrivalPos)
build trip using a from-to edges
bool isWalk() const
return true if tag correspond to a walk element
void hideDemandElementSelector()
hide demand element selector
long onCmdAbortPersonPlanCreation(FXObject *, FXSelector, void *)
static void buildWalkEdges(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, double arrivalPos)
build walk using a list of consecutive edges
void showHelpCreation()
show HelpCreation
void finishPersonPlanCreation()
finish person plan creation
GNEFrameModuls::DemandElementSelector * myPersonSelector
Person selectors.
GNEFrameModuls::AttributeCarrierHierarchy * myPersonHierarchy
Person Hierarchy.
FXButton * myFinishCreationButton
button for finish route creation
An Element which don't belongs to GNENet but has influency in the simulation.
void demandElementSelected()
selected demand element in DemandElementSelector
static void buildPersonTripBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, GNEAdditional *busStop, const std::vector< std::string > &types, const std::vector< std::string > &modes)
build trip using a from edge and a busStop