Optimal Design of the Gating and Riser System for Complex Casting Using an Evolutionary Algorithm

The gating and riser system design is essential for both quality and cost in large-scale casting and is expected to reach several objectives simultaneously. However, even with the help of commercial simulation software, the design of gating and riser systems is still the result of a long-term trial-and-error optimal process owing to the conflict between the objectives. Several evolutionary algorithms (EAs) have been reported to be helpful in the selection of the geometrical dimensions of gating and riser systems. In this study, a route with sequential use of a multi-objective EA and single-objective optimization algorithm was developed to help design gating and riser systems, respectively. This route was applied in an actual case and verified using commercial simulation software. The results showed a dramatic decrease in the time cost in design and acceptable casting quality. Thus, the proposed design method is time-saving.


Introduction
The design of gating and riser systems directly affects the casting quality. Traditional design methods are based on long-term and expensive "trial-and-error" approaches. With the development of numerical simulation software, the design of gating and riser systems has shifted to a "proof-of-concept" approach [1]; however, it remains a long modification process that depends on the experience of the designer [2][3][4]. To balance quality and cost, an initial prototype of the gating and riser system that is close to its final optimal version should be set up to reduce the time spent on the design procedure.
The dimensions of the gating and riser systems are strongly related to both the quality and cost of casting. In terms of the riser, which is relatively simple and focuses mainly on material spending, single-objective optimization algorithms, such as the genetic algorithm (GA) and evolutionary topology algorithm, have been successfully applied to determine the geometric dimensions [5][6][7]. The design of a gating system is characterized by multiple conflicting objectives and involves many parameters, which is a typical multi-objective optimization problem [8]. However, multi-objective optimization faces objective conflict, in which no feasible solutions allow simultaneous optimal solutions for all objectives [9]. The classical approach to solve the multi-objective optimization problem is to simplify it to a single-objective optimization problem to use a simpler algorithm. Dučić et al. [10] used a GA to optimize the gating system design to obtain the minimum filling time. Tong et al. [11] employed a fruit fly optimization algorithm for gating system design based on simulation technology.
The multi-objective evolution algorithm (MOEA) is an ideal tool for solving multiobjective optimization problems by naturally producing multiple solutions called Pareto solutions [12]. The Pareto front obtained by the MOEA can provide a trade-off between objectives and support decision-makers in choosing the final optimal solution [13]. Kor [14] proposed an optimization strategy for the gating system using the elitist non-dominated sorting GA II (NSGA-II) [15], in which the objectives included no shrinkage porosity, minimized flow velocity, and maximized casting yields. However, expressing the shrinkage porosity mathematically is difficult; consequently, the individual fitness in NSGA II cannot be evaluated. The authors used simulation results instead of mathematical methods to solve the problem, and six optimized designs were obtained after 320 rounds of simulations. This strategy has a high requirement for computing power and incurs a large time cost when casting becomes complex.
In this study, an optimization route was developed in which the NSGA-II and GA were sequentially used on the gating and riser, respectively. A mathematical model was established for the gating design, consisting of three optimization objectives and three constraint functions. Because each optimization objective can be calculated in code, a set of Pareto optimal solutions can be automatically calculated by NSGA-II with the help of constraint functions, and the final design of the gating system is selected from the Pareto front based on the properties of the casting. The evolutionary algorithm (EA) toolbox Geatpy was used to run the optimization algorithms. The results show that the proposed method can achieve extremely high efficiency by obtaining a reasonable gating and riser system design.

