[2023 Huashu Cup National College Students Mathematical Contest in Modeling] Question B: Optimal Color Scheme Design of Opaque Products Detailed Modeling Scheme Analysis and References

[2023 Huashu Cup National College Students Mathematical Contest in Modeling] Question B: Optimal Color Scheme Design of Opaque Products Detailed Modeling Scheme Analysis and References

Please add a picture description

1 topic

Problem B Optimal color scheme design for opaque products

The colorful opaque colored products in daily life are dyed by colorants. Therefore, the color matching of opaque products plays an important role in its appearance and market competitiveness. However, traditional artificial color matching has certain limitations, such as strong subjectivity and low efficiency. Therefore, it is of great significance to study how to realize the color matching of opaque products by computer methods.

Light propagates through objects in three ways: absorption, reflection, and transmission. For opaque articles, most of the light is absorbed or reflected by the surface. The absorbed and reflected light is decomposed into different color components according to wavelength after correction such as transparency, forming a spectral map. This spectrum usually consists of the colors of light in the 400–700nm band. To simplify the calculation, the reflectance of the color after the final color matching is represented by the spectral data at intervals of 20nm. For opaque materials, there is a certain relationship between the ratio of the absorption coefficient K/scattering coefficient S and the reflectivity R. For details, please refer to the KM optical model in [1] "Research on Computer Color Matching Theory and Algorithms".

The color parameters obtained based on the optical model can be applied to the calculation of color difference. Usually, the color difference (no more than 1) is used as the standard for the color matching effect. Color difference calculation method references [2] The total color difference calculation method of CIELAB color space in "Research on Blended Fabric Color Measurement Based on CIELAB Uniform Color Space and Clustering Algorithm". The calculation method of the tristimulus value XYZ appearing in the calculation of the color parameters L* (lightness), a* (red-green degree) and b* (yellow-blue degree) is as follows: X = k ∫ 400 700 S ( λ ) x
( λ ) R ( λ ) d ( λ ) Y = k ∫ 400 700 S ( λ ) y ( λ ) R ( λ ) d ( λ ) Z = k ∫ 400 700 S ( λ ) z ( λ ) R ( λ ) d ( λ ) X = k \int_{400}^{700} S(\lambda) x(\lambda)R(\lambda)d(\lambda)\\ Y = k \int_{400}^{700} S(\lambda) y(\lambda)R(\lambda)d(\lambda)\\ Z = k \int_{400}^{700} S(\lambda) z(\lambda)R(\lambda)d (\lambda)\X=k400700S ( λ ) x ( λ ) R ( λ ) d ( λ )Y=k400700S ( λ ) y ( λ ) R ( λ ) d ( λ )Z=k400700S ( λ ) z ( λ ) R ( λ ) d ( λ ) 

Among them, S (l) is the spectral energy distribution, x ( λ ) x(\lambda)x ( λ ) ,y ( λ ) y(\lambda)y ( λ ) ,z ( λ ) z(\lambda)z ( λ ) is the spectrum tristimulus value of the observer,S ( λ ) S(\lambda)S ( λ ) andx ( λ ) x(\lambda)x ( λ ) ,y ( λ ) y(\lambda)y ( λ ) ,z ( λ ) z(\lambda)See Appendix 1 for multiplying z ( λ ) to a fixed value. R ( λ ) R(\lambda)R ( λ ) is the spectral reflectance, the value of k is about 0.1,d ( λ ) d(\lambda)d ( λ ) is the wavelength interval of the reflectance of the measured object, this questiond ( λ ) d(\lambda)d(λ) =20nm。

The problem of color matching of opaque products is to design the color matching model of opaque products based on the optical model. Compared with manual color matching, it saves a lot of manpower, material resources and financial resources, which is of great significance to reduce energy consumption.

For an opaque product, the K/S values ​​of the red, yellow and blue colorants at different concentrations and different wavelengths and the K/S values ​​of the base material at different wavelengths are known, see Annex 2. Wherein, concentration=colorant gram weight/substrate weight. The ratio of the absorption coefficient K/scattering coefficient S of each colorant is additive, please refer to the KM single constant theory in [1] "Research on Computer Color Matching Theory and Algorithm" for details. See Appendix 3 for the R values ​​of 10 target samples (made by mixing two to three colorants). Please keep 4 decimal places for the result display.

Please build a mathematical model to solve the following problems:

Question 1: Please calculate the relationship between K/S and concentration of the three colorants in Annex 2 at different wavelengths, and fill in the relationship formula and fitting coefficient in the table.

Table 1 Question 1 related result data

