A scientific challenge on industrial production is to mathematically represent a production process, and this challenge increases when describing production processes with stochastic behavior. The present paper will be approaching a specific part of the production process of soybean oil, where the main objective is to maximize the oil extraction by keeping the thicknesses of the soybean flakes within an operating range. We propose a method, based on a mathematical stochastic model, to obtain pressure setpoints that produce flakes as ideal as possible for oil extraction. The results reported are achieved by applying the proposed method in the industry with improvements within the process in terms of time and quality.