Optimization Methods
In this study, sand casting, which is the beam of the laser engraving machine, was made of ZL104 aluminum alloy (7% Si, 0.5% Mg, 0.15% Ti, 0.2% Fe), and the net mass was 91.6 Kg. The thermal properties of the ZL104 alloy are listed in Table 1. The computeraided design (CAD) model in Figure 1 shows that the casting was characterized using a large-sized complex structure (545 mm × 2487 mm × 287 mm).  [14] proposed an optimization strategy for the gating system using the elitist non-dominated sorting GA II (NSGA-II) [15], in which the objectives included no shrinkage porosity, minimized flow velocity, and maximized casting yields. However, expressing the shrinkage porosity mathematically is difficult; consequently, the individual fitness in NSGA II cannot be evaluated. The authors used simulation results instead of mathematical methods to solve the problem, and six optimized designs were obtained after 320 rounds of simulations. This strategy has a high requirement for computing power and incurs a large time cost when casting becomes complex. In this study, an optimization route was developed in which the NSGA-II and GA were sequentially used on the gating and riser, respectively. A mathematical model was established for the gating design, consisting of three optimization objectives and three constraint functions. Because each optimization objective can be calculated in code, a set of Pareto optimal solutions can be automatically calculated by NSGA-II with the help of constraint functions, and the final design of the gating system is selected from the Pareto front based on the properties of the casting. The evolutionary algorithm (EA) toolbox Geatpy was used to run the optimization algorithms. The results show that the proposed method can achieve extremely high efficiency by obtaining a reasonable gating and riser system design.

Optimization Methods
In this study, sand casting, which is the beam of the laser engraving machine, was made of ZL104 aluminum alloy (7% Si, 0.5% Mg, 0.15% Ti, 0.2% Fe), and the net mass was 91.6 Kg. The thermal properties of the ZL104 alloy are listed in Table 1. The computeraided design (CAD) model in Figure 1 shows that the casting was characterized using a large-sized complex structure (545 mm × 2487 mm × 287 mm).  The mold filling process of liquid metal has a great influence on the casting quality. A short filling time is a crucial design objective. However, a fast liquid metal front causes the surface of the liquid metal to be folded over by surface turbulence [16]. Therefore, a short filling time and stable liquid flow are two conflicting objectives that must be considered simultaneously. A reasonable design should be selected according to the actual situation. The casting yield is another optimization objective that cannot be neglected. Therefore, we attempted to design a gating to obtain a short filling time, high casting yield, and stable liquid metal flow, consisting of a three-objective optimization problem. The entire optimization process is illustrated in Figure 2. The mold filling process of liquid metal has a great influence on the casting quality. A short filling time is a crucial design objective. However, a fast liquid metal front causes the surface of the liquid metal to be folded over by surface turbulence [16]. Therefore, a short filling time and stable liquid flow are two conflicting objectives that must be considered simultaneously. A reasonable design should be selected according to the actual situation. The casting yield is another optimization objective that cannot be neglected. Therefore, we attempted to design a gating to obtain a short filling time, high casting yield, and stable liquid metal flow, consisting of a three-objective optimization problem. The entire optimization process is illustrated in Figure 2. In our optimization process, NSGA II was utilized to generate Pareto-optimal solutions for the gating system and the geometry of the gating system, such as the ratio of the choke section and the height of the sprue, were selected as decision variables in the mathematical models. The solution of this stage was determined based on the casting and Pareto front properties. The riser was relatively simple and only the casting yield required optimization; therefore, we considered it a single-objective problem. The single-objective evolution algorithm (GA) was employed in this stage. The numerical simulation software ProCAST was used to locate hotspots and evaluate the design quality. The SolidWorks CAD package provided the surface and volume data for the mathematical models.

Gating System Setup
An open bottom-filling gating pattern was selected for low turbulence. Figure 3 shows the initial design of the gating system, along with the decision variables of the radius of the choke section (r) and the distance from the choke section to the liquid top (h). According to the foundry manual, the cross-sectional area ratio of the gating system was set to A sprue/A runner/A ingate = 1:2:4, and the dimensions of the remaining components of the gating system were defined based on the decision variables. In our optimization process, NSGA II was utilized to generate Pareto-optimal solutions for the gating system and the geometry of the gating system, such as the ratio of the choke section and the height of the sprue, were selected as decision variables in the mathematical models. The solution of this stage was determined based on the casting and Pareto front properties. The riser was relatively simple and only the casting yield required optimization; therefore, we considered it a single-objective problem. The single-objective evolution algorithm (GA) was employed in this stage. The numerical simulation software ProCAST was used to locate hotspots and evaluate the design quality. The SolidWorks CAD package provided the surface and volume data for the mathematical models.

