SDOA: for solving Gear-Train Design Problem

SDOA Algorithm Implementation for Gear-Train Design Optimization

Al momento, stai seguendo questo contributo

SDOA Algorithm Implementation for Gear-Train Design Optimization
Core Algorithm: Scuba Diver Optimization Algorithm (SDOA)
The Scuba Diver Optimization Algorithm (SDOA) is a nature-inspired, population-based metaheuristic derived from scuba-diving dynamics.
  • Adaptive search behaviour is regulated by simulated oxygen availability and depth-stage transitions.
  • Each diver represents one candidate gear-train configuration.
  • Oxygen depletion progressively changes the search from broad exploration to intensive exploitation and fine-tuning.
  • Oxygen replenishment allows successful search behaviours to continue.
  • Depth-dependent search operators permit global exploration, guided movement, local refinement, and diversification within one adaptive search framework.
Problem Solved: Gear-Train Design Optimization
Objective
The classical gear-train design problem aims to determine the integer numbers of teeth of four gears such that the resulting transmission ratio is as close as possible to a prescribed target ratio of:
[
R_{\mathrm{target}}=\frac{1}{6.931}
]
The standard benchmark formulation uses four integer design variables, normally bounded between 12 and 60 teeth.
The minimization objective can be expressed as:
[
\min f(\mathbf{x})
\left[
\frac{1}{6.931}
\frac{x_1x_2}{x_3x_4}
\right]^2
]
where:
[
\mathbf{x}=[x_1,x_2,x_3,x_4]
]
and:
[
x_i\in{12,13,\ldots,60},
\qquad i=1,2,3,4
]
Some publications use a different ordering of the four gear variables in the ratio expression; this represents a relabelling of the gears rather than a different optimization objective. The essential problem remains the minimization of the error between the generated gear ratio and (1/6.931).
Design Variables
The problem contains four discrete integer variables:
[
\mathbf{x}=[x_1,x_2,x_3,x_4]
]
where each variable represents the number of teeth of one gear.
Thus:
[
12\leq x_i\leq60
]
with the additional requirement:
[
x_i\in\mathbb{Z}
]
The gear-train problem is therefore a discrete integer optimization problem rather than a purely continuous optimization problem.
Design Requirement
The actual gear ratio generated by a candidate design is:
[
R(\mathbf{x})
\frac{x_1x_2}{x_3x_4}
]
The corresponding ratio error is:
[
E(\mathbf{x})
\left|
R_{\mathrm{target}}-R(\mathbf{x})
\right|
]
and the objective function minimizes the squared error:
[
f(\mathbf{x})=E^2(\mathbf{x})
]
Consequently, lower objective values indicate a closer correspondence between the obtained and required transmission ratios.
Algorithm Components
1) Diver Representation and Initialization
Each diver represents one complete gear-train configuration:
[
X_i=
[x_{i1},x_{i2},x_{i3},x_{i4}]
]
where each component corresponds to the number of teeth assigned to one gear.
The initial population is generated across the permissible design interval:
[
12\leq x_{ij}\leq60
]
Initial continuous values produced by the population-generation mechanism are converted to valid integer tooth numbers:
[
x_{ij}\leftarrow\operatorname{round}(x_{ij})
]
This integer enforcement is applied:
  • after initialization,
  • after every search update,
  • after crossover,
  • after random movement,
  • after mutation,
  • after diversification or reset.
The initialization procedure aims to distribute the population across different possible gear combinations so that the algorithm does not begin from a narrowly concentrated region of the discrete search space.
2) Oxygen and Depth Management
Search behaviour is adaptively controlled by the simulated oxygen level associated with each diver.
The oxygen level decreases as the optimization proceeds according to the oxygen-decay model:
[
O_i(t)
O_i(t-1)
\exp
\left(
-\alpha\frac{t}{t_{\max}}
\right)
]
where:
  • (O_i(t)) is the oxygen level of diver (i) at iteration (t),
  • (\alpha) is the oxygen-decay coefficient,
  • (t) is the current iteration,
  • (t_{\max}) is the maximum number of iterations.
The oxygen level determines the current depth stage and therefore the type and magnitude of the search operation.D1 – High Oxygen: Global Exploration
Divers in the D1 stage perform relatively large movements through the search space.
Main objectives are to:
  • explore substantially different gear combinations,
  • preserve population diversity,
  • investigate distant regions of the discrete search space,
  • avoid premature concentration around an inferior gear ratio.
