Minimising inventory costs by properly choosing the level of safety stock