SAFETY STOCK OPTIMIZATION FOR ATO AND MTO PRODUCTION SYSTEMS