Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 2, 2024 102 A Study of Production Decision Making Problems Based on Sample Testing and Cost Optimisation Models Xin Zhou1, * 1Software Engineering Institute of Guangzhou, Guangzhou, China *Corresponding author: 2890091630@qq.com Abstract: In this paper, we provide an in-depth discussion on the optimization of sampling inspection and production decisions in the manufacturing process. In order to strike a balance between cost and accuracy, we propose a method based on two-stage sampling inspection. The method accomplishes the cost inspection with a better inspection cost the method effectively reduces the inspection cost while ensuring the inspection quality. Further, we propose a dynamic model-based production decision scheme. The scheme is able to minimize the production cost by continuously updating the estimate of the defective rate during multi-stage inspection and assembly sessions. Finally, we provide a detailed analysis and discussion of the production decision scheme combining sampling inspection and dynamic modeling using confidence intervals and Monte Carlo simulation methods. Keywords: Sampling and Testing, Two-stage Decision Making, Dynamic Modeling, Monte Carlo Simulation. 1. Introduction In this paper, we conduct an in-depth study on the problem of sampling inspection and production decision optimization in the manufacturing process. We first propose an innovative two-stage sampling inspection method, which realizes effective monitoring of supplier part quality with lower inspection cost by comparing the estimation of defective rate and inspection cost [1,2]. Further, we introduce the concept of dynamic modeling, which provides more accurate data support for production decision-making and cost optimization by continuously updating the estimate of defective rate during multi-stage inspection and assembly sessions [3,4,5]. Finally, assuming that the estimated value of the defective rate is obtained by sampling inspection method, we synthesize the confidence interval and Monte Carlo simulation methods, and analyze and discuss in detail the production decision-making scheme combining sampling inspection and dynamic modeling [6,7,8]. Through these innovative researches, this paper provides new perspectives and methods for the optimization of sampling inspection and production decision- making in the manufacturing process, which has important theoretical significance and application value. 2. Sampling and Testing Program Based on Two-stage Sampling This paper focuses on decision making in the manufacturing process of spare parts, semi-finished products and finished products in an enterprise. In this chapter, we first consider the sampling and testing scheme. We have obtained data on the quality of the company's spare parts from our research. The supplier claims that the defective rate of a batch of spare parts will not be more than 10%, and the enterprise is going to decide whether to accept this batch of spare parts purchased from the supplier by using the sampling and testing method, and the cost of testing will be borne by the enterprise itself. By using the sampling method to test the spare parts, this paper conducts a hypothesis test on the defective rate. We define the following two hypotheses: The original hypothesis 𝐻 : Substandard rate Substandard rate π‘ž 10%, i.e., it is assumed that the substandard rate of the batch does not exceed 10%. Alternative assumption 𝐻 : defective rate π‘ž 10%, i.e., assume that the defective rate of the batch is more than 10%. Decide whether to accept the lot of spare parts or not at the given level of significance through a statistical test. If the test is significant and the alternative hypothesis is valid, the lot of spare parts is rejected; otherwise, the lot of spare parts is accepted. In order to strike a balance between cost and accuracy, a two-stage sampling and testing strategy is used. The core idea of this method is to increase the confidence level through staged sampling and gradually increase the sample size to reduce unnecessary testing costs. In the first stage, we set the initial sample size 𝑛 50, from which we detect the number of defective products π‘˜ , and calculate the initial defective rate π‘ž . If π‘ž 15%, the batch of parts will be rejected directly; if π‘ž 5%, the batch of parts will be accepted directly; if π‘ž is between 5% and 15%, the batch will enter the second stage for further testing. In the second stage, the sample size is expanded to 𝑛 138, which is the minimum sample size required at the 95% confidence level. The number of defective products detected in the second stage is π‘˜ , and the total number of defective products is π‘˜total π‘˜ π‘˜ , thus the total defective rate can be expressed as: total? total? 1 2 k q n n ο€½  (1) Based on the accumulated sample data, a final decision is made whether to accept or reject the batch of spare parts. For ease of calculation, it is assumed that the number of defective products follows a binomial distribution, and when the sample size is large, according to the central limit theorem, the binomial distribution can be approximated by a normal distribution. In this case, the expectation of the number of defective products is πœ‡ 𝑛 β‹… π‘ž , and the variance is 𝜎 103 𝑛 β‹… π‘ž β‹… 1 π‘ž . In order to check whether the sample defective rate meets the nominal value, the defective rate can be standardized and transformed into the z-value of the standard normal distribution with the following formula: 1 / q q z n ο€­ ο€½ (2) where 1q is the defective rate of the sample and q is the supplier's nominal defective rate. We begin by discussing the acceptance and rejection criterion for the first stage, at the 95% confidence level. Assuming a sample size of 𝑛 50 and a nominal defective rate of π‘ž=0.10, the desired number of defective products πœ‡ 50 0.10 5 , with the standard deviation, 𝜎 √50 0.10 0.90 2.12. When the detected defective rate is π‘ž 0.15 , the number of defective products π‘˜ 50 0.15 7.5 , and we can calculate the normalization 𝑧 . . . √ 1.67, so the batch of parts will be rejected. If the defective rate 1q is greater than 15% in the first stage of inspection, it is necessary to go to the second stage for additional sampling until the total sample size reaches 𝑛 138 . Based on the properties of the binomial distribution, we calculate the critical number of rejected defective parts in the cumulative sample: the total sample size is 𝑛 138 , which corresponds to a critical number of defective parts of π‘˜ reject 20 at the 95% confidence level, and if the total number of defective parts detected, π‘˜ total 20, then the batch of parts will be rejected. The second stage was designed based on 138 samples to ensure more reliable detection results at higher confidence intervals. With an additional 88 samples (totaling 138 samples), companies are able to more accurately determine the lot defect rate. A reasonable interval is provided between the rejection and acceptance criteria for the number of substandard products, and companies are able to avoid erroneous judgments due to small sample fluctuations, especially for borderline substandard rate situations. Minimization of testing costs and high accuracy of decision- making are ensured through two-stage sampling. 3. Dynamic Model-based Production Decision-making Program We have collected data on the production process of a firm that produces a certain best-selling electronic product and needs to purchase the parts and components separately, and assemble the parts and components into a finished product at the firm. In the production process, the enterprise needs to make decisions for each link, and the specific decisions include whether to perform quality inspection on parts 1 and 2, whether to perform quality inspection on the finished product, whether to disassemble the finished product when it fails, and whether to disassemble and handle the returned nonconforming products again, etc. We construct a dynamic optimization model to optimize the production process in multiple stages. We construct a dynamic optimization model to continuously update the estimate of the defective rate during the multi-stage inspection and assembly sessions, and make decisions based on the inspection results of each cycle. In order to clarify the decision-making in each production stage, we introduce the following strategy variables: π‘₯ , π‘₯ ∈ 0,1 : Indicates whether or not Part 1 and Part 2 are detected, respectively, with 1 indicating that detection is performed and 0 indicating that detection is not performed. 𝑦 ∈ 0,1 : Whether or not to test the finished product, 1 means to test, 0 means not to test. 𝑧 ∈ 0,1 : Whether to dismantle substandard finished products, 1 means dismantling, 0 means no dismantling. 𝑀 ∈ 0,1 : Whether or not to process the returned nonconforming products, 1 means process, 0 means no processing. Different costs are incurred under different decision- making stages, consisting of five main components. For Parts 1 and 2, the cost of parts inspection in each cycle is calculated as follows:                 part_detect? 1 1 1 1 1 2 2 2 2 21 1n n n n n n n d b d bC x C x q C x C x q Cο€½ οƒ—  ο€­ οƒ— οƒ—  οƒ—  ο€­ οƒ— οƒ— (3) where π‘₯ , π‘₯ are the decision variables for inspection of parts 1 and 2 in the nth loop, respectively. The cost of finished product inspection and assembly consists of the following components:           assembly? assembly? product? assembly? market?1n n n nC C y C y q C Cο€½  οƒ—  ο€­ οƒ— οƒ—  (4) where 𝑦 is the decision variable for whether or not to test the finished product in the nth loop. If the finished product is not tested, the defective product will enter the market and incur return and exchange losses. If the product fails testing, the firm can choose to disassemble it, and the disassembled parts will go through testing and assembly again. For the nth cycle, the total cost of disassembly is calculated as follows:         dismantle srework ? 1 test1 2 te t ?as l 2 semb y n n n nC z C q C q C Cο€½ οƒ—  οƒ—  οƒ—  (5) For nonconforming products that are returned, companies have the option of disassembling and reusing them. The cost of this treatment can be expressed as:         return disassembl s ?e as m 1 te yst1 s2 te t?2 e bl n n n nC w C q C q C Cο€½ οƒ—  οƒ—  οƒ—  (6) At the end of each round of the cycle, the defective rate will be reduced, and the specific decreasing model is as follows:      1 1 1 11n nq q  ο€½ οƒ— ο€­ (7)      1 2 2 21n nq q  ο€½ ο‚΄ ο€­ (8)      2 pradact? product? prodecel?1n nq q  ο€½ ο‚΄ ο€­ (9) The total cost model works by cumulatively summing the costs of each of the inspection, assembly, rework, and return processing in each round of the cycle, using the following formula:         all 1 test? rework rassembly eturn? n n n nN nC C C C Cο€½ο€½ οƒ₯    (10) 104 where N is the total number of rounds in the loop and the termination condition is one of the following two conditions: 𝑛 𝑁: Reach preset maximum number of cycles. π‘ž , π‘ž , π‘žproduc πœ– :: Decrease in defective rate to below the set threshold πœ–. The enterprise also produces a best-selling electronic product through a multiprocessing process, which involves 2 processes and 8 parts, where parts 1,2,3 produce semi- finished product 1, parts 4,5,6 produce semi-finished product 2, parts 7,8 produce semi-finished product 3, and semi- finished product 1,2,3 produce the finished product, with a decision-making process similar to that of a single-processing process. Table 1 below gives the 6 scenarios encountered by the firm in production with 2 processes and 8 spare parts. Table 1. Situations encountered by enterprises in production Scenario Part1 Part2 Product Unqualified products Rate of defective Price Inspection Costs Rate of defective Price Inspection Costs Rate of defective assembly cost Inspection Costs Selling Price Replacement Costs Disassembly Loss 1 10% 4 2 10% 18 3 10% 6 3 56 6 5 2 20% 4 2 20% 18 3 20% 6 3 56 6 5 3 10% 4 2 10% 18 3 10% 6 3 56 30 5 4 20% 4 1 20% 18 1 20% 6 2 56 30 5 5 10% 4 8 20% 18 1 10% 6 2 56 110 5 6 5% 4 2 5% 18 3 5% 6 3 56 10 40 By solving the production decision model based on the dynamic model, we obtained the results of decision variables, total cost and number of cycles for the six scenarios as shown in Table 2 below: Table 2. Dynamic model-based production decision-making scheme Inspection of spare parts 1 Inspection of spare parts 2 Inspection of finished products disassemble total cost Number of cycles 0 False False False True 29.18 2 1 False False False True 32.16 2 2 False False False True 29.18 2 3 False False True True 28.48 2 4 False False False True 28.24 2 5 False False False False 4.20 1 In all cases, Part 1 was not tested. This suggests that in these cases, Part 1 has a low defect rate and the cost of testing is too high, so it may be preferable to go directly to assembly. In Scenarios 2, 3 and 4, Part 2 was selected for testing. This suggests that in these scenarios, Part 2 has a high defect rate, and that testing would help reduce subsequent assembly and rework costs. Although testing increases the initial investment, in the long run it can effectively reduce rework and product obsolescence costs, so it is a reasonable strategy to choose testing. In Scenarios 1, 3, and 5, finished product inspection is enabled. Its main purpose is to prevent defective products from reaching the market, thus reducing the cost of subsequent exchange and compensation. In most scenarios, dismantling of nonconforming products is chosen. The reason for this is that in these cases it is more economical to dismantle and reuse the parts than to discard or re-purchase them. In most cases, 2 cycles were performed, indicating that after the initial inspection and measures, the defective product rate was still high and the system needed more cycles to further reduce the defective rate and reach the target threshold. 4. Production Decision-making Scheme combining Sampling and Dynamic Modeling In this chapter, we consider that the defective rate π‘ž is no longer given directly, but is derived by sampling parts, semi- finished products, and finished products. We take a random sample of products at each production stage and derive the overall defective rate based on the proportion of defective products in the sample. The defective rate οΏ½Μ‚οΏ½ is derived by sampling under a large sample normal distribution. Assuming that the number of defective products found in the sample is 𝑋 and the sample size is 𝑛 , the formula for estimating the defective rate is: Λ† i i i X q n ο€½ (11) where 𝑋 represents the number of defective products in the sample and 𝑛 is the total number of samples. In order to ensure that the estimate of the defective rate has a high confidence level 𝛼, we calculate the required sample size based on the set confidence level Ξ± and the allowed error 𝐸. The formula is as follows:  2 /2 2 Λ† Λ†1i i i N q q n E  οƒ— ο€­ ο€½ (12) where 𝑁 / is the critical value of the standard normal distribution at confidence level 𝛼. With the initial estimated defective rate οΏ½Μ‚οΏ½ and the set error 𝐸, the required number of samples 𝑛 can be calculated. Since the defective rate is estimated by sampling and testing, the effect of sampling error needs to be considered in the defective rate decrement process. We set the value of the 105 decreasing defective rate as the estimated value of the defective rate based on the previous sampling. The formula for decreasing the defective rate is:  ( 1) ( )Λ† Λ† 1k k i iq q  ο€½ οƒ— ο€­ (13) where οΏ½Μ‚οΏ½ is the estimate of the defective rate in k cycles, and 𝛼 is the decrement ratio. The defective rate οΏ½Μ‚οΏ½ after each decrement will be used as the basis for the next round of sampling and testing. It can be seen that by this method, a dynamic updating process is formed under the decreasing substandard rate. This is different from the previous model with a fixed decreasing rate of substandard products. The substandard rate οΏ½Μ‚οΏ½ in the detection decision equation is to be updated after each sampling. the detection decision is given by: Λ†i i ie q cο€Ό οƒ— (14) Decisions in each loop will vary due to changes in the defective rate. The process is executed in a loop, with each new sampling result used to update the estimate of the defective rate. This dynamic updating mechanism can respond to the changes occurring in the production process in a timely manner, thus improving the efficiency and effectiveness of quality management. In the fixed defective rate model, the inspection decision is based on the known defective rate. However, in the sampling model, the defective rate is estimated by sampling, so the impact of the estimation error on the decision needs to be considered, and we use Monte Carlo simulation to reduce the impact of the error. By solving the production decision model incorporating sampling checks, we obtain the results for the decision variables, total cost and number of cycles for the six scenarios, as shown in Table 3 below: Table 3. Comparison of power load forecasting of 403 line Inspection of spare parts 1 Inspection of spare parts 2 Inspection of finished products disassemble total cost Number of cycles 0 False False False True 30.799186 2 1 False False True True 34.241151 2 2 False False False True 29.917576 2 3 False True True True 29.620153 2 4 False True False True 29.515179 2 5 False False True False 4.328443 1 5. Conclusions In this paper, we explore the problem of optimizing sampling inspection and production decisions in the manufacturing process. First, we propose a method based on two-stage sampling inspection, which aims to reduce inspection costs while ensuring quality control. Further, the article proposes a dynamic model-based production decision scheme to optimize the production cost by continuously updating the defective rate estimate. Finally, the article constructs a model for updating the defective rate in conjunction with sampling, = which assumes that the defective rate is obtained through sampling, and dynamically updates the defective rate estimate to adapt to the changes in the production process and improve the efficiency of quality management. The research in this paper provides a new perspective and method for manufacturing enterprises to effectively control production costs, improve production efficiency and product quality, which has important theoretical and practical application value. References [1] Y. Yang. Application of different sampling methods in the estimation of cereal production in China[J]. Statistics and Management, 2018, (03): 46-48. [2] Lu Shouzeng. β€œOne-sided test identification.” China Health Statistics 02(1999):53-56. [3] Wang LY. Research on intelligent product design and development under the whole life cycle based on cost optimization [D]. Shandong University of Architecture,2023. [4] he textbook writing group of β€œOperations Research”. Operations Research (Revised Edition). Tsinghua University Press, 1990. [5] Yuan Kun, Peng Heping. A randomized circle detection algorithm based on curve fitting[J]. Software Guide, 2022, 21 (11): 52-57. [6] Li Yue. Research on R&D cost estimation and optimization based on Monte Carlo method[D]. Nanchang University,2023. [7] Xiao Shuan, Gao Baohai, Ren Yatao, et al. Accelerated strategy for solving strong inhomogeneous medium radiation heat transfer problem in nozzle based on Monte Carlo method[J]. Solid Rocket Technology,2024,47(04):537-546. [8] Hsu, Chaojun. Risk assessment of power grid secondary system based on improved Monte Carlo method[J]. Intelligent Computer and Application,2024,14(07):90-93. [9] ZHU Lei, ZHANG Jianxun, SUN Hailin. Solution method of Euler-Bernoulli beam fundamental frequency and vibration mode based on Monte Carlo method(English)[J].Journal of Southeast University(English Edition),2024,40(02):203-209.