Two commodity inventory system with variable ordering quantity