Optimization of Multi-branch Truss-Z based on evolution strategy

This paper concerns multi-branch Truss-Z networks (MTZ). A possible scenario for creating a “multibranch bridge” linking 6 terminals of pedestrian and cycling communication is presented. This process is formulated as a constrained minimization problem. New, biology-inspired nomenclature for MTZ and encoding for MTZ are introduced. Several operations for MTZs are introduced and illustrated. The functionality of these operations is illustrated with transformation from a random MTZ to a “proper” 6-branch MTZ network. A population-based heuristic experiment is presented to demonstrate that the introduced operators allow us to create any desirable MTZ. A cost function for the considered scenario is introduced. The genetic operations are interpreted and visualized. A number of feasible MTZ layouts produced by an evolution strategy-based algorithm are presented. One of these layouts is used for creation of the spatial 6-terminal MTZ, which is also visualized. © 2016 Elsevier Ltd. All rights reserved.


Introduction
A stairway is the most common means of pedestrian vertical transportation used in the built environment. Elevators and escalators are relatively expensive to install and maintain, and their traffic flow capacity is much lower than that of stairs. Moreover, it is not always possible to install an elevator or escalator due to limited space. However, most people occasionally or temporarily cannot use stairs, as when riding a bicycle, pushing a baby stroller or carrying heavy luggage. For elders and people in wheelchairs, stairs form a permanent and impassable barrier. This is an important social issue, especially since the proportion of elderly people in society is higher than in the past, and some predict that this tendency will continue [1] . A comprehensive literature review for elderly pedestrians is carried out in [2] .
Truss-Z (TZ) is a modular skeletal system for creating free-form ramps and ramp networks among any number of terminals in space. The concept has been introduced in [3] . The motivation for TZ in the context of human mobility, and in particular -the mobility problems of elders is discussed in [4] . The underlying idea of this system is to create structurally sound provisional or permanent structures using the minimal number of types of modular elements. Further discussion on modularity vs. free-form can be found in [5] .
In principle, TZ connects two points in space, called terminals. Multi-branch Truss-Z (MTZ) is a system of connected TZ paths linking more than two terminals. Constructing an efficient MTZ layout can be formally expressed as a constrained discrete multi-criterial optimization problem. Usually, it is specifically a minimization, where: the number of modules and junction points, network distance, etc. are to be minimal. Common constraints are: the locations of terminals, positions and shapes of obstacles in the given environment, maximal allowable unsupported spans, etc. MTZ has been already introduced together with TZ in [3] . The pioneering methods laconically outlined there, were derived directly from single TZ path mathematical modeling. This paper presents new and "organic" formulation of MTZ. It allows for incomparably more efficient work, including MTZ optimization. The novel approach is particularly suited for evolutionary computation.
This paper is organized as follows: after general introduction, the concept of single path TZ is explained. Its purposefulness is illustrated with basic ramp configurations and proposed solution for a real-life retrofitting case. Second section also briefly reports the fabrication of reduction scale models of TZ. Third section describes a possible scenario where six terminals at different elevations are to be connected by a system of pedestrian ramps. Fourth section introduces nature-inspired nomenclature for MTZ and its novel encoding. Fifth section introduces transformation operators and illustrates them with transformation of one arbitrary MTZ to another. Sixth section shows that these transformations allow for effective exploration of the solution space. Finally, seventh section presents an application of evolution strategy-based algorithm which produces satisfactory solutions for the problem defined in the third section.

The concept of Truss-Z
This section briefly describes the fundamental properties and specific issues of TZ.

