Optimal control of manufacturing processes in Hybrid Inventory-Production systems