Eclipse SUMO - Simulation of Urban MObility
GNEPersonFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The Widget for add Person elements
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <netedit/GNENet.h>
24 #include <netedit/GNEUndoList.h>
25 #include <netedit/GNEViewNet.h>
32 
33 #include "GNEPersonFrame.h"
34 #include "GNEStopFrame.h"
35 
36 // ===========================================================================
37 // method definitions
38 // ===========================================================================
39 
40 // ---------------------------------------------------------------------------
41 // GNEPersonFrame::HelpCreation - methods
42 // ---------------------------------------------------------------------------
43 
45  FXGroupBox(vehicleFrameParent->myContentFrame, "Help", GUIDesignGroupBoxFrame),
46  myPersonFrameParent(vehicleFrameParent) {
47  myInformationLabel = new FXLabel(this, "", 0, GUIDesignLabelFrameInformation);
48 }
49 
50 
52 
53 
54 void
56  // first update help cration
57  updateHelpCreation();
58  // show modul
59  show();
60 }
61 
62 
63 void
65  hide();
66 }
67 
68 
69 void
71  // create information label
72  std::ostringstream information;
73  // set text depending of selected person plan
74  switch (myPersonFrameParent->myPersonPlanTagSelector->getCurrentTagProperties().getTag()) {
76  information
77  << "- Click over edges to\n"
78  << " create a trip.";
79  break;
81  information
82  << "- Click over an edge and\n"
83  << " a bus to create a trip.";
84  break;
86  information
87  << "- Click over a sequenz of\n"
88  << " consecutive edges to\n"
89  << " create a walk.";
90  break;
92  information
93  << "- Click over edges to\n"
94  << " create a walk.";
95  break;
97  information
98  << "- Click over an edge and\n"
99  << " a bus to create a walk.";
100  break;
101  case SUMO_TAG_WALK_ROUTE:
102  information
103  << "- Click over a route";
104  break;
106  information
107  << "- Click over edges to\n"
108  << " create a ride.";
109  break;
111  information
112  << "- Click over an edge and\n"
113  << " a bus to create a ride";
114  break;
116  information
117  << "- Click over a busStop\n"
118  << " to create a stop";
119  break;
121  information
122  << "- Click over a lane\n"
123  << " to create a stop";
124  break;
125  default:
126  throw ProcessError("Invalid person plan tag");
127  }
128  // set information label
129  myInformationLabel->setText(information.str().c_str());
130 }
131 
132 // ---------------------------------------------------------------------------
133 // GNEPersonFrame - methods
134 // ---------------------------------------------------------------------------
135 
136 GNEPersonFrame::GNEPersonFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
137  GNEFrame(horizontalFrameParent, viewNet, "Persons") {
138 
139  // create tag Selector modul for persons
140  myPersonTagSelector = new GNEFrameModuls::TagSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_PERSON);
141 
142  // create person types selector modul
144 
145  // create person attributes
147 
148  // create tag Selector modul for person plans
149  myPersonPlanTagSelector = new GNEFrameModuls::TagSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_PERSONPLAN);
150 
151  // create person plan attributes
153 
154  // Create Netedit parameter
156 
157  // create EdgePathCreator Modul
158  myEdgePathCreator = new GNEFrameModuls::EdgePathCreator(this, GNEFrameModuls::EdgePathCreator::EdgePathCreatorModes::GNE_EDGEPATHCREATOR_FROM_TO_VIA);
159 
160  // create Help Creation Modul
161  myHelpCreation = new HelpCreation(this);
162 
163  // limit path creator to pedestrians
165 
166  // set Person as default vehicle
168 }
169 
170 
172 
173 
174 void
176  // refresh item selector
180  // update VClass of myEdgePathCreator
183  } else {
185  }
186  // show frame
187  GNEFrame::show();
188 }
189 
190 
191 bool
193  // obtain tag (only for improve code legibility)
195  // first check that current selected person is valid
196  if (personTag == SUMO_TAG_NOTHING) {
197  myViewNet->setStatusBarText("Current selected person isn't valid.");
198  return false;
199  }
200  // now check that pType is valid
201  if (myPTypeSelector->getCurrentDemandElement() == nullptr) {
202  myViewNet->setStatusBarText("Current selected person type isn't valid.");
203  return false;
204  }
205  // finally check that person plan selected is valid
207  myViewNet->setStatusBarText("Current selected person plan isn't valid.");
208  return false;
209  }
210  // check if walk routes can be created
212  return buildPersonOverRoute(objectsUnderCursor.getDemandElementFront());
214  return buildPersonOverStop(objectsUnderCursor.getLaneFront(), objectsUnderCursor.getAdditionalFront());
215  } else if (objectsUnderCursor.getAdditionalFront() && (objectsUnderCursor.getAdditionalFront()->getTagProperty().getTag() == SUMO_TAG_BUS_STOP)) {
216  return myEdgePathCreator->addBusStop(objectsUnderCursor.getAdditionalFront());
217  } else if (objectsUnderCursor.getEdgeFront()) {
218  return myEdgePathCreator->addEdge(objectsUnderCursor.getEdgeFront());
219  } else {
220  return false;
221  }
222 }
223 
224 
227  return myEdgePathCreator;
228 }
229 
230 // ===========================================================================
231 // protected
232 // ===========================================================================
233 
234 void
236  // first check if person is valid
238  // show PType selector and person plan selector
241  // show person attributes
243  // show person plan tag selector
245  // now check if person plan selected is valid
247  // check if person plan attributes has to be shown
249  // hide person plan attributes
251  } else {
252  // show person plan attributes
254  }
255  // check if myEdgePathCreator has to be show
258  // hide edge path creator modul
260  // show Netedit attributes modul
262  } else {
263  // set edge path creator name
265  myEdgePathCreator->edgePathCreatorName("person trip");
270  }
271  // update VClass of myEdgePathCreator
274  } else {
276  }
277  // show edge path creator modul
279  // hide Netedit attributes modul
281  }
282  // show help modul
284  } else {
285  // hide modules
289  }
290  } else {
291  // hide modules
298  }
299  } else {
300  // hide all moduls if person isn't valid
308  }
309 }
310 
311 
312 void
315  // show person attributes
317  // show person plan tag selector
319  // now check if person plan selected is valid
321  // check if person plan attributes has to be shown
323  // hide person plan attributes
325  } else {
326  // show person plan attributes
328  }
329  // check if myEdgePathCreator has to be show
332  // hide edge path creator modul
334  // show Netedit attributes modul
336  } else {
337  // set edge path creator name
339  myEdgePathCreator->edgePathCreatorName("person trip");
344  }
345  // update VClass of myEdgePathCreator
348  } else {
350  }
351  // show edge path creator modul
353  // hide Netedit attributes modul
355  }
356  // show help modul
358  } else {
359  // hide modules
364  }
365  } else {
366  // hide modules
373  }
374 }
375 
376 
377 void
379  // first check that all attributes are valid
381  myViewNet->setStatusBarText("Invalid person parameters.");
382  } else if (!myPersonPlanAttributes->areValuesValid()) {
384  } else {
385  // build person
386  GNEDemandElement* createdPerson = buildPerson();
387  // Declare map to keep attributes from myPersonPlanAttributes
388  std::map<SumoXMLAttr, std::string> valuesMap = myPersonPlanAttributes->getAttributesAndValues(true);
389  // check what PersonPlan we're creating
392  // obtain attributes
393  std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_VTYPES]);
394  std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_MODES]);
395  double arrivalPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_ARRIVALPOS]);
396  // now check that number of selected edges are correct
397  if (myEdgePathCreator->getClickedEdges().size() > 0) {
398  GNERouteHandler::buildPersonTripFromTo(myViewNet, true, createdPerson, myEdgePathCreator->getClickedEdges(), types, modes, arrivalPos);
399  // end undo-redo operation
401  } else {
402  myViewNet->setStatusBarText("A person trip with from-to attributes needs at least one edge.");
403  // abort person creation
405  }
406  break;
407  }
409  // obtain attributes
410  std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_VTYPES]);
411  std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_MODES]);
412  // now check that number of selected edges are correct
415  // end undo-redo operation
417  } else {
418  myViewNet->setStatusBarText("A person trip with from-to attributes needs at least one edge.");
419  // abort person creation
421  }
422  break;
423  }
424  case SUMO_TAG_WALK_EDGES: {
425  // obtain attributes
426  double arrivalPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_ARRIVALPOS]);
427  GNERouteHandler::buildWalkEdges(myViewNet, true, createdPerson, myEdgePathCreator->getClickedEdges(), arrivalPos);
428  // end undo-redo operation
430  break;
431  }
432  case SUMO_TAG_WALK_FROMTO: {
433  // obtain attributes
434  double arrivalPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_ARRIVALPOS]);
435  GNERouteHandler::buildWalkFromTo(myViewNet, true, createdPerson, myEdgePathCreator->getClickedEdges(), arrivalPos);
436  // end undo-redo operation
438  break;
439  }
440  case SUMO_TAG_WALK_BUSSTOP: {
441  // obtain attributes
443  // end undo-redo operation
445  break;
446  }
447  case SUMO_TAG_RIDE_FROMTO: {
448  // obtain attributes
449  std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_LINES]);
450  double arrivalPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_ARRIVALPOS]);
451  GNERouteHandler::buildRideFromTo(myViewNet, true, createdPerson, myEdgePathCreator->getClickedEdges(), lines, arrivalPos);
452  // end undo-redo operation
454  break;
455  }
456  case SUMO_TAG_RIDE_BUSSTOP: {
457  // obtain attributes
458  std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[SUMO_ATTR_LINES]);
460  // end undo-redo operation
462  break;
463  }
464  default:
465  throw InvalidArgument("Invalid person plan tag");
466  }
467  }
468 }
469 
470 // ---------------------------------------------------------------------------
471 // GNEPersonFrame - private methods
472 // ---------------------------------------------------------------------------
473 
474 
475 bool
477  if (route && (route->getTagProperty().getTag() == SUMO_TAG_ROUTE)) {
478  // first check that all attributes are valid
480  myViewNet->setStatusBarText("Invalid person parameters.");
481  } else if (!myPersonPlanAttributes->areValuesValid()) {
483  } else {
484  // build person and walk over route
486  // end undo-redo operation
488  return true;
489  }
490  return false;
491  } else {
493  return false;
494  }
495 }
496 
497 
498 bool
500  // first check that all attributes are valid
502  myViewNet->setStatusBarText("Invalid person parameters.");
503  return false;
504  } else if (!myPersonPlanAttributes->areValuesValid()) {
506  return false;
507  } else {
508  // declare stop parameters and friendly position
509  SUMOVehicleParameter::Stop stopParameter;
510  bool friendlyPosition;
513  // create it in RouteFrame
514  GNERouteHandler::buildStop(myViewNet, true, stopParameter, buildPerson(), friendlyPosition);
515  // end undo-redo operation
517  // stop sucesfully created, then return true
518  return true;
519  } else {
520  return false;
521  }
522  }
523 }
524 
525 
528  // obtain person tag (only for improve code legibility)
530  // obtain person plan tag (only for improve code legibility)
532  // begin undo-redo operation
533  myViewNet->getUndoList()->p_begin("create " + toString(personTag) + " and " + toString(personPlanTag));
534  // Declare map to keep attributes from myPersonAttributes
535  std::map<SumoXMLAttr, std::string> valuesMap = myPersonAttributes->getAttributesAndValues(false);
536  // add ID parameter
537  valuesMap[SUMO_ATTR_ID] = myViewNet->getNet()->generateDemandElementID("", personTag);
538  // add pType parameter
540  // check if we're creating a person or personFlow
541  if (personTag == SUMO_TAG_PERSON) {
542  // Add parameter departure
543  if (valuesMap[SUMO_ATTR_DEPART].empty()) {
544  valuesMap[SUMO_ATTR_DEPART] = "0";
545  }
546  // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes
547  SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(personTag));
548  // obtain person parameters
549  SUMOVehicleParameter* personParameters = SUMOVehicleParserHelper::parseVehicleAttributes(SUMOSAXAttrs, false, false, false, true);
550  // build person in GNERouteHandler
551  GNERouteHandler::buildPerson(myViewNet, true, *personParameters);
552  // delete personParameters
553  delete personParameters;
554  } else {
555  // set begin and end attributes
556  if (valuesMap[SUMO_ATTR_BEGIN].empty()) {
557  valuesMap[SUMO_ATTR_BEGIN] = "0";
558  }
559  if (valuesMap[SUMO_ATTR_END].empty()) {
560  valuesMap[SUMO_ATTR_END] = "3600";
561  }
562  // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes
563  SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesMap, getPredefinedTagsMML(), toString(personTag));
564  // obtain personFlow parameters
565  SUMOVehicleParameter* personFlowParameters = SUMOVehicleParserHelper::parseFlowAttributes(SUMOSAXAttrs, false, 0, SUMOTime_MAX, true);
566  // build personFlow in GNERouteHandler
567  GNERouteHandler::buildPersonFlow(myViewNet, true, *personFlowParameters);
568  // delete personFlowParameters
569  delete personFlowParameters;
570  }
571  return myViewNet->getNet()->retrieveDemandElement(personTag, valuesMap[SUMO_ATTR_ID]);
572 }
573 
574 /****************************************************************************/
GNEPersonFrame::GNEPersonFrame
GNEPersonFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEPersonFrame.cpp:136
SUMO_TAG_WALK_FROMTO
Definition: SUMOXMLDefinitions.h:308
SUMO_ATTR_TYPE
Definition: SUMOXMLDefinitions.h:382
GNEPersonFrame::show
void show()
show Frame
Definition: GNEPersonFrame.cpp:175
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:157
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
SUMO_ATTR_DEPART
Definition: SUMOXMLDefinitions.h:432
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEAdditional.h
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1187
GNEFrameModuls::EdgePathCreator::setVClass
void setVClass(SUMOVehicleClass vClass)
set SUMOVehicleClass
Definition: GNEFrameModuls.cpp:573
GNEAttributeCarrier::TagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNEAttributeCarrier.cpp:527
SUMOVehicleParserHelper.h
GNEUndoList::p_end
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
Definition: GNEUndoList.cpp:80
GNERouteHandler::buildRideFromTo
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
Definition: GNERouteHandler.cpp:776
GNEFrameModuls::EdgePathCreator::showEdgePathCreator
void showEdgePathCreator()
show EdgePathCreator
Definition: GNEFrameModuls.cpp:547
GNEPersonFrame::edgePathCreated
void edgePathCreated()
finish edge path creation
Definition: GNEPersonFrame.cpp:378
GNEFrameAttributesModuls::NeteditAttributes
Definition: GNEFrameAttributesModuls.h:548
GNEPersonFrame::myPersonAttributes
GNEFrameAttributesModuls::AttributesCreator * myPersonAttributes
internal vehicle attributes
Definition: GNEPersonFrame.h:108
SUMO_TAG_WALK_ROUTE
Definition: SUMOXMLDefinitions.h:310
GNERouteHandler::buildPersonTripBusStop
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
Definition: GNERouteHandler.cpp:607
GNEFrameModuls::DemandElementSelector::refreshDemandElementSelector
void refreshDemandElementSelector()
refresh demand element selector
Definition: GNEFrameModuls.cpp:409
GNEFrameAttributesModuls::AttributesCreator
Definition: GNEFrameAttributesModuls.h:157
GNEFrameAttributesModuls::AttributesCreator::areValuesValid
bool areValuesValid() const
check if parameters of attributes are valid
Definition: GNEFrameAttributesModuls.cpp:725
SUMO_TAG_PERSON
Definition: SUMOXMLDefinitions.h:296
GNEViewNet::setStatusBarText
void setStatusBarText(const std::string &text)
set staturBar text
Definition: GNEViewNet.cpp:482
GNEFrameModuls::DemandElementSelector::showDemandElementSelector
void showDemandElementSelector()
show demand element selector
Definition: GNEFrameModuls.cpp:378
SUMO_ATTR_LINES
Definition: SUMOXMLDefinitions.h:773
GNEFrameModuls::EdgePathCreator::addBusStop
bool addBusStop(GNEAdditional *busStop)
add busStop to route
Definition: GNEFrameModuls.cpp:661
GNEPerson.h
GNEPersonFrame::myEdgePathCreator
GNEFrameModuls::EdgePathCreator * myEdgePathCreator
edge path creator (used for Walks, rides and trips)
Definition: GNEPersonFrame.h:117
GNENet::retrieveDemandElement
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENet.cpp:2266
GNEFrame
Definition: GNEFrame.h:35
SUMO_TAG_PTYPE
description of a person type (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:124
GNEPersonFrame::buildPersonOverStop
bool buildPersonOverStop(GNELane *lane, GNEAdditional *busStop)
build person over stop
Definition: GNEPersonFrame.cpp:499
GNEPersonFrame::myPersonPlanTagSelector
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
person plan selector (used to select diffent kind of person plan)
Definition: GNEPersonFrame.h:105
GNEViewNet
Definition: GNEViewNet.h:43
GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:279
SUMO_ATTR_ARRIVALPOS
Definition: SUMOXMLDefinitions.h:438
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:291
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:44
GUIDesigns.h
GNEPersonFrame::myPTypeSelector
GNEFrameModuls::DemandElementSelector * myPTypeSelector
Person Type selectors.
Definition: GNEPersonFrame.h:102
GNEPersonFrame::myPersonPlanAttributes
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal person plan attributes
Definition: GNEPersonFrame.h:111
GNEPersonFrame::myHelpCreation
HelpCreation * myHelpCreation
Help creation.
Definition: GNEPersonFrame.h:120
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:521
GNEFrameAttributesModuls::AttributesCreator::showAttributesCreatorModul
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show AttributesCreator modul
Definition: GNEFrameAttributesModuls.cpp:631
GNEFrameModuls::EdgePathCreator::addEdge
bool addEdge(GNEEdge *edge)
add edge to route
Definition: GNEFrameModuls.cpp:597
SUMOVehicleParserHelper::parseVehicleAttributes
static SUMOVehicleParameter * parseVehicleAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false, const bool isPerson=false)
Parses a vehicle's attributes.
Definition: SUMOVehicleParserHelper.cpp:231
SUMO_ATTR_BEGIN
weights: time range begin
Definition: SUMOXMLDefinitions.h:675
GNEFrameAttributesModuls::AttributesCreator::hideAttributesCreatorModul
void hideAttributesCreatorModul()
hide group box
Definition: GNEFrameAttributesModuls.cpp:662
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:210
GNEFrameModuls::EdgePathCreator
Definition: GNEFrameModuls.h:177
GNEPersonFrame::~GNEPersonFrame
~GNEPersonFrame()
Destructor.
Definition: GNEPersonFrame.cpp:171
GNEFrameAttributesModuls::AttributesCreator::getAttributesAndValues
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
Definition: GNEFrameAttributesModuls.cpp:668
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:927
SUMO_TAG_WALK_EDGES
Definition: SUMOXMLDefinitions.h:307
GNERouteHandler::buildWalkFromTo
static void buildWalkFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge * > &edges, double arrivalPos)
build walk using a from-to edges
Definition: GNERouteHandler.cpp:681
GNEPersonFrame
Definition: GNEPersonFrame.h:33
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1171
GNEPersonFrame::tagSelected
void tagSelected()
Tag selected in TagSelector.
Definition: GNEPersonFrame.cpp:235
GNERouteHandler::buildRideBusStop
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
Definition: GNERouteHandler.cpp:813
GNEPersonFrame::HelpCreation::showHelpCreation
void showHelpCreation()
show HelpCreation
Definition: GNEPersonFrame.cpp:55
SUMOSAXAttributesImpl_Cached
Encapsulated Xerces-SAX-attributes.
Definition: SUMOSAXAttributesImpl_Cached.h:44
SUMO_TAG_PERSONSTOP_LANE
Definition: SUMOXMLDefinitions.h:314
GNEFrameModuls::EdgePathCreator::hideEdgePathCreator
void hideEdgePathCreator()
show EdgePathCreator
Definition: GNEFrameModuls.cpp:558
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:149
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:114
GNEFrameModuls::EdgePathCreator::edgePathCreatorName
void edgePathCreatorName(const std::string &name)
update EdgePathCreator name
Definition: GNEFrameModuls.cpp:536
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:45
GNEViewNet.h
SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:160
GNEFrameModuls::DemandElementSelector::getCurrentDemandElement
GNEDemandElement * getCurrentDemandElement() const
get current demand element
Definition: GNEFrameModuls.cpp:353
ProcessError
Definition: UtilExceptions.h:40
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
GNEFrame::getPredefinedTagsMML
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:276
GNEPersonFrame::buildPerson
GNEDemandElement * buildPerson()
build person and return it (note: function includes a call to p_begin(...), but NOT a call to p_end(....
Definition: GNEPersonFrame.cpp:527
GNEStopFrame::getStopParameter
static bool getStopParameter(SUMOVehicleParameter::Stop &stop, bool &friendlyPosition, const SumoXMLTag stopTag, GNEViewNet *viewNet, const GNEFrameAttributesModuls::AttributesCreator *stopAttributes, const GNEFrameAttributesModuls::NeteditAttributes *myNeteditAttributes, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
Definition: GNEStopFrame.cpp:207
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
GNEAttributeCarrier::TagProperties::isWalk
bool isWalk() const
return true if tag correspond to a walk element
Definition: GNEAttributeCarrier.cpp:772
GNEFrameAttributesModuls::NeteditAttributes::showNeteditAttributesModul
void showNeteditAttributesModul(const GNEAttributeCarrier::TagProperties &tagValue)
show Netedit attributes modul
Definition: GNEFrameAttributesModuls.cpp:2036
GNEFrameModuls::TagSelector::getCurrentTagProperties
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
Definition: GNEFrameModuls.cpp:195
GNERouteHandler::buildPerson
static void buildPerson(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &personParameters)
build person
Definition: GNERouteHandler.cpp:522
SUMO_TAG_PERSONTRIP_BUSSTOP
Definition: SUMOXMLDefinitions.h:306
GNEPersonFrame.h
GNEPersonFrame::HelpCreation::HelpCreation
HelpCreation(GNEPersonFrame *vehicleFrameParent)
constructor
Definition: GNEPersonFrame.cpp:44
GNEPersonFrame::HelpCreation::~HelpCreation
~HelpCreation()
destructor
Definition: GNEPersonFrame.cpp:51
GNERouteHandler::buildWalkRoute
static void buildWalkRoute(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEDemandElement *routeParent, double arrivalPos)
build walk using a list of consecutive edges
Definition: GNERouteHandler.cpp:754
GNEPersonFrame::getEdgePathCreator
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
Definition: GNEPersonFrame.cpp:226
GNEUndoList::p_abort
void p_abort()
reverts and discards ALL active command groups
Definition: GNEUndoList.cpp:94
GNEFrameModuls::TagSelector::hideTagSelector
void hideTagSelector()
hide item selector
Definition: GNEFrameModuls.cpp:189
GNEAttributeCarrier::TagProperties::isPersonTrip
bool isPersonTrip() const
return true if tag correspond to a person trip
Definition: GNEAttributeCarrier.cpp:766
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:98
GNERouteHandler::buildPersonTripFromTo
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
Definition: GNERouteHandler.cpp:574
GNEFrameModuls::TagSelector::setCurrentTag
void setCurrentTag(SumoXMLTag newTag)
set current type manually
Definition: GNEFrameModuls.cpp:226
SUMOVehicleParserHelper::parseFlowAttributes
static SUMOVehicleParameter * parseFlowAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson=false)
Parses a flow's attributes.
Definition: SUMOVehicleParserHelper.cpp:56
GNEPersonFrame::buildPersonOverRoute
bool buildPersonOverRoute(GNEDemandElement *route)
build person over route
Definition: GNEPersonFrame.cpp:476
GNEAttributeCarrier::TagProperties::isPersonStop
bool isPersonStop() const
return true if tag correspond to a person stop element
Definition: GNEAttributeCarrier.cpp:784
SUMO_ATTR_VTYPES
Definition: SUMOXMLDefinitions.h:630
GNEFrameModuls::TagSelector::refreshTagProperties
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
Definition: GNEFrameModuls.cpp:243
GNERouteHandler::buildPersonFlow
static void buildPersonFlow(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &personFlowParameters)
build person flow
Definition: GNERouteHandler.cpp:548
InvalidArgument
Definition: UtilExceptions.h:57
GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:259
GNEPersonFrame::myNeteditAttributes
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
Definition: GNEPersonFrame.h:114
GNEPersonFrame::HelpCreation
Definition: GNEPersonFrame.h:40
SUMO_TAG_PERSONTRIP_FROMTO
Definition: SUMOXMLDefinitions.h:305
GNERouteHandler::buildStop
static void buildStop(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter::Stop &stopParameters, GNEDemandElement *stopParent, bool friendlyPosition)
build stop
Definition: GNERouteHandler.cpp:431
SUMO_TAG_RIDE_BUSSTOP
Definition: SUMOXMLDefinitions.h:312
GNEPersonFrame::HelpCreation::updateHelpCreation
void updateHelpCreation()
update HelpCreation
Definition: GNEPersonFrame.cpp:70
SUMOSAXAttributesImpl_Cached.h
GNEPersonFrame::demandElementSelected
void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEPersonFrame.cpp:313
SUMO_ATTR_MODES
Definition: SUMOXMLDefinitions.h:651
GNEPersonFrame::addPerson
bool addPerson(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEPersonFrame.cpp:192
SUMO_TAG_WALK_BUSSTOP
Definition: SUMOXMLDefinitions.h:309
GNERouteHandler::buildWalkBusStop
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
Definition: GNERouteHandler.cpp:717
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:126
GNEViewNetHelper::ObjectsUnderCursor::getLaneFront
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:289
config.h
GNEFrameModuls::DemandElementSelector::hideDemandElementSelector
void hideDemandElementSelector()
hide demand element selector
Definition: GNEFrameModuls.cpp:397
SUMO_ATTR_END
weights: time range end
Definition: SUMOXMLDefinitions.h:677
GNEPersonFrame::HelpCreation::myInformationLabel
FXLabel * myInformationLabel
Label with creation information.
Definition: GNEPersonFrame.h:63
GNEFrameModuls::EdgePathCreator::getClickedEdges
std::vector< GNEEdge * > getClickedEdges() const
get current clicked edges
Definition: GNEFrameModuls.cpp:585
SUMOTime_MAX
#define SUMOTime_MAX
Definition: SUMOTime.h:36
GNEAttributeCarrier::TagProperties::isRide
bool isRide() const
return true if tag correspond to a ride element
Definition: GNEAttributeCarrier.cpp:778
GNENet::generateDemandElementID
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
Definition: GNENet.cpp:2411
SUMO_TAG_PERSONSTOP_BUSSTOP
Definition: SUMOXMLDefinitions.h:313
GNEFrameModuls::TagSelector::showTagSelector
void showTagSelector()
show item selector
Definition: GNEFrameModuls.cpp:183
GNEFrameAttributesModuls::NeteditAttributes::hideNeteditAttributesModul
void hideNeteditAttributesModul()
hide Netedit attributes modul
Definition: GNEFrameAttributesModuls.cpp:2087
GNEUndoList::p_begin
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
Definition: GNEUndoList.cpp:73
GNEStopFrame.h
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEPersonFrame::myPersonTagSelector
GNEFrameModuls::TagSelector * myPersonTagSelector
person tag selector (used to select diffent kind of persons)
Definition: GNEPersonFrame.h:99
GNEFrameModuls::EdgePathCreator::getClickedBusStop
GNEAdditional * getClickedBusStop() const
get current clicked edges
Definition: GNEFrameModuls.cpp:591
SUMO_TAG_RIDE_FROMTO
Definition: SUMOXMLDefinitions.h:311
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:239
GNENet.h
GNERouteHandler.h
SUMOVehicleParameter::Stop
Definition of vehicle stop (position and duration)
Definition: SUMOVehicleParameter.h:566
GNEUndoList.h
GNERouteHandler::buildWalkEdges
static void buildWalkEdges(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge * > &edges, double arrivalPos)
build walk using a list of consecutive edges
Definition: GNERouteHandler.cpp:645
GNEPersonFrame::HelpCreation::hideHelpCreation
void hideHelpCreation()
hide HelpCreation
Definition: GNEPersonFrame.cpp:64