The modularity of Truss-Z
The TZ structures are composed of four variations of a single basic unit (R), as shown in Fig. 1.
Unit L is a mirror reflection of unit R. By rotation, they can be assembled in two additional ways (R 2 -rotated R and L 2 -rotated L), effectively giving four types of units. Some examples are shown in Fig. 2. Fig. 3 shows an example from the case study of retrofitting an existing concrete overpass system comprised of two bridges connected with three stairways, presented in [6] .
Structural rigidity of the TZ module has been demonstrated in [5] , along with other topological properties such as nullity, degree of static indeterminacy (DSI = 0), etc. Due to the modularity of this system, it is natural to apply discrete optimization methods for creating TZ linkages and networks. Such structures can be optimized for various criteria: the minimal number of modules, the minimal number of changes in direction, and, in a case of multiple branches, the minimal network distance, etc. Various deterministic and meta-heuristic methods have been successfully implemented for single TZ paths. E.g: backtracking [7] , evolution strategy [8] , and evolutionary algorithm [9] . These methods produced usually good, but not ideal , solutions. A graph-theoretical exhaustive search method, which produces the best allowable, that is ideal solutions has been described in [6] .

Physical models of TZ
Several case studies of retrofitting with TZ and reduced scale models have been built, as shown in Figs. 4 and 5.
Although 3D-printing is a common "effortless" method for rapid prototyping, the assembly models are much closer to reality, as they use elements which to a certain extent correspond to the actual truss members, as shown in Fig. 5.    As Fig. 5 indicates, TZ supports "meandering" ramps. It is an advantageous safety feature as the length of straight sections can be reduced. Furthermore, the concept of foldable Truss-Z module and the proof-of-concept prototype scale model has been presented in [10] . However, a multi-branch TZ network (MTZ) is a qualitatively more difficult problem. This paper introduces new encoding and operators for efficient optimization of MTZ in realistic situations. Although TZ is a spatial system, for simplicity, in this paper the problem is reduced to the projection on the 2D plane, in other words, to the layout of MTZ. Thus modules R&L 2 and L&R 2 correspond to trapezoidal units 0 and 1, respectively.

Possible scenario for a "multi-branch bridge"
The following scenario illustrates a possible application of the concept of a multi-branch Truss-Z network (MTZ): -There is a canal with walking and cycling paths on both sides. -The canal is depressed and another, approximately perpendicular walking/cycling path is elevated. -Create a layout of a network linking 6 elements of pedestrian and cycling communication (terminals).
The situation is shown in Fig. 6. The concept of MTZ has been considered in the past [ 3 , 5 ]. An example of a manually created layout of a 6-branch Truss-Z (MTZ 6 ) has been presented in [11] . However, the original encoding has not been suited for genetic operations, the defined genetic operations have not covered all possible transformations, and as a result, the population-based heuristics could not produce satisfactory results. This paper presents: the new encoding, a systematical study of the genetic operations (in particular -mutations), a new and wellconverging algorithm based on evolution strategy, and a realistic case-study of retrofitting a traffic junction with a 6-branch MTZ network.

The new nomenclature and encoding
According to [12] , in computer science, specifically in evolutionary algorithms, "object forming possible solutions within the original problem context are referred to as phenotypes, their encoding, are called genotypes". Usually genotypes are in the form of a bit string, array, tree, list or matrix. The genotype encoding for MTZ introduced in [11] had the form of a nested list. Such an encoding although straightforward, is not very concise or suitable for genetic operations. Fig. 7 illustrates the new, nature-inspired naming for the MTZ phenotype components and the new genotype encoding in the form of a relatively simple list of lists.
As Fig. 7 indicates, MTZ has hierarchical structure, defined as follows: I The main structure is composed of stems. II Each stem ends with a bud with three branching faces ( BF s) . III Stems must not form closed loops. IV A stem must have at least one unit (in such a case -that unit is the bud ). V Twigs do not have buds . VI The first stem is rooted to the first terminal. It is the only stem connected directly to a terminal. VII All the terminals except the first one are connected by twigs .
A genotype of an i th MTZ is defined as a list of branches in a form of two sub-lists of stems and twigs: where S i and T i are the lists of n stems and m twigs of the genotype G i , respectively.
A j th stem from the list of stems S i is defined as follows: where j, p j , f j , and u j are: the index of a j th stem, the index of the parent , that is the stem to which the j th stem is attached, the face of the parent stem's bud and the list of units u forming the j th stem, respectively. u ∈ (1,0), where 1 and 0 stand for a "right turning" and "left turning" trapezoid along the path of a branch. A bud is composed of the last trapezoidal unit in a stem and its mirror reflection along the longer base of the trapezoid. In the case of the first stem, p 1 , and f 1 are virtual (since it is not connected to a parent stem). A k th twig from the list of twigs T i is defined as follows: where p k , f k , and u k are: the parent that is the stem to which the k th twig is attached, the face of the parent stem's bud and the list of units forming the k th twig, respectively. The list of units in a twig and stem are analogous. Two MTZs presented in [11] are shown among others in Fig. 8 with the new genotype encoding. Sub-Figs. 8.1 and 8.7 show: the example of a complex network (MTZ C ) and an efficient six-terminal network (MTZ 6 ) with relatively few units and simple paths, respectively.