Gating System Setup
An open bottom-filling gating pattern was selected for low turbulence. Figure 3 shows the initial design of the gating system, along with the decision variables of the radius of the choke section (r) and the distance from the choke section to the liquid top (h). According to the foundry manual, the cross-sectional area ratio of the gating system was set to A sprue /A runner /A ingate = 1:2:4, and the dimensions of the remaining components of the gating system were defined based on the decision variables.
The "dangerous" section in Figure 3 is characterized by a minimum wall thickness section and a vertical plane that needs to limit the rising speed of liquid metal to meet the high filling performance requirements. ∆h is the distance from the "dangerous" section to the top of the liquid. As the height of the in-gate was set to two times the diameter of the in-gate, the distance from the "dangerous" section to the bottom of the beam was 222 mm, and ∆h was calculated as (h-222-3r).  The "dangerous" section in Figure 3 is characterized by a minimum wall thickness section and a vertical plane that needs to limit the rising speed of liquid metal to meet the high filling performance requirements. ∆h is the distance from the "dangerous" section to the top of the liquid. As the height of the in-gate was set to two times the diameter of the in-gate, the distance from the "dangerous" section to the bottom of the beam was 222 mm, and ∆h was calculated as (h-222-3r).

Mathematical Model of Gating System
Objective function. The design of the gating system is regarded as a minimum optimization problem with three minimum objectives by taking the reciprocal of the casting yield Y, as shown in Equation (1).
The filling time t can be simplified into the ratio of the volume of the casting VCAST to the flow of liquid metal Q through the choke section without considering the energy and pressure loss during the filling process, as shown in Equation (2). The metal liquid flow state in the in-gate can be expressed by the Reynolds number [17], as shown in Equation (3).
where v is the velocity of the liquid metal flow (mm/ss), v is the dynamic viscosity of the liquid metal for aluminum alloy castings (v = 0.675 Pa.s), and d is the characteristic length (mm); for the internal pipe flow, d = 2r. The characteristic length for a non-internal pipe flow is given by Equation (4).
The casting yield Y is defined as in Equation (5).

Mathematical Model of Gating System
Objective function. The design of the gating system is regarded as a minimum optimization problem with three minimum objectives by taking the reciprocal of the casting yield Y, as shown in Equation (1).
The filling time t can be simplified into the ratio of the volume of the casting V CAST to the flow of liquid metal Q through the choke section without considering the energy and pressure loss during the filling process, as shown in Equation (2). The metal liquid flow state in the in-gate can be expressed by the Reynolds number [17], as shown in Equation (3).
where v is the velocity of the liquid metal flow (mm/ss), v is the dynamic viscosity of the liquid metal for aluminum alloy castings (v = 0.675 Pa.s), and d is the characteristic length (mm); for the internal pipe flow, d = 2r. The characteristic length for a non-internal pipe flow is given by Equation (4).
The casting yield Y is defined as in Equation (5).
Constraint function. The Reynolds number corresponding to the rapid increase in inclusion was selected as the critical Reynolds number of the cavity, and the critical Reynolds number of the aluminum alloy casting was 2600 [18]. The maximum velocity of the liquid metal in the cavity can be calculated using Equation (3). According to Campbell's rules [19], the maximum velocity v Max is approximately 50 cm/s for most liquid metals and can be calculated using Equation (6).
The design of the gating system should ensure that the cavity is tabled ultimately to prevent misruns, cold laps, and other defects. The filling performance can be guaranteed to avoid the above defects when the velocity of the liquid metal in the cavity is larger than the minimum velocity under certain conditions. The average minimum velocity of the liquid metal in the cavity can be calculated using Equation (7) [18].
where v min is the average minimum velocity of the liquid metal along the cavity (cm/s); h a and δ a are the casting height and thickness (cm), respectively; and T is the pouring temperature ( • C).
The actual liquid metal flow velocity of the "dangerous" section should be larger than v min to avoid defects. The actual velocity v a of the liquid metal front can be calculated using the following equation: where Q is the liquid flow (mm 3 /s), A is the cross-sectional area (mm 2 ), ∆h is the distance from the section to the liquid top (mm), and h denotes the decision variable. The constraint function shown in Equation (9) limits the search space for feasible solutions and ensures the quality of the casting.