wavelength red yellow blue
Function relation fit coefficient Function relation fit coefficient Function relation fit coefficient
400nm
420nm
440nm
……
700nm

Question 2: Please establish an optimization model for the color matching of opaque products. On the premise of knowing the R value of the target sample (Appendix 3), based on the spectral tristimulus value weighting table (Appendix 1) and the colorant K/S basic database (Appendix 2), use the optimization model to calculate the color difference with the target sample The closest 10 different formulations require a color difference of less than 1.

Question 3: On the basis of question 2, consider cost control and batch color matching, and improve the color matching model. Perform color matching on 2kg of the base material, and find 10 different formulas with the closest color difference to the target sample (Appendix 3), and the color difference is required to be less than 1. See Appendix 4 for the price per gram of masterbatch.

Question 4: In actual production, the less coloring agent required for color matching, the better. Based on this, on the basis of Question 3, find the optimal color scheme for the first 5 samples in Appendix 3, and require each sample to be formulated 5 different formulas with color difference less than 1.

Data and information provided:

  1. Attachment 1 (Spectral tristimulus value weighting table)

  2. Attachment 2 (K/S values ​​of different concentrations and different wavelengths)

  3. Annex 3 (R values ​​of 10 samples)

  4. Attachment 4 (Dye Prices)

  5. References [1] Jiang Pengfei. Research on computer color matching theory and algorithm [D/OL]. Zhongyuan Institute of Technology, 2016

  6. Reference [2] Wang Linji. Research on color measurement of blended fabrics based on CIELAB uniform color space and clustering algorithm [D]. Zhejiang Sci-Tech University, 2011.

2 Problem Analysis

2.1 Question 1

This is a linear regression problem. The fitting model was used to analyze the relationship between K/S and concentration of red, yellow and blue colorants at different wavelengths. Firstly, see the red in the data in appendix 2, when the concentration is 0.05, 0.1, 0.5, 1, 2, 3, 4 and 5, the K/S value increases with the concentration. Therefore, it is assumed that the K/S value of the red colorant has a linear relationship with the concentration at different concentrations. A linear regression is then used to fit a model to represent this relationship. Use a simple least squares method to fit a linear regression model, find the best coefficients a and b, and minimize the deviation between the fitted curve and the actual data.

2.2 Question 2

This is an optimization problem, translated into a nonlinear program solver:

Step 1: Combine the spectral tristimulus value weighting table in Table 1 with the basic database table in Table 2, calculate the K/S value of the material, and save the result as a new Table 4.

. . slightly

The third step is to establish an optimization model: the formula is used as an optimization variable, and the color difference is used as an objective function to establish an optimization model that minimizes the color difference. into a nonlinear programming problem.

The fourth step is to determine the constraint: set the constraint condition that the color difference is less than 1 to ensure that the color difference between the selected formula and the target sample is less than 1.

The fifth step is to solve the optimization problem: use mathematical optimization algorithms, such as gradient descent method, genetic algorithm, etc., to solve the established optimization problem, and obtain 10 different formulas with the color difference closest to the target sample.

2.3 Question 3

This is a linear programming problem. On the basis of the above problems, the color matching problem is transformed into a linear programming problem, that is, the total cost of the formula is minimized under the condition that the color difference is less than 1. The specific modeling process is as follows:

Step 1: Combine the spectral tristimulus value weighting table in Table 1 with the basic database table in Table 2, calculate the K/S value of each color material, and save the result as a new Table 4.

Step 2: Calculate the total amount of formula for each color: distribute 2kg of base material according to the proportion required for each color, and distribute the corresponding amount of ingredients to obtain the total amount of formula for each color. The third step is to establish an optimization model: since the total amount of the formula is a continuous variable, the total amount of the formula of each color is used as an optimization variable, and a linear programming model including cost and constraints is established, so that on the basis of minimizing the cost, the color difference is less than The constraints of 1 are as follows:
min ⁡ x , y , z 60 x + 65 y + 63 z \begin{equation} \min_{x,y,z} 60x+65y+63z \end{equation}x,y,zmin60x+65 y.o+63 z

where xxxyyy z z z represent the total amount of the formula of red, yellow and blue masterbatch respectively, the unit is gram. In order to satisfy the constraints that the color difference is less than 1, constraints need to be added:

. . slightly

Among them, R i R_iRi G i G_i Gi B i B_i BiIndicates the iiThe three primary colors of i recipes and target samples,R t R_tRt G t G_t Gt B t B_t BtIndicates the three primary colors of the target sample. The above constraints are used to ensure that the color difference between each formula and the target sample is less than 1. Where the variable is greater than 0, it means that the total amount of the recipe needs to be a positive number.