The creation/transformation algorithm
The creation of any MTZ or transformation of any MTZ A to any other MTZ B can be executed in a few steps presented in Table 1.
The operators listed in the right column of Table 1 are defined and explained in the subsection below.

Transformation operators
The following 7 operators suffice to "manually" construct a genotype of any MTZ or transform one MTZ to another: Adding a stem A single stem can be added to a MTZ h : where G h is the genotype of MTZ h , s i , and BF i are: the index and bud face of the i th stem to which a new stem is to be added, respectively. u i is the sequence of trapezoidal units in the added stem. The new stem is assigned an index: If there was an "old" branch b x (stem or twig) at BF i , then the "old" branch parent's index ( p x ) is replaced by s m , in other words the new stem is placed between the "old" branch and its parent's bud face.

Adding twigs
Adding twigs is similar to adding stems. However, twigs are not indexed and it is possible to add multiple twigs at the same time: where p k and BF k are: the index of the parent (the stem to which the k th twig to be connected) and that parent's bud face, respectively; u k is the sequence of trapezoidal units of the k th twig.
Removing branches Removing branches (stems or twigs) from MTZ t is defined as follows: where p k and BF k are: the index of the parent and the parent's BF from which the k th branch is to be removed. For an illustrative example of this operation see sub-Figs. 1 and 2 of Fig. 8.

Displacing branches
Multiple branches can be displaced among bud faces: where p i and BF i , describe the original location of the i th branch, namely: the index of the branch's parent and BF to which the i th branch is attached, respectively; p j and BF j describe the new location for the i th branch, namely: the index of the j th stem and its BF , respectively.

Adding units at branches
Several units at multiple locations (loci) can be added to multiple branches: where p j and BF j are: the parent stem and the bud face to which the j th branch is attached, respectively. v j k and l j k are the value and where p j and BF j are: the parent stem and the bud face to which the j th branch is attached, respectively; l j k is the locus of the k th unit to be removed from the j th branch.

Inverting units at branches
Several units at multiple loci can be inverted at multiple branches: where p j and BF j are: the parent stem and bud face to which the j th branch is attached, respectively; l j k is the locus of the k th unit at the j th branch whose value is to be inverted. For an example of inverting units at stems and twigs see sub-Figs. 6 and 7 of Fig. 8 , respectively. The operators defined above suffice to create any MTZ or, equivalently, to transform any MTZ to any other. The section below illustrates the latter. Fig. 8 shows a transformation from MTZ C to MTZ 6 . Although most of the operators transform branches in general, here, for clarity, the operations on stems and twigs are shown separately.

Transformation of MTZ C to the MTZ 6
Although it is possible to manually create any MTZ, even for small cases it is quite challenging. This is due to the fact that creating even a single TZ path, and thus obviously a multi-branch TZ network are NP-hard problems. The number of possible configurations for a layout of a single planar TZ path grows exponentially: Table 1 The sequence of steps for creating any MTZ or transforming one to another.
where s is the number of segments of a MTZ, u i is the number of units in the i th segment. The notion of segment is explained in Fig. 9. Therefore the number of all possible "siblings" of MTZ 6, that is networks of similar general structure (4 segments of 23, 10, 21, and 10 units) equals: 23 × 2 23 × 10 × 2 10 × 21 × 2 21 × 10 × 2 10 = 890,977,738,760,171,343,052,800, which is almost a septillion (10 24 ). Meaningful exploration of such an enormous discrete solution space requires a search algorithm. The next subsection describes such a method formulated as a quasi-optimization problem.

