Joint capacity, inventory, and demand allocation decisions in manufacturing systems