diff --git a/src/microsim/devices/MSDevice_Bluelight.cpp b/src/microsim/devices/MSDevice_Bluelight.cpp index 1a3a1d26d06..00a2f85602f 100644 --- a/src/microsim/devices/MSDevice_Bluelight.cpp +++ b/src/microsim/devices/MSDevice_Bluelight.cpp @@ -149,14 +149,15 @@ MSDevice_Bluelight::notifyMove(SUMOVehicle& veh, double /* oldPos */, //Setting the lateral alignment to build a rescue lane if (veh2->getLane()->getIndex() == numLanes-1) { t.setPreferredLateralAlignment(LATALIGN_LEFT); - //std::cout << "New alignment to right for vehicle: " << veh2->getID() << " " << veh2->getVehicleType().getPreferredLateralAlignment() << "\n"; + //std::cout << "New alignment to left for vehicle: " << veh2->getID() << " " << veh2->getVehicleType().getPreferredLateralAlignment() << "\n"; } else { t.setPreferredLateralAlignment(LATALIGN_RIGHT); - //std::cout << "New alignment to left for vehicle: " << veh2->getID() << " " << veh2->getVehicleType().getPreferredLateralAlignment() << "\n"; + //std::cout << "New alignment to right for vehicle: " << veh2->getID() << " " << veh2->getVehicleType().getPreferredLateralAlignment() << "\n"; } //influencedVehicles->push_back(static_cast(veh2)); //std::cout << "Vehcile in influencedVehicleList: " << veh2->getID() << "\n"; } + //todo if vehicle is passed all vehicles which had to react should get their state back after they leave the communication range } } return true; // keep the device diff --git a/tests/sumo/extended/device_bluelight/errors.sumo b/tests/sumo/extended/device_bluelight/errors.sumo new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/sumo/extended/device_bluelight/input_routes.rou.xml b/tests/sumo/extended/device_bluelight/input_routes.rou.xml new file mode 100644 index 00000000000..d83eb50811f --- /dev/null +++ b/tests/sumo/extended/device_bluelight/input_routes.rou.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/sumo/extended/device_bluelight/net2.net.xml b/tests/sumo/extended/device_bluelight/net2.net.xml new file mode 100644 index 00000000000..ef5aa6fc5cc --- /dev/null +++ b/tests/sumo/extended/device_bluelight/net2.net.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/sumo/extended/device_bluelight/options.sumo b/tests/sumo/extended/device_bluelight/options.sumo new file mode 100644 index 00000000000..c6d72a83d08 --- /dev/null +++ b/tests/sumo/extended/device_bluelight/options.sumo @@ -0,0 +1 @@ +--no-step-log --no-duration-log --net-file=net2.net.xml -r input_routes.rou.xml --device.bluelight.explicit rescue --tripinfo-output tripinfos.xml --lateral-resolution 0.64 diff --git a/tests/sumo/extended/device_bluelight/output.sumo b/tests/sumo/extended/device_bluelight/output.sumo new file mode 100644 index 00000000000..b56cf0c6bbb --- /dev/null +++ b/tests/sumo/extended/device_bluelight/output.sumo @@ -0,0 +1,29 @@ +vehicle 'rescue' does not supply vehicle parameter 'bluelight'. Using default of -1.00 +vehicle 'rescue' does not supply vType parameter 'bluelight'. Using default of -1.00 +initialized device 'bluelight_rescue' with myCustomValue1=0.00, myCustomValue2=-1.00, myCustomValue3=-1.00 +device 'bluelight_rescue' notifyEnter: reason=0 currentEdge=SC +device 'bluelight_rescue' notifyMove: newSpeed=2.60 +device 'bluelight_rescue' notifyMove: newSpeed=5.20 +device 'bluelight_rescue' notifyMove: newSpeed=7.80 +device 'bluelight_rescue' notifyMove: newSpeed=10.40 +device 'bluelight_rescue' notifyMove: newSpeed=13.00 +device 'bluelight_rescue' notifyMove: newSpeed=15.60 +device 'bluelight_rescue' notifyMove: newSpeed=11.62 +device 'bluelight_rescue' notifyMove: newSpeed=7.12 +device 'bluelight_rescue' notifyMove: newSpeed=2.62 +device 'bluelight_rescue' notifyMove: newSpeed=5.22 +device 'bluelight_rescue' notifyLeave: reason=3 currentEdge=SC +device 'bluelight_rescue' notifyEnter: reason=3 currentEdge=SC +device 'bluelight_rescue' notifyMove: newSpeed=7.82 +device 'bluelight_rescue' notifyLeave: reason=1 currentEdge=SC +device 'bluelight_rescue' notifyEnter: reason=1 currentEdge=SC +device 'bluelight_rescue' notifyMove: newSpeed=10.42 +device 'bluelight_rescue' notifyLeave: reason=1 currentEdge=SC +device 'bluelight_rescue' notifyEnter: reason=1 currentEdge=CN +device 'bluelight_rescue' notifyMove: newSpeed=13.02 +device 'bluelight_rescue' notifyMove: newSpeed=15.62 +device 'bluelight_rescue' notifyMove: newSpeed=18.22 +device 'bluelight_rescue' notifyMove: newSpeed=20.82 +device 'bluelight_rescue' notifyMove: newSpeed=23.42 +device 'bluelight_rescue' notifyMove: newSpeed=26.02 +device 'bluelight_rescue' notifyLeave: reason=6 currentEdge=CN diff --git a/tests/sumo/extended/device_bluelight/tripinfos.sumo b/tests/sumo/extended/device_bluelight/tripinfos.sumo new file mode 100644 index 00000000000..a880ce542f6 --- /dev/null +++ b/tests/sumo/extended/device_bluelight/tripinfos.sumo @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/tests/sumo/extended/testsuite.sumo b/tests/sumo/extended/testsuite.sumo index a264528980e..751d67282cf 100644 --- a/tests/sumo/extended/testsuite.sumo +++ b/tests/sumo/extended/testsuite.sumo @@ -38,6 +38,9 @@ shapes # tests functions of the example device device_example +# tests functions of the bluelight device +device_bluelight + # saving and loading simulation state state