A quasi-optimization of MTZ
In order to examine whether the transformations described above are effective for practical MTZ applications and also to select the most efficient parameters for the algorithm, a simple population-based experiment has been carried out. In principle, in mathematical optimization the ideal solution is not known. In this experiment, however, the ideal solution is explicitly given -it is MTZ 6 . Therefore it is called a quasi-optimization. Nonetheless it also requires a few additional functions and operators inherent to population-based algorithms.
Random MTZ generator A random MTZ genotype is generated by: where s, t and u are the numbers of: stems, twigs and units in all branches, respectively. Fix genotype (fix MTZ general structure) Any genotype G k can be modified to have the desired number of stems and twigs: where G k , s, t , and l are: a genotype to be modified, the desired number of stems, the desired number of twigs, and the number of randomly generated units in any additional branches (if applicable), respectively.
Tabulate genotype A genotype G i of MTZ i relatively concisely, encodes the hierarchy of the elements into a nested list (list of lists). On the other hand, the tabulation transcribes G i into a less concise, however, more "structured" rectangular matrix T [ G i ], in respect of the buds , as illustrated in Fig. 10.

Compare genotypes
The difference between two individuals MTZ j and MTZ k is measured by comparing their tabulated genotypes: where T * [ G j ] and T * [ G k ] are "standardized" tabulated genotypes G j and G k , respectively. Standardization here means that the structures of T [ G j ] and T [ G k ] have been made equivalent, so if they had different dimensions, blank elements have been added. The difference is the total of differences between the bit strings  of the respective branches of MTZ j and MTZ k . The differences among respective stems and twigs are calculated independently and summed up, as illustrated in Fig. 11.

Evolution strategy-based experiment (ES * )
This subsection describes a simple experiment based on the principles of the first mutation-selection scheme of the classic meta-heuristic method -evolution strategy (ES) [13] . ES like other evolutionary algorithms, operates on populations of candidate solutions stochastically with bias towards the individuals considered as relatively good. Unlike other EA methods, however, ES does not employ crossover, and is limited to intensive mutation. The general procedure is based on repetition of three simple steps: 1. Evaluation of each individual in a population, 2. Random selection with a preference for good individuals for the next generation, 3. Mutation of the selected individuals, 4. Go to 1 until the stopping criterion is met.
In this experiment the selection of a genotype G x is based on the comparison with the known ideal ( G 6 ), that is, C [ G 6, G x ]. It is a minimization, since the lower this value C [ G 6, G x ], the better. Since this is a quasi-optimization based on evolution strategy, it is denoted as ES * . In this experiment, the "multi-mutation" involves four functions directly derived from the transformation operators introduced in Section 5.1 "Transformation operators".

Displace-branch mutation
MdB g k, m i (17) where g k and m i are: the genotype of the k th MTZ, and the mutation intensity, respectively; m i is normalized, so 0 and 1 yield: "displacement of none", and "displacement of all branches", respectively.

Add-unit mutation
MaU g k, m i (18) Here m i is normalized, so that 0 and 1, "does not add any units", and "doubles the units", respectively. The values of the added units are random integers, 0 or 1. The loci for added units are randomly distributed among all branches.

Remove-unit mutation
MrU g k, m i (19) As mentioned in Section 3 , each stem must have at least one unit. There is no such constraint for the twigs. Here m i is normalized , so that 0 and 1, "does not remove any units", and "removes all the units except one randomly selected unit per stem", respectively. The loci of removed units are randomly distributed among all branches.

