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());
151 myComboBoxVClass->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_VCLASS).c_str());
152 setVClassLabelImage();
153 return myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass();
160 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_VCLASS).empty()) {
164 switch (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass()) {
256 myVTypeAtributesParent(VTypeAtributesParent) {
267 for (
auto i : VShapeStrings) {
280 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) {
281 myComboBoxShape->setTextColor(FXRGB(0, 0, 0));
282 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(),
283 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
284 setVShapeLabelImage();
286 myComboBoxShape->setTextColor(FXRGB(255, 0, 0));
287 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
295 myComboBoxShape->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_GUISHAPE).c_str());
296 setVShapeLabelImage();
403 myVTypeAtributesParent(VTypeAtributesParent),
405 myRowAttrType(rowAttrType),
407 myTextField(nullptr),
408 myComboBox(nullptr) {
423 for (
const auto& value : values) {
440 if (myRowAttrType == ROWTYPE_COMBOBOX) {
442 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
443 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
444 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
448 myComboBox->setTextColor(FXRGB(255, 0, 0));
450 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
451 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
453 }
else if (myRowAttrType == ROWTYPE_COLOR) {
455 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_COLOR, myTextField->getText().text())) {
457 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(
SUMO_ATTR_COLOR) != myTextField->getText().text()) {
458 myTextField->setTextColor(FXRGB(0, 0, 0));
460 myTextField->setTextColor(FXRGB(195, 195, 195));
462 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_COLOR, myTextField->getText().text(), myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
464 myTextField->setTextColor(FXRGB(255, 0, 0));
465 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
466 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr =
SUMO_ATTR_COLOR;
470 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
471 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
472 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
476 myTextField->setTextColor(FXRGB(255, 0, 0));
478 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
479 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
489 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
490 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
491 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
493 updateValue(defaultValue);
495 myComboBox->setTextColor(FXRGB(255, 0, 0));
497 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
498 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
502 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
503 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
504 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
506 updateValue(defaultValue);
508 myTextField->setTextColor(FXRGB(255, 0, 0));
510 myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
511 myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
519 if (myRowAttrType == ROWTYPE_COMBOBOX) {
521 myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
523 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myComboBox->getText().text()) {
524 myComboBox->setTextColor(FXRGB(0, 0, 0));
526 myComboBox->setTextColor(FXRGB(195, 195, 195));
528 }
else if (myRowAttrType == ROWTYPE_COLOR) {
530 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
532 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
533 myTextField->setTextColor(FXRGB(0, 0, 0));
535 myTextField->setTextColor(FXRGB(195, 195, 195));
539 const std::string& parametersStr = myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr);
541 myTextField->setText(parametersStr.c_str());
543 myTextField->setTextColor(FXRGB(0, 0, 0));
552 if (keyValue.size() == 2) {
558 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
560 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
561 myTextField->setTextColor(FXRGB(0, 0, 0));
563 myTextField->setTextColor(FXRGB(195, 195, 195));
573 myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
575 if (defaultValue != myComboBox->getText().text()) {
576 myComboBox->setTextColor(FXRGB(0, 0, 0));
578 myComboBox->setTextColor(FXRGB(195, 195, 195));
582 myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
584 if (defaultValue != myTextField->getText().text()) {
585 myTextField->setTextColor(FXRGB(0, 0, 0));
587 myTextField->setTextColor(FXRGB(195, 195, 195));
602 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
603 colordialog.setTarget(
this);
605 if (GNEAttributeCarrier::canParse<RGBColor>(myTextField->getText().text())) {
606 colordialog.setRGBA(
MFXUtils::getFXColor(GNEAttributeCarrier::parse<RGBColor>(myTextField->getText().text())));
611 if (colordialog.execute()) {
613 myTextField->setText(newValue.c_str());
614 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, newValue)) {
615 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, newValue, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
617 myTextField->setTextColor(FXRGB(0, 0, 0));
618 myTextField->killFocus();
627 FXFileDialog opendialog(
this,
"Open Image");
629 opendialog.setSelectMode(SELECTFILE_EXISTING);
630 opendialog.setPatternList(
"All files (*)");
634 if (opendialog.execute()) {
638 std::string imagePath = opendialog.getFilename().text();
640 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
641 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
642 myTextField->setText(imagePath.c_str());
644 myTextField->setTextColor(FXRGB(0, 0, 0));
645 myTextField->killFocus();
654 FXFileDialog opendialog(
this,
"Open OSG File");
656 opendialog.setSelectMode(SELECTFILE_EXISTING);
657 opendialog.setPatternList(
"OSG file (*.obj)");
661 if (opendialog.execute()) {
665 std::string imagePath = opendialog.getFilename().text();
667 if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
668 myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
669 myTextField->setText(imagePath.c_str());
671 myTextField->setTextColor(FXRGB(0, 0, 0));
672 myTextField->killFocus();
680 return myTextField->getText().text();
684 std::vector<std::pair<std::string, std::string> >
686 std::vector<std::pair<std::string, std::string> > result;
689 result.push_back(std::make_pair(parameter.first, parameter.second));
702 for (
const auto& parameter : parameters) {
704 result += parameter.first +
"=" + parameter.second +
"|";
709 if (!result.empty()) {
713 myTextField->setText(result.c_str());
722 return "crossingGap";
724 return "driveAfterYellowTime";
726 return "driveAfterRedTime";
728 return "driveRedSpeed";
730 return "ignoreKeepClearTime";
732 return "ignoreFoeSpeed";
734 return "ignoreFoeProb";
738 return "timegapMinor";
743 return "cooperative";
761 return "timeToImpatience";
765 return "lookaheadLeft";
767 return "speedGainRight";
769 return "maxSpeedLatStanding";
771 return "maxSpeedLatFactor";
773 return "turnAlignDistance";
775 return "overtakeRight";
795 FXGroupBox* commonAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Vehicle Type attributes",
GUIDesignGroupBoxFrame);
803 FXGroupBox* JMAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Junction Model attributes",
GUIDesignGroupBoxFrame);
811 FXGroupBox* LCMAttributes =
new FXGroupBox(firstAuxiliarHorizontalFrame,
"Lane Change Model attributes",
GUIDesignGroupBoxFrame);
820 myVClassRow =
new VClassRow(
this, column);
868 myVShapeRow =
new VShapeRow(
this, column);
1010 myTextFieldVehicleTypeID->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_ID).c_str());
1013 myVShapeRow->updateValues();
1015 myLaneChangeModel->updateValue();
1016 myLatAlignment->updateValue();
1017 myColor->updateValue();
1023 myWidth->updateValue(
toString(defaultVTypeParameters.
width));
1025 myFilename->updateValue();
1031 myBoardingDuration->updateValue();
1032 myLoadingDuration->updateValue();
1033 myMinGapLat->updateValue();
1034 myMaxSpeedLat->updateValue();
1035 myActionStepLength->updateValue();
1036 myProbability->updateValue();
1037 myCarriageGap->updateValue();
1039 myJMCrossingGap->updateValue();
1040 myJMIgnoreKeepclearTime->updateValue();
1041 myJMDriveAfterYellowTime->updateValue();
1042 myJMDriveAfterRedTime->updateValue();
1043 myJMDriveRedSpeed->updateValue();
1044 myJMIgnoreFoeProb->updateValue();
1045 myJMIgnoreFoeSpeed->updateValue();
1046 myJMSigmaMinor->updateValue();
1047 myJMTimeGapMinor->updateValue();
1048 myJMImpatience->updateValue();
1050 myLCAStrategicParam->updateValue();
1051 myLCACooperativeParam->updateValue();
1052 myLCASpeedgainParam->updateValue();
1053 myLCAKeeprightParam->updateValue();
1054 myLCASublaneParam->updateValue();
1055 myLCAOppositeParam->updateValue();
1056 myLCAPushy->updateValue();
1057 myLCAPushygap->updateValue();
1058 myLCAAssertive->updateValue();
1059 myLCAImpatience->updateValue();
1060 myLCATimeToImpatience->updateValue();
1061 myLCAAccelLat->updateValue();
1062 myLCALookAheadLeft->updateValue();
1063 myLCASpeedGainRight->updateValue();
1064 myLCAMaxSpeedLatStanding->updateValue();
1065 myLCAMaxSpeedLatFactor->updateValue();
1066 myLCATurnAlignmentDistance->updateValue();
1067 myLCAOvertakeRight->updateValue();
1070 myParameters->updateValue();
1077 myVehicleTypeDialog->myVehicleTypeValid =
true;
1080 if (myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) {
1081 myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1082 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1083 }
else if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) {
1084 myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1085 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1087 myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0));
1088 myVehicleTypeDialog->myVehicleTypeValid =
false;
1094 myVShapeRow->setVariable();
1096 myColor->setVariable();
1102 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1106 myLaneChangeModel->setVariable();
1107 myLatAlignment->setVariable();
1113 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1115 myFilename->setVariable();
1121 myBoardingDuration->setVariable();
1122 myLoadingDuration->setVariable();
1123 myMinGapLat->setVariable();
1124 myMaxSpeedLat->setVariable();
1125 myActionStepLength->setVariable();
1126 myProbability->setVariable();
1127 myCarriageGap->setVariable();
1129 myJMCrossingGap->setVariable();
1130 myJMIgnoreKeepclearTime->setVariable();
1131 myJMDriveAfterYellowTime->setVariable();
1132 myJMDriveAfterRedTime->setVariable();
1133 myJMDriveRedSpeed->setVariable();
1134 myJMIgnoreFoeProb->setVariable();
1135 myJMIgnoreFoeSpeed->setVariable();
1136 myJMSigmaMinor->setVariable();
1137 myJMTimeGapMinor->setVariable();
1138 myJMImpatience->setVariable();
1140 myLCAStrategicParam->setVariable();
1141 myLCACooperativeParam->setVariable();
1142 myLCASpeedgainParam->setVariable();
1143 myLCAKeeprightParam->setVariable();
1144 myLCASublaneParam->setVariable();
1145 myLCAOppositeParam->setVariable();
1146 myLCAPushy->setVariable();
1147 myLCAPushygap->setVariable();
1148 myLCAAssertive->setVariable();
1149 myLCAImpatience->setVariable();
1150 myLCATimeToImpatience->setVariable();
1151 myLCAAccelLat->setVariable();
1152 myLCALookAheadLeft->setVariable();
1153 myLCASpeedGainRight->setVariable();
1154 myLCAMaxSpeedLatStanding->setVariable();
1155 myLCAMaxSpeedLatFactor->setVariable();
1156 myLCATurnAlignmentDistance->setVariable();
1157 myLCAOvertakeRight->setVariable();
1159 myParameters->setVariable();
1167 if (obj == myColor->getButton()) {
1168 myColor->openColorDialog();
1169 }
else if (obj == myFilename->getButton()) {
1170 myFilename->openImageFileDialog();
1171 }
else if (obj == myOSGFile->getButton()) {
1172 myFilename->openOSGFileDialog();
1183 if (
GNESingleParametersDialog(myParameters, myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()).execute()) {
1187 myVehicleTypeDialog->getEditedDemandElement()->setAttribute(
GNE_ATTR_PARAMETERS, myParameters->getParametersStr(), myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()->getUndoList());
1201 myVehicleTypeDialog(vehicleTypeDialog) {
1213 for (
auto i : CFModels) {
1382 for (
const auto& i : myRows) {
1386 myLabelIncompleteAttribute->hide();
1397 myApparentDecelRow->show();
1398 myEmergencyDecelRow->show();
1414 myEmergencyDecelRow->show();
1416 myMinGapFactorRow->show();
1427 myEmergencyDecelRow->show();
1429 myMinGapFactorRow->show();
1430 myTrauLastRow->show();
1437 myEmergencyDecelRow->show();
1439 mySteppingRow->show();
1440 myMinGapFactorRow->show();
1446 myEmergencyDecelRow->show();
1448 mySteppingRow->show();
1449 myMinGapFactorRow->show();
1450 myAdaptFactorRow->show();
1451 myAdaptTimeRow->show();
1457 myEmergencyDecelRow->show();
1459 mySteppingRow->show();
1460 myMinGapFactorRow->show();
1461 myTpreviewRow->show();
1462 myTreactionRow->show();
1463 myTPersDriveRow->show();
1464 myTPersEstimateRow->show();
1465 myCcoolnessRow->show();
1466 mySigmaleaderRow->show();
1467 mySigmagapRow->show();
1468 mySigmaerrorRow->show();
1469 myJerkmaxRow->show();
1470 myEpsilonaccRow->show();
1471 myTaccmaxRow->show();
1472 myMflatnessRow->show();
1473 myMbeginRow->show();
1474 myUseVehDynamicsRow->show();
1475 myMaxVehPreviewRow->show();
1481 myEmergencyDecelRow->show();
1484 myMinGapFactorRow->show();
1490 myEmergencyDecelRow->show();
1491 myMinGapFactorRow->show();
1492 mySecurityRow->show();
1493 myEstimationRow->show();
1497 myTrainTypeRow->show();
1503 myEmergencyDecelRow->show();
1504 myMinGapFactorRow->show();
1506 myLabelIncompleteAttribute->show();
1522 myEmergencyDecelRow->show();
1523 myMinGapFactorRow->show();
1525 myLabelIncompleteAttribute->show();
1548 myLabelIncompleteAttribute->show();
1575 myVerticalFrameRows->recalc();
1584 myComboBoxCarFollowModel->setCurrentItem(0);
1586 myComboBoxCarFollowModel->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL).c_str());
1591 for (
const auto& i : myRows) {
1600 myVehicleTypeDialog->myVehicleTypeValid =
true;
1603 if (myVehicleTypeDialog->myEditedDemandElement->isValid(
SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text())) {
1604 myComboBoxCarFollowModel->setTextColor(FXRGB(0, 0, 0));
1605 myVehicleTypeDialog->myEditedDemandElement->setAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1607 myComboBoxCarFollowModel->setTextColor(FXRGB(255, 0, 0));
1608 myVehicleTypeDialog->myVehicleTypeValid =
false;
1612 for (
const auto& i : myRows) {
1667 WRITE_DEBUG(
"Opening FXMessageBox of type 'warning'");
1672 FXMessageBox::warning(getApp(), MBOX_OK,
1673 (
"Error " + operation1 +
" " + tagString).c_str(),
"%s",
1674 (tagString +
" cannot be " + operation2 +
1676 " is invalid.").c_str());
1678 WRITE_DEBUG(
"Closed FXMessageBox of type 'warning' with 'OK'");
1684 getApp()->stopModal(
this, TRUE);
1695 getApp()->stopModal(
this, FALSE);
1717 myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1719 myTextField(nullptr) {
1728 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
1730 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1731 myTextField->setTextColor(FXRGB(0, 0, 0));
1733 myTextField->setTextColor(FXRGB(195, 195, 195));
1735 myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
1736 myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getNet()->getViewNet()->getUndoList());
1740 myTextField->setTextColor(FXRGB(255, 0, 0));
1742 myCarFollowingModelParametersParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
1743 myCarFollowingModelParametersParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
1751 myTextField->setText(myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
1753 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1754 myTextField->setTextColor(FXRGB(0, 0, 0));
1756 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 GNEVType)
#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 type frame)
#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, SUMOVehicleShape::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
@ RICKSHAW
render as a rickshaw
@ RAIL_CARGO
render as a cargo train
@ EMERGENCY
render as an emergency vehicle
@ PASSENGER_VAN
render as a van
@ PASSENGER
render as a passenger vehicle
@ SCOOTER
render as a scooter
@ RAIL_CAR
render as a (city) rail without locomotive
@ SHIP
render as a arbitrary ship
@ DELIVERY
automated car (with cruise controllers)
@ BICYCLE
render as a bicycle
@ MOTORCYCLE
render as a motorcycle
@ BUS_TROLLEY
render as a trolley bus
@ E_VEHICLE
render as a (futuristic) e-vehicle
@ ANT
render as a giant ant
@ TRUCK
render as a transport vehicle
@ FIREBRIGADE
render as a fire brigade
@ PASSENGER_HATCHBACK
render as a hatchback passenger vehicle ("Fliessheck")
@ BUS_FLEXIBLE
render as a flexible city bus
@ TRUCK_1TRAILER
render as a transport vehicle with one trailer
@ PASSENGER_SEDAN
render as a sedan passenger vehicle ("Stufenheck")
@ BUS_COACH
render as a coach
@ POLICE
render as a police car
@ PASSENGER_WAGON
render as a wagon passenger vehicle ("Combi")
@ TRUCK_SEMITRAILER
render as a semi-trailer transport vehicle ("Sattelschlepper")
@ PEDESTRIAN
render as a pedestrian
@ SUMO_TAG_CF_KRAUSS_PLUS_SLOPE
@ SUMO_TAG_CF_PWAGNER2009
@ SUMO_TAG_CF_KRAUSS_ORIG1
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_CF_EIDM_T_ACC_MAX
@ SUMO_ATTR_CF_EIDM_EPSILON_ACC
@ SUMO_ATTR_EMISSIONCLASS
@ SUMO_ATTR_JM_IGNORE_FOE_SPEED
@ SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
@ SUMO_ATTR_CF_EIDM_T_LOOK_AHEAD
@ SUMO_ATTR_CF_WIEDEMANN_SECURITY
@ SUMO_ATTR_LCA_ASSERTIVE
@ SUMO_ATTR_CF_EIDM_USEVEHDYNAMICS
@ SUMO_ATTR_CF_IDMM_ADAPT_TIME
@ SUMO_ATTR_LANE_CHANGE_MODEL
@ SUMO_ATTR_CF_KERNER_PHI
@ SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE
@ SUMO_ATTR_CF_EIDM_C_COOLNESS
@ SUMO_ATTR_CF_EIDM_SIG_ERROR
@ 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_CF_EIDM_MAX_VEH_PREVIEW
@ SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
@ SUMO_ATTR_CF_EIDM_T_REACTION
@ SUMO_ATTR_CF_EIDM_T_PERSISTENCE_ESTIMATE
@ SUMO_ATTR_CF_PWAGNER2009_TAULAST
@ SUMO_ATTR_CF_EIDM_SIG_GAP
@ SUMO_ATTR_CAR_FOLLOW_MODEL
@ SUMO_ATTR_CF_EIDM_JERK_MAX
@ 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_CF_EIDM_M_FLATNESS
@ SUMO_ATTR_JM_SIGMA_MINOR
@ SUMO_ATTR_CF_EIDM_M_BEGIN
@ SUMO_ATTR_CF_EIDM_T_PERSISTENCE_DRIVE
@ SUMO_ATTR_CF_EIDM_SIG_LEADER
@ 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.
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
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 * myTpreviewRow
Row for Look ahead/preview Time.
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
CarFollowingModelRow * myMflatnessRow
Row for Startup M flatness.
CarFollowingModelRow * myTmp4Row
Row for TMP4.
CarFollowingModelRow * myTmp1Row
Row for TMP1.
CarFollowingModelRow * myTreactionRow
Row for Reaction Time.
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
CarFollowingModelRow * myCcoolnessRow
Row for Coolness parameter.
CarFollowingModelRow * mySigmagapRow
Row for Gap estimation error.
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
CarFollowingModelRow * myTmp5Row
Row for TMP5.
CarFollowingModelRow * myAccelRow
Row for Accel.
CarFollowingModelRow * myEpsilonaccRow
Row for AP Driver Update threshold.
CarFollowingModelRow * myAprobRow
Row for Aprob.
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
CarFollowingModelRow * myTPersDriveRow
Row for Wiener Process Driving Error.
long onCmdSetVariable(FXObject *, FXSelector, void *)
void updateValues()
update values
CarFollowingModelRow * myTmp3Row
Row for TMP3.
CarFollowingModelRow * myMaxVehPreviewRow
Row for Using vehicle preview.
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
CarFollowingModelRow * myTmp2Row
Row for TMP2.
CarFollowingModelRow * myTauRow
Row for Tau.
CarFollowingModelRow * myTPersEstimateRow
Row for Wiener Process Estimation Error.
CarFollowingModelRow * myJerkmaxRow
Row for max jerk.
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
CarFollowingModelRow * myTaccmaxRow
Row for Startup Time to acc_max.
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 * mySigmaleaderRow
Row for leader speed estimation error.
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 * myMbeginRow
Row for Startup M begin.
CarFollowingModelRow * mySigmaerrorRow
Row for Driving Error.
CarFollowingModelRow * myAdaptTimeRow
Row for Adapt Time.
CarFollowingModelRow * myDeltaRow
Row for MinGap (only for IDM)
CarFollowingModelRow * myTrauLastRow
Row for TauLast.
CarFollowingModelRow * myUseVehDynamicsRow
Row for Using vehicle dynamics.
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 * 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 const RGBColor BLACK
static std::vector< std::string > getLatAlignmentStrings()
return all valid strings for latAlignment
static StringBijection< SumoXMLTag > CarFollowModels
car following models
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
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