# Applying Simheuristics to Minimize Overall Costs of an MRP Planned Production System
## 4 Modeling a Stochastic Mrp-Based Production System
### Stochastic Mrp Setting  
Our MRP simulation model can handle stochastic demands as well as random processing times, and provides the described standard MRP logic to treat customers' orders. Stochastic behavior is introduced and controlled using log-normal probability distributions with expected values (\(\mu_{i}\)) and variances (\(\sigma_{i}^{2}\)) for machine setup time, customer required lead time and customer's expected order amount. The random variables can be found in Table 2, which also includes the respective coefficients of variation (\(CV_{i}\)).  
The simulated production system is illustrated in Figure 1. The role of the developed simheuristic is to set lot size, planned lead time and safety stock parameters in order to minimize the overall cost, which is the sum of inventory and tardiness costs. Despite being a simple BOM that considers only three levels, the example allows to demonstrate how simheuristics can be meaningfully integrated into an MRP system to optimize overall costs for all three planning parameters. Two final products, products 10 and 11, at low-level-code (LLC) 0 are produced on machine \(M2\). The two semi-finished products, materials 20 and 21, are produced on machine \(M1\). For one unit of final product 10, 1 semi-finished product 20 is needed. One piece of semi-finished product 21 is needed for final product 11. The raw material 100, which is a purchased product, is needed for the semi-finished products 20 and 21. This raw material is assumed to be always available. For this simple production system, 12 different parameters have to be optimized because during simulation for each of the materials (10, 11, 20 and 21), all three MRP planning parameters have to be tested for optimality. Table 3 shows the start-up values and respective ranges for optimization parameters. Please note that the MRP planning parameter values are treated and evaluated as integer units. This means that in the simulation results, the increase or decrease of overall costs related to each individual MRP parameter can be tracked. Furthermore, the interrelation between the single planning parameters is integrated in the simulation model, e.g., both a higher planned lead time and a higher safety stock lead to higher inventory costs and lower tardiness costs, also compare to Buzacott and Shanthikumar [8]. A decrease in lot size, for example, leads to higher setup efforts and, therefore, also affects the production  
\begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Parameter** & **Item** & \(\mu_{i}\) & \(\sigma_{i}^{2}\) & \(CV_{i}\) \\ \hline order amount & 10 & 10 & 2 & 0.1414 \\ \hline order amount & 11 & 15 & 6 & 0.1633 \\ \hline customer required lead time & 10 & 6 & 9 & 0.5000 \\ \hline customer required lead time & 11 & 6 & 10 & 0.5270 \\ \hline machine setup time & all & 12 & 36 & 0.5000 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Random variables with log-normal behavior.  
lead time. A higher safety stock increases inventory costs and also increases service level which leads to lower backorder costs.