Mathematical Model of Riser
The design goal of the riser is to achieve a minimum volume while eliminating defects in the casting. The design of the riser is regarded as a single-objective minimum optimization problem and the objective function can be expressed as follows: where f(x) is the objective function and V r is the minimum riser volume. To improve the feeding capacity of the riser, the design should obey the following rules: (1) A feeding channel must exist between the feeding part in the casting and the riser until the casting is completely solidified; (2) The riser should solidify at the same time or later than the casting; (3) The riser should store sufficient liquid metal to compensate for the reduced volume of the casting due to solidification; (4) The height of the riser neck should be greater than 15 mm and the riser should maintain its height.
Rule 1 requires the minimum diameter of the riser neck, which can be calculated using the cubic equation method [20] as follows: , K 1 and K 2 are the geometry parameters of the riser, Mc is the modulus of casting, V c is the volume of the riser filled area in the casting, and ε is the volume shrinkage of metal solidification. For the cylinder riser, K 1 = 0.25πf 1 , K 2 = π(0 .5 + f 1 ), and f 1 is a coefficient with a value of f 1 = 1.5.
Rule 2 can be satisfied by Chvorinov's heat-transfer criteria. Because there are nearly 20% potential errors when converting from modulus to freezing time, the modulus of the riser should be at least 1.2 times larger than the feeding part in the casting [21], as shown in Equation (12), where M r and M C are the moduli of the riser and feeding part in casting, respectively. For Rule 3, both the feeding efficiency of the riser and the solidification shrinkage rate of the liquid metal should be considered, which can be satisfied with the volume criterion, as shown in Equation (13).
where η is the efficiency of the riser; for the cylinder riser, η = 0.14; ε is the liquid contraction during freezing; for the aluminum alloy, ε = 0.02; V r is the volume of the riser; and V c is the volume of the feeding part in the casting. A cylinder riser is presented in this case and the CAD model and decision variables are shown in Figure 4. The objective function is expressed as follows: where A= , K1 and K2 are the geometry parameters of the riser, Mc is the modulus of casting, Vc is the volume of the riser filled area in the casting, and ε is the volume shrinkage of metal solidification. For the cylinder riser, K1 = 0.25 πf 1 , K2 = π(0.5+f 1 ), and f1 is a coefficient with a value of f1 = 1.5. Rule 2 can be satisfied by Chvorinov's heat-transfer criteria. Because there are nearly 20% potential errors when converting from modulus to freezing time, the modulus of the riser should be at least 1.2 times larger than the feeding part in the casting [21], as shown in Equation (12), where Mr and MC are the moduli of the riser and feeding part in casting, respectively. For Rule 3, both the feeding efficiency of the riser and the solidification shrinkage rate of the liquid metal should be considered, which can be satisfied with the volume criterion, as shown in Equation (13).
where η is the efficiency of the riser; for the cylinder riser, η = 0.14; ε is the liquid contraction during freezing; for the aluminum alloy, ε = 0.02; Vr is the volume of the riser; and Vc is the volume of the feeding part in the casting. A cylinder riser is presented in this case and the CAD model and decision variables are shown in Figure 4. The objective function is expressed as follows: The constraint function is as follows: Subject to  The constraint function is as follows:

Initial and Boundary Conditions
The initial conditions in the numerical simulation include the material properties of each entity, pouring temperature, pouring time, and room temperature. The beam casting, gating system, and subsequent riser installation are made of ZL104 aluminum alloy. The resin sand in the material library is selected as the material for the sand box. The initial temperature of the liquid metal entering the pouring system is set at 710 • C and the pouring time is set by the concrete calculation results. The room temperature is set at 25 • C.
The boundary condition in numerical simulation is mainly the heat transfer coefficient of the contact surface between two different materials in the model. In this study, the heat transfer coefficient between the sand mold and casting, riser, and gating system was set at Materials 2022, 15, 7490 7 of 13 500 W/(m 2 ·K), the heat transfer coefficient between the sand mold and air at 20 • C was set at 10 W/(m 2 ·K), and the heat transfer coefficient between the casting and cold iron was set at 2000 W/(m 2 ·K). The heat transfer coefficient between the cold iron and the sand mold was taken as 1000 W/(m 2 ·K). The preceding parameters are selected based on experience. Table 2 lists the parameter values measured using SolidWorks software. The maximum velocity v Max of the liquid metal in the cavity can be calculated as 93 mm/s using Equation (6) as Campbell's rules. The minimum velocity v min of the liquid metal was obtained as 24 mm/s using Equation (7). The actual velocity v a of the liquid metal in the "dangerous" section can be determined by combining with Equation (8), as shown in Equation (16). The mathematical model is shown in Equation (17):

