I formulate and solve a volume optimization problem for the screw gear set inside a helical swing hydraulic cylinder. My objective is to reduce the total material volume of the screw gear pair without violating strength, undercut, shaft diameter, or kinematic constraints. I express the classical design ranges of module, tooth number, and helix angle as programmatic constraints, then use an adaptive genetic algorithm in Python to search for the minimum-volume screw gear configuration. The adaptive genetic algorithm adjusts crossover and mutation rates according to individual fitness relative to the population average, which allows the screw gear search to escape local minima and converge faster than a conventional genetic algorithm. The final optimized screw gear volume is reduced by 5.87% compared with the initial reference design, and the adaptive method reaches the best solution in fewer generations.
Keywords: screw gear; helical swing cylinder; Python; genetic algorithm; volume optimization; adaptive selection; crossover; mutation; elitism; mechanical design
1. Introduction
I treat the screw gear as the central transmission element in a helical swing cylinder. The screw gear converts the linear motion of a piston into rotary motion of an output shaft, and it does so with high torque capacity, compact axial packaging, and relatively stable transmission. Because the screw gear carries both radial and axial loads, its geometry directly affects the size, mass, cost, and dynamic response of the entire actuator. In many conventional designs, the screw gear is oversized to guarantee reliability. This redundancy increases material consumption, machining time, and production cost. I therefore replace the conventional trial-and-error sizing of the screw gear with a global optimization procedure.
The design problem of the screw gear is nonlinear. The volume depends on module, tooth number, helix angle, face width, and the diameters of the inner and outer screw gear pairs. Several constraints are coupled: the shaft diameter must satisfy torsional strength, the module must satisfy bending and contact-related verification, the tooth number must avoid undercut, and the helix angle must remain within a manufacturable range. I encode these constraints directly in Python so that infeasible screw gear candidates are rejected or repaired before they enter the next generation. The adaptive genetic algorithm then searches the feasible design space for a screw gear with minimum volume.
My contribution is not only the final numerical reduction of screw gear volume, but also a reusable computational workflow. The workflow exposes multiple near-optimal screw gear solutions, shows the convergence trend, and helps a designer compare traditional and adaptive genetic algorithms. The screw gear optimization model is simple enough to run on a desktop computer yet detailed enough to guide real mechanical design.
2. Working Principle and Screw Gear Structure
The helical swing cylinder contains a two-stage screw gear transmission. The piston carries inner teeth and outer teeth. The inner teeth mesh with a shaft screw gear, while the outer teeth mesh with a housing screw gear. When hydraulic pressure moves the piston axially, the helical engagement forces the piston to rotate. The shaft screw gear and the housing screw gear provide different helix directions or lead characteristics, so the piston rotation is converted into a controlled swing of the output shaft. The screw gear pair therefore acts as both a motion converter and a torque amplifier.

