Regulation of the input flow of supply chains to optimize the production