66 vehicle->buildPopUpMenuCommonOptions(
this, app, vehicle->myNet->getViewNet(), vehicle->getTagProperty()->getTag(), vehicle->isAttributeCarrierSelected());
68 vehicle->buildMenuCommandRouteLength(
this);
70 if (
myVehicle->getNet()->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
72 vehicle->buildMenuAddReverse(this);
74 if (myVehicle->getTagProperty()->vehicleJunctions()) {
76 FXMenuPane* transformOperation = new FXMenuPane(this);
77 this->insertMenuPaneChild(transformOperation);
78 new FXMenuCascade(this, TL(
"transform to"), nullptr, transformOperation);
80 GUIDesigns::buildFXMenuCommand(transformOperation,
81 TL(
"Trip (over junctions)"),
82 GUIIconSubSys::getIcon(GUIIcon::TRIP_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_JUNCTIONS,
83 (myVehicle->getTagProperty()->getTag() == GNE_TAG_TRIP_JUNCTIONS));
84 GUIDesigns::buildFXMenuCommand(transformOperation,
85 TL(
"Flow (over junctions)"),
86 GUIIconSubSys::getIcon(GUIIcon::FLOW_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_JUNCTIONS,
87 (myVehicle->getTagProperty()->getTag() == GNE_TAG_FLOW_JUNCTIONS));
88 }
else if (
myVehicle->getTagProperty()->vehicleTAZs()) {
90 FXMenuPane* transformOperation = new FXMenuPane(this);
91 this->insertMenuPaneChild(transformOperation);
92 new FXMenuCascade(this, TL(
"transform to"), nullptr, transformOperation);
94 GUIDesigns::buildFXMenuCommand(transformOperation,
95 TL(
"Trip (over TAZs)"),
96 GUIIconSubSys::getIcon(GUIIcon::TRIP_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_TAZS,
97 (myVehicle->getTagProperty()->getTag() == GNE_TAG_TRIP_TAZS));
98 GUIDesigns::buildFXMenuCommand(transformOperation,
99 TL(
"Flow (over TAZs)"),
100 GUIIconSubSys::getIcon(GUIIcon::FLOW_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_TAZS,
101 (myVehicle->getTagProperty()->getTag() == GNE_TAG_FLOW_TAZS));
104 FXMenuPane* transformOperation = new FXMenuPane(this);
105 this->insertMenuPaneChild(transformOperation);
106 new FXMenuCascade(this, TL(
"transform to"), nullptr, transformOperation);
108 GUIDesigns::buildFXMenuCommand(transformOperation,
110 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE,
111 (myVehicle->getTagProperty()->getTag() == SUMO_TAG_VEHICLE));
112 GUIDesigns::buildFXMenuCommand(transformOperation,
113 TL(
"Vehicle (embedded route)"),
114 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE_EMBEDDED,
115 (myVehicle->getTagProperty()->getTag() == GNE_TAG_VEHICLE_WITHROUTE));
116 GUIDesigns::buildFXMenuCommand(transformOperation,
118 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_ROUTEFLOW,
119 (myVehicle->getTagProperty()->getTag() == GNE_TAG_FLOW_ROUTE));
120 GUIDesigns::buildFXMenuCommand(transformOperation,
121 TL(
"RouteFlow (embedded route)"),
122 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_EMBEDDED,
123 (myVehicle->getTagProperty()->getTag() == GNE_TAG_FLOW_WITHROUTE));
124 GUIDesigns::buildFXMenuCommand(transformOperation,
126 GUIIconSubSys::getIcon(GUIIcon::TRIP), this, MID_GNE_VEHICLE_TRANSFORM_TRIP,
127 (myVehicle->getTagProperty()->getTag() == SUMO_TAG_TRIP));
128 GUIDesigns::buildFXMenuCommand(transformOperation,
130 GUIIconSubSys::getIcon(GUIIcon::FLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW,
131 (myVehicle->getTagProperty()->getTag() == SUMO_TAG_FLOW));
142 switch (FXSELID(sel)) {
194 vehicle->buildMenuAddReverse(this);
196 if (vehicle->getTagProperty()->vehicleJunctions()) {
198 FXMenuPane* transformOperation = new FXMenuPane(this);
199 this->insertMenuPaneChild(transformOperation);
200 new FXMenuCascade(this, TL(
"transform selected to"), nullptr, transformOperation);
202 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
203 TLF(
"Trips (over junctions) (only %)", toString(GNE_TAG_TRIP_JUNCTIONS)),
204 GUIIconSubSys::getIcon(GUIIcon::TRIP_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_JUNCTIONS)] = GNE_TAG_TRIP_JUNCTIONS;
205 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
206 TLF(
"Flows (over junctions) (only %)", toString(GNE_TAG_FLOW_JUNCTIONS)),
207 GUIIconSubSys::getIcon(GUIIcon::FLOW_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_JUNCTIONS)] = GNE_TAG_FLOW_JUNCTIONS;
209 new FXMenuSeparator(transformOperation);
211 GUIDesigns::buildFXMenuCommand(transformOperation,
212 TL(
"Trips (over junctions)"),
213 GUIIconSubSys::getIcon(GUIIcon::TRIP_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_JUNCTIONS);
214 GUIDesigns::buildFXMenuCommand(transformOperation,
215 TL(
"Flows (over junctions)"),
216 GUIIconSubSys::getIcon(GUIIcon::FLOW_JUNCTIONS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_JUNCTIONS);
219 FXMenuPane* transformOperation = new FXMenuPane(this);
220 this->insertMenuPaneChild(transformOperation);
221 new FXMenuCascade(this, TL(
"transform selected to"), nullptr, transformOperation);
223 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
224 TLF(
"Trips (over TAZs) (only %)", toString(GNE_TAG_TRIP_TAZS)),
225 GUIIconSubSys::getIcon(GUIIcon::TRIP_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_TAZS)] = GNE_TAG_TRIP_TAZS;
226 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
227 TLF(
"Flows (over TAZs) (only %)", toString(GNE_TAG_FLOW_TAZS)),
228 GUIIconSubSys::getIcon(GUIIcon::FLOW_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_TAZS)] = GNE_TAG_FLOW_TAZS;
230 new FXMenuSeparator(transformOperation);
232 GUIDesigns::buildFXMenuCommand(transformOperation,
233 TL(
"Trips (over TAZs)"),
234 GUIIconSubSys::getIcon(GUIIcon::TRIP_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_TRIP_TAZS);
235 GUIDesigns::buildFXMenuCommand(transformOperation,
236 TL(
"Flows (over TAZs)"),
237 GUIIconSubSys::getIcon(GUIIcon::FLOW_TAZS), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_TAZS);
240 FXMenuPane* transformOperation = new FXMenuPane(this);
241 this->insertMenuPaneChild(transformOperation);
242 new FXMenuCascade(this, TL(
"transform selected to"), nullptr, transformOperation);
244 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
245 TLF(
"Vehicles (only %)", toString(SUMO_TAG_VEHICLE)),
246 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE)] = SUMO_TAG_VEHICLE;
247 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
248 TLF(
"Vehicles (embedded route) (only %)", toString(GNE_TAG_VEHICLE_WITHROUTE)),
249 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE_EMBEDDED)] = GNE_TAG_VEHICLE_WITHROUTE;
250 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
251 TLF(
"RouteFlows (only %)", toString(GNE_TAG_FLOW_ROUTE)),
252 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_ROUTEFLOW)] = GNE_TAG_FLOW_ROUTE;
253 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
254 TLF(
"RouteFlows (embedded route) (only %)", toString(GNE_TAG_FLOW_WITHROUTE)),
255 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_EMBEDDED)] = GNE_TAG_FLOW_WITHROUTE;
256 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
257 TLF(
"Trips (only %)", toString(SUMO_TAG_TRIP)),
258 GUIIconSubSys::getIcon(GUIIcon::TRIP), this, MID_GNE_VEHICLE_TRANSFORM_TRIP)] = SUMO_TAG_TRIP;
259 myRestrictedMenuCommands[GUIDesigns::buildFXMenuCommand(transformOperation,
260 TLF(
"Flows (only %)", toString(SUMO_TAG_FLOW)),
261 GUIIconSubSys::getIcon(GUIIcon::FLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW)] = SUMO_TAG_FLOW;
263 new FXMenuSeparator(transformOperation);
265 GUIDesigns::buildFXMenuCommand(transformOperation,
267 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE);
268 GUIDesigns::buildFXMenuCommand(transformOperation,
269 TL(
"Vehicles (embedded route)"),
270 GUIIconSubSys::getIcon(GUIIcon::VEHICLE), this, MID_GNE_VEHICLE_TRANSFORM_VEHICLE_EMBEDDED);
271 GUIDesigns::buildFXMenuCommand(transformOperation,
273 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_ROUTEFLOW);
274 GUIDesigns::buildFXMenuCommand(transformOperation,
275 TL(
"RouteFlows (embedded route)"),
276 GUIIconSubSys::getIcon(GUIIcon::ROUTEFLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW_EMBEDDED);
277 GUIDesigns::buildFXMenuCommand(transformOperation,
279 GUIIconSubSys::getIcon(GUIIcon::TRIP), this, MID_GNE_VEHICLE_TRANSFORM_TRIP);
280 GUIDesigns::buildFXMenuCommand(transformOperation,
282 GUIIconSubSys::getIcon(GUIIcon::FLOW), this, MID_GNE_VEHICLE_TRANSFORM_FLOW);
295 switch (FXSELID(sel)) {
297 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
308 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
319 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
330 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
341 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
352 if (!vehicle->getTagProperty()->vehicleJunctions() && !vehicle->getTagProperty()->vehicleTAZs()) {
363 if (vehicle->getTagProperty()->vehicleJunctions()) {
374 if (vehicle->getTagProperty()->vehicleJunctions()) {
385 if (vehicle->getTagProperty()->vehicleTAZs()) {
396 if (vehicle->getTagProperty()->vehicleTAZs()) {
418#pragma warning(disable: 4355)
455 id = vehicleParameters.
id;
469 id = vehicleParameters.
id;
590 if (
via.size() > 0) {
609 if (demandElement->getTagProperty()->isVehicleStop()) {
610 demandElement->writeDemandElement(device);
615 route->writeDemandElement(device);
634 }
else if (
myNet->getDemandPathManager()->isPathValid(
this)) {
643 }
else if (
myNet->getDemandPathManager()->isPathValid(
this)) {
691 for (
int i = 1; i < (int)routeEdges.size(); i++) {
692 if (
myNet->getDemandPathManager()->getPathCalculator()->consecutiveEdgesConnected(
getTypeParent()->
getVClass(), routeEdges.at((
int)i - 1), routeEdges.at(i)) ==
false) {
693 return (
"There is no valid path between route edges '" + routeEdges.at((
int)i - 1)->getID() +
"' and '" + routeEdges.at(i)->getID() +
"'");
702 for (
int i = 1; i < (int)routeEdges.size(); i++) {
703 if (
myNet->getDemandPathManager()->getPathCalculator()->consecutiveEdgesConnected(
getTypeParent()->
getVClass(), routeEdges.at((
int)i - 1), routeEdges.at(i)) ==
false) {
704 return (
"There is no valid path between embedded route edges '" + routeEdges.at((
int)i - 1)->getID() +
"' and '" + routeEdges.at(i)->getID() +
"'");
737 myNet->removeGLObjectFromGrid(
this);
742 if (routeRef->getTagProperty()->isDistributionReference()) {
743 myPosOverView = routeRef->getParentDemandElements().at(1)->getParentEdges().front()->getChildLanes().at(0)->getLaneShape().front();
750 myNet->addGLObjectIntoGrid(
this);
755 const double rot = ((double)atan2((posB.
x() - posA.
x()), (posA.
y() - posB.
y())) * (double) -180.0 / (
double)
M_PI);
766 const double rot = ((double)atan2((posB.
x() - posA.
x()), (posA.
y() - posB.
y())) * (double) -180.0 / (
double)
M_PI);
775 double posOverLane = 0;
784 demandElement->computePathElement();
786 demandElement->updateGeometry();
806 const auto& editModes =
myNet->getViewNet()->getEditModes();
813 if (
myNet->getViewNet()->getPopup()) {
814 return myNet->getViewNet()->getPopup()->getGLObject() ==
this;
824 const auto selectedDemandElements =
myNet->getAttributeCarriers()->getSelectedDemandElements();
825 std::vector<GNEVehicle*> selectedVehicles;
826 selectedVehicles.reserve(selectedDemandElements.size());
827 for (
const auto& selectedDemandElement : selectedDemandElements) {
828 if (selectedDemandElement->getTagProperty()->isVehicle()) {
829 selectedVehicles.push_back(
dynamic_cast<GNEVehicle*
>(selectedDemandElement));
871 vehicleBoundary.
grow(20);
872 return vehicleBoundary;
885 if (
myNet->getViewNet()->getNetworkViewOptions().showDemandElements() &&
886 myNet->getViewNet()->getDataViewOptions().showDemandElements() &&
887 myNet->getViewNet()->getDemandViewOptions().showNonInspectedDemandElements(
this)) {
889 const bool drawSpreadVehicles = (
myNet->getViewNet()->getNetworkViewOptions().drawSpreadVehicles() ||
myNet->getViewNet()->getDemandViewOptions().drawSpreadVehicles());
911 glTranslated(vehiclePosition.
x(), vehiclePosition.
y(), 0);
912 glRotated(vehicleRotation, 0, 0, -1);
914 glTranslated(0, (-1) * length * exaggeration, 0);
917 double upscaleLength = exaggeration;
918 if ((exaggeration > 1) && (length > 5)) {
920 upscaleLength =
MAX2(1.0, upscaleLength * (5 + sqrt(length - 5)) / length);
922 glScaled(exaggeration, upscaleLength, 1);
934 glColor3d(0., 1., 0.);
937 glVertex2d(0., minGap);
938 glVertex2d(-.5, minGap);
939 glVertex2d(.5, minGap);
943 glTranslated(0,
MIN2(length / 2,
double(5)), -
getType());
944 glScaled(1 / exaggeration, 1 / upscaleLength, 1);
945 glRotated(-vehicleRotation, 0, 0, -1);
966 drawFlowLabel(vehiclePosition, vehicleRotation, width, length, exaggeration);
972 myVehicleContour.calculateContourRectangleShape(s, d,
this, vehiclePosition, length * 0.5, width * 0.5,
getType(),
973 length * -0.5, 0, vehicleRotation, exaggeration,
nullptr);
987 std::vector<GNEEdge*> edgeStops;
991 if (demandElement->getTagProperty()->isVehicleStop()) {
993 if (demandElement->getParentAdditionals().size() > 0) {
994 edgeStop = demandElement->
getParentAdditionals().front()->getParentLanes().front()->getParentEdge();
996 edgeStop = demandElement->
getParentLanes().front()->getParentEdge();
1000 if (
stops.empty()) {
1001 edgeStops.push_back(edgeStop);
1002 }
else if (edgeStops.back() != edgeStop) {
1003 edgeStops.push_back(edgeStop);
1009 std::vector<GNEEdge*> edgePath;
1014 if (firstLane && lastLane) {
1016 edgePath.push_back(firstLane->getParentEdge());
1018 if (edgeStops.size() > 0) {
1020 for (
const auto& edgeStop : edgeStops) {
1022 auto edgePathStop = edgePath;
1023 edgePathStop.push_back(edgeStop);
1024 edgePathStop.push_back(lastLane->getParentEdge());
1025 auto path =
myNet->getDemandPathManager()->getPathCalculator()->calculateDijkstraPath(
getVClass(), edgePathStop);
1026 if (path.size() > 0) {
1027 edgePath.push_back(edgeStop);
1032 for (
const auto& edgeViaID :
via) {
1033 const auto edgeVia =
myNet->getAttributeCarriers()->retrieveEdge(edgeViaID,
false);
1036 auto edgePathStop = edgePath;
1037 edgePathStop.push_back(edgeVia);
1038 edgePathStop.push_back(lastLane->getParentEdge());
1039 if (
myNet->getDemandPathManager()->getPathCalculator()->calculateDijkstraPath(
getVClass(), edgePathStop).size() > 0) {
1040 edgePath.push_back(edgeVia);
1046 edgePath.push_back(lastLane->getParentEdge());
1048 myNet->getDemandPathManager()->calculatePath(
this,
getVClass(), edgePath);
1059 const bool drawInNetworkMode =
myNet->getViewNet()->getEditModes().isCurrentSupermodeNetwork() &&
1060 myNet->getViewNet()->getNetworkViewOptions().showDemandElements() &&
1061 myNet->getViewNet()->getDemandViewOptions().showAllTrips();
1063 const bool drawInDemandMode =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1064 myNet->getViewNet()->getDemandViewOptions().showAllTrips();
1066 const bool isSelected =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1069 const bool isInspected =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1070 myNet->getViewNet()->getInspectedElements().isACInspected(
this);
1072 if (segment->
getLane() && (drawInNetworkMode || drawInDemandMode || isSelected || isInspected) &&
1073 myNet->getDemandPathManager()->getPathDraw()->checkDrawPathGeometry(s, segment->
getLane(),
myTagProperty->getTag(),
false)) {
1113 glTranslated(0, 0,
getType() + offsetFront);
1157 glTranslated(geometryEndPosition.
x(), geometryEndPosition.
y(), 0);
1188 const bool drawInNetworkMode =
myNet->getViewNet()->getEditModes().isCurrentSupermodeNetwork() &&
1189 myNet->getViewNet()->getNetworkViewOptions().showDemandElements() &&
1190 myNet->getViewNet()->getDemandViewOptions().showAllTrips();
1192 const bool drawInDemandMode =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1193 myNet->getViewNet()->getDemandViewOptions().showAllTrips();
1195 const bool isSelected =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1198 const bool isInspected =
myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
1199 myNet->getViewNet()->getInspectedElements().isACInspected(
this);
1201 if (segment->
getJunction() && (drawInNetworkMode || drawInDemandMode || isSelected || isInspected) &&
1202 myNet->getDemandPathManager()->getPathDraw()->checkDrawPathGeometry(s, segment,
myTagProperty->getTag(),
false)) {
1212 glTranslated(0, 0,
getType() + offsetFront);
1295 if ((departLaneIndex >= 0) && (departLaneIndex < (
int)firstEdge->
getChildLanes().size())) {
1346 if ((arrivalLaneIndex >= 0) && (arrivalLaneIndex < (
int)lastEdge->
getChildLanes().size())) {
1539 return laneShape.front();
1541 return laneShape.back();
1546 return laneShape.front();
1560 return laneShape.front();
1562 return laneShape.back();
1567 return laneShape.back();
1625 const auto ACs =
myNet->getAttributeCarriers();
1636 int dummyDepartLane;
1640 if (error.empty()) {
1646 return (dummyDepartLane == 0);
1648 return (dummyDepartLane == 0);
1657 double dummyDepartPos;
1661 return error.empty();
1664 double dummyDepartSpeed;
1668 if (error.empty()) {
1681 int dummyArrivalLane;
1685 if (error.empty()) {
1691 return (dummyArrivalLane == 0);
1693 return (dummyArrivalLane == 0);
1702 double dummyArrivalPos;
1706 return error.empty();
1709 double dummyArrivalSpeed;
1713 return error.empty();
1724 double dummyDepartPosLat;
1728 return error.empty();
1731 double dummyArrivalPosLat;
1735 return error.empty();
1749 return (ACs->retrieveEdge(
value,
false) !=
nullptr);
1752 if (
value.empty()) {
1776 return (ACs->retrieveJunction(
value,
false) !=
nullptr);
1813 const auto& inspectedElements =
myNet->getViewNet()->getInspectedElements();
1817 if (inspectedElements.getFirstAC() && (inspectedElements.getFirstAC()->getTagProperty()->getTag() ==
SUMO_TAG_EDGE)) {
1821 }
else if (inspectedElements.isACInspected(
getParentEdges().front())) {
1825 for (
const auto& viaEdgeID :
via) {
1826 if (viaEdgeID == inspectedElements.getFirstAC()->getID()) {
1840 const auto net = originalVehicle->
getNet();
1845 GNERoute* newEmbeddedRoute =
nullptr;
1847 const std::string newRouteID = net->getAttributeCarriers()->generateDemandElementID(
SUMO_TAG_ROUTE);
1848 const std::string newVehicleID = net->getAttributeCarriers()->generateDemandElementID(originalVehicle->
getTagProperty()->
getTag());
1851 newVehicleParameters.
id = newVehicleID;
1857 newVehicleParameters);
1861 newVehicleParameters);
1868 newVehicleParameters);
1874 newVehicleParameters);
1880 newVehicleParameters);
1883 undoList->begin(originalVehicle,
TLF(
"copy % '%'", newVehicle->
getTagStr(), newVehicleID));
1888 if (newEmbeddedRoute) {
1924 bool updateSpreadStackGeometry =
false;
1933 if (
getID().size() > 0) {
1978 if (
getID().size() > 0) {
1980 updateSpreadStackGeometry =
true;
2022 if (
getID().size() > 0) {
2024 updateSpreadStackGeometry =
true;
2125 updateSpreadStackGeometry =
true;
2133 updateSpreadStackGeometry =
true;
2141 updateSpreadStackGeometry =
true;
2145 if (!
value.empty()) {
2158 updateSpreadStackGeometry =
true;
2163 if (
value.empty()) {
2175 if (
getID().size() > 0) {
2177 updateSpreadStackGeometry =
true;
2183 if (
value.empty()) {
2194 if (
getID().size() > 0) {
2197 updateSpreadStackGeometry =
true;
2207 updateSpreadStackGeometry =
true;
2215 updateSpreadStackGeometry =
true;
2226 updateSpreadStackGeometry =
true;
2236 updateSpreadStackGeometry =
true;
2244 if (updateSpreadStackGeometry) {
FXDEFMAP(GNEVehicle::GNESingleVehiclePopupMenu) GNESingleVehiclePopupMenuMap[]
@ DEMAND_TYPE
Mode for editing types.
@ MID_GNE_VEHICLE_TRANSFORM_FLOW_EMBEDDED
transform vehicle to flow over junctions
@ MID_GNE_VEHICLE_TRANSFORM_FLOW_TAZS
transform vehicle to flow over TAZs
@ MID_GNE_VEHICLE_TRANSFORM_VEHICLE_EMBEDDED
transform vehicle to vehicle over junctions
@ MID_GNE_VEHICLE_TRANSFORM_ROUTEFLOW
transform vehicle to flow over route
@ MID_GNE_VEHICLE_TRANSFORM_TRIP_JUNCTIONS
transform vehicle to trip over junctions
@ MID_GNE_VEHICLE_TRANSFORM_TRIP_TAZS
transform vehicle to trip over TAZs
@ MID_GNE_VEHICLE_TRANSFORM_TRIP
transform vehicle to trip
@ MID_GNE_VEHICLE_TRANSFORM_FLOW
transform vehicle to flow
@ MID_GNE_VEHICLE_TRANSFORM_VEHICLE
transform vehicle to vehicle over route
@ MID_GNE_VEHICLE_TRANSFORM_FLOW_JUNCTIONS
transform vehicle to flow over jucntions
GUIViewObjectsHandler gViewObjectsHandler
const std::string invalid_return< std::string >::value
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearances.
const std::string DEFAULT_VTYPE_ID
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
const long long int VEHPARS_ARRIVALSPEED_SET
const long long int VEHPARS_DEPARTPOSLAT_SET
const long long int VEHPARS_ARRIVALPOSLAT_SET
const long long int VEHPARS_PERSON_NUMBER_SET
const long long int VEHPARS_DEPARTSPEED_SET
@ GIVEN
The edge index is given.
@ DEFAULT
No information given; use default.
DepartLaneDefinition
Possible ways to choose a lane on depart.
@ GIVEN
The lane is given.
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
DepartPosLatDefinition
Possible ways to choose the lateral departure position.
DepartPosDefinition
Possible ways to choose the departure position.
@ GIVEN
The position is given.
const long long int VEHPARS_ROUTE_SET
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
@ GIVEN
The arrival lane is given.
const long long int VEHPARS_COLOR_SET
const long long int VEHPARS_VIA_SET
DepartSpeedDefinition
Possible ways to choose the departure speed.
@ GIVEN
The speed is given.
const long long int VEHPARS_TO_TAZ_SET
const long long int VEHPARS_ARRIVALLANE_SET
const long long int VEHPARS_DEPARTLANE_SET
const long long int VEHPARS_DEPARTPOS_SET
const long long int VEHPARS_ARRIVALPOS_SET
const long long int VEHPARS_ARRIVALEDGE_SET
const long long int VEHPARS_CONTAINER_NUMBER_SET
const long long int VEHPARS_FROM_TAZ_SET
const long long int VEHPARS_VTYPE_SET
ArrivalPosDefinition
Possible ways to choose the arrival position.
@ GIVEN
The arrival position is given.
ArrivalPosLatDefinition
Possible ways to choose the lateral arrival position.
const long long int VEHPARS_LINE_SET
const long long int VEHPARS_DEPARTEDGE_SET
const long long int VEHPARS_INSERTION_CHECKS_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_ROUTE
description of a route
@ GNE_TAG_ROUTE_EMBEDDED
embedded route
@ SUMO_TAG_EDGE
begin/end of the description of an edge
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PLAN_GEOMETRY_STARTPOS
person/container geometry start position
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_DEPARTPOS_LAT
@ GNE_ATTR_FLOWPARAMETERS
flow parameters (integer for mask end, number, etc...)
@ GNE_ATTR_TAZ_CENTROID
TAZ Center (uses to return the TAZ centroid if center is not defined).
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_END
weights: time range end
@ GNE_ATTR_PLAN_GEOMETRY_ENDPOS
person/container geometry end position
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ARRIVALPOS_LAT
@ SUMO_ATTR_INSERTIONCHECKS
const double INVALID_DOUBLE
invalid double
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void drawFilledCircleDetailled(const GUIVisualizationSettings::Detail d, const double radius)
Draws a filled circle around (0,0) depending of level of detail.
static void pushMatrix()
push matrix
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
virtual double getAttributeDouble(SumoXMLAttr key) const =0
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const std::string getID() const override
get ID (all Attribute Carriers have one)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
const std::string & getTagStr() const
get tag assigned to this object in string format
bool isTemplate() const
check if this AC is template
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
Position getCommonAttributePosition(SumoXMLAttr key) const
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
const std::string & getFilename() const
get filename in which save this AC
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
GNENet * getNet() const
get pointer to net
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset, const GNESegment *segment, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
calculate contour extruded (used in elements formed by a central shape)
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
bool checkDrawPathContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
drawing contour functions
void toggleFlowAttribute(const SumoXMLAttr attribute, const bool value)
toggle flow parameters (used in toggleAttribute(...) function of vehicles, persons and containers
void drawFlowLabel(const Position &position, const double rotation, const double width, const double length, const double exaggeration) const
draw flow label
std::string getFlowAttribute(const GNEDemandElement *flowElement, SumoXMLAttr key) const
inherited from GNEAttributeCarrier and adapted to GNEDemandElementFlow
void disableFlowAttribute(GNEDemandElement *flowElement, SumoXMLAttr key, GNEUndoList *undoList)
bool isFlowAttributeEnabled(SumoXMLAttr key) const
double getFlowAttributeDouble(SumoXMLAttr key) const
bool isValidFlowAttribute(GNEDemandElement *flowElement, SumoXMLAttr key, const std::string &value)
void enableFlowAttribute(GNEDemandElement *flowElement, SumoXMLAttr key, GNEUndoList *undoList)
void setFlowAttribute(GNEDemandElement *flowElement, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void buildMenuCommandRouteLength(GUIGLObjectPopupMenu *ret) const
build menu command route length
void drawStackLabel(const int number, const std::string &element, const Position &position, const double rotation, const double width, const double length, const double exaggeration) const
draw stack label
GUIGeometry myDemandElementGeometry
demand element geometry (also called "stacked geometry")
bool isValidDemandElementID(const std::string &value) const
check if a new demand element ID is valid
void replaceLastParentEdge(const std::string &value)
replace the last parent edge
void drawJunctionLine(const GNEDemandElement *element) const
draw line between junctions
GNEDemandElement(const std::string &id, GNENet *net, const std::string &filename, SumoXMLTag tag, const GNEPathElement::Options pathOptions)
Constructor.
void replaceFirstParentAdditional(SumoXMLTag tag, const std::string &value)
replace the first parent additional
GNEDemandElement * getRouteParent() const
get route parent (always the second parent demand element)
void setDemandElementID(const std::string &newID)
set demand element id
GUIGeometry mySpreadGeometry
demand element spread geometry (Only used by vehicles and pedestrians)
void replaceFirstParentJunction(const std::string &value)
replace the first parent junction
GNEDemandElement * getTypeParent() const
get type parent (needed because first parent can be either type or typeDistribution)
void replaceDemandElementParent(const std::vector< SumoXMLTag > tags, const std::string &value, const int parentIndex)
replace demand element parent
friend class GNEDemandElementFlow
void replaceFirstParentEdge(const std::string &value)
replace the first parent edge
int myStackedLabelNumber
stacked label number
RGBColor getColorByScheme(const GUIColorer &c, const SUMOVehicleParameter *parameters) const
get color by scheme (used by vehicles, persons and containers)
Problem
enum class for demandElement problems
void replaceLastParentAdditional(SumoXMLTag tag, const std::string &value)
replace the last parent additional
void replaceLastParentJunction(const std::string &value)
replace the last parent junction
GNELane * getLaneByAllowedVClass(const SUMOVehicleClass vClass) const
return the first lane that allow a vehicle of type vClass (or the first lane, if none was found)
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
void setParent(ParentType parent)
edit parent and childrens without maintain integrity (use carefully)
const GNEHierarchicalContainerParents< GNEJunction * > & getParentJunctions() const
get parent junctions
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
const GNEHierarchicalContainerChildren< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
void setParents(const GNEHierarchicalContainerParents< ParentType > &parents)
set multiple parent element (ONLY use in constructors)
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
const PositionVector & getLaneShape() const
get elements shape
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
const GUIGeometry & getLaneGeometry() const
get lane geometry
GNEEdge * getParentEdge() const
get parent edge
static const double arrivalPositionDiameter
vehicle arrival position radius
A NBNetBuilder extended by visualisation and editing capabilities.
GNEViewNet * getViewNet() const
get view net
GNEPathElement(const GNEPathElement::Options options)
constructor
static void transformToRouteFlow(GNEVehicle *originalVehicle, bool createEmbeddedRoute)
transform routeFlow over an existent route
static void transformToFlow(GNEVehicle *originalVehicle)
transform to flow
static void transformToTrip(GNEVehicle *originalVehicle)
transform to trip
static void transformToFlowJunctions(GNEVehicle *originalVehicle)
transform to flow over junctions
static void transformToTripJunctions(GNEVehicle *originalVehicle)
transform to trip over junctions
static void transformToFlowTAZs(GNEVehicle *originalVehicle)
transform to flow over TAZs
static void transformToVehicle(GNEVehicle *originalVehicle, bool createEmbeddedRoute)
transform vehicle functions
static void transformToTripTAZs(GNEVehicle *originalVehicle)
transform to trip over TAZs
const GNELane * getLane() const
get lane associated with this segment
const GNEJunction * getJunction() const
get junction associated with this segment
const GNELane * getNextLane() const
get next lane
const GNELane * getPreviousLane() const
get previous lane
bool isFirstSegment() const
check if segment is the first path's segment
GNEContour * getContour() const
int getLaneIndex() const
get lane index
bool isLastSegment() const
check if segment is the last path's segment
bool vehicleJunctions() const
return true if tag correspond to a vehicle placed over from-to junctions
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool vehicleRouteEmbedded() const
return true if tag correspond to a vehicle placed over an embedded route
bool vehicleEdges() const
return true if tag correspond to a vehicle placed over from-to edges
bool vehicleTAZs() const
return true if tag correspond to a vehicle placed over from-to TAZs
bool vehicleRoute() const
plan parents
Problem isDemandElementValid() const override
check if current demand element is valid to be written into XML (by default true, can be reimplemente...
GNEMoveElementVehicle * myMoveElementVehicle
move element vehicle over lanes
std::string getParentName() const override
Returns the name of the parent object.
std::string getDemandElementProblem() const override
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
void writeDemandElement(OutputDevice &device) const override
write demand element element into a xml file
void computePathElement() override
compute pathElement
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
GNEContour myVehicleContour
variable used for draw vehicle contours
GNELane * getLastPathLane() const override
get last path lane
Position getPositionInView() const override
Returns position of demand element in view.
Position getAttributePosition(SumoXMLAttr key) const override
RGBColor getDrawingColor(const GUIVisualizationSettings &s) const
get drawing color
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList) override
void updateGeometry() override
update pre-computed geometry information
GNEMoveElementView * myMoveElementView
move element over view
double getAttributeDouble(SumoXMLAttr key) const override
GNELane * getFirstPathLane() const override
get first path lane
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
void fixDemandElementProblem() override
fix demand element problem (by default throw an exception, has to be reimplemented in children)
const RGBColor & getColor() const override
get color
Position myPosOverView
position over view
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over junction.
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList) override
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList) override
split geometry
Parameterised * getParameters() override
get parameters associated with this vehicle
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
const SUMOVehicleParameter & getSUMOVehicleParameter() const
@brier get sumo vehicle parameter
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
bool isValid(SumoXMLAttr key, const std::string &value) override
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this vehicle
void toggleAttribute(SumoXMLAttr key, const bool value) override
method for enable or disable the attribute and nothing else (used in GNEChange_ToggleAttribute)
SUMOVehicleClass getVClass() const override
obtain VClass related with this demand element
bool isAttributeEnabled(SumoXMLAttr key) const override
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over lane.
GNEVehicle(SumoXMLTag tag, GNENet *net)
default constructor
static GNEDemandElement * copyVehicle(const GNEVehicle *originalVehicle)
create a copy of the given vehicle
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
GNEUndoList * getUndoList() const
get the undoList object
static void drawAction_drawVehicleAsTrianglePlus(const double width, const double length, bool amReversed=false)
draw vehicle as a triangle
static void drawAction_drawVehicleAsPoly(const GUIVisualizationSettings &s, const SUMOVehicleShape shape, const double width, const double length, int carriageIndex=-1, bool isStopped=false, bool amReversed=false)
draw vehicle as a polygon
static void drawAction_drawVehicleAsBoxPlus(const double width, const double length, bool amReversed=false)
draw vehicle as a Box
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void buildPopUpMenuCommonOptions(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, GUISUMOAbstractView *parent, const SumoXMLTag tag, const bool selected, bool addSeparator=true)
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
Stores the information about how to visualize structures.
GUIVisualizationTextSettings vehicleName
GUIVisualizationSizeSettings vehicleSize
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationWidthSettings widthSettings
width settings
bool checkDrawVehicle(Detail d, const bool selected) const
check if draw vehicle
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
double scale
information about a lane's width (temporary, used for a single view)
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIVisualizationTextSettings personName
bool showRouteIndex
Information whether the route index should be shown.
double angle
The current view rotation angle.
static const std::vector< SumoXMLTag > types
type namespace
static const std::vector< SumoXMLTag > vehicles
vehicles namespace
static const std::vector< SumoXMLTag > routes
route namespace
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
double x() const
Returns the x-position.
double angleTo2D(const Position &other) const
returns the angle in the plane of the vector pointing from here to the other position (in radians bet...
double y() const
Returns the y-position.
double length2D() const
Returns the length.
Position positionAtOffset2D(double pos, double lateralOffset=0, bool extrapolateBeyond=false) const
Returns the position at the given length.
static const RGBColor RED
named colors
Structure representing possible vehicle parameter.
double departPosLat
(optional) The lateral position the vehicle shall depart from
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
std::string getArrivalSpeed() const
obtain arrival speed parameter in string format
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
double departSpeed
(optional) The initial speed of the vehicle
SumoXMLTag tag
The vehicle tag.
std::string vtypeid
The vehicle's type id.
std::string getDepartLane() const
obtain depart lane parameter in string format
SUMOVehicleParameter()
Constructor.
std::vector< std::string > via
List of the via-edges the vehicle must visit.
static bool parseArrivalLane(const std::string &val, const std::string &element, const std::string &id, int &lane, ArrivalLaneDefinition &ald, std::string &error)
Validates a given arrivalLane value.
static bool parseArrivalPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosLatDefinition &apd, std::string &error)
Validates a given arrivalPosLat value.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
long long int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color).
void write(OutputDevice &dev, const OptionsCont &oc, const SumoXMLTag altTag=SUMO_TAG_VEHICLE, const std::string &typeID="") const
Writes the parameters as a beginning element.
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
std::string getArrivalLane() const
obtain arrival lane parameter in string format
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons).
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
RouteIndexDefinition arrivalEdgeProcedure
Information how the vehicle's final edge shall be chosen.
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.
bool wasSet(long long int what) const
Returns whether the given parameter was set.
std::string getDepartSpeed() const
obtain depart speed parameter in string format
std::string getArrivalPos() const
obtain arrival pos parameter in string format
double departPos
(optional) The position the vehicle shall depart from
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
RGBColor color
The vehicle's color, TraCI may change this.
bool areInsertionChecksValid(const std::string &value) const
check if given insertion checks are valid
double arrivalPos
(optional) The position the vehicle shall arrive on
static int parseInsertionChecks(const std::string &value)
parses insertion checks
static bool parseDepartLane(const std::string &val, const std::string &element, const std::string &id, int &lane, DepartLaneDefinition &dld, std::string &error)
Validates a given departLane value.
std::string getInsertionChecks() const
get insertion checks in string format
std::string routeid
The vehicle's route id.
std::string id
The vehicle's id.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
int departEdge
(optional) The initial edge within the route of the vehicle
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
static bool parseDepartPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosLatDefinition &dpd, std::string &error)
Validates a given departPosLat value.
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
std::string getArrivalPosLat() const
obtain arrival pos lat parameter in string format
std::string getDepartPos() const
obtain depart pos parameter in string format
std::string toTaz
The vehicle's destination zone (district).
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
int insertionChecks
bitset of InsertionCheck
int arrivalEdge
(optional) The final edge within the route of the vehicle
std::string fromTaz
The vehicle's origin zone (district).
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
std::string line
The vehicle's line (mainly for public transport).
int containerNumber
The static number of containers in the vehicle when it departs.
RouteIndexDefinition departEdgeProcedure
Information how the vehicle's initial edge shall be chosen.
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
RGBColor vehicleTripColor
color for vehicle trips
RGBColor selectedVehicleColor
vehicle selection color
static const double segmentWidth
width of dotted contour segments
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool show(const GUIGlObject *o) const
whether to show the text
double scaledSize(double scale, double constFactor=0.1) const
get scale size
double tripWidth
width for trips