I describe the screw gear geometry with three primary variables: module \(m\), tooth number \(z\), and helix angle \(\beta\). The first-stage screw gear pair consists of the shaft screw gear and the piston inner screw gear. The second-stage screw gear pair consists of the piston outer screw gear and the housing screw gear. Because the piston inner and outer teeth share the same body, the tooth numbers and diameters of the screw gear stages must satisfy geometric compatibility. I use the pitch diameter relation
$$ d = \frac{m z}{\cos\beta} $$
for each screw gear. Here \(d\) is the pitch diameter, \(m\) is the normal module, \(z\) is the number of teeth, and \(\beta\) is the helix angle. The axial force generated by the screw gear is
$$ F_a = F_t \tan\beta = \frac{2000 T}{d_1} = P A $$
where \(F_t\) is the tangential force, \(T\) is the torque, \(P\) is the working pressure, and \(A\) is the effective piston area. The effective area is related to the piston diameters and the helix angle. I use this relation to keep the screw gear geometry consistent with the hydraulic actuation requirement.
3. Technical Parameters and Load Conditions
I base my optimization on a representative helical swing cylinder. The main technical parameters are summarized in Table 1. These values define the load environment in which the screw gear must operate.
| Parameter | Value |
|---|---|
| Maximum torque \(T\) | 190,000 N·mm |
| Radial load | 1,850 kg |
| Axial load | 28 kg |
| Maximum working pressure \(P\) | 360 MPa |
| Maximum rotation angle | 384° |
| Displacement \(V\) | 190,000 mL |
The material selected for the screw gear and shaft is a high-strength alloy steel. I use the yield strength and ultimate strength to define allowable stresses. Table 2 lists the material properties used in the constraint calculations.
| Property | Value |
|---|---|
| Yield strength \(\sigma_s\) | 1,324 MPa |
| Ultimate strength \(\sigma_b\) | 1,471 MPa |
| Allowable torsional shear stress \([\tau_T]\) | Derived from \(\sigma_s\) with a safety factor |
| Reference shaft diameter \(d_1\) | At least 61 mm |
I calculate the torsional shear stress in the shaft screw gear as
$$ \tau_T = \frac{T_j}{W_T} \le [\tau_T] $$
where \(T_j = K T\) is the design torque, \(K\) is a correction factor, and \(W_T\) is the torsional section modulus. Because the shaft contains keyways, I increase the minimum diameter by 10%. The resulting shaft diameter constraint is
$$ d_1 = \frac{m z_1}{\cos\beta} \ge 1.1 \sqrt[3]{\frac{16 T_j}{\pi [\tau_T]}} $$
I also verify the module with a bending-strength condition. The module must satisfy
$$ m \ge 12.6 \sqrt[3]{\frac{K T \cos^2\beta}{\Psi_d z^2 \sigma_{FP}} Y_{FS} Y_{\varepsilon\beta}} $$
where \(\Psi_d\) is the face-width coefficient, \(Y_{FS}\) is the tooth-form factor, \(Y_{\varepsilon\beta}\) is the overlap and helix-angle factor, and \(\sigma_{FP}\) is the allowable stress of the screw gear material. This constraint prevents the optimizer from selecting a screw gear with a module that is too small for the load.
4. Design Variables and Volume Objective
I define the screw gear optimization variables as the module \(m\), the first-stage tooth number \(z_1\), and the helix angle \(\beta\). The second-stage tooth number \(z_3\) is not independent because it must satisfy the piston area and geometric compatibility. I compute \(z_3\) from
$$ z_3 = \left\lceil \frac{\cos\beta}{m} \sqrt{ \frac{\pi}{4} \left( \frac{m z_1}{\cos\beta} \right)^2 + \frac{\sin\beta}{7\pi m z_1} \times 3.8 \times 10^6 \times \frac{4}{\pi} } \right\rceil $$
and then obtain the outer pitch diameter as
$$ d_3 = \frac{m z_3}{\cos\beta} $$
The volume objective includes three main screw gear-related volumes: the shaft screw gear, the piston screw gear, and the housing screw gear. I write the total volume as
$$ V = \frac{\pi}{4} \left( \frac{m z_1}{\cos\beta} \right)^2 b_1 + \left[ \frac{\pi}{4} \left( \frac{m z_3}{\cos\beta} \right)^2 – \frac{\pi}{4} \left( \frac{m z_2}{\cos\beta} \right)^2 \right] b_2 + \left[ \frac{\pi}{4} d_4^2 – \frac{\pi}{4} \left( \frac{m z_3}{\cos\beta} \right)^2 \right] b_3 $$
Here \(b_1\), \(b_2\), and \(b_3\) are the face widths of the corresponding screw gear sections, \(z_2\) is the piston inner tooth number, and \(d_4\) is the housing inner diameter. Since the goal is minimization, I define the fitness function as the reciprocal of volume:
$$ f(x_i) = \frac{1}{V(x_i) + \varepsilon} $$
where \(\varepsilon\) is a small positive number that prevents division by zero. A smaller screw gear volume therefore produces a larger fitness value. Table 3 summarizes the design variables and their roles.
| Symbol | Variable | Role in screw gear optimization |
|---|---|---|
| \(m\) | Normal module | Controls tooth size, shaft diameter, and volume |
| \(z_1\) | First-stage tooth number | Controls pitch diameter and undercut avoidance |
| \(\beta\) | Helix angle | Controls axial force, overlap, and packaging |
| \(z_2\) | Piston inner tooth number | Derived from first-stage mesh |
| \(z_3\) | Piston outer tooth number | Derived from piston area and compatibility |
5. Constraint Formulation for the Screw Gear
I convert the classical design rules for the screw gear into explicit constraints. The tooth number must be large enough to avoid undercut. The module must be within a practical manufacturing range and must also satisfy the verification inequality. The helix angle must remain within a range that balances axial force and transmission smoothness. The shaft diameter must satisfy torsional strength. Table 4 lists the constraint ranges I implement in Python.
| Name | Constraint |
|---|---|
| Tooth number \(z\) | \(17 \le z \le 50\) |
| Module \(m\) | \(1 \le m \le 4\) |
| Module verification | \(m \ge 12.6 \sqrt[3]{\frac{K T \cos^2\beta}{\Psi_d z^2 \sigma_{FP}} Y_{FS} Y_{\varepsilon\beta}}\) |
| Helix angle \(\beta\) | \(20^\circ \le \beta \le 44^\circ\) |
| Shaft diameter \(d_1\) | \(d_1 = \frac{m z_1}{\cos\beta} \ge 61\) |
I check these constraints at every stage of the screw gear optimization: during initial population generation, before crossover, after crossover, before mutation, and after mutation. If a candidate violates any constraint, I reject it and replace it by copying a feasible individual from the current population. This strategy keeps the population size constant and prevents the adaptive genetic algorithm from wasting evaluations on invalid screw gear designs. The minimum shaft diameter constraint is especially important because the screw gear must transmit high torque while carrying radial and axial loads.
For the first-stage screw gear pair, I also require the contact ratio and overlap ratio to remain within acceptable limits. While I do not include these as primary optimization objectives, I use them as feasibility conditions. A screw gear with an excessively small helix angle may have insufficient overlap, while a screw gear with an excessively large helix angle may generate excessive axial force. The constraint range \(20^\circ \le \beta \le 44^\circ\) reflects this compromise.
6. Adaptive Genetic Algorithm for Screw Gear Optimization
The genetic algorithm I use is a population-based stochastic search method. Each individual represents one candidate screw gear design. The algorithm applies selection, crossover, and mutation repeatedly until a termination condition is met. The general model of a simple genetic algorithm is
$$ \mathrm{SGA} = (C, E, P, M, \phi, \Gamma, \psi, T) $$
where \(C\) is the encoding method, \(E\) is the fitness evaluation function, \(P\) is the initial population, \(M\) is the population size, \(\phi\) is the selection operator, \(\Gamma\) is the crossover operator, \(\psi\) is the mutation operator, and \(T\) is the termination condition. I use a binary encoding for the screw gear variables. Table 5 shows the encoding scheme.
| Variable | Range | Precision | Bits |
|---|---|---|---|
| Module \(m\) | 1.0 to 4.0 | 0.1 | 6 |
| Tooth number \(z\) | 17 to 50 | 1 | 6 |
| Helix angle \(\beta\) | 20° to 44° | 1° | 7 |
| Total chromosome | 3 variables | Mixed precision | 19 |
I calculate the decoding precision from the bit length as
$$ \delta = \frac{x_{max} – x_{min}}{2^L – 1} $$
where \(L\) is the number of bits for that variable. This allows the binary string to be mapped back to a real-valued screw gear design. I use a population size of 500 and a maximum of 30 generations. These values were selected after preliminary trials because they provide a good balance between diversity and computational cost for the screw gear problem.
For selection, I use fitness-proportionate selection with an elitist strategy. The selection probability of individual \(i\) is
$$ p_i = \frac{f_i}{\sum_{j=1}^{N} f_j} $$
where \(N\) is the population size and \(f_i\) is the fitness of the \(i\)-th screw gear candidate. I also preserve the best individual in each generation. Elitism prevents the best screw gear design from being lost through crossover or mutation. I write the elitist update as
$$ P_{new} = \mathrm{top}_{k}(P_{old}) \cup \mathrm{offspring}(P_{old}) $$
where \(\mathrm{top}_{k}\) denotes the \(k\) best individuals. In my implementation, \(k\) is chosen so that the best screw gear design always survives into the next generation.
The main difference between the conventional genetic algorithm and the adaptive genetic algorithm is the way crossover and mutation rates are determined. In the conventional method, the crossover rate \(P_c\) and mutation rate \(P_m\) are constant. In the adaptive method, these rates depend on the fitness of the individual relative to the population average and the best fitness. I use the following adaptive crossover rule:
$$ P_c = \begin{cases} K_1 + \frac{(K_2-K_1)f’}{f_{avg}}, & f’ \lt f_{avg} \\ K_2, & f’ \ge f_{avg} \end{cases} $$
and the following adaptive mutation rule:
$$ P_m = \begin{cases} K_3 + \frac{(K_4-K_3)(f_{max}-f’)}{f_{max}-f_{avg}}, & f’ \gt f_{avg} \\ K_4, & f’ \le f_{avg} \end{cases} $$
Here \(f’\) is the fitness of the selected individual, \(f_{avg}\) is the average fitness of the population, \(f_{max}\) is the best fitness in the population, and \(K_1\), \(K_2\), \(K_3\), and \(K_4\) are constants in the interval \((0,1)\). This adaptive mechanism gives a high crossover rate to below-average screw gear designs so that they can recombine and improve. It gives a lower crossover rate to above-average designs so that their beneficial genes are not disrupted excessively. Similarly, the mutation rate is increased for high-fitness individuals only when the population is far from the best solution, which helps the screw gear search avoid premature convergence.
Table 6 compares the parameter settings of the conventional genetic algorithm and the adaptive genetic algorithm used for the screw gear volume optimization.
| Parameter | Condition | Conventional GA | Adaptive GA |
|---|---|---|---|
| Population size | None | 500 | 500 |
| Generations | None | 30 | 30 |
| Crossover rate | \(f’ \lt f_{avg}\) | 0.6 | \(0.7 + \frac{(0.7-0.21)f’}{f_{avg}}\) |
| Crossover rate | \(f’ \ge f_{avg}\) | 0.6 | 0.2 |
| Mutation rate | \(f’ \gt f_{avg}\) | 0.05 | \(0.05 + \frac{(0.2-0.05)(f_{max}-f’)}{f_{max}-f_{avg}}\) |
| Mutation rate | \(f’ \le f_{avg}\) | 0.05 | 0.02 |
7. Python Implementation Workflow
I implement the screw gear optimization entirely in Python. The program stores each individual as a vector containing module, tooth number, and helix angle. The main workflow consists of initialization, constraint checking, fitness evaluation, selection, crossover, mutation, elitist copying, and reporting. I also generate convergence curves so that the behavior of the screw gear search can be inspected visually.
The first step is random population generation. For each candidate screw gear, I sample \(m\), \(z_1\), and \(\beta\) from their allowed ranges. I then check whether the resulting shaft diameter and module verification satisfy the strength constraints. If not, I resample or repair the candidate. After the initial population is feasible, I compute the fitness of every individual from the volume model. The fitness is the inverse of total screw gear volume, so a smaller screw gear receives a higher score.
The second step is selection. I sort the population by fitness and assign selection probabilities. The best individuals are more likely to be chosen as parents. I also copy the best individual directly into the next generation. This elitist step is important because the screw gear volume landscape contains many local minima, and the best design can easily be lost without elitism.
The third step is crossover. For each pair of selected parents, I generate a random number. If the number is less than the adaptive crossover rate, I exchange parts of the binary chromosomes. Because the chromosome length is 19 bits, I use a uniform or single-point crossover. The adaptive crossover rate depends on the fitness of the parents. If the parents are below average, the crossover rate is high. If the parents are above average, the crossover rate is low.
The fourth step is mutation. I flip bits with a probability equal to the adaptive mutation rate. Mutation introduces new screw gear geometries that may not exist in the current population. The adaptive mutation rate is higher when the population is far from the best fitness and lower when the population is close to the best. This helps the algorithm explore the screw gear design space early and exploit good regions later.
The fifth step is constraint checking after crossover and mutation. If an offspring violates the module, tooth number, helix angle, or shaft diameter constraint, I reject it and replace it with a copy of a feasible parent. I repeat this process until the population size returns to 500. The sixth step is evaluation and reporting. I record the best volume, the average volume, and the best parameters in each generation. Table 7 summarizes the main Python functions I use.
| Function | Purpose |
|---|---|
random_individual() |
Generate a feasible screw gear candidate |
check_module_value() |
Verify the module constraint for the screw gear |
fitness_count1() |
Compute the volume-based fitness of a screw gear |
selection_operator() |
Select parents according to fitness |
crossover_operator() |
Recombine two screw gear chromosomes |
mutation_operator() |
Mutate a screw gear chromosome |
copy_operator() |
Copy the best screw gear into the next generation |
draw_charts() |
Plot the volume convergence trend |
I also define a repair operator for infeasible individuals. The repair operator first attempts to adjust the module or tooth number toward the feasible region. If repair is not possible, the individual is replaced by a random feasible screw gear. This keeps the adaptive genetic algorithm stable and ensures that every generation contains valid screw gear designs.
8. Fitness Landscape and Convergence Behavior
The fitness landscape of the screw gear problem is nonlinear and nonconvex. The volume decreases as the module and pitch diameters decrease, but the strength constraints impose lower bounds on the module and shaft diameter. The helix angle affects both the pitch diameter and the axial force. A larger helix angle can reduce the transverse diameter for a given module and tooth number, but it also increases axial force and may require a larger shaft or bearing. The optimizer must therefore balance geometric compactness against load capacity.
I use the convergence increment
$$ \Delta V_g = \frac{V_{g-1} – V_g}{V_{g-1}} \times 100\% $$
to monitor the progress of the screw gear optimization. A large \(\Delta V_g\) means that the algorithm is still finding substantially better screw gear designs. A small \(\Delta V_g\) means that the population has converged near a minimum. In my experiments, the adaptive genetic algorithm reaches a stable best volume earlier than the conventional genetic algorithm. The conventional method continues to improve slowly for many generations, while the adaptive method finds the best screw gear volume in about seven generations.
The initial reference screw gear design uses \(z_1 = 30\), \(m = 2\), and \(\beta = 30^\circ\). Its total volume is \(4.21 \times 10^5 \ \mathrm{mm^3}\). Both the conventional genetic algorithm and the adaptive genetic algorithm reduce this volume to \(3.96281 \times 10^5 \ \mathrm{mm^3}\). The final reduction is
$$ R = \frac{V_{initial} – V_{optimal}}{V_{initial}} \times 100\% = 5.87\% $$
Table 8 shows the volume and reduction rate at selected generations. The adaptive genetic algorithm converges faster and reaches the final minimum earlier.
| Generation | Conventional GA volume | Conventional reduction | Adaptive GA volume | Adaptive reduction |
|---|---|---|---|---|
| 1 | 404,944 | 3.81% | 400,035 | 4.98% |
| 4 | 398,815 | 5.27% | 397,784 | 5.51% |
| 7 | 397,563 | 5.57% | 396,281 | 5.87% |
| 11 | 396,497 | 5.82% | 396,281 | 5.87% |
| 16 | 396,389 | 5.85% | 396,281 | 5.87% |
| 17 | 396,281 | 5.87% | 396,281 | 5.87% |
Figure-free comparison of the trends shows that the adaptive curve drops sharply in the early generations. The conventional curve also decreases, but its improvement is more gradual. The adaptive algorithm therefore has an advantage in iteration speed for the screw gear volume problem. It is also less likely to become trapped in a local minimum because its crossover and mutation rates change with the fitness distribution.
9. Results and Discussion
I compare the optimized screw gear volume with the initial reference design. The initial volume is \(4.21 \times 10^5 \ \mathrm{mm^3}\). The optimized volume returned by both algorithms is \(3.96281 \times 10^5 \ \mathrm{mm^3}\). This corresponds to a material saving of 5.87%. The reduction may appear modest in percentage terms, but for a compact hydraulic actuator it represents a meaningful decrease in mass, machining volume, and raw material cost. Because the screw gear is a precision component, even a small volume reduction can reduce cutting time and heat-treatment cost.
The adaptive genetic algorithm reaches the best screw gear volume at generation 7. The conventional genetic algorithm reaches the same volume at generation 17. This means the adaptive method saves approximately ten generations of computation for the same final result. The computational saving is important when the fitness function includes detailed strength checks or when the optimizer is embedded in a larger design workflow. The adaptive method does introduce additional computation per generation because it must calculate the average fitness and adjust crossover and mutation probabilities for each individual. However, the reduction in the number of generations more than compensates for this overhead in my experiments.
The adaptive genetic algorithm also produces multiple near-optimal screw gear solutions. These solutions are useful for practical design because manufacturing tolerances, available tooling, and material batch differences may make one near-optimal screw gear preferable to another. For example, a design with a slightly larger module may be easier to machine, while a design with a slightly smaller helix angle may reduce axial thrust. The optimizer therefore does not only return a single number; it returns a set of design alternatives that can be evaluated by the engineer.
Table 9 summarizes the main comparison between the conventional and adaptive genetic algorithms for the screw gear volume optimization.
| Metric | Conventional GA | Adaptive GA |
|---|---|---|
| Population size | 500 | 500 |
| Maximum generations | 30 | 30 |
| Best volume | 396,281 | 396,281 |
| Volume reduction | 5.87% | 5.87% |
| Generation of best solution | 17 | 7 |
| Local-minimum risk | Higher | Lower |
| Computation per generation | Lower | Higher |
The results show that the adaptive genetic algorithm is not necessarily more accurate in the final objective value, because both methods find the same best screw gear volume. Its advantage is convergence speed and robustness. The conventional algorithm is simpler and has lower per-generation cost. The adaptive algorithm is preferable when the screw gear design space is large, when the fitness function is expensive, or when the designer wants to reduce the number of iterations.
10. Sensitivity of Screw Gear Volume to Design Variables
I perform a sensitivity analysis to understand how the screw gear volume responds to module, tooth number, and helix angle. The module has a strong influence on volume because the pitch diameter is proportional to \(m\). Increasing the module increases the shaft screw gear diameter, the piston screw gear diameter, and the housing screw gear diameter. However, the module cannot be reduced indefinitely because the bending strength and shaft diameter constraints set a lower bound. The tooth number also affects the pitch diameter, but its influence is more gradual. The helix angle affects the volume through the factor \(1/\cos\beta\). As \(\beta\) increases, \(\cos\beta\) decreases, so the pitch diameter increases for fixed \(m\) and \(z\). This means a larger helix angle tends to increase the screw gear volume, but it can improve overlap and smoothness. The optimizer must find a compromise.
Table 10 shows a qualitative sensitivity ranking for the screw gear volume.
| Variable | Effect on volume | Effect on strength | Effect on axial force |
|---|---|---|---|
| Module \(m\) | Strong positive | Strong positive | Indirect |
| Tooth number \(z\) | Moderate positive | Moderate positive | Indirect |
| Helix angle \(\beta\) | Moderate positive through \(1/\cos\beta\) | Overlap benefit | Strong positive |
| Shaft diameter \(d_1\) | Strong positive | Strong positive | Negative through larger \(d_1\) |
I observe that the optimal screw gear tends to use the smallest feasible module and the smallest feasible shaft diameter. The tooth number is then selected to satisfy the geometric compatibility and undercut constraints. The helix angle settles at a value that balances transmission smoothness against axial force. This behavior is consistent with the mathematical structure of the objective function and with the constraint set.
11. Practical Design Guidelines
Based on the optimization results, I recommend the following guidelines for screw gear design in helical swing cylinders. First, define the strength constraints before running the genetic algorithm. If the constraints are too loose, the optimizer may return a screw gear that is small but unsafe. If the constraints are too tight, the feasible region may be empty or too small for the algorithm to explore effectively. Second, use a population size of at least 500 for the screw gear problem. Smaller populations converge quickly but may miss the global minimum. Third, use elitism to preserve the best screw gear. Fourth, use adaptive crossover and mutation rates when the fitness landscape is expected to be rugged. Fifth, inspect the convergence curve and the multiple near-optimal solutions rather than trusting a single final value.
I also recommend checking the manufacturing feasibility of the optimized screw gear. The module and tooth number must be compatible with available hobs or cutters. The helix angle must be within the capability of the gear grinding or milling machine. The face width must provide sufficient tooth contact without causing excessive deflection. The shaft diameter must accommodate keyways, bearings, and seals. These practical constraints can be added to the Python model as additional penalty functions or hard constraints.
12. Limitations and Future Work
The current screw gear optimization focuses on volume minimization under static strength constraints. It does not include dynamic loading, thermal effects, lubrication, wear, or manufacturing cost in the objective function. These factors can be important in high-pressure hydraulic actuators. Future work can extend the objective to a weighted sum of volume, cost, and efficiency. The adaptive genetic algorithm can also be combined with a local search method, such as sequential quadratic programming or pattern search, to refine the best screw gear solution. A hybrid method may find a slightly better volume and improve convergence even further.
Another limitation is that the fitness function is deterministic. In real production, material properties, machining tolerances, and assembly clearances vary. A robust optimization formulation could include these uncertainties. The screw gear design could then be optimized for a mean volume and a standard deviation of performance. This would produce a screw gear that is not only compact but also reliable under manufacturing variation. Future work can also compare the adaptive genetic algorithm with particle swarm optimization, differential evolution, and simulated annealing for the same screw gear problem.
13. Conclusions
I have presented a Python-based adaptive genetic algorithm for screw gear volume optimization in a helical swing cylinder. The screw gear geometry is modeled with module, tooth number, and helix angle as design variables. The volume objective includes the shaft screw gear, the piston screw gear, and the housing screw gear. The constraints include tooth number limits, module limits, module verification, helix angle limits, and minimum shaft diameter. The adaptive genetic algorithm adjusts crossover and mutation rates based on individual fitness relative to the population average and the best fitness. This allows the screw gear search to explore widely in the early generations and exploit good regions later.
Both the conventional genetic algorithm and the adaptive genetic algorithm reduce the screw gear volume from \(4.21 \times 10^5 \ \mathrm{mm^3}\) to \(3.96281 \times 10^5 \ \mathrm{mm^3}\), a reduction of 5.87%. The adaptive genetic algorithm reaches the best screw gear volume at generation 7, while the conventional genetic algorithm reaches it at generation 17. The adaptive method therefore provides a clear advantage in iteration speed and is less likely to become trapped in a local minimum. The procedure produces multiple near-optimal screw gear designs that can guide practical decisions about module, tooth number, and helix angle. The method reduces design calculation time, lowers production cost, and provides a reusable framework for optimizing other screw gear transmission systems.
In summary, the screw gear volume optimization problem is well suited to an adaptive genetic algorithm. The screw gear objective is nonlinear, the constraints are coupled, and the design space contains both feasible and infeasible regions. By encoding the screw gear constraints directly in Python and using adaptive selection, crossover, and mutation, I obtain a compact screw gear design with verified strength and improved convergence behavior. The screw gear remains the critical element, and its optimization demonstrates how computational intelligence can support mechanical design without sacrificing engineering rigor.
