Optimal control of production sites in a supply chain