## 4 Cable Tension Solution Based on the Genetic Algorithm for the 3 DJM  
Since the objective function of the optimization model (34) is complicated and the stiffness of the VSD relative to the cable tension does not need to be different at each point, the widely used gradient-based algorithms for nonlinear optimization problems are not suitable for this optimization model. The direct optimization methods, which do not need the gradient of the objective function, can be employed for this optimization model, such as Complex method, Nelder-Mead algorithm [35] and genetic algorithm. In this paper, a generic method based on the genetic algorithm is proposed to solve the nonlinear constrained optimization model.  
A genetic algorithm is inspired by biological evolutionary theory. It is an iterative procedure which usually operates on a population of constant size [36]. In order to apply the genetic algorithm, we revise the optimization model (34) as follows  
\[\begin{split}\text{Maximize}& f(\mathbf{T}_{s})=\frac{1 }{h(\mathbf{T}_{s})},\\ \text{Subject to}&\mathbf{\Phi}\mathbf{T}_{s}-\mathbf{w} \preceq\mathbf{0}.\end{split} \tag{35}\]  
where \(\mathbf{T}_{s}\) is taken as an individual (also called a _chromosomes_), and \(f(\mathbf{T}_{s})\) is taken as the fitness function of the individual \(\mathbf{T}_{s}\).  
The genetic algorithm is a stochastic iterative algorithm, where each iteration step is also called a _generation_. Since the genetic algorithm cannot guarantee convergence [36], the termination condition of the proposed method is commonly triggered by finding an acceptable solution for the problem or by reaching a maximum number of generations. Here, we define a parameter \(\eta\in\mathbb{R}\) to evaluate the closeness of two matrices \(\mathbf{K}_{1},\mathbf{K}_{2}\in\mathbb{R}^{3\times 3}\),  
\[\eta(\mathbf{K}_{1},\mathbf{K}_{2})=\frac{\mathbf{v}_{1}\cdot\mathbf{v}_{2}}{\|\mathbf{v}_{1}\|\|\bm {v}_{2}\|}\times 100\%, \tag{36}\]where \(v_{i}\) (\(i=1,2\)) is the vector form of \(K_{i}\) and \(\|v_{i}\|\) is the norm of \(v_{i}\). The iterative procedure of the proposed method is shown below, and it terminates when the following condition achieves  
\[1-\eta(\overline{K}_{\text{act}},\mathbf{K}_{\text{des}})\leq 0.0005. \tag{37}\]  
**Step 1:**: _Generate an initial population_  
Generate an initial population of individuals randomly or heuristically. Each individual can be represented by a binary string.
**Step 2:**: _Evaluate all individuals_  
Compute \(T_{p}\) via (29), and evaluate the fitness function \(f(T_{s})\) for the individuals of the current population. If \(\mathbf{T}_{p}\) does not satisfy \(T_{p-min}\preceq T_{p}\preceq T_{p-max}\), set the fitness value as zero.
**Step 3:**: _Check termination condition_  
Check if the current population satisfies the termination condition. Stop the iterative procedure if it satisfies, and generate a new population if not.
**Step 4:**: _Selective reproduction_  
Select the individuals of the current population (usually with a probability proportional to their relative fitness values) and produce offspring candidates.
**Step 5:**: _Crossover and mutation_  
Perform two operators, named crossover and mutation, on the above offspring candidates for producing a new population. Execute **Step 3** for the new population.  
_Crossover_ is the primary genetic operator, which swaps the substrings of two individuals, called parents, before and after a randomly selected crossover point to produce two new individuals, called offsprings.  
_Mutation_ is essentially an arbitrary modification, which flips bits randomly in a string with a certain probability called the mutation rate.  
The diagram of the proposed method is shown in Figure 3.  
Figure 3: Diagram of the proposed method for the stiffness-oriented cable tension distribution problem of the 3 DJM.