Lévy-flight-style perturbations can be used to generate relatively large changes in the tooth-number configuration.
Because gear tooth numbers must remain integers, every generated movement is rounded before fitness evaluation.
D2 – Moderate Oxygen: Guided Exploration
At moderate oxygen levels, divers begin to incorporate information from promising solutions.
Search behaviour can include:
  • crossover with the current best solution,
  • communication with elite divers,
  • moderate random movement,
  • combination of current and best gear configurations.
D2 provides an intermediate stage between broad exploration and intensive refinement.B1 – Reduced Oxygen: Exploitation
At reduced oxygen levels, the search becomes concentrated around high-quality gear configurations.
The principal objective is to improve the current transmission-ratio approximation by making localized changes to the tooth numbers.
Possible operations include:
  • local search,
  • elite-guided movement,
  • best-solution crossover,
  • limited modification of one or more gear variables.
This stage increases convergence pressure around promising integer combinations.D3 – Low Oxygen: Fine-Tuning
Low-oxygen divers perform fine-scale modifications around promising solutions.
Non-uniform mutation with decreasing intensity is used so that the number and magnitude of tooth changes become smaller as optimization progresses.
For example, a late-stage modification may change a gear by only one or a few teeth rather than generating an entirely different configuration.
This mechanism is particularly useful because the optimum gear ratio may require a highly specific combination of four integer tooth numbers.D4 / Reset – Very Low Oxygen: Diversification
When oxygen reaches the reset threshold, the diver is prevented from remaining indefinitely around an unproductive configuration.
The reset mechanism can:
  • replenish oxygen,
  • reinitialize part of the solution,
  • generate another integer gear combination,
  • relocate the diver away from a stagnating region.
D4 therefore provides a recovery mechanism when local refinement is no longer producing improvements.
3) Search Operators
Lévy-Flight Exploration
Lévy-inspired movement generates occasional large changes in candidate gear combinations.
Its main role is to:
  • increase global coverage,
  • escape locally competitive tooth combinations,
  • reduce premature convergence.
