63 myVTypeAtributesParent(VTypeAtributesParent) {
71 myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
73 for (
const auto& i : myVTypeAtributesParent->myVehicleTypeDialog->getEditedDemandElement()->getTagProperty().getAttributeProperties(
SUMO_ATTR_VCLASS).getDiscreteValues()) {
75 myComboBoxVClass->appendItem(i.c_str());
79 if (myComboBoxVClass->getNumItems() > 10) {
80 myComboBoxVClass->setNumVisible(10);
82 myComboBoxVClass->setNumVisible(myComboBoxVClass->getNumItems());
154 myComboBoxVClass->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_VCLASS).c_str());
155 setVClassLabelImage();
156 return myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass();
163 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_VCLASS).empty()) {
167 switch (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass()) {
259 myVTypeAtributesParent(VTypeAtributesParent) {
270 for (
auto i : VShapeStrings) {
283 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) {
284 myComboBoxShape->setTextColor(FXRGB(0, 0, 0));
285 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(),
286 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
287 setVShapeLabelImage();
289 myComboBoxShape->setTextColor(FXRGB(255, 0, 0));
290 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
298 myComboBoxShape->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_GUISHAPE).c_str());
299 setVShapeLabelImage();
401 myVTypeAtributesParent(VTypeAtributesParent),
403 myRowAttrType(rowAttrType),
405 myTextField(nullptr),
406 myComboBox(nullptr) {
421 for (
const auto& value : values) {
438 if (myRowAttrType == ROWTYPE_COMBOBOX) {
440 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
441 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
442 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
446 myComboBox->setTextColor(FXRGB(255, 0, 0));
448 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
449 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
451 }
else if (myRowAttrType == ROWTYPE_COLOR) {
453 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_COLOR, myTextField->getText().text())) {
455 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(
SUMO_ATTR_COLOR) != myTextField->getText().text()) {
456 myTextField->setTextColor(FXRGB(0, 0, 0));
458 myTextField->setTextColor(FXRGB(195, 195, 195));
460 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_COLOR, myTextField->getText().text(), myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
462 myTextField->setTextColor(FXRGB(255, 0, 0));
463 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
464 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr =
SUMO_ATTR_COLOR;
468 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
469 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
470 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
474 myTextField->setTextColor(FXRGB(255, 0, 0));
476 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
477 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
487 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
488 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
489 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
491 updateValue(defaultValue);
493 myComboBox->setTextColor(FXRGB(255, 0, 0));
495 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
496 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
500 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
501 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
502 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
504 updateValue(defaultValue);
506 myTextField->setTextColor(FXRGB(255, 0, 0));
508 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
509 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
517 if (myRowAttrType == ROWTYPE_COMBOBOX) {
519 myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
521 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myComboBox->getText().text()) {
522 myComboBox->setTextColor(FXRGB(0, 0, 0));
524 myComboBox->setTextColor(FXRGB(195, 195, 195));
526 }
else if (myRowAttrType == ROWTYPE_COLOR) {
528 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
530 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
531 myTextField->setTextColor(FXRGB(0, 0, 0));
533 myTextField->setTextColor(FXRGB(195, 195, 195));
537 const std::string& parametersStr = myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr);
539 myTextField->setText(parametersStr.c_str());
541 myTextField->setTextColor(FXRGB(0, 0, 0));
550 if (keyValue.size() == 2) {
556 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
558 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
559 myTextField->setTextColor(FXRGB(0, 0, 0));
561 myTextField->setTextColor(FXRGB(195, 195, 195));
571 myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
573 if (defaultValue != myComboBox->getText().text()) {
574 myComboBox->setTextColor(FXRGB(0, 0, 0));
576 myComboBox->setTextColor(FXRGB(195, 195, 195));
580 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
582 if (defaultValue != myTextField->getText().text()) {
583 myTextField->setTextColor(FXRGB(0, 0, 0));
585 myTextField->setTextColor(FXRGB(195, 195, 195));
600 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
601 colordialog.setTarget(
this);
603 if (GNEAttributeCarrier::canParse<RGBColor>(myTextField->getText().text())) {
609 if (colordialog.execute()) {
611 myTextField->setText(newValue.c_str());
612 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, newValue)) {
613 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, newValue, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
615 myTextField->setTextColor(FXRGB(0, 0, 0));
616 myTextField->killFocus();
625 FXFileDialog opendialog(
this,
"Open Image");
627 opendialog.setSelectMode(SELECTFILE_EXISTING);
628 opendialog.setPatternList(
"All files (*)");
632 if (opendialog.execute()) {
636 std::string imagePath = opendialog.getFilename().text();
638 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
639 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
640 myTextField->setText(imagePath.c_str());
642 myTextField->setTextColor(FXRGB(0, 0, 0));
643 myTextField->killFocus();
652 FXFileDialog opendialog(
this,
"Open OSG File");
654 opendialog.setSelectMode(SELECTFILE_EXISTING);
655 opendialog.setPatternList(
"OSG file (*.obj)");
659 if (opendialog.execute()) {
663 std::string imagePath = opendialog.getFilename().text();
665 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
666 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
667 myTextField->setText(imagePath.c_str());
669 myTextField->setTextColor(FXRGB(0, 0, 0));
670 myTextField->killFocus();
678 return myTextField->getText().text();
682 std::vector<std::pair<std::string, std::string> >
684 std::vector<std::pair<std::string, std::string> > result;
687 result.push_back(std::make_pair(parameter.first, parameter.second));
700 for (
const auto& parameter : parameters) {
702 result += parameter.first +
"=" + parameter.second +
"|";
707 if (!result.empty()) {
711 myTextField->setText(result.c_str());
720 return "crossingGap";
722 return "driveAfterYellowTime";
724 return "driveAfterRedTime";
726 return "driveRedSpeed";
728 return "ignoreKeepClearTime";
730 return "ignoreFoeSpeed";
732 return "ignoreFoeProb";
736 return "timegapMinor";
741 return "cooperative";
759 return "timeToImpatience";
763 return "lookaheadLeft";
765 return "speedGainRight";
767 return "maxSpeedLatStanding";
769 return "maxSpeedLatFactor";
771 return "turnAlignDistance";
773 return "overtakeRight";
793 FXGroupBox* commonAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Vehicle Type attributes",
GUIDesignGroupBoxFrame);
801 FXGroupBox* JMAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Junction Model attributes",
GUIDesignGroupBoxFrame);
809 FXGroupBox* LCMAttributes =
new FXGroupBox(firstAuxiliarHorizontalFrame,
"Lane Change Model attributes",
GUIDesignGroupBoxFrame);
818 myVClassRow =
new VClassRow(
this, column);
866 myVShapeRow =
new VShapeRow(
this, column);
1011 myTextFieldVehicleTypeID->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_ID).c_str());
1014 myVShapeRow->updateValues();
1016 myLaneChangeModel->updateValue();
1017 myLatAlignment->updateValue();
1018 myColor->updateValue();
1025 myWidth->updateValue(
toString(defaultVTypeParameters.
width));
1027 myFilename->updateValue();
1033 myBoardingDuration->updateValue();
1034 myLoadingDuration->updateValue();
1035 myMinGapLat->updateValue();
1036 myMaxSpeedLat->updateValue();
1037 myActionStepLength->updateValue();
1038 myProbability->updateValue();
1039 myCarriageGap->updateValue();
1041 myJMCrossingGap->updateValue();
1042 myJMIgnoreKeepclearTime->updateValue();
1043 myJMDriveAfterYellowTime->updateValue();
1044 myJMDriveAfterRedTime->updateValue();
1045 myJMDriveRedSpeed->updateValue();
1046 myJMIgnoreFoeProb->updateValue();
1047 myJMIgnoreFoeSpeed->updateValue();
1048 myJMSigmaMinor->updateValue();
1049 myJMTimeGapMinor->updateValue();
1050 myJMImpatience->updateValue();
1052 myLCAStrategicParam->updateValue();
1053 myLCACooperativeParam->updateValue();
1054 myLCASpeedgainParam->updateValue();
1055 myLCAKeeprightParam->updateValue();
1056 myLCASublaneParam->updateValue();
1057 myLCAOppositeParam->updateValue();
1058 myLCAPushy->updateValue();
1059 myLCAPushygap->updateValue();
1060 myLCAAssertive->updateValue();
1061 myLCAImpatience->updateValue();
1062 myLCATimeToImpatience->updateValue();
1063 myLCAAccelLat->updateValue();
1064 myLCALookAheadLeft->updateValue();
1065 myLCASpeedGainRight->updateValue();
1066 myLCAMaxSpeedLatStanding->updateValue();
1067 myLCAMaxSpeedLatFactor->updateValue();
1068 myLCATurnAlignmentDistance->updateValue();
1069 myLCAOvertakeRight->updateValue();
1072 myParameters->updateValue();
1079 myVehicleTypeDialog->myVehicleTypeValid =
true;
1082 if (myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) {
1083 myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1084 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1085 }
else if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) {
1086 myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1087 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1089 myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0));
1090 myVehicleTypeDialog->myVehicleTypeValid =
false;
1096 myVShapeRow->setVariable();
1098 myColor->setVariable();
1105 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1109 myLaneChangeModel->setVariable();
1110 myLatAlignment->setVariable();
1117 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1119 myFilename->setVariable();
1125 myBoardingDuration->setVariable();
1126 myLoadingDuration->setVariable();
1127 myMinGapLat->setVariable();
1128 myMaxSpeedLat->setVariable();
1129 myActionStepLength->setVariable();
1130 myProbability->setVariable();
1131 myCarriageGap->setVariable();
1133 myJMCrossingGap->setVariable();
1134 myJMIgnoreKeepclearTime->setVariable();
1135 myJMDriveAfterYellowTime->setVariable();
1136 myJMDriveAfterRedTime->setVariable();
1137 myJMDriveRedSpeed->setVariable();
1138 myJMIgnoreFoeProb->setVariable();
1139 myJMIgnoreFoeSpeed->setVariable();
1140 myJMSigmaMinor->setVariable();
1141 myJMTimeGapMinor->setVariable();
1142 myJMImpatience->setVariable();
1144 myLCAStrategicParam->setVariable();
1145 myLCACooperativeParam->setVariable();
1146 myLCASpeedgainParam->setVariable();
1147 myLCAKeeprightParam->setVariable();
1148 myLCASublaneParam->setVariable();
1149 myLCAOppositeParam->setVariable();
1150 myLCAPushy->setVariable();
1151 myLCAPushygap->setVariable();
1152 myLCAAssertive->setVariable();
1153 myLCAImpatience->setVariable();
1154 myLCATimeToImpatience->setVariable();
1155 myLCAAccelLat->setVariable();
1156 myLCALookAheadLeft->setVariable();
1157 myLCASpeedGainRight->setVariable();
1158 myLCAMaxSpeedLatStanding->setVariable();
1159 myLCAMaxSpeedLatFactor->setVariable();
1160 myLCATurnAlignmentDistance->setVariable();
1161 myLCAOvertakeRight->setVariable();
1163 myParameters->setVariable();
1171 if (obj == myColor->getButton()) {
1172 myColor->openColorDialog();
1173 }
else if (obj == myFilename->getButton()) {
1174 myFilename->openImageFileDialog();
1175 }
else if (obj == myOSGFile->getButton()) {
1176 myFilename->openOSGFileDialog();
1187 if (
GNESingleParametersDialog(myParameters, myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()).execute()) {
1191 myVehicleTypeDialog->getEditedDemandElement()->setAttribute(
GNE_ATTR_PARAMETERS, myParameters->getParametersStr(), myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()->getUndoList());
1205 myVehicleTypeDialog(vehicleTypeDialog) {
1217 for (
auto i : CFModels) {
1326 for (
const auto& i : myRows) {
1330 myLabelIncompleteAttribute->hide();
1341 myApparentDecelRow->show();
1342 myEmergencyDecelRow->show();
1358 myEmergencyDecelRow->show();
1360 myMinGapFactorRow->show();
1371 myEmergencyDecelRow->show();
1373 myMinGapFactorRow->show();
1374 myTrauLastRow->show();
1381 myEmergencyDecelRow->show();
1382 mySteppingRow->show();
1383 myMinGapFactorRow->show();
1389 myEmergencyDecelRow->show();
1390 mySteppingRow->show();
1391 myMinGapFactorRow->show();
1392 myAdaptFactorRow->show();
1393 myAdaptTimeRow->show();
1399 myEmergencyDecelRow->show();
1402 myMinGapFactorRow->show();
1408 myEmergencyDecelRow->show();
1409 myMinGapFactorRow->show();
1410 mySecurityRow->show();
1411 myEstimationRow->show();
1415 myTrainTypeRow->show();
1421 myEmergencyDecelRow->show();
1422 myMinGapFactorRow->show();
1424 myLabelIncompleteAttribute->show();
1440 myEmergencyDecelRow->show();
1441 myMinGapFactorRow->show();
1443 myLabelIncompleteAttribute->show();
1466 myLabelIncompleteAttribute->show();
1493 myVerticalFrameRows->recalc();
1502 myComboBoxCarFollowModel->setCurrentItem(0);
1504 myComboBoxCarFollowModel->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL).c_str());
1509 for (
const auto& i : myRows) {
1518 myVehicleTypeDialog->myVehicleTypeValid =
true;
1521 if (myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text())) {
1522 myComboBoxCarFollowModel->setTextColor(FXRGB(0, 0, 0));
1523 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1525 myComboBoxCarFollowModel->setTextColor(FXRGB(255, 0, 0));
1526 myVehicleTypeDialog->myVehicleTypeValid =
false;
1530 for (
const auto& i : myRows) {
1585 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
1590 FXMessageBox::warning(getApp(), MBOX_OK,
1591 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
1592 (tagString +
" cannot be " + operation2 +
1594 " is invalid.").c_str());
1596 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
1602 getApp()->stopModal(
this, TRUE);
1613 getApp()->stopModal(
this, FALSE);
1635 myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1637 myTextField(nullptr) {
1646 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
1648 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1649 myTextField->setTextColor(FXRGB(0, 0, 0));
1651 myTextField->setTextColor(FXRGB(195, 195, 195));
1653 myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
1654 myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1658 myTextField->setTextColor(FXRGB(255, 0, 0));
1660 myCarFollowingModelParametersParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
1661 myCarFollowingModelParametersParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
1669 myTextField->setText(myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
1671 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1672 myTextField->setTextColor(FXRGB(0, 0, 0));
1674 myTextField->setTextColor(FXRGB(195, 195, 195));
FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_OPEN_PARAMETERS_DIALOG
open parameters dialog
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trought dialog
#define GUIDesignComboBox
#define GUIDesignComboBoxWidth180
comboBox with thick frame, width 180 (Used in GNEVehicleType)
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignTextFielWidth180
text field with thick frame, width of 180 (Used in GNEVehicleType)
#define GUIDesignLabelTickedIcon180x46
label ticked filled extended over frame used for VClasses/VShapes. (can be used by icons of 64x32 pix...
#define GUIDesignLabelAboutInfoCenter
label extended over frame with thick and with text justify to center
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonRectangular150
button rectangular with thick and raise frame with a width of 150
#define GUIDesignLabelAttribute150
label extended over the matrix column with thick frame
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
FXString gCurrentFolder
The folder used as last.
@ VSHAPE_PASSENGER_HATCHBACK
@ VSHAPE_TRUCK_SEMITRAILER
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_SHIP
is an arbitrary ship
@ SVC_PRIVATE
private vehicles
@ SVC_HOV
vehicle is a HOV
@ SVC_TRUCK
vehicle is a large transport vehicle
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_CUSTOM2
is a user-defined type
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_COACH
vehicle is a coach
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_RAIL_FAST
vehicle that is allowed to drive on high-speed rail tracks
@ SVC_TRAILER
vehicle is a large transport vehicle
@ SVC_CUSTOM1
is a user-defined type
@ SVC_RAIL_ELECTRIC
rail vehicle that requires electrified tracks
@ SVC_DELIVERY
vehicle is a small delivery vehicle
@ SVC_RAIL_URBAN
vehicle is a city rail
@ SVC_MOTORCYCLE
vehicle is a motorcycle
@ SVC_EMERGENCY
public emergency vehicles
@ SVC_MOPED
vehicle is a moped
@ SVC_AUTHORITY
authorities vehicles
@ SVC_TRAM
vehicle is a light rail
@ SVC_TAXI
vehicle is a taxi
@ SVC_BUS
vehicle is a bus
@ SVC_E_VEHICLE
is an electric vehicle
@ SVC_PEDESTRIAN
pedestrian
@ SVS_BICYCLE
render as a bicycle
@ SVS_FIREBRIGADE
render as a fire brigade
@ SVS_ANT
render as a giant ant
@ SVS_PASSENGER_HATCHBACK
render as a hatchback passenger vehicle ("Fliessheck")
@ SVS_TRUCK_SEMITRAILER
render as a semi-trailer transport vehicle ("Sattelschlepper")
@ SVS_RAIL
render as a rail
@ SVS_EMERGENCY
render as an emergency vehicle
@ SVS_DELIVERY
automated car (with cruise controllers)
@ SVS_MOTORCYCLE
render as a motorcycle
@ SVS_PASSENGER
render as a passenger vehicle
@ SVS_TRUCK
render as a transport vehicle
@ SVS_PASSENGER_SEDAN
render as a sedan passenger vehicle ("Stufenheck")
@ SVS_MOPED
render as a moped
@ SVS_E_VEHICLE
render as a (futuristic) e-vehicle
@ SVS_BUS_FLEXIBLE
render as a flexible city bus
@ SVS_BUS_TROLLEY
render as a trolley bus
@ SVS_RAIL_CARGO
render as a cargo train
@ SVS_BUS_COACH
render as a coach
@ SVS_SHIP
render as a arbitrary ship
@ SVS_RAIL_CAR
render as a (city) rail without locomotive
@ SVS_PASSENGER_WAGON
render as a wagon passenger vehicle ("Combi")
@ SVS_PASSENGER_VAN
render as a van
@ SVS_PEDESTRIAN
render as a pedestrian
@ SVS_POLICE
render as a police car
@ SVS_RICKSHAW
render as a rickshaw
@ SVS_TRUCK_1TRAILER
render as a transport vehicle with one trailer
@ SUMO_TAG_CF_KRAUSS_PLUS_SLOPE
@ SUMO_TAG_CF_PWAGNER2009
@ SUMO_TAG_CF_KRAUSS_ORIG1
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_EMISSIONCLASS
@ SUMO_ATTR_JM_IGNORE_FOE_SPEED
@ SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
@ SUMO_ATTR_CF_WIEDEMANN_SECURITY
@ SUMO_ATTR_LCA_ASSERTIVE
@ SUMO_ATTR_CF_IDMM_ADAPT_TIME
@ SUMO_ATTR_LANE_CHANGE_MODEL
@ SUMO_ATTR_CF_KERNER_PHI
@ SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE
@ SUMO_ATTR_LCA_LOOKAHEADLEFT
@ SUMO_ATTR_APPARENTDECEL
@ SUMO_ATTR_LCA_SPEEDGAIN_PARAM
@ SUMO_ATTR_ACTIONSTEPLENGTH
@ SUMO_ATTR_LCA_IMPATIENCE
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME
@ SUMO_ATTR_LOADING_DURATION
@ SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
@ SUMO_ATTR_CF_PWAGNER2009_TAULAST
@ SUMO_ATTR_CAR_FOLLOW_MODEL
@ SUMO_ATTR_LCA_MAXSPEEDLATSTANDING
@ SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME
@ SUMO_ATTR_LCA_KEEPRIGHT_PARAM
@ SUMO_ATTR_JM_IGNORE_FOE_PROB
@ SUMO_ATTR_CONTAINER_CAPACITY
@ SUMO_ATTR_LCA_COOPERATIVE_PARAM
@ SUMO_ATTR_LCA_OPPOSITE_PARAM
@ SUMO_ATTR_EMERGENCYDECEL
@ SUMO_ATTR_LCA_SUBLANE_PARAM
@ SUMO_ATTR_JM_CROSSING_GAP
@ SUMO_ATTR_CARRIAGE_LENGTH
@ SUMO_ATTR_CF_IDM_STEPPING
@ SUMO_ATTR_CF_IDMM_ADAPT_FACTOR
@ SUMO_ATTR_COLLISION_MINGAP_FACTOR
@ SUMO_ATTR_BOARDING_DURATION
@ SUMO_ATTR_JM_SIGMA_MINOR
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_CF_PWAGNER2009_APPROB
@ SUMO_ATTR_LCA_OVERTAKE_RIGHT
@ SUMO_ATTR_LCA_ACCEL_LAT
@ SUMO_ATTR_LCA_STRATEGIC_PARAM
@ SUMO_ATTR_PERSON_CAPACITY
@ SUMO_ATTR_LOCOMOTIVE_LENGTH
@ SUMO_ATTR_NOTHING
invalid attribute
@ SUMO_ATTR_JM_DRIVE_RED_SPEED
@ SUMO_ATTR_LCA_TIME_TO_IMPATIENCE
@ SUMO_ATTR_JM_TIMEGAP_MINOR
@ SUMO_ATTR_CF_WIEDEMANN_ESTIMATION
@ SUMO_ATTR_LCA_SPEEDGAINRIGHT
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::vector< double > & getParameter()
Returns the parameters of this distribution.
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
Dialog to edit sequences, parameters, etc.. of DemandElements.
void acceptChanges()
Accept changes did in this dialog.
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
FXVerticalFrame * myContentFrame
frame for contents
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
void initChanges()
init a new group of changes that will be do it in dialog
void cancelChanges()
Cancel changes did in this dialog.
void changeDemandElementDialogHeader(const std::string &newHeader)
change additional dialog header
void resetChanges()
reset changes did in this dialog.
An Element which don't belongs to GNENet but has influency in the simulation.
virtual SUMOVehicleClass getVClass() const =0
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
virtual std::string getAttribute(SumoXMLAttr key) const =0
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
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
GNEViewNet * getViewNet() const
get view net
Dialog for edit parameters.
class used for represent rows with Car Following Model parameters
FXTextField * myTextField
text field
void setVariable()
set Variablen in VehicleType
CarFollowingModelRow(CarFollowingModelParameters *carFollowingModelParametersParent, FXVerticalFrame *verticalFrame, SumoXMLAttr attr)
constructor
void updateValue()
update value of Vehicle Type
class for CarFollowingModel
CarFollowingModelRow * myPhiRow
Row for MinGap (only for Kerner)
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
CarFollowingModelRow * myTmp4Row
Row for TMP4.
CarFollowingModelRow * myTmp1Row
Row for TMP1.
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
CarFollowingModelRow * myTmp5Row
Row for TMP5.
CarFollowingModelRow * myAccelRow
Row for Accel.
CarFollowingModelRow * myAprobRow
Row for Aprob.
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
long onCmdSetVariable(FXObject *, FXSelector, void *)
void updateValues()
update values
CarFollowingModelRow * myTmp3Row
Row for TMP3.
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
CarFollowingModelRow * myTmp2Row
Row for TMP2.
CarFollowingModelRow * myTauRow
Row for Tau.
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
CarFollowingModelRow * myApparentDecelRow
Row for aparent Decel.
CarFollowingModelRow * myDecelRow
Row for Decel.
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
FXComboBox * myComboBoxCarFollowModel
Row for CarFollowModel.
CarFollowingModelRow * myEmergencyDecelRow
Row for emergency Decel.
CarFollowingModelRow * myTrainTypeRow
Row for TrainType.
void refreshCFMFields()
refresh Car Following Model Fields
CarFollowingModelRow * myEstimationRow
Row for Estimation (only for Wiedemann)
CarFollowingModelRow * mySigmaRow
Row for Sigma.
CarFollowingModelRow * myAdaptTimeRow
Row for Adapt Time.
CarFollowingModelRow * myDeltaRow
Row for MinGap (only for IDM)
CarFollowingModelRow * myTrauLastRow
Row for TauLast.
CarFollowingModelParameters(GNEVehicleTypeDialog *vehicleTypeDialog, FXHorizontalFrame *column)
FOX-declaration.
CarFollowingModelRow * myMinGapFactorRow
Row for MinGapFactor.
FXComboBox * myComboBoxVClass
FXComboBox for VClass.
SUMOVehicleClass updateValue()
update values
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
SUMOVehicleClass setVariable()
set vehicle class
void setVClassLabelImage()
set VClass texture
void setVariable()
set variables
void updateValues()
update values
VShapeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *column)
constructor
FXLabel * myComboBoxShapeLabelImage
label with image of Shape
FXComboBox * myComboBoxShape
FXComboBox for Shape.
void setVShapeLabelImage()
set VShape texture
class used for represent rows with Vehicle Type parameters
void openImageFileDialog()
open image file dialog
std::string getParametersStr() const
get parameters as string
void openColorDialog()
open color dialog
const FXButton * getButton() const
get button
void updateValue()
update value of Vehicle Type (using default value obtained from GNEAttributeCarrier)
void setParameters(const std::vector< std::pair< std::string, std::string > > ¶meters)
set parameters
FXComboBox * myComboBox
ComboBox for attributes with limited values.
std::vector< std::pair< std::string, std::string > > getParametersVectorStr() const
get parameters as vector of strings
FXTextField * myTextField
text field
FXButton * myButton
button
FXString filterAttributeName(const SumoXMLAttr attr) const
filter attribute name
void setVariable()
set Variablen in VehicleType (using default value obtained from GNEAttributeCarrier)
VTypeAttributeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector< std::string > &values={})
constructor
RowAttrType
Attribute type.
void openOSGFileDialog()
open OSG file dialog
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
void updateValues()
update values
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
VTypeAttributeRow * myLocomotiveLength
VTypeAttributeRow for locomotive length.
void buildJunctionModelAttributesB(FXVerticalFrame *column)
build JunctionModel attributes (B)
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
VTypeAttributeRow * mySpeedDev
VTypeAttributeRow for SpeedDev.
VTypeAttributeRow * myParameters
VTypeAttributeRow for parameters.
VTypeAttributeRow * myCarriageLength
VTypeAttributeRow for carriage length.
long onCmdOpenAttributeDialog(FXObject *obj, FXSelector, void *)
@event called after press a button dialog
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
void buildAttributesB(FXVerticalFrame *column)
build commmon attributes (B)
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
void buildAttributesA(FXVerticalFrame *column)
build commmon attributes (A)
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
VTypeAtributes(GNEVehicleTypeDialog *vehicleTypeDialog, FXHorizontalFrame *column)
constructor
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
long onCmdOpenParametersEditor(FXObject *obj, FXSelector, void *)
@event called after press a button dialog
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
Dialog for edit rerouter intervals.
~GNEVehicleTypeDialog()
destructor
VTypeAtributes * myVTypeAtributes
Vehicle Type Common Attributes.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
bool myVehicleTypeValid
flag to check if current vehicleType is valid
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
GNEVehicleTypeDialog(GNEDemandElement *editedVehicleType, bool updatingElement)
constructor
long onCmdAccept(FXObject *, FXSelector, void *)
GNEUndoList * getUndoList() const
get the undoList object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
static RGBColor parseColor(std::string coldef)
Parses a color information.
static const RGBColor BLACK
static StringBijection< SumoXMLTag > CarFollowModels
car following models
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
std::vector< std::string > getStrings() const
std::vector< std::string > getVector()
return vector of strings
bool hasNext()
returns the information whether further substrings exist
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
struct for default values that depend of VClass
double height
This class' height.
int personCapacity
The person capacity of the vehicle.
double carriageLength
the length of train carriages
std::string osgFile
3D model file for this class
SUMOEmissionClass emissionClass
The emission class of this vehicle.
double minGap
This class' free space in front of the vehicle itself.
int containerCapacity
The container capacity of the vehicle.
double maxSpeed
The vehicle type's maximum speed [m/s].
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
double width
This class' width.
double length
The physical vehicle length.
double locomotiveLength
the length of train locomotive