Safety valves were first used on steam locomotives during the industrial revolution in the late-1800's. Early boilers without them were prone to accidental explosion.
They are equipped on just about every steam locomotive. Including the African and Chinese steam locomotives built during the 1980's and 1990's.
They are often located on a dome connected to the boiler, or in a long tube which resembles a whistle.
Vacuum safety valves (or combined pressure/vacuum safety valves) are used to prevent a tank from collapsing while emptying it or when cold rinse water is used after hot water.
The calculation method is not defined in any normal temperature when sizing a vacuum safety valve, particularly in the hot/cold water scenario, but some manufacturers have developed simulations to do so.