**3.2 Genetic operators**

36 Woven Fabrics

There are two search mechanisms included in the system; one is developed for the search of weave structure pattern, the other is for that of weaving parameters. The search mechanism is based on genetic algorithm (GA), which is an optimization technique inspired by biological evolution (Karr, 1999). Base on the natural evolution concept, GA is computationally simple and powerful in its search for improvement and is able to rapidly converge by continuously identifying solutions that are globally optimal with a large search space. By using the random selection mechanism, the GA has been proven to be

The user interface allows the user to set the basic parameters, e.g., population size, crossover rate, mutation rate, and the number of maximum generations, for GA to run. Besides, the user interface is of a function to display the searched results of the weave structure and the

Recent application of computer technology in the textile field (Inui et al., 1994) (Liu et al., 1995) (Ohra et al., 1994) (Hu, 2009) (Zhang et al., 2010) (Penava et al.,2009) , e.g., simulation systems for color matching, computer aided design (CAD) systems for static and dynamic states, and semantic color-generating systems for garment design. In this study, we propose an intelligent searching system theory based on a genetic algorithm to search for weaving parameters. There are five weaving parameters, i.e., warp yarn count, weft yarn count, warp yarn density, weft yarn density, and total yarn weight, which are all correlated to one another in weaving. If two or more than two parameters are unknown among them, there

Let's suppose there is a weaving mill that develops a fabric whose total weight consumption is preset as 5.6 × 10-7 (lb) per square inch. For simplification, the shrinkage of the fabric during weaving is neglected. There exist many combinations of weaving parameters (i.e., both yarn count and weaving density of the warp and weft), that can be used for preset weight consumptions of the material yarns. For instance, samples A, B, and C, shown in Table 1, all answer these demands. The areas of these three fabric pieces are similar- 1 square inch- but they have different yarn counts and weaving densities. Now the question is how a designer can easily and immediately obtain a lot of available combination sets of these four weaving parameters. In other words, it's difficult for a designer to acquire all the possible combination sets of weaving parameters simply through common sense. In addition, in order to speed up the production rate, the weft yarn count used in weaving is usually smaller than the warp yarn count. Thus the weaving density of the warp yarns is usually larger than that of weft yarns during implementation. Sample D's weaving density of warp yarn is smaller than that of its weft yarn. Sample E's warp yarn count is smaller than its weft yarn count. Sample F's weaving density of warp yarn is smaller than its weft yarn, and its warp yarn count is smaller than its weft yarn count. Therefore, Samples D-F

shown in Table 1 are not available for practical use in weaving engineering.

theoretically robust and empirically applicable for search in complex space.

weaving parameters, on the monitor for the user to refer.

**3. Search module for weaving parameters** 

**3.1 Weaving parameters in production** 

will be many available combinations.

**2.1 Search mechanism** 

**2.2 User interface** 

A genetic algorithm (GA) (Gen et al., 1997) (Goldberg, 1989) (Karr et al., 1999) is a search method based on the mechanism of genetic inheritance. A genetic algorithm maintains a set of trial solutions, called a population, and operates in cycles called generations. Each individual in the population is called a chromosome, representing a solution to the problem at hand. A chromosome is a string of symbols, usually, but not necessarily, a binary bit string.

We adopted a search method, genetic algorithm (GA), to the combination sets. A genetic algorithm maintains a set of trial solutions, called a population, and operates in cycles called generations. Each individual in the population is called a chromosome, representing a solution to the problem at hand. A chromosome is a string of symbols, usually, but not necessarily, a binary bit string.

During each generation, three steps are executed.


The genetic algorithm is shown in Figure 2 and a brief discussion on the three basic operators of GA is made as below.

a. Crossover

Crossover is the main genetic operator. It operates on two chromosomes at a time and generates offspring by combining both chromosomes' features. A simple way to achieve crossover would be to choose a random cut-point and generate the offspring by combing the segment of one parent to the left of the cut-point with the segment of the other parent to the right of the cut-point. This method of genetic algorithms depends to a great extend on the performance of the crossover operator used.

b. Mutation

Mutation is a background operator, which produces spontaneous random changes in various chromosomes. A simple way to achieve mutation would be to alter one or more

An Integration of Design and Production for Woven Fabrics Using Genetic Algorithm 39

The domain of variable xi is [pi,qi] and the required precision is dependent on the size of encoded-bit. The precision requirement implies that the range of domain of each variable should be divided into at least (qi-pi)/(2n-1) size ranges. The required bits (denoted with n) for a variable is calculated as follows and the mapping from a binary string to a real number

After finding an appropriate ki to put into Equation 1 to have a xi, which can make fitness function to come out with a fitness value approaching to '1', the desired parameters can thus

Combine all of the parameters as a string to be an index vector, i.e. X=(x1,x2,....,xm), and unite all of the encoder of each searching index as a bit string to construct a chromosome shown

 P=b11...b1jb21...b2j........bi1...bij bij {0,1} ; i=1,2,...,m; j=1,2,...,n; (2) Suppose that each xi was encoded by n bits and there was m parameters then the length of Equation 2 should be a N-bit (N=m×n) string. During each generation, all the searching

 ki=bi1\*2n-1+ bi2\*2n-2+...+ bin\*2n-n i=1,2,...,m; (3) Finally the real number for variable xi can thus be obtained from Equations 1-3. The flow

xi=pi+ki(qi-pi)/(2n-1) (1)

**3.4 Encoding and decoding of chromosome** 

be obtained.

as below.

**3.5 Object function** 

is maximized.

for variable xi is straight forward and completed as follows.

where ki is an integer between 0~2n and is called a searching index.

index kis of the generated chromosome can be obtained by Equation 3.

chart for the encoding and decoding of the parameter is illustrated in Figure 3.

Fig. 3. Flow chart for encoding and decoding of the parameter with 4-bit precision

The fitness of the GA used in the system is shown in Equation 4. This approach will allow the GA to find the minimum difference between W and Wg when the fitness function value

genes. In genetic algorithms, mutation serves the crucial role of preventing system from being struck to the local optimum.

c. Reproduction

Each set is evaluated by a certain evaluation function. According to the value of evaluation function, the number which survives into the next generation is decided for each set of strings. The system then generates sets of strings for the next generation.

#### **3.3 Chromosome representation**

A main difference between genetic algorithms and more traditional optimization search algorithms is that genetic algorithms work with a coding of the parameter set and not the parameters themselves. Thus, before any type of genetic search can be performed, a coding scheme must be determined to represent the parameters in the problem in hand. In finding solutions, consisting of proper combination of the four weaving parameters, i.e., warp yarn count (N1), weft yarn count (N2), weaving density of warp yarn (n1), and weaving density of weft yarn (n2), a coding scheme for three parameters must be determined and considered in advance. A multi-parameter coding, consisting of four sub-strings, is required to code each of the four variables into a single string. In a direct problem representation, the transportation variables themselves are used as a chromosome. A list of warp yarn count/weft yarn count/weaving density of warp yarn/weaving density of weft yarn was used as chromosome representation. The structure of a chromosome is illustrated in Table 2.


Table 2. Structure of a chromosome (Lin, 2003)

Fig. 2. Flow chart of genetic algorithm