Results and Discussion
where x =[r, h] T The real number coding NSGA2 was selected, two-point crossover and roulette wheel selection were used as genetic operators, the crossover probability was set to 0.8, and the mutant probability was set to 0.3. The population range and generation number were set to 500 and the limits of the design variables were r = (1,50) and h = (300,900).
The Pareto front searched by the NSGA2 provided trade-off information between the three objectives, as shown in Figure 5. As observed from Figure 5a-c, the optimization objective T with the remaining two optimization objectives, Y and Re, were two sets of conflicting objectives. In other words, a higher yield tended to result in a more stable liquid metal flow and longer filling time. However, when the yield was unchanged, a shorter filling time was obtained by increasing the Reynolds number, as shown in Figure 5a,b.
In the Pareto front, the yield ranged between 80.1% and 88.4% without considering the riser system, the corresponding filling time ranged from 9.37 s to 15.27 s, and the corresponding Reynolds numbers ranged from 18,742 to 25,000. Because the constraint functions limit the search space of feasible solutions, all of the obtained nondominant solutions met the design requirements. Figure 6 shows the interaction effects of the gating system radios and gating system height on the liquid metal flow state and filling time in a specific casting yield (rounded down to the nearest integer). For higher yields, more optimal solutions were obtained, which means that the yield was a preferential objective in this mathematical model. Simultaneously, a higher yield results in higher economic benefits; therefore, in this case, the optimal solution was selected from Figure 6a  In the Pareto front, the yield ranged between 80.1% and 88.4% without considering the riser system, the corresponding filling time ranged from 9.37 s to 15.27 s, and the corresponding Reynolds numbers ranged from 18,742 to 25,000. Because the constraint functions limit the search space of feasible solutions, all of the obtained nondominant solutions met the design requirements. Figure 6 shows the interaction effects of the gating system radios and gating system height on the liquid metal flow state and filling time in a specific casting yield (rounded down to the nearest integer). For higher yields, more optimal solutions were obtained, which means that the yield was a preferential objective in this mathematical model. Simultaneously, a higher yield results in higher economic benefits; therefore, in this case, the optimal solution was selected from Figure 6a    The distribution of the defects in the casting was determined using the numerical simulation software ProCAST, as shown in Figure 7a. As observed, the defects inside the casting were mainly distributed at the joints. Two sets of open cylinder risers of different sizes were placed on the casting top to eliminate top defects. The chills were placed on the lower part of the casting to construct a temperature field to form a bottom-to-top solidification, as shown in Figure 7c, and the thickness of the external chill was 1.2-1.5 times the thickness of the casting. The casting part fed by riser2 was the corner of two vertical planes with a thickness of 6 mm, as shown in Figure 7b, where the liquid metal in the casting and the riser solid quickly produced defects inside the casting. The safety factor α = 1.5 was set to riser2 to make the production more reliable. The distribution of the defects in the casting was determined using the numerical simulation software ProCAST, as shown in Figure 7a. As observed, the defects inside the casting were mainly distributed at the joints. Two sets of open cylinder risers of different sizes were placed on the casting top to eliminate top defects. The chills were placed on the lower part of the casting to construct a temperature field to form a bottom-to-top solidification, as shown in Figure 7c, and the thickness of the external chill was 1.2-1.5 times the thickness of the casting. The casting part fed by riser 2 was the corner of two vertical planes with a thickness of 6 mm, as shown in Figure 7b, where the liquid metal in the casting and the riser solid quickly produced defects inside the casting. The safety factor α = 1.5 was set to riser 2 to make the production more reliable. The distribution of the defects in the casting was determined using the numerical simulation software ProCAST, as shown in Figure 7a. As observed, the defects inside the casting were mainly distributed at the joints. Two sets of open cylinder risers of different sizes were placed on the casting top to eliminate top defects. The chills were placed on the lower part of the casting to construct a temperature field to form a bottom-to-top solidification, as shown in Figure 7c, and the thickness of the external chill was 1.2-1.5 times the thickness of the casting. The casting part fed by riser2 was the corner of two vertical planes with a thickness of 6 mm, as shown in Figure 7b, where the liquid metal in the casting and the riser solid quickly produced defects inside the casting. The safety factor α = 1.5 was set to riser2 to make the production more reliable. The volume and area of the casting part fed by riser1 were V1 = 387,074 mm 3 and A1 = 51,519 mm 2 , respectively, and those for riser2 were V2 = 77,025 mm 3 and A2 = 25,671 mm 2 , Figure 7. (a) Numerical simulation results of the beam with gating system, (b) location of the riser and feeding zone, and (c) optimal gating and riser system design with chill.
The volume and area of the casting part fed by riser 1 were V 1 = 387,074 mm 3 and A 1 = 51,519 mm 2 , respectively, and those for riser 2 were V 2 = 77,025 mm 3 and A 2 = 25,671 mm 2 , respectively. Combined with Equation (15), the constraint function of riser 1 and riser 2 can be simplified to Equations (18) and (19) A real number coding GA was selected, two-point crossover and tournament selection was used as the genetic operator, and the population range was set to 300 with 500 generations. Table 3 lists the upper and lower limits of the design variables and optimization results of the riser design. The simulation results in Figure 8a indicate that the velocity of liquid metal in the cavity was under 0.1 m/s, which was close to the maximum velocity of 93 mm/s in the constraint function. This indicates that the mathematical model established in this study is reasonable. From Figure 8b, the riser system eliminated the defects at the top of the casting and the casting quality was acceptable. As a comparison, Figure 8c,d show a result simulated based on a gating and riser system designed by the traditional method, setting the dimensions only by experience and manual. Table 4 shows the results of two different designs. Combining Figure 8 and Table 4, we find that the design with the EA can effectively improve the casting yield, reduce the time cost, and be closer to the optimal design than the traditional design method.  The proposed optimized solution of the feeder system was applied to the actual production, the pouring temperature was set to 710 °C, and the filling time was 4.5 s. The production results show that the optimized feeder system design can obtain an intact casting shape and a legible contour, as shown in Figure 9a. Samples were taken from the top region, sidewall, substrate, and rib plate of the casting, respectively; 20 images were taken for each sample using the optical microscope and the porosity of each sample was calculated with the image processing software ImageJ. As shown in Figure 9b,c, the porosity of the top region reached 2.0% and 1.7% and the pores were larger than the rest of the casting region. The main reasons for the relative high porosity in the upper region of the casting are the low static pressure and the floating of impurities in the casting process. In contrast, substrate and sidewall of the casting have higher quality. As shown in Figure 9e,f, the porosity of those region is 1.4% and 1.3%, respectively. The micro-topography of the rib plate is shown in Figure 9d; owing to the small thickness, the porosity of the rib plate is  The proposed optimized solution of the feeder system was applied to the actual production, the pouring temperature was set to 710 • C, and the filling time was 4.5 s. The production results show that the optimized feeder system design can obtain an intact casting shape and a legible contour, as shown in Figure 9a. Samples were taken from the top region, sidewall, substrate, and rib plate of the casting, respectively; 20 images were taken for each sample using the optical microscope and the porosity of each sample was calculated with the image processing software ImageJ. As shown in Figure 9b,c, the porosity of the top region reached 2.0% and 1.7% and the pores were larger than the rest of the casting region. The main reasons for the relative high porosity in the upper region of the casting are the low static pressure and the floating of impurities in the casting process. In contrast, substrate and sidewall of the casting have higher quality. As shown in Figure 9e,f, the porosity of those region is 1.4% and 1.3%, respectively. The micro-topography of the rib plate is shown in Figure 9d; owing to the small thickness, the porosity of the rib plate is only 0.7%. An entity containing the above-mentioned features was cut out from the casting and X-ray detection was performed, as shown in Figure 9a, which indicated that the casting has a high quality with 98.6% relative density.

