65 myVTypeAttributesParent(VTypeAttributesParent) {
70 myComboBoxVClass =
new MFXComboBoxIcon(verticalFrameLabelAndComboBox, myVTypeAttributesParent->myVehicleTypeDialog->getApplicationWindow()->getStaticTooltipMenu(),
73 myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
75 for (
const auto& vClass : myVTypeAttributesParent->myVehicleTypeDialog->getElement()->getTagProperty()->getAttributeProperties(
SUMO_ATTR_VCLASS)->getDiscreteValues()) {
155 const auto vClass = myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_VCLASS);
157 for (
int i = 0; i < myComboBoxVClass->getNumItems(); i++) {
158 if (myComboBoxVClass->getItemText(i) == vClass) {
162 myComboBoxVClass->setCurrentItem(index);
163 setVClassLabelImage();
164 return myVTypeAttributesParent->myVehicleTypeDialog->myElement->getVClass();
171 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_VCLASS).empty()) {
175 switch (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getVClass()) {
288 myVTypeAttributesParent(VTypeAttributesParent) {
300 for (
const auto& VShapeString : VShapeStrings) {
311 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) {
313 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(),
314 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
315 setVShapeLabelImage();
318 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
327 const int index = myComboBoxShape->findItem(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_GUISHAPE).c_str());
329 myComboBoxShape->setCurrentItem(0);
331 myComboBoxShape->setCurrentItem(index);
333 setVShapeLabelImage();
344 myComboBoxShape->setCurrentItem(0);
346 myComboBoxShape->setCurrentItem(index);
349 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(),
350 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
351 setVShapeLabelImage();
464 myVTypeAttributesParent(VTypeAttributesParent),
466 myRowAttrType(rowAttrType),
468 myTextField(nullptr),
469 myComboBox(nullptr) {
488 for (
const auto& value : values) {
499 if (myRowAttrType == ROWTYPE_COMBOBOX) {
501 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, myComboBox->getText().text())) {
502 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, myComboBox->getText().text(),
503 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
509 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
510 myVTypeAttributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
512 }
else if (myRowAttrType == ROWTYPE_COLOR) {
514 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(
SUMO_ATTR_COLOR, myTextField->getText().text())) {
516 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(
SUMO_ATTR_COLOR) != myTextField->getText().text()) {
519 myTextField->setTextColor(FXRGB(195, 195, 195));
521 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_COLOR, myTextField->getText().text(), myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
524 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
525 myVTypeAttributesParent->myVehicleTypeDialog->myInvalidAttr =
SUMO_ATTR_COLOR;
529 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, myTextField->getText().text())) {
530 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, myTextField->getText().text(),
531 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
537 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
538 myVTypeAttributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
548 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, myComboBox->getText().text())) {
549 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, myComboBox->getText().text(),
550 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
552 updateValue(defaultValue);
556 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
557 myVTypeAttributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
561 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, myTextField->getText().text())) {
562 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, myTextField->getText().text(),
563 myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
565 updateValue(defaultValue);
569 myVTypeAttributesParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
570 myVTypeAttributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
578 if (myRowAttrType == ROWTYPE_COMBOBOX) {
580 const int index = myComboBox->findItem(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
582 myComboBox->disable();
584 myComboBox->setCurrentItem(index);
585 myComboBox->enable();
588 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(myAttr) != myComboBox->getText().text()) {
591 myComboBox->setTextColor(FXRGB(195, 195, 195));
593 }
else if (myRowAttrType == ROWTYPE_COLOR) {
595 myTextField->setText(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
597 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(myAttr) != myTextField->getText().text()) {
600 myTextField->setTextColor(FXRGB(195, 195, 195));
604 const std::string& parametersStr = myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr);
606 myTextField->setText(parametersStr.c_str());
617 if (keyValue.size() == 2) {
623 myTextField->setText(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
625 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(myAttr) != myTextField->getText().text()) {
628 myTextField->setTextColor(FXRGB(195, 195, 195));
638 const int index = myComboBox->findItem(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
640 myComboBox->disable();
642 myComboBox->setCurrentItem(index);
643 myComboBox->enable();
646 if (defaultValue != myComboBox->getText().text()) {
649 myComboBox->setTextColor(FXRGB(195, 195, 195));
653 myTextField->setText(myVTypeAttributesParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
655 if (defaultValue != myTextField->getText().text()) {
658 myTextField->setTextColor(FXRGB(195, 195, 195));
672 const auto editedDemandElement = myVTypeAttributesParent->myVehicleTypeDialog->myElement;
675 if (GNEAttributeCarrier::canParse<RGBColor>(myTextField->getText().text())) {
676 color = GNEAttributeCarrier::parse<RGBColor>(myTextField->getText().text());
679 const auto colorDialog =
new GNEColorDialog(editedDemandElement->getNet()->getViewNet()->getViewParent()->getGNEAppWindows(), color);
682 std::string newValue =
toString(colorDialog->getColor());
683 myTextField->setText(newValue.c_str());
684 if (editedDemandElement->isValid(myAttr, newValue)) {
685 editedDemandElement->setAttribute(myAttr, newValue, editedDemandElement->getNet()->getViewNet()->getUndoList());
688 myTextField->killFocus();
697 FXFileDialog opendialog(
this,
TL(
"Open Image"));
699 opendialog.setSelectMode(SELECTFILE_EXISTING);
704 if (opendialog.execute()) {
708 std::string imagePath = opendialog.getFilename().text();
710 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, imagePath)) {
711 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, imagePath, myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
712 myTextField->setText(imagePath.c_str());
715 myTextField->killFocus();
724 FXFileDialog opendialog(
this,
TL(
"Open OSG File"));
726 opendialog.setSelectMode(SELECTFILE_EXISTING);
731 if (opendialog.execute()) {
735 std::string imagePath = opendialog.getFilename().text();
737 if (myVTypeAttributesParent->myVehicleTypeDialog->myElement->isValid(myAttr, imagePath)) {
738 myVTypeAttributesParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, imagePath, myVTypeAttributesParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
739 myTextField->setText(imagePath.c_str());
742 myTextField->killFocus();
750 return myTextField->getText().text();
754std::vector<std::pair<std::string, std::string> >
756 std::vector<std::pair<std::string, std::string> > result;
759 result.push_back(std::make_pair(parameter.first, parameter.second));
772 for (
const auto& parameter : parameters) {
774 result += parameter.first +
"=" + parameter.second +
"|";
779 if (!result.empty()) {
783 myTextField->setText(result.c_str());
792 return "crossingGap";
794 return "driveAfterYellowTime";
796 return "driveAfterRedTime";
798 return "driveRedSpeed";
800 return "ignoreKeepClearTime";
802 return "ignoreFoeSpeed";
804 return "ignoreFoeProb";
808 return "timegapMinor";
813 return "cooperative";
831 return "timeToImpatience";
835 return "lookaheadLeft";
837 return "speedGainRight";
839 return "maxSpeedLatStanding";
841 return "maxSpeedLatFactor";
843 return "turnAlignDistance";
845 return "overtakeRight";
847 return "keepRightAcceptanceTime";
849 return "overtakeDeltaSpeedFactor";
869 FXGroupBox* commonAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Vehicle Type attributes",
GUIDesignGroupBoxFrame);
877 FXGroupBox* JMAttributes =
new FXGroupBox(firstAuxiliarVerticalFrame,
"Junction Model attributes",
GUIDesignGroupBoxFrame);
885 FXGroupBox* LCMAttributes =
new FXGroupBox(firstAuxiliarHorizontalFrame,
"Lane Change Model attributes",
GUIDesignGroupBoxFrame);
894 myVClassRow =
new VClassRow(
this, column);
942 myVShapeRow =
new VShapeRow(
this, column);
1094 myTextFieldVehicleTypeID->setText(myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_ID).c_str());
1097 myVShapeRow->updateValues();
1099 myLaneChangeModel->updateValue();
1101 myColor->updateValue();
1108 myWidth->updateValue(
toString(defaultVTypeParameters.
width));
1110 myFilename->updateValue();
1120 myBoardingDuration->updateValue();
1121 myLoadingDuration->updateValue();
1122 myMinGapLat->updateValue();
1123 myMaxSpeedLat->updateValue();
1124 myActionStepLength->updateValue();
1125 myProbability->updateValue();
1127 myJMCrossingGap->updateValue();
1128 myJMIgnoreKeepclearTime->updateValue();
1129 myJMDriveAfterYellowTime->updateValue();
1130 myJMDriveAfterRedTime->updateValue();
1131 myJMDriveRedSpeed->updateValue();
1132 myJMIgnoreFoeProb->updateValue();
1133 myJMIgnoreFoeSpeed->updateValue();
1134 myJMSigmaMinor->updateValue();
1135 myJMTimeGapMinor->updateValue();
1136 myJMImpatience->updateValue();
1138 myLCAStrategicParam->updateValue();
1139 myLCACooperativeParam->updateValue();
1140 myLCASpeedgainParam->updateValue();
1141 myLCAKeeprightParam->updateValue();
1142 myLCASublaneParam->updateValue();
1143 myLCAOppositeParam->updateValue();
1144 myLCAPushy->updateValue();
1145 myLCAPushygap->updateValue();
1146 myLCAAssertive->updateValue();
1147 myLCAImpatience->updateValue();
1148 myLCATimeToImpatience->updateValue();
1149 myLCAAccelLat->updateValue();
1150 myLCALookAheadLeft->updateValue();
1151 myLCASpeedGainRight->updateValue();
1152 myLCAMaxSpeedLatStanding->updateValue();
1153 myLCAMaxSpeedLatFactor->updateValue();
1154 myLCATurnAlignmentDistance->updateValue();
1155 myLCAOvertakeRight->updateValue();
1156 myLCAKeepRightAcceptanceTime->updateValue();
1157 myLCAOvertakeDeltaSpeedFactor->updateValue();
1160 myParameters->updateValue();
1167 myVehicleTypeDialog->myVehicleTypeValid =
true;
1170 if (myVehicleTypeDialog->myElement->isValid(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) {
1172 myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
1173 }
else if (myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) {
1175 myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
1178 myVehicleTypeDialog->myVehicleTypeValid =
false;
1184 myVShapeRow->setVariable();
1186 myColor->setVariable();
1193 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1197 myLaneChangeModel->setVariable();
1204 myWidth->setVariable(
toString(defaultVTypeParameters.
width));
1206 myFilename->setVariable();
1216 myBoardingDuration->setVariable();
1217 myLoadingDuration->setVariable();
1218 myMinGapLat->setVariable();
1219 myMaxSpeedLat->setVariable();
1220 myActionStepLength->setVariable();
1221 myProbability->setVariable();
1223 myJMCrossingGap->setVariable();
1224 myJMIgnoreKeepclearTime->setVariable();
1225 myJMDriveAfterYellowTime->setVariable();
1226 myJMDriveAfterRedTime->setVariable();
1227 myJMDriveRedSpeed->setVariable();
1228 myJMIgnoreFoeProb->setVariable();
1229 myJMIgnoreFoeSpeed->setVariable();
1230 myJMSigmaMinor->setVariable();
1231 myJMTimeGapMinor->setVariable();
1232 myJMImpatience->setVariable();
1234 myLCAStrategicParam->setVariable();
1235 myLCACooperativeParam->setVariable();
1236 myLCASpeedgainParam->setVariable();
1237 myLCAKeeprightParam->setVariable();
1238 myLCASublaneParam->setVariable();
1239 myLCAOppositeParam->setVariable();
1240 myLCAPushy->setVariable();
1241 myLCAPushygap->setVariable();
1242 myLCAAssertive->setVariable();
1243 myLCAImpatience->setVariable();
1244 myLCATimeToImpatience->setVariable();
1245 myLCAAccelLat->setVariable();
1246 myLCALookAheadLeft->setVariable();
1247 myLCASpeedGainRight->setVariable();
1248 myLCAMaxSpeedLatStanding->setVariable();
1249 myLCAMaxSpeedLatFactor->setVariable();
1250 myLCATurnAlignmentDistance->setVariable();
1251 myLCAOvertakeRight->setVariable();
1252 myLCAKeepRightAcceptanceTime->setVariable();
1253 myLCAOvertakeDeltaSpeedFactor->setVariable();
1255 myParameters->setVariable();
1263 if (obj == myColor->getButton()) {
1264 myColor->openColorDialog();
1265 }
else if (obj == myFilename->getButton()) {
1266 myFilename->openImageFileDialog();
1267 }
else if (obj == myOSGFile->getButton()) {
1268 myFilename->openOSGFileDialog();
1276 auto viewNet = myVehicleTypeDialog->getElement()->getNet()->getViewNet();
1278 const auto singleParametersDialog =
GNEParametersDialog(viewNet->getViewParent()->getGNEAppWindows(), myVehicleTypeDialog->getElement()->getParameters()->getParametersMap());
1282 myVehicleTypeDialog->getElement()->setAttribute(
GNE_ATTR_PARAMETERS, myParameters->getParametersStr(), viewNet->getUndoList());
1293 myVehicleTypeDialog(vehicleTypeDialog) {
1305 for (
const auto& CFModel : CFModels) {
1509 for (
const auto& row : myRows) {
1513 myLabelIncompleteAttribute->hide();
1524 myApparentDecelRow->show();
1525 myEmergencyDecelRow->show();
1541 myEmergencyDecelRow->show();
1543 myMinGapFactorRow->show();
1554 myEmergencyDecelRow->show();
1556 myMinGapFactorRow->show();
1557 myTrauLastRow->show();
1564 myEmergencyDecelRow->show();
1566 mySteppingRow->show();
1567 myMinGapFactorRow->show();
1573 myEmergencyDecelRow->show();
1575 mySteppingRow->show();
1576 myMinGapFactorRow->show();
1577 myAdaptFactorRow->show();
1578 myAdaptTimeRow->show();
1584 myEmergencyDecelRow->show();
1586 mySteppingRow->show();
1587 myMinGapFactorRow->show();
1588 myTpreviewRow->show();
1589 myTreactionRow->show();
1590 myTPersDriveRow->show();
1591 myTPersEstimateRow->show();
1592 myCcoolnessRow->show();
1593 mySigmaleaderRow->show();
1594 mySigmagapRow->show();
1595 mySigmaerrorRow->show();
1596 myJerkmaxRow->show();
1597 myEpsilonaccRow->show();
1598 myTaccmaxRow->show();
1599 myMflatnessRow->show();
1600 myMbeginRow->show();
1601 myUseVehDynamicsRow->show();
1602 myMaxVehPreviewRow->show();
1608 myEmergencyDecelRow->show();
1611 myMinGapFactorRow->show();
1617 myEmergencyDecelRow->show();
1618 myMinGapFactorRow->show();
1619 mySecurityRow->show();
1620 myEstimationRow->show();
1635 myTrainTypeRow->show();
1641 myEmergencyDecelRow->show();
1642 myMinGapFactorRow->show();
1644 myLabelIncompleteAttribute->show();
1660 myEmergencyDecelRow->show();
1661 myMinGapFactorRow->show();
1663 myLabelIncompleteAttribute->show();
1686 myLabelIncompleteAttribute->show();
1713 myVerticalFrameRows->recalc();
1722 myComboBoxCarFollowModel->setCurrentItem(0);
1725 const int index = myComboBoxCarFollowModel->findItem(myVehicleTypeDialog->myElement->getAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL).c_str());
1727 myComboBoxCarFollowModel->disable();
1729 myComboBoxCarFollowModel->setCurrentItem(index);
1730 myComboBoxCarFollowModel->enable();
1736 for (
const auto& row : myRows) {
1745 myVehicleTypeDialog->myVehicleTypeValid =
true;
1750 myVehicleTypeDialog->myElement->setAttribute(
SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text(), myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
1753 myVehicleTypeDialog->myVehicleTypeValid =
false;
1757 for (
const auto& row : myRows) {
1803 TLF(
"The % cannot be updated because attribute % is invalid.",
1829 FXVerticalFrame* verticalFrame,
SumoXMLAttr attr) :
1831 myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1833 myTextField(nullptr) {
1842 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->isValid(myAttr, myTextField->getText().text())) {
1844 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(myAttr) != myTextField->getText().text()) {
1847 myTextField->setTextColor(FXRGB(195, 195, 195));
1849 myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->setAttribute(myAttr, myTextField->getText().text(),
1850 myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->getNet()->getViewNet()->getUndoList());
1856 myCarFollowingModelParametersParent->myVehicleTypeDialog->myVehicleTypeValid =
false;
1857 myCarFollowingModelParametersParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
1865 myTextField->setText(myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->getAttribute(myAttr).c_str());
1867 if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myElement->getTagProperty()->getDefaultStringValue(myAttr) != myTextField->getText().text()) {
1870 myTextField->setTextColor(FXRGB(195, 195, 195));
FXDEFMAP(GNEVehicleTypeDialog::VTypeAttributes) VTypeAttributesMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_ATTRIBUTESEDITOR_PARAMETERS
open generic parameters editor
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trough dialog
#define GUIDesignTextFieldFixed(width)
text field with fixed width
#define GUIDesignTextColorRed
red color (for invalid text)
#define GUIDesignComboBox
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#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 GUIDesignComboBoxFixed(customWidth)
comboBox with thick frame, fixed width
#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 GUIDesignComboBoxVisibleItems
#define GUIDesignTextColorBlack
black color (for correct text)
#define GUIDesignButtonFixed(width)
button rectangular with thick and raise frame with the given width
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
FXString gCurrentFolder
The folder used as last.
@ VSHAPE_PASSENGER_HATCHBACK
@ VSHAPE_TRUCK_SEMITRAILER
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SUMOVehicleShape::UNKNOWN, false)
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)
@ 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
render as a delivery vehicle
@ BICYCLE
render as a bicycle
@ MOTORCYCLE
render as a motorcycle
@ BUS_TROLLEY
render as a trolley bus
@ TAXI
automated car (with cruise controllers)
@ E_VEHICLE
render as a (futuristic) e-vehicle
@ ANT
render as a giant ant
@ TRUCK
render as a transport vehicle
@ AIRCRAFT
render as aircraft
@ 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
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_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
@ 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_DESIRED_MAXSPEED
@ 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_OVERTAKE_DELTASPEED_FACTOR
@ SUMO_ATTR_LCA_SUBLANE_PARAM
@ SUMO_ATTR_JM_CROSSING_GAP
@ 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_LCA_KEEPRIGHT_ACCEPTANCE_TIME
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
@ 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)
double getParameter(const int index) const
Returns the nth parameter of this distribution.
virtual bool isAttributeEnabled(SumoXMLAttr key) const
const std::string & getTagStr() const
get tag assigned to this object in string format
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
GNENet * getNet() const
get pointer to net
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
FXVerticalFrame * myContentFrame
content frame
GNEApplicationWindow * getApplicationWindow() const
get pointer to the application window
void openDialog(FXWindow *focusableElement=nullptr)
open dialog
GNEViewNet * getViewNet() const
get view net
T * myElement
pointer to edited element
void resetChanges()
reset changes did in this dialog.
long acceptElementDialog()
close dialog commiting changes
class used for represent rows with Car Following Model parameters
FXTextField * myTextField
text field
void setVariable()
set Variable 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 * myW99CC1
Row for W99 CC 01.
CarFollowingModelRow * myTpreviewRow
Row for Look ahead/preview Time.
CarFollowingModelRow * myW99CC8
Row for W99 CC 08.
CarFollowingModelRow * myW99CC6
Row for W99 CC 06.
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
CarFollowingModelRow * myMflatnessRow
Row for Startup M flatness.
CarFollowingModelRow * myTmp4Row
Row for TMP4.
CarFollowingModelRow * myW99CC3
Row for W99 CC 03.
CarFollowingModelRow * myTmp1Row
Row for TMP1.
CarFollowingModelRow * myW99CC2
Row for W99 CC 02.
CarFollowingModelRow * myTreactionRow
Row for Reaction Time.
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
CarFollowingModelRow * myCcoolnessRow
Row for Coolness parameter.
GNEVehicleTypeDialog * myVehicleTypeDialog
pointer to Vehicle Type dialog parent
CarFollowingModelRow * mySigmagapRow
Row for Gap estimation error.
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
CarFollowingModelRow * myW99CC7
Row for W99 CC 07.
CarFollowingModelRow * myW99CC5
Row for W99 CC 05.
CarFollowingModelRow * myTmp5Row
Row for TMP5.
CarFollowingModelRow * myAccelRow
Row for Accel.
CarFollowingModelRow * myEpsilonaccRow
Row for AP Driver Update threshold.
CarFollowingModelRow * myAprobRow
Row for Aprob.
CarFollowingModelRow * myW99CC9
Row for W99 CC 09.
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.
MFXComboBoxIcon * myComboBoxCarFollowModel
Row for CarFollowModel.
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 apparent Decel.
CarFollowingModelRow * myDecelRow
Row for Decel.
CarFollowingModelRow * myW99CC4
Row for W99 CC 04.
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
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.
SUMOVehicleClass setVariable()
set vehicle class
VTypeAttributes * myVTypeAttributesParent
pointer to VTypeAttributes parent
SUMOVehicleClass updateValue()
update values
void setVClassLabelImage()
set VClass texture
MFXComboBoxIcon * myComboBoxVClass
MFXComboBoxIcon for VClass.
VTypeAttributes * myVTypeAttributesParent
pointer to VTypeAttributes parent
MFXComboBoxIcon * myComboBoxShape
MFXComboBoxIcon for Shape.
FXLabel * myComboBoxShapeLabelImage
label with image of Shape
void setVShapeLabelImage()
set VShape texture
void updateValues()
update values
void setVariable()
set variables
VShapeRow(VTypeAttributes *VTypeAttributesParent, FXVerticalFrame *column)
constructor
void updateValue(SUMOVehicleClass vClass)
update value
class used for represent rows with Vehicle Type parameters
VTypeAttributeRow(VTypeAttributes *VTypeAttributesParent, FXVerticalFrame *verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector< std::string > &values={})
constructor
FXTextField * myTextField
text field
void openImageFileDialog()
open image file dialog
MFXComboBoxIcon * myComboBox
ComboBox for attributes with limited values.
std::string getParametersStr() const
get parameters as string
void updateValue()
update value of Vehicle Type (using default value obtained from GNEAttributeCarrier)
RowAttrType
Attribute type.
void setVariable()
set Variable in VehicleType (using default value obtained from GNEAttributeCarrier)
const FXButton * getButton() const
get button
std::vector< std::pair< std::string, std::string > > getParametersVectorStr() const
get parameters as vector of strings
VTypeAttributes * myVTypeAttributesParent
pointer to VTypeAttributeParameters parent
FXButton * myButton
button
void setParameters(const std::vector< std::pair< std::string, std::string > > ¶meters)
set parameters
std::string filterAttributeName(const SumoXMLAttr attr) const
filter attribute name
void openOSGFileDialog()
open OSG file dialog
void openColorDialog()
open color dialog
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
void buildAttributesA(FXVerticalFrame *column)
build common attributes (A)
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
VTypeAttributeRow * myParameters
VTypeAttributeRow for parameters.
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
void updateValues()
update values
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
long onCmdOpenAttributeDialog(FXObject *obj, FXSelector, void *)
@event called after press a button dialog
void buildJunctionModelAttributesB(FXVerticalFrame *column)
build JunctionModel attributes (B)
void buildAttributesB(FXVerticalFrame *column)
build common attributes (B)
long onCmdSetAttribute(FXObject *, FXSelector, void *)
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
VTypeAttributeRow * myDesiredMaxSpeed
VTypeAttributeRow for desired max speed.
long onCmdOpenParametersEditor(FXObject *obj, FXSelector, void *)
@event called after press a button dialog
VTypeAttributes(GNEVehicleTypeDialog *vehicleTypeDialog, FXHorizontalFrame *column)
constructor
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
~GNEVehicleTypeDialog()
destructor
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
bool myVehicleTypeValid
flag to check if current vehicleType is valid
VTypeAttributes * myVTypeAttributes
Vehicle Type Common Attributes.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
GNEVehicleTypeDialog(GNEDemandElement *vehicleType)
constructor
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
static FXLabel * buildFXLabel(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXuint opts, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Construct label with given text and icon.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
dialog arguments, used for certain modal dialogs that can not be edited using tab
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
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< OSGFileExtension > OSGFileExtensions
OSG file Extensions.
static StringBijection< ImageFileExtension > ImageFileExtensions
image file extensions
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
std::vector< std::string > getStrings() const
get all strings
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
static FXIcon * getVClassIcon(const SUMOVehicleClass vc)
returns icon associated to the given vClass
struct for default values that depend of VClass
double height
This class' height.
int personCapacity
The person capacity of the vehicle.
double desiredMaxSpeed
The vehicle type's desired maximum speed [m/s].
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] (technical limit, not subject to speed deviation)
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.
SUMOVehicleShape shape
This class' shape.
LatAlignmentDefinition latAlignmentProcedure
the lateral alignment procedure