Step 4: Solve the optimization problem: Use a linear programming solution method, such as the simplex method or interior point method, to solve the established linear programming model, obtain 10 different formulas with the color difference closest to the target sample, and calculate each formula total cost.

2.4 Question 4

This is a mixed integer linear programming problem. Model the problem as a mixed integer programming problem. For each sample, 5 different formulations need to be found, each of which has a color difference of less than 1 and the total colorant usage is minimal. Therefore, the number of recipes is used as an integer variable, and the amount of each color used in each recipe is used as a continuous variable.

. . . slightly

Finally, use a mixed integer linear programming solver (such as CPLEX, Gurobi, etc.) to solve the model and obtain the optimal formulation scheme for the first 5 samples.

3 Modeling scheme

3.1 Question 1

Simple linear regression, y = ax+b.

3.2 Question 2

Suppose the formula to be optimized is a vector x = [ c 1 , c 2 , … , cn ] x = [c_1, c_2, \ldots, c_n]x=[c1,c2,,cn] , among whichci c_iciIndicates the iiConcentration of i colors (%),nnn is the number of color classes. Combine the spectral tristimulus value weighting table (Table 1) with the basic database (Table 2) to obtain the K/S value of the material (Table 4). The K/S value vector for the material isks = [ ks 1 , ks 2 , … , ksn ] k_s = [k_{s1}, k_{s2}, \ldots, k_{sn}]ks=[kpage 1,ks 2,,ksn] , whereksi k_{si}kand iIndicates the iiK/S value of i color. The R value vector for the target sample isrt = [ rt 1 , rt 2 , … , rtn ] r_t = [r_{t1}, r_{t2}, \ldots, r_{tn}]rt=[rt 1,rt2 _,,rtn] , among whichrti r_{ti}rt iIndicates the iiR value of the target sample for i colors. Formula xxcalculated using CIEDE2000 color difference formulaThe color difference between x and the target sample, expressed asd ( x ) d(x)d ( x ) . Transform the problem into a nonlinear programming problem, i.e. minimize the color differenced ( x ) d(x)d(x)

min ⁡ x   d ( x ) \min_{x} \ d(x) xmin d(x)

where xxThe constraints on x are as follows:

  1. The concentration range constraint of the formulation: c min ≤ ci ≤ c max c_{\text{min}} \leq c_i \leq c_{\text{max}}cmincicmax, for all iii

  2. Color difference constraints: d ( x ) ≤ Threshold d(x) \leq \text{Threshold}d(x)Threshold,其中 Threshold \text{Threshold} Threshold is the maximum value of the color difference, that is, the color difference is less than 1.

  3. Restriction on the number of formula types: In order to obtain different formulas, the concentration of each color can be set to be different.

3.3 Question 3

First combine the spectral tristimulus value weighting table in Table 1 with the basic database table in Table 2, calculate the K/S value of each color material, and save the result as a new Table 4. Secondly, calculate the total amount of formula for each color: distribute the corresponding ingredient amount to 2kg of base material according to the proportion required for each color, and obtain the total amount of formula corresponding to each color. Then the third step is to establish an optimization model: since the total amount of formula is a continuous variable, the total amount of formula for each color is used as an optimization variable, and a linear programming model including cost and constraints is established, so that the color difference can be satisfied on the basis of minimizing the cost Constraints less than 1.

Assuming that the number of colors to be matched is n, the unit weight prices corresponding to red, yellow and blue are C1, C2 and C3 yuan/kg respectively.
Assuming variables: x1 represents the amount of red masterbatch (kg), x2 represents the amount of yellow masterbatch (kg), x3 represents the amount of blue masterbatch (kg), then for each formula i, we have the following constraints condition:

. . . slightly, please download the complete information

By solving the above linear programming problem, 10 different formulas with the closest color difference to the target sample can be obtained.

3.4 Question 4

Objective function: minimize the total colorant usage
min ∑ s = 1 5 ∑ i = 1 4 ∑ j = 1 3 C ijsij min \sum_{s=1}^{5}\sum_{i=1}^{ 4}\sum_{j=1}^{3}C_{ij}s_{ij}mins=15i=14j=13Cijsij
Constraints:
. . . slightly, please download the complete information

Among them, xsi x_{si}xand iIndicates whether sample s uses recipe i (0 or 1), sij s_{ij}sijIndicates the amount of color j used in formula i, C ij C_{ij}CijIndicates the amount of colorant used for color j.

4 downloads

Know the download link at the bottom of the article, including the word document and references of the complete information.

zhuanlan.zhihu.com/p/648089858

Guess you like

Origin blog.csdn.net/weixin_43935696/article/details/132094468