Conclusions
In this study, NSGA II and GA were used to design the gating and riser system, respectively. The mathematical model was proven to be effective through a study case. The conclusions of this study are as follows.
(1) Compared with the traditional design method, the use of an EA to design the gating and riser system can reduce the time cost and obtain a higher casting yield and acceptable casting quality design. With the increase in casting complexity and numerical simulation difficulty, the method proposed in this study can significantly reduce the time cost; (2) The design of a gating system is a multi-objective optimization problem characterized by several conflicting objectives. The Pareto front obtained by NSGA II can provide complex trade-off information between objectives, providing decision-makers with a more flexible range of choices; (3) The method proposed is particularly suitable for the gating and riser system design of complex thin-wall casings because of the dramatic decrease in time spent. It also makes further automatic design feasible. (4) The trial casting has an intact shape and a legible contour, the casting relative density reaches 98.6%, and the X-ray detection shows the casting has a high quality, which verifies the effectiveness of the method proposed.

Conclusions
In this study, NSGA II and GA were used to design the gating and riser system, respectively. The mathematical model was proven to be effective through a study case. The conclusions of this study are as follows.
(1) Compared with the traditional design method, the use of an EA to design the gating and riser system can reduce the time cost and obtain a higher casting yield and acceptable casting quality design. With the increase in casting complexity and numerical simulation difficulty, the method proposed in this study can significantly reduce the time cost; (2) The design of a gating system is a multi-objective optimization problem characterized by several conflicting objectives. The Pareto front obtained by NSGA II can provide complex trade-off information between objectives, providing decision-makers with a more flexible range of choices; (3) The method proposed is particularly suitable for the gating and riser system design of complex thin-wall casings because of the dramatic decrease in time spent. It also makes further automatic design feasible. (4) The trial casting has an intact shape and a legible contour, the casting relative density reaches 98.6%, and the X-ray detection shows the casting has a high quality, which verifies the effectiveness of the method proposed.

Data Availability Statement:
The CAD model used in this study was provide by a third party. Direct request for the material may be made to the provider as indicated in the Acknowledgements. All data and codes generated or used during the study are available from the corresponding author by request. NSGA II python code with a mathematical model. GA python code with a mathematical model.