Following every Lévy-based update:
[
X_i^{new}
\rightarrow
\operatorname{round}(X_i^{new})
]
and the values are repaired to remain inside the admissible interval.
Crossover Operator
The crossover mechanism combines information from the current diver and a high-quality or elite diver.
A candidate solution may inherit some tooth numbers from one configuration and the remaining tooth numbers from another.
For example:
[
[19,25,44,51]
]
and
[
[20,16,43,49]
]
can exchange components to produce a different integer gear combination.
This mechanism facilitates information sharing between promising solutions.
Random Walk
A bounded stochastic change is introduced into one or more gear variables.
Conceptually:
[
x_j^{new}=x_j+\Delta_j
]
where (\Delta_j) represents a stochastic displacement.
The resulting value is rounded:
[
x_j^{new}
\leftarrow
\operatorname{round}(x_j^{new})
]
and clipped to the valid interval:
[
12\leq x_j^{new}\leq60
]
Random walks provide neighbourhood exploration without forcing all divers directly toward the current global best.
Local Search
Local search examines small modifications around a promising gear configuration.
Typical operations can involve:
[
x_j^{new}=x_j\pm1
]
or other small integer changes.
The resulting candidate is retained when it produces a smaller gear-ratio error.
This mechanism is particularly appropriate for Gear-Train Design because small changes in tooth numbers can produce substantial differences in the resulting transmission ratio.
Non-Uniform Mutation
The mutation magnitude decreases as optimization progresses.
Conceptually:
[
\Delta(t)\downarrow
\qquad
\text{as }
t\rightarrow t_{\max}
]
Large mutations are therefore more common during early iterations, whereas small integer modifications dominate later iterations.
This mechanism permits global exploration initially and more precise discrete refinement toward the end of optimization.
4) Boundary and Integer Handling
Unlike the Speed Reducer Design problem, the classical four-variable Gear-Train Design benchmark does not primarily depend on nonlinear mechanical inequality constraints. Its principal restrictions are the allowable integer numbers of teeth.
After every update, each variable is therefore subjected to two operations.
Boundary Repair
[
x_j=
\begin{cases}
12, & x_j<12\
x_j, & 12\leq x_j\leq60\
60, & x_j>60
\end{cases}
]
Integer Snapping
[
x_j\leftarrow\operatorname{round}(x_j)
]
Thus, every objective-function evaluation corresponds to a physically interpretable integer number of gear teeth.
5) Fitness Evaluation and Acceptance
For each diver, the generated transmission ratio is calculated:
[
R_i=
\frac{x_{i1}x_{i2}}
{x_{i3}x_{i4}}
]
The error relative to the required ratio is:
[
E_i=
\left|
\frac{1}{6.931}-R_i
\right|
]
and fitness is:
[
f_i=
\left(
\frac{1}{6.931}-R_i
\right)^2
]
Because the objective is minimization, a new candidate is accepted when:
[
f(X_i^{new})<f(X_i^{old})
]
The globally best gear configuration is continuously maintained:
[
X^*
\arg\min_i f(X_i)
]
Because the conventional formulation contains only integer-domain restrictions, a mechanical constraint-penalty term is generally unnecessary for this particular benchmark.
6) Adaptive Mechanisms
Elitism
The best-performing gear combinations are retained from one iteration to the next.
Elite protection prevents the algorithm from losing previously discovered low-error gear configurations.
Parameter Adaptation
Exploration and mutation intensities decrease with increasing iteration number.
Early iterations therefore permit relatively large changes in tooth combinations, while later iterations favour smaller integer modifications.
Oxygen Replenishment
When a diver produces an improved gear configuration, part of its oxygen can be replenished.
This permits successful search behaviour to continue and reduces dependence on a completely predetermined phase schedule.
Communication Strategy
Divers probabilistically exchange information with the current global best or elite gear configurations.
Communication increases convergence pressure toward promising tooth combinations while maintaining stochastic population movement.
Adaptive Diversification
If oxygen becomes very low or search improvement stagnates, diversification can relocate the affected diver.
This mechanism reduces the probability that the entire population remains concentrated around one suboptimal gear-ratio approximation.
Key Parameters
When the same SDOA experimental configuration used for the Speed Reducer implementation is retained, the main parameters are:
Population size: 500 divers
Maximum iterations: 2000
Independent runs: 10
Elite size: 15
Initial oxygen:
[
O_0=200
]
Oxygen-decay factor:
[
\alpha=0.4
]
Initial mutation rate:
[
\mu_0=0.3
]
with progressive reduction over iterations.
Initial current/search strength:
[
c_0=0.3
]
with a progressively decreasing magnitude to increase local refinement during later iterations.
Decision-variable dimension:
[
D=4
]
Variable type: Integer
Variable bounds:
[
12\leq x_i\leq60
]
Results and Visualization
The Gear-Train Design implementation can generate numerical and graphical diagnostics for both solution quality and SDOA search behaviour.
Best-Run Convergence History
The best objective value is recorded at each iteration:
[
f_{\mathrm{best}}(t)
]
This curve shows how quickly SDOA reduces the transmission-ratio error.
Gear-Ratio Error History
The absolute ratio error can also be recorded:
[
E(t)=
\left|
\frac{1}{6.931}
R_{\mathrm{best}}(t)
\right|
]
This provides a more physically interpretable indication of convergence than the squared objective value alone.
Best Gear Configuration
A bar chart can display the four integer tooth numbers:
[
x_1,;x_2,;x_3,;x_4
]
for the best solution.
This plot makes the optimized gear configuration directly visible.
Target versus Obtained Gear Ratio
The optimized transmission ratio can be compared directly with the required ratio:
[
R_{\mathrm{target}}
\frac{1}{6.931}
]
and:
[
R_{\mathrm{SDOA}}
\frac{x_1x_2}{x_3x_4}
]
The difference:
[
|R_{\mathrm{target}}-R_{\mathrm{SDOA}}|
]
provides a direct engineering measure of solution accuracy.
Diver Distribution Across Depth Stages
The number or percentage of divers assigned to:
  • D1,
  • D2,
  • B1,
  • D3,
  • D4/Reset
can be recorded at every iteration.
An area plot can then illustrate how the population transitions from exploration toward exploitation and fine-tuning.
Cross-Run Convergence
Convergence histories from all independent runs can be displayed together.
This plot indicates whether SDOA consistently reaches similar high-quality gear combinations or whether substantial run-to-run variability exists.
Final Objective Distribution
The final best objective from each independent run can be presented using:
  • scatter plots,
  • boxplots,
  • mean and median statistics,
  • standard deviation.
