How Monte Carlo Simulation Optimizes Part Parameter Design and Reduces Losses
This article explains how to design part calibration values and tolerances for a product composed of seven components, models the relationship between component parameters and product quality, and uses a Monte Carlo simulation in Python to estimate the average loss per product, illustrating the trade‑off between quality loss and manufacturing cost.
Part Parameter Design
Problem
A product is assembled from several parts, and a performance parameter of the product depends on the parameters of these parts. Part parameters consist of a nominal (calibrated) value and a tolerance. In batch production, the nominal value represents the average of the batch, while the tolerance defines the allowable deviation. Treating part parameters as random variables, the nominal value is the expectation, and the tolerance is typically set to three times the standard deviation when no special requirement exists.
Analysis
Designing part parameters means determining their nominal values and tolerances. Two factors must be considered: (1) When assembled, if the product parameter deviates from the target, quality loss occurs, and larger deviations cause larger losses; (2) Smaller tolerances increase manufacturing cost, so tighter tolerance design raises cost.
Modeling
A certain parameter of a particle separator (denoted as y) is determined by the parameters of seven parts (denoted as x1‑x7) through an empirical formula. The target value of y is 1.50. If y deviates by 0.1 or more, the product is classified as a defect with a loss of 1,000 CNY; if the deviation reaches 0.3 or more, the product is a scrap with a loss of 9,000 CNY.
The nominal values of the seven part parameters and their tolerance grades are:
x1 = 0.1 (Grade B), x2 = 0.3 (Grade B), x3 = 0.1 (Grade B), x4 = 0.1 (Grade C), x5 = 1.5 (Grade C), x6 = 16 (Grade B), x7 = 0.75 (Grade B).
Solution
The main difficulty is that the product parameter y is a random variable and its relationship with the part parameters is complex, making an analytical probability distribution infeasible. A Monte Carlo simulation is used: generate a large number of products (e.g., 100,000), compute the total loss, and obtain the average loss per product. The seven part parameters are assumed to follow normal distributions based on the table data and the defined tolerances.
<code>import numpy as
N=100000; mu=[0.1, 0.3, 0.1, 0.1, 1.5, 16, 0.75]
cov=np.diag([(0.005/3)**2, 0.005**2, (0.005/3)**2,
(0.01/3)**2, 0.05**2, (0.8/3)**2, 0.0125**2])
a=np.random.multivariate_normal(mu,cov,size=N)
x1,x2,x3,x4,x5,x6,x7 = a.T
y=174.42*x1/x5*(x3/(x2-x1))**0.85*np.sqrt((1-2.62*(1-0.36*(x4/x2)**(-0.56)))**(3/2)*(x4/x2)**1.16)/(x6*x7))
d=np.abs(y-1.5)
f=np.sum(9000*(d>=0.3)+1000*((d<0.3)&(d>=0.1)))/N
print("Average loss:",f)
</code>References
Si Shougui, Sun Xijing. Python Mathematics Experiment and Modeling.
Model Perspective
Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.