# Production Optimization in a Grain Facility through Mixed-Integer Linear Programming +
## 5 A Real-World Case Study: Optimization in a Grain Processing Facility in Uruguay
### Description of the Case Study  
The case study corresponds to an Uruguayan agricultural company, specifically Barraca Erro. This is a very relevant real-world case study in Uruguay. Among other products and services, Barraca Erro produces grains and seeds (soybeans, wheat, barley, etc.). The company is one of the main producers and exporters in Uruguay. In 2021, Barraca Erro exported goods for a total amount of 248 million USD, which represented 15% of the total Uruguayan exports within its sector of economic activity and 2.5% of the total exports of the Uruguayan economy. The considered case study accounts for producers who send orders for 17 different kinds of soybeans for each harvest (i.e., \(|V|=17\)). The soybeans must be processed and delivered according to a schedule that extends over a period of 19 weeks (i.e., \(S_{f}=19\)), which defines the annual soybean harvest. The main problem that the company faces when the orders are received is the accurate planning of production and the proper preparation the deliveries in a timely manner. The company has two production lines (line 1 and line 2, i.e., \(|L|=2\)) with a processing capacity of 6.165 and 6.65 tons per hour, respectively, (i.e., \(\pi_{1}=6.165\) and \(\pi_{2}=6.650\)). Both lines are capable of producing any of the 17 products considered. Every time the machines finish processing a product, they must be stopped and cleaned in the case that a different product is to be processed next. The duration of the stoppage and cleaning times is 6 h for production line 1 and 8 h for production line 2 (i.e., \(L_{1}=6\) and \(L_{2}=8\)). The company stops producing during the period of time that the machines are down for cleaning, and therefore reducing this downtime is of the utmost importance to improve production efficiency and profit. The adequate quantity to be produced, as well as the correct sequencing of the products that must enter each of the two production lines, help to reduce stoppages and generates important savings in time and associated costs. Two important decisions make it possible to reduce downtime and generate significant savings in production times and associated costs: (i) determining the appropriate quantity of each product to be produced and (ii) determining the correct sequencing of the products that must enter each of the two production lines. A proper production sequencing strategy often involves producing more soybeans than withdrawals in particular weeks. In this case, surplus soybeans must be stored. For storage purposes, the company owns silos with a total storage capacity of 2700 tons of grain. Using machinery efficiently and taking advantage of the available storage silos, the company must produce and store enough grain to cover the withdrawals required by its customers. In the defined case study, the two types of products defined in Section 3 are considered. Processed products are categorized into two classes: inoculated and treated. This categorization implies an additional control that the company must resolve. Products within the inoculated class (7 out of the 17 products considered, i.e., \(|V_{I}|=7\)) have an expiration time. Therefore, these products cannot be manufactured and stored too far in advance, due to the proximity of their expiration date. In the case study considered, the expiration time is two weeks, which imposes an important limitation for the planning of the inoculated products. This restriction does not apply to treated products, since there is no expiration time for products within the treated class (10 out of the 17 products considered, i.e., \(|V_{T}|=10\)). The company has personnel (operators) who carry out the two main tasks for a correct development of the production process: the supervision of the machinery during production and the cleaning tasks of the production lines. The operators work in shifts, a total of 7.5 effective hours in each shift. The company has defined a set of management policies for its workers, which imply certain rules.