This provides information about both accuracy and stochastic stability.
Gear Configuration Across Runs
The optimized values of:
[
x_1,;x_2,;x_3,;x_4
]
can be compared across independent runs.
Repeated convergence to the same or equivalent tooth combinations indicates strong search consistency.
Success Rate
A run can be defined as successful when:
[
|R_{\mathrm{target}}-R_{\mathrm{obtained}}|
\leq\varepsilon
]
for a predefined numerical tolerance (\varepsilon).
The success rate is:
[
SR=
\frac{N_{\mathrm{successful}}}
{N_{\mathrm{runs}}}
\times100%
]
The tolerance used to define success should be stated explicitly when reporting this metric.
Strengths of the Implementation
Discrete Search Compatibility
All four gear variables are explicitly treated as integers throughout the search process. Integer snapping after every update prevents evaluation of physically invalid fractional tooth numbers.
Exploration–Exploitation Balance
Oxygen-driven depth switching controls the transition from global investigation of different gear combinations to local refinement of promising discrete solutions.
Local-Optimum Avoidance
Lévy-style exploration, random movement, and adaptive reset mechanisms provide alternative search directions when the current tooth configuration ceases to improve.
Fine Integer Refinement
Low-intensity mutation and local search allow SDOA to test small changes in tooth counts near high-quality gear-ratio combinations.
Elite Preservation
High-quality tooth combinations are protected against loss during subsequent stochastic movements.
Adaptive Search Behaviour
Different divers can occupy different depth stages simultaneously. Consequently, global exploration and local exploitation can coexist within the same population.
Direct Engineering Interpretability
Every candidate solution corresponds directly to four integer gear tooth counts, while the fitness value quantifies the difference between the required and generated transmission ratios.
Behavioural Tracking
Depth-stage statistics, oxygen histories, convergence curves, and cross-run gear configurations provide information about how SDOA reaches the final solution rather than reporting only the final objective value.
Algorithm Characteristics
Computational Complexity
For (N) divers, (T) iterations, and four design variables, the principal computational complexity is:
[
O(N\times T\times4)
]
or, in general form:
[
O(N\times T\times D)
]
where:
[
D=4
]
for the Gear-Train Design problem.
Because the objective function itself is computationally inexpensive, most computational effort arises from population updating and repeated candidate evaluation.Memory Usage
Memory requirements are moderate and primarily include storage of:
  • diver positions,
  • objective values,
  • oxygen levels,
  • depth stages,
  • elite solutions,
  • convergence history,
  • ratio-error history,
  • cross-run statistics.
Scalability
The classical Gear-Train Design problem is low dimensional but highly discrete. Its difficulty arises primarily from identifying the most appropriate integer combination rather than from a large number of design variables.
The problem is therefore useful for evaluating whether SDOA can successfully convert its originally continuous movement mechanisms into effective discrete search behaviour through integer repair and adaptive local refinement.
Overall Assessment
The Gear-Train Design problem provides a complementary engineering test of SDOA because its optimization structure differs substantially from the continuous and mixed-variable Speed Reducer Design problem. Instead of minimizing structural weight under numerous nonlinear constraints, the Gear-Train problem requires the algorithm to identify a highly accurate combination of four integer tooth numbers that reproduces a prescribed transmission ratio.
Within SDOA, high-oxygen D1 and D2 stages search broadly among alternative gear combinations, while reduced-oxygen stages progressively concentrate the population around favourable tooth configurations. Fine-tuning and integer-compatible local modifications improve the precision of the final ratio, whereas oxygen replenishment and reset operations maintain diversity when improvement stagnates.
Accordingly, the Gear-Train implementation evaluates three important properties of SDOA: its ability to operate in a discrete integer search space, its capacity to balance broad search and precise local refinement, and its consistency in recovering very low gear-ratio errors across independent runs.

Cita come

Saman M. Almufti (2026). SDOA: for solving Gear-Train Design Problem (https://it.mathworks.com/matlabcentral/fileexchange/184452-sdoa-for-solving-gear-train-design-problem), MATLAB Central File Exchange. Recuperato .

Add the first tag.

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.0.0