MiU g k, m i (20)
Here m i is normalized, so that 0 and 1: "does not change value of any unit", and "inverts the values of all units" (equivalent to mirror reflection of entire MTZ), respectively. The loci of units for the inversions are randomly distributed among all branches.
Finally, the actual "multi-mutation" is defined as follows: where, G x and m i are the x th genotype, and mutation intensity, respectively. M randomly selects the mutation type according to w dB , w aU , w rU, w iU which are the weights for respective mutations: MdB, MaU, MrU , and MiU . The experiment has been set up as follows: • The initial population of 200 MTZs has been generated using the rTZ operator with the following parameters: • Number of stems: random integer ( i ) from the range [2, 5];  • All experiments start from the same initial population P i . • Each genotype G x in the population is evaluated according to C [ G 6, G x ], that is compared to the genotype of MTZ 6 and assigned a numerical value ( ε). Since it is a minimization problem, the goal is ε = 0.
• 10% of the best genotypes are selected. • 10 copies of each selected genotype are subject to mutation. • The stopping criterion: the process is repeated for 100 iterations (generations). • 10 trials for each experiment.
The experiment has been performed for several mutation intensities ( m i ). Fig. 12 shows selected examples.
As Fig. 12 indicates, the convergence of this ES * is sensitive to the mutation intensity. Moreover, it should be kept relatively low, that is between 0 and 0.2. In fact, it is a more efficient strategy to randomly draw the m i value from the given range [0, m i MAX ]. Fig. 13 compares selected convergences in detail.   16. The relative error of the "red" genotype to the best individual in the population at each, but last generation. The best and worse ranks are shown in green and red, respectively.
As Fig. 13 indicates, ES * @ m i MAX from the range [0.1, 0.15] produces the best results. Therefore value 0.12 has been assumed for the subsequent simulations.
In the next experiment one of four mutations has been excluded and the results have been compared in Fig. 14.
As Fig. 14 indicates, the mutations are not only sufficient, but all four are necessary for ES * to reach the goal.

Inside the "black box"
An additional trial has been performed with the same settings as described above, starting from the same initial population with Fig. 17. The MTZ optimization problem: each twig tip ( tT ) must come as close as possible to the respective terminal, the total number of units ( n ) is to be minimal, and the MTZ must not intersect with itself. The initial terminal ( Ts ), the remaining terminals, and the twig tips ( tTs ) with corresponding reaching errors ( r E ) are shown in: green, by black dots, red dots and blue arrows, respectively. m i = 0.12, the only difference was the stopping criterion, so the procedure stopped after finding the ideal. In this case it was the 50th generation. In this experiment, however, all information about the intermediate steps (generations) has been stored. At each generation, full population, that is 200 individuals have been recorded, including the mutation type and intensity applied to each individual. Moreover, each offspring received a sequential number, which allowed to identify the relationships among the individuals. Fig. 15 shows the tree-graph of the algorithm. Table 2 All successful mutations of the "red" genotype. For each mutation the number of generation ( g ), error ( ε), relative error to the best individual in the population ( δ), and the number of units ( n ) are shown in the top left corner.  Fig. 15 shows the "successful" individuals, that is the best 10% of each population, which have been selected for the subsequent generation. In this trial, 10,0 0 0 (20 0 individuals × 50 generations) genetic operations have been evoked. This number is incomparably smaller than the total number of all possibilities mentioned in Section 4.2 "Transformation of a MTZ to the MTZ 6 ", that is ∼ 8.9 × 10 23 . In other words, the ideal solution has been found by exploring merely ∼1.1 * 10 −20 of the solution space. Table 2 collects all the intermediate mutations of the successful genotype (referred to as "red" in Fig. 15 ).
Approximately half of the times the "red" genotype was the best in a population, as illustrated in the Fig. 16.

Optimization with evolution strategy (ES)
The previous experiment was somewhat unrealistic since the ideal solution was explicitly known. Nonetheless it helped benchmarking and served to understand the general dynamics of the algorithm and to select the most efficient parameters. It was also particularly practical, as it did not employ an objective function which is usually computationally expensive. Thus the simulations were very quick, namely one trial took less than a minute. The following experiment is an optimization in the full sense, and therefore will be denoted as ES (without the asterisk) The known solution (MTZ 6 ) is not considered as the ideal anymore, but is still assumed to be very good and will be used for comparison. Thus an objective function must be formulated. The problem is defined as follows: 1. There are 6 terminals (T) to be communicated by MTZ 2. The first terminal (T S ) and the initial direction of MTZ are given. 3. MTZ is to have as few modules as possible. 4. The modules must not collide with each other.
The problem is formulated as minimization, namely: the summation of the distances between each terminal and respective twig tip ( tT ), called the reaching error ( r E ) is to be minimal and the number of units in MTZ ( n ) is also to be minimal, as illustrated in Fig.  17 . The objective function in minimization is usually called the cost function.

