Optimization of operational safety in tunnels