On determining and applying optimal control strategies for optimal delivery of goods to a network of retailers based on inventory levels