Eclipse SUMO - Simulation of Urban MObility
GNECalibratorDialog.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 // Dialog for edit calibrators
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
27 #include <netedit/GNENet.h>
28 #include <netedit/GNEViewNet.h>
29 #include <netedit/GNEUndoList.h>
34 
35 #include "GNECalibratorDialog.h"
37 #include "GNERouteDialog.h"
38 #include "GNEVehicleTypeDialog.h"
39 
40 // ===========================================================================
41 // FOX callback mapping
42 // ===========================================================================
43 
44 FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[] = {
51 };
52 
53 // Object implementation
54 FXIMPLEMENT(GNECalibratorDialog, GNEAdditionalDialog, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
55 
56 // ===========================================================================
57 // member method definitions
58 // ===========================================================================
59 
61  GNEAdditionalDialog(editedCalibrator, false, 640, 480) {
62 
63  // Create two columns, one for Routes and VehicleTypes, and other for Flows
64  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
65  FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
66  FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
67 
68  // create add buton and label for routes
69  FXHorizontalFrame* buttonAndLabelRoute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
70  myAddRoute = new FXButton(buttonAndLabelRoute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_ROUTE, GUIDesignButtonIcon);
71  new FXLabel(buttonAndLabelRoute, ("Add new " + toString(SUMO_TAG_ROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
72 
73  // Create table in left frame
74  myRouteList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE, GUIDesignTableAdditionals);
75  myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
76  myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
77  myRouteList->setEditable(false);
78 
79  // create add buton and label for vehicle types
80  FXHorizontalFrame* buttonAndLabelVehicleType = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
81  myAddVehicleType = new FXButton(buttonAndLabelVehicleType, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE, GUIDesignButtonIcon);
82  new FXLabel(buttonAndLabelVehicleType, ("Add new " + toString(SUMO_TAG_VTYPE) + "s").c_str(), nullptr, GUIDesignLabelThick);
83 
84  // Create table in left frame
85  myVehicleTypeList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE, GUIDesignTableAdditionals);
86  myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
87  myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
88  myVehicleTypeList->setEditable(false);
89 
90  // create add buton and label for flows in right frame
91  FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
92  myAddFlow = new FXButton(buttonAndLabelFlow, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_FLOW, GUIDesignButtonIcon);
93  myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str(), nullptr, GUIDesignLabelThick);
94 
95  // Create table in right frame
96  myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals);
97  myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
98  myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
99  myFlowList->setEditable(false);
100 
101  // update tables
102  updateRouteTable();
103  updateVehicleTypeTable();
104  updateFlowTable();
105 
106  // start a undo list for editing local to this additional
107  initChanges();
108 
109  // Open dialog as modal
110  openAsModalDialog();
111 }
112 
113 
115 
116 
117 long
118 GNECalibratorDialog::onCmdAccept(FXObject*, FXSelector, void*) {
119  // accept changes before closing dialog
120  acceptChanges();
121  // Stop Modal
122  getApp()->stopModal(this, TRUE);
123  return 1;
124 }
125 
126 
127 long
128 GNECalibratorDialog::onCmdCancel(FXObject*, FXSelector, void*) {
129  // cancel changes
130  cancelChanges();
131  // Stop Modal
132  getApp()->stopModal(this, FALSE);
133  return 1;
134 }
135 
136 
137 long
138 GNECalibratorDialog::onCmdReset(FXObject*, FXSelector, void*) {
139  // reset changes
140  resetChanges();
141  // update tables
144  updateFlowTable();
145  return 1;
146 }
147 
148 
149 long
150 GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) {
151  // create nes calibrator route and configure it with GNERouteDialog
153  // update routes table
155  return 1;
156 }
157 
158 
159 long
160 GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) {
161  // check if some delete button was pressed
162  for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTE).size(); i++) {
163  // obtain rerouter
164  GNEDemandElement* routeToEdit = myEditedAdditional->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, myRouteList->getItem(i, 0)->getText().text());
165  if (myRouteList->getItem(i, 2)->hasFocus()) {
166  // find all flows that contains route to delete as "route" parameter
167  std::vector<GNEAdditional*> calibratorFlowsToErase;
168  for (auto j : myEditedAdditional->getAdditionalChildren()) {
169  if (j->getAttribute(SUMO_ATTR_ROUTE) == myRouteList->getItem(i, 0)->getText().text()) {
170  calibratorFlowsToErase.push_back(j);
171  }
172  }
173  // if there are flows that has route to remove as "route" parameter
174  if (calibratorFlowsToErase.size() > 0) {
175  // write warning if netedit is running in testing mode
176  WRITE_DEBUG("Opening FXMessageBox of type 'question'");
177  // open question dialog box
178  std::string message = ("Deletio n of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() + "' will remove " +
179  toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
180  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str(), "%s", message.c_str());
181  if (answer != 1) { //1:yes, 2:no, 4:esc
182  // write warning if netedit is running in testing mode
183  if (answer == 2) {
184  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
185  } else if (answer == 4) {
186  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
187  }
188  // abort deletion of route
189  return 0;
190  } else {
191  // write warning if netedit is running in testing mode
192  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
193  // remove affected flows of calibrator flows
194  for (auto j : calibratorFlowsToErase) {
195  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true);
196  }
197  // remove route of calibrator routes
198  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
199  // update flows and route table
200  updateFlowTable();
202  return 1;
203  }
204  } else {
205  // remove route
206  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
207  // update routes table
209  return 1;
210  }
211  } else if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) {
212  // modify route of calibrator routes
213  GNERouteDialog(routeToEdit, true);
214  // update routes table
216  // update Flows routes also because Route ID could be changed
217  updateFlowTable();
218  return 1;
219  }
220  }
221  // nothing to do
222  return 0;
223 }
224 
225 
226 long
227 GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) {
228  // only add flow if there is at least a GNERoute (There is always a Vehicle Type)
230  // create new calibrator and configure it with GNECalibratorFlowDialog
232  // update flows table
233  updateFlowTable();
234  return 1;
235  } else {
236  throw ProcessError("myEditedAdditional->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTE) cannot be empty");
237  }
238 }
239 
240 
241 long
242 GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
243  // check if some delete button was pressed
244  for (int i = 0; i < (int)myEditedAdditional->getAdditionalChildren().size(); i++) {
245  if (myFlowList->getItem(i, 2)->hasFocus()) {
246  // remove flow of calibrator flows
248  // update flows table
249  updateFlowTable();
250  return 1;
251  } else if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus()) {
252  // modify flow of calibrator flows (temporal)
254  // update flows table
255  updateFlowTable();
256  return 1;
257  }
258  }
259  // nothing to do
260  return 0;
261 }
262 
263 
264 long
265 GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
266  // create a new Vehicle Type and configure it with GNEVehicleTypeDialog
267  std::string vehicleTypeID = myEditedAdditional->getViewNet()->getNet()->generateDemandElementID("", SUMO_TAG_VTYPE);
269  // update vehicle types table
271  return 1;
272 }
273 
274 
275 long
276 GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
277  // check if some delete button was pressed
278  for (int i = 0; i < (int)myEditedAdditional->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_VTYPE).size(); i++) {
279  // obtain vehicle type
281  // Make sure that default vehicle isn't edited
282  if ((i == 0) && (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus() || myVehicleTypeList->getItem(i, 2)->hasFocus())) {
283  FXMessageBox::warning(getApp(), MBOX_OK,
284  ("Error editing default " + toString(SUMO_TAG_VTYPE)).c_str(), "%s",
285  ("Default " + toString(SUMO_TAG_VTYPE) + " cannot be either edited or deleted.").c_str());
286  } else if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
287  // find all flows that contains vehicle type to delete as "vehicle type" parameter
288  std::vector<GNEAdditional*> calibratorFlowsToErase;
289  for (auto j : myEditedAdditional->getAdditionalChildren()) {
290  if (j->getAttribute(SUMO_ATTR_TYPE) == myVehicleTypeList->getItem(i, 0)->getText().text()) {
291  calibratorFlowsToErase.push_back(j);
292  }
293  }
294  // if there are flows that has vehicle type to remove as "vehicle type" parameter
295  if (calibratorFlowsToErase.size() > 0) {
296  std::string message = ("Deletion of " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeList->getItem(i, 0)->getText().text() + "' will remove " +
297  toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
298  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str(), "%s", message.c_str());
299  if (answer != 1) { //1:yes, 2:no, 4:esc
300  // write warning if netedit is running in testing mode
301  if (answer == 2) {
302  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
303  } else if (answer == 4) {
304  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
305  }
306  // abort deletion of vehicle type
307  return 0;
308  } else {
309  // write warning if netedit is running in testing mode
310  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
311  // remove affected flows of calibrator flows
312  for (auto j : calibratorFlowsToErase) {
313  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true);
314  }
315  // remove vehicle type of calibrator vehicle types
316  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
317  // update flows and vehicle types table
318  updateFlowTable();
320  return 1;
321  }
322  } else {
323  // remove vehicle type of calibrator vehicle types
324  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
325  // update vehicle types table
327  return 1;
328  }
329  } else if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
330  // modify vehicle type
331  GNEVehicleTypeDialog(vType, true);
332  // update vehicle types table
334  // update Flows routes also because VType ID could be changed
335  updateFlowTable();
336  return 1;
337  }
338  }
339  // nothing to do
340  return 0;
341 }
342 
343 
344 void
346  // clear table
347  myRouteList->clearItems();
348  // set number of rows
350  // Configure list
351  myRouteList->setVisibleColumns(4);
352  myRouteList->setColumnWidth(0, 136);
353  myRouteList->setColumnWidth(1, 136);
354  myRouteList->setColumnWidth(2, GUIDesignTableIconCellWidth);
355  myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
356  myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
357  myRouteList->setColumnText(2, "");
358  myRouteList->getRowHeader()->setWidth(0);
359  // Declare index for rows and pointer to FXTableItem
360  int indexRow = 0;
361  FXTableItem* item = nullptr;
362  // iterate over routes
364  // Set ID
365  item = new FXTableItem(toString(i.second->getAttribute(SUMO_ATTR_ID)).c_str());
366  myRouteList->setItem(indexRow, 0, item);
367  // Set edges
368  item = new FXTableItem(toString(i.second->getAttribute(SUMO_ATTR_EDGES)).c_str());
369  myRouteList->setItem(indexRow, 1, item);
370  // set remove
371  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
372  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
373  item->setEnabled(false);
374  myRouteList->setItem(indexRow, 2, item);
375  // Update index
376  indexRow++;
377  }
378  // enable or disable flow and label button
380 }
381 
382 
383 void
385  // clear table
386  myFlowList->clearItems();
387  // set number of rows
388  myFlowList->setTableSize(int(myEditedAdditional->getAdditionalChildren().size()), 3);
389  // Configure list
390  myFlowList->setVisibleColumns(3);
391  myFlowList->setColumnWidth(0, 136);
392  myFlowList->setColumnWidth(1, 136);
393  myFlowList->setColumnWidth(2, GUIDesignTableIconCellWidth);
394  myFlowList->setColumnText(0, toString(SUMO_ATTR_TYPE).c_str());
395  myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
396  myFlowList->setColumnText(2, "");
397  myFlowList->getRowHeader()->setWidth(0);
398  // Declare index for rows and pointer to FXTableItem
399  int indexRow = 0;
400  FXTableItem* item = nullptr;
401  // iterate over flows
402  for (auto i : myEditedAdditional->getAdditionalChildren()) {
403  // Set vehicle type
404  item = new FXTableItem(i->getAttribute(SUMO_ATTR_TYPE).c_str());
405  myFlowList->setItem(indexRow, 0, item);
406  // Set route
407  item = new FXTableItem(i->getAttribute(SUMO_ATTR_ROUTE).c_str());
408  myFlowList->setItem(indexRow, 1, item);
409  // set remove
410  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
411  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
412  item->setEnabled(false);
413  myFlowList->setItem(indexRow, 2, item);
414  // Update index
415  indexRow++;
416  }
417  // enable or disable flow and label button
419 }
420 
421 
422 void
424  // clear table
425  myVehicleTypeList->clearItems();
426  // set number of rows
428  // Configure list
429  myVehicleTypeList->setVisibleColumns(4);
430  myVehicleTypeList->setColumnWidth(0, 136);
431  myVehicleTypeList->setColumnWidth(1, 136);
433  myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
434  myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
435  myVehicleTypeList->setColumnText(2, "");
436  myVehicleTypeList->getRowHeader()->setWidth(0);
437  // Declare index for rows and pointer to FXTableItem
438  int indexRow = 0;
439  FXTableItem* item = nullptr;
440  // iterate over vehicle types
442  // Set id
443  item = new FXTableItem(i.second->getAttribute(SUMO_ATTR_ID).c_str());
444  myVehicleTypeList->setItem(indexRow, 0, item);
445  // Set VClass
446  item = new FXTableItem(i.second->getAttribute(SUMO_ATTR_VCLASS).c_str());
447  myVehicleTypeList->setItem(indexRow, 1, item);
448  // set remove icon except for default vehicle type
449  if (indexRow != 0) {
450  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
451  } else {
452  item = new FXTableItem("");
453  }
454  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
455  item->setEnabled(false);
456  myVehicleTypeList->setItem(indexRow, 2, item);
457  // Update index
458  indexRow++;
459  }
460  // enable or disable flow and label button
462 }
463 
464 
465 void
467  // disable AddFlow button if no route is defined
469  myAddFlow->disable();
470  myFlowList->disable();
471  myLabelFlow->setText("No routes defined");
472  } else {
473  myAddFlow->enable();
474  myFlowList->enable();
475  myLabelFlow->setText(("Add new " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str());
476  }
477 }
478 
479 /****************************************************************************/
MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE
change table route
Definition: GUIAppEnum.h:1002
SUMO_ATTR_TYPE
Definition: SUMOXMLDefinitions.h:382
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:289
GNENet::getAttributeCarriers
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
Definition: GNENet.cpp:1014
MID_GNE_CALIBRATORDIALOG_ADD_FLOW
Definition: GUIAppEnum.h:1007
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GUIDesignLabelThick
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left and height of 23
Definition: GUIDesigns.h:174
GNEChange_DemandElement
Definition: GNEChange_DemandElement.h:46
GNECalibratorDialog::onCmdAddRoute
long onCmdAddRoute(FXObject *, FXSelector, void *)
add new route
Definition: GNECalibratorDialog.cpp:150
GNECalibratorDialog::~GNECalibratorDialog
~GNECalibratorDialog()
destructor
Definition: GNECalibratorDialog.cpp:114
GNEChange_DemandElement.h
GNECalibratorDialog::myFlowList
FXTable * myFlowList
list with flows
Definition: GNECalibratorDialog.h:105
GUIDesignUniformHorizontalFrame
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:295
GNECalibratorDialog::onCmdAccept
long onCmdAccept(FXObject *, FXSelector, void *)
Definition: GNECalibratorDialog.cpp:118
GNEChange_Additional
Definition: GNEChange_Additional.h:45
GNEAdditionalDialog
Dialog to edit sequences, parameters, etc.. of Additionals.
Definition: GNEAdditionalDialog.h:45
GNECalibratorDialog::updateFlowAndLabelButton
void updateFlowAndLabelButton()
update flow and label button
Definition: GNECalibratorDialog.cpp:466
GNERoute
Definition: GNERoute.h:42
GNECalibratorFlowDialog
Dialog for edit rerouter intervals.
Definition: GNECalibratorFlowDialog.h:43
GNECalibratorDialog::updateFlowTable
void updateFlowTable()
update data table with flows
Definition: GNECalibratorDialog.cpp:384
GNENet::retrieveDemandElement
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENet.cpp:2266
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
GNECalibratorDialog::onCmdReset
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
Definition: GNECalibratorDialog.cpp:138
GNECalibratorDialog::myRouteList
FXTable * myRouteList
list with routes
Definition: GNECalibratorDialog.h:96
GUIDesigns.h
SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:122
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:602
ICON_REMOVE
Definition: GUIIcons.h:185
GUIAppEnum.h
GNEAdditionalDialog::cancelChanges
void cancelChanges()
Cancel changes did in this dialog.
Definition: GNEAdditionalDialog.cpp:136
GNECalibratorDialog::onCmdAddVehicleType
long onCmdAddVehicleType(FXObject *, FXSelector, void *)
add new vehicle type
Definition: GNECalibratorDialog.cpp:265
GNECalibratorFlow.h
GNEChange_Additional.h
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:927
GNECalibratorFlowDialog.h
GNERoute.h
GNECalibratorDialog.h
MID_GNE_CALIBRATORDIALOG_ADD_ROUTE
add new route
Definition: GUIAppEnum.h:1004
GUIDesignTableIconCellWidth
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
Definition: GUIDesigns.h:483
GNEVehicleTypeDialog.h
GNECalibratorDialog::updateVehicleTypeTable
void updateVehicleTypeTable()
update data table with vehicle types
Definition: GNECalibratorDialog.cpp:423
GUIDesignButtonIcon
#define GUIDesignButtonIcon
button only with icon (23x23)
Definition: GUIDesigns.h:75
MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE
change table route
Definition: GUIAppEnum.h:1009
GNECalibratorDialog::onCmdClickedFlow
long onCmdClickedFlow(FXObject *, FXSelector, void *)
remove or edit flow
Definition: GNECalibratorDialog.cpp:242
GNEVehicleType
Definition: GNEVehicleType.h:37
ICON_ADD
Definition: GUIIcons.h:184
GNEViewNet.h
SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:160
SUMO_ATTR_ROUTE
Definition: SUMOXMLDefinitions.h:441
GNECalibratorDialog::myLabelFlow
FXLabel * myLabelFlow
label for flows
Definition: GNECalibratorDialog.h:99
SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:428
GNECalibratorDialog::updateRouteTable
void updateRouteTable()
update data table with routes
Definition: GNECalibratorDialog.cpp:345
MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE
add vehicle type
Definition: GUIAppEnum.h:1011
ProcessError
Definition: UtilExceptions.h:40
GNECalibrator
Definition: GNECalibrator.h:42
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
MID_GNE_CALIBRATORDIALOG_TABLE_FLOW
change table flow
Definition: GUIAppEnum.h:1006
FXDEFMAP
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
GNENet::AttributeCarriers::demandElements
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
Definition: GNENet.h:105
GNECalibratorFlow
Definition: GNECalibratorFlow.h:41
GNEAdditionalDialog::myEditedAdditional
GNEAdditional * myEditedAdditional
pointer to edited aditional
Definition: GNEAdditionalDialog.h:83
GNERouteDialog
Dialog for edit Calibrator Routes.
Definition: GNERouteDialog.h:43
GNECalibratorDialog::onCmdClickedRoute
long onCmdClickedRoute(FXObject *, FXSelector, void *)
remove or edit route
Definition: GNECalibratorDialog.cpp:160
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
GNECalibratorDialog
Dialog for edit calibrators.
Definition: GNECalibratorDialog.h:46
SUMO_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:154
GNECalibratorDialog::myVehicleTypeList
FXTable * myVehicleTypeList
list with vehicle types
Definition: GNECalibratorDialog.h:111
GNEAdditionalDialog::acceptChanges
void acceptChanges()
Accept changes did in this dialog.
Definition: GNEAdditionalDialog.cpp:125
GNEHierarchicalElementChildren::getAdditionalChildren
const std::vector< GNEAdditional * > & getAdditionalChildren() const
return vector of additionals that have as Parent this edge (For example, Calibrators)
Definition: GNEHierarchicalElementChildren.cpp:132
GNEVehicleTypeDialog
Dialog for edit rerouter intervals.
Definition: GNEVehicleTypeDialog.h:45
GNEAdditional::getViewNet
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
Definition: GNEAdditional.cpp:387
GNECalibratorDialog::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
Definition: GNECalibratorDialog.cpp:128
GNECalibratorDialog::onCmdAddFlow
long onCmdAddFlow(FXObject *, FXSelector, void *)
add new flow
Definition: GNECalibratorDialog.cpp:227
GNECalibrator.h
SUMO_ATTR_VCLASS
Definition: SUMOXMLDefinitions.h:452
GUIDesignAuxiliarFrame
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
Definition: GUIDesigns.h:286
GNERouteDialog.h
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:126
GNECalibratorDialog::onCmdClickedVehicleType
long onCmdClickedVehicleType(FXObject *, FXSelector, void *)
remove or edit vehicle type
Definition: GNECalibratorDialog.cpp:276
config.h
GNEVehicleType.h
GUIDesignTableAdditionals
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition: GUIDesigns.h:480
GNENet::generateDemandElementID
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
Definition: GNENet.cpp:2411
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:246
GNEAdditionalDialog::resetChanges
void resetChanges()
reset changes did in this dialog.
Definition: GNEAdditionalDialog.cpp:142
GNECalibratorDialog::myAddFlow
FXButton * myAddFlow
button for add new flow
Definition: GNECalibratorDialog.h:102
GNENet.h
GNEUndoList.h