The cost function
The cost function (CF) should consistently give lower values for better candidates. For practical reasons, so that the optimization can be performed in realistic time, CF should also be as computationally inexpensive as possible. Constructing such a function for a constrained problem is usually difficult [14] , especially when unacceptable solutions are common in the solution space as shown in Table 2 . Moreover, since the solution space has such infeasible areas (corresponding to unacceptable solutions), in order to reach very good solutions it is often necessary to traverse through the unacceptable ones [15] . In other words, the infeasible solutions should not be excluded, but "penalized" by adding to CF a penalty term proportional to the constraint violation [ 16 , 17 , 18 , 19 ]. In this  experiment, however, the self-intersection prohibition can be ignored altogether. It is intuitive to assume that the best MTZs, that is comprised of the smallest number of units will not self-intersect.
where n is the total number of units in MTZ, ε i is the distance between the i th terminal and corresponding tT; w is a parametric weight.
Since MTZ 6 is comprised of 64 units and its respective tT s reach exactly the 5 terminals ( r E = 0), the corresponding cost function CF MTZ6 equals 64. Therefore, the best MTZs should have similar CF s. In order to promote the MTZ configurations that "reach out for the terminals", the weight w must be greater than 1, otherwise such solutions "do not have motivation to grow towards the terminals" and quickly "get stuck" in local minima. Interestingly, all experiments produced MTZs with fewer units than MTZ 6 (although with higher r E ). Fig. 19 shows the best results in selected trials.

The results
As Figs. 18 and 19 indicate, whether w is set to 3 or 4 the algorithm produces equally competitive results. Moreover, Fig. 20 shows selected ("milestone" ) generations of the 2nd trial of the experiment with w = 4, and confirms that the assumption that such simple CF will suffice was correct.
As Fig. 20 indicates, the best individual in the first generation was infeasible due to constraint violation, that is self-intersections. However, it soon, that is to say already in the next generation, evolved into feasible offspring, finally producing a satisfactory solution.

The "multi-branch bridge" based on the result of ES
The solution produced by ES with w = 3 in the 2nd trial (ES w3t2 for short) has been used as a layout of a TZ network (MTZ w3t2 for short) for the problem formulated in Section 3 : "Possible scenario: a "multi-branch bridge" (see Fig. 6 ). Figs. 21 and 22 show the plan & front views, and perspective view of MTZ w3t2 , respectively.

Conclusions and future work
The new encoding for multi-branch Truss-Z (MTZ) introduced here is substantially more efficient than the previous encoding presented in [11] . It is not only more intuitive, but also more suitable for "genetic operations" and therefore -better suited for metaheuristic optimization methods. The genetic operators for MTZ introduced in this paper are efficient as demonstrated in numerous examples and the minimization experiments show good convergence. A 6-branch MTZ for linking 3 pedestrian/cycling paths has been presented. Although the structural considerations are not part of this paper, this modular 6-branch bridge can be considered relatively realistic.
Primary experiments with crossover showed no benefit to the optimization algorithm, therefore have not been presented here. This was most likely due to the "harshness" of the procedure, which produces feasible individuals, but hardly resembling the parents. This phenomenon was also noticeable while calibrating the mutation intensity which also was relatively low ( ≤ 0.12). Nevertheless, elaboration of crossover is a natural direction for the future research. This paper presents a constrained optimization problem, however, the formal definition of the actual constraints was not necessary. Moreover, the problem of MTZ optimization has been simplified to the MTZ layout optimization. Therefore, a realistic three-dimensional case study where constraints are explicitly formulated is under consideration. Finally, the problem of intermediate supports has not been addressed sufficiently yet. However, this will be part of the design of the TZ prototype in the future.