After the recent collision of a Metrolink train in California which cost the lives of 25 people I thought about some possible improvements.
The first that comes to mind is a sacrificial car that is simply a crumble zone. This car could be placed between the engine and the rest of the train. Upon tripping a collision sensor in the front of the train all cars behind the "crumple car" would immediately activate their brakes. The sensor could be borrowed from that found in automobiles which trigger airbags.
Another possible solution is active collision avoidance that relies on radar or sonar to detect upcoming obstructions. This system would be slower to activate but would first start to reduce power and then activate braking systems if obstructions remain. Sounding the horn and flashing warnings for the engineer would also be helpful. Systems like this have recently become available in luxury cars.
These ideas may help to prevent derailment during collisions. Once a train derails, much more damage is done. Just like in car crashes, rollovers are more dangerous.
Saving lives and preventing spills of toxic or hazardous substances is a big deal. Hopefully something will be done to prevent or limit the problem of train collisions and the damage that results