show bluelight only on vehicles which have the bluelight device
currently it is on all emergency vehicles alternatively emergency vehicles could be equipped with the device by default
I find it confusing that a vehicle with vClass="emergency" still needs a bluelight device to be set explicitly. I would vote for equipping those vehicles with the device by default to make configuration more easy. After all, it does not only impact the visualization but also the driving behavior (e.g., crossing a red light). I don't really see the where you would want to have an emergency vehicle without the bluelight device in order behave like "normal" vehicles.
Emergency vehicles do not always have their emergency lights switched on (My personal experience is that those vehicles often drive without lights). The bluelight device models behavioral changes (by the vehicle and surrounding traffic) when driving in the lights-on state. I agree that the blue-light-blinking visualization should be tied to an active device. Setting a device is easy enough and you have to customize the type anyway for faster-than-speed-limit driving and violating red ilghts: https://sumo.dlr.de/docs/Simulation/Emergency.html#example_configuration
I get your point that you want to distinguish between an actively used bluelight device (in case of an emergency) and an emergency vehicle that just drives through traffic normally. Therefore, it makes sense to keep the configuration separate.
It is not a 100% clear to me what the difference of an emergency vehicle (i.e., vClass="emergency) without the bluelight device and a normal vehicle (e.g., vClass="passenger") in terms of driving behavior is. I know they differ in default dimensions, and guiShape, but I am referring to special driving rules only. Is it correct that all special driving rules (e.g., red light, right of way, overtaking on the right, etc.) are only enabled when the bluelight device is active, and thus, are not enabled without the device? If this is the case, only the activation of the device makes the difference in terms of special driving rules, which matches the real-world and would thus be correct. Am I right here?
An issue currently then is that other parameters you can specifically define for emergency vehicles (e.g., speedFactor) are used no matter the state of the bluelight device. This does not match the real world as the vehicles are only allowed to drive faster when there is an emergency (i.e., with active bluelight device). Since the type of a vehicle can not be changed during runtime, we would need to configure two speedFactors in this example, one for the normal driving (e.g., 1.0) and one for the emergency case (e.g., 1.5). The same applies to other parameters like impatience.
Thanks for adding the example configuration yesterday (7f38bdefd77de83df5da9c83c37feb8a618033a3). Do you agree that the documentation for the emergency vehicles is not clear enough about the required configuration steps and the resulting changed behavior? At least for me the above questions are still open and it took me quite some time to understand that the vehicle needs the bluelight device (or a different speedMode value) for special rules (e.g., crossing red lights) when I was using emergency vehicles recently.
Please see the updated documentation at https://sumo.dlr.de/docs/Simulation/Emergency.html
see also #9268 (once switching is possible, the user should probably call setSpeedFactor as well)