**4.2 Encoding**

42 Woven Fabrics

Population Chromosome N1 N2 n1 n2 C Fitness 1 0100010000011100 52.0 22.7 70.7 70.7 0.6946 0.7531 2 0100010000111001 44.0 28.0 70.7 70.7 0.6760 0.6948 3 0100010001011110 57.3 33.3 70.7 70.7 0.6247 0.5640 4 0100010100111001 44.0 28.0 73.3 70.7 0.6835 0.7050 5 0001010101101111 60.0 36.0 73.3 70.7 0.6165 0.5359 6 0100010101001110 57.3 30.7 73.3 70.7 0.6440 0.6029 7 0100010101011111 60.0 33.3 73.3 70.7 0.6275 0.5623 8 0001010100111011 49.3 28.0 73.3 62.7 0.6381 0.6266 9 0100010010010100 30.7 44.0 70.7 62.7 0.6394 0.0000 10 0100010000011100 52.0 22.7 70.7 70.7 0.6946 0.7531 11 0100010001111111 60.0 38.7 70.7 70.7 0.5995 0.5056 12 0001010101001110 57.3 30.7 73.3 62.7 0.6103 0.5590 13 0100110001111111 60.0 38.7 92.0 62.7 0.6314 0.0000 14 0100110001011110 57.3 33.3 92.0 70.7 0.6814 0.0000 15 0100011001101110 57.3 36.0 76.0 70.7 0.6283 0.5532 16 1101011001111111 60.0 38.7 76.0 94.7 0.7036 0.0000 17 0100010001010101 33.3 33.3 70.7 94.7 0.7667 0.0000 18 0100010000011111 60.0 22.7 70.7 70.7 0.6832 0.7226 19 0100010001011010 46.7 33.3 70.7 70.7 0.6451 0.6114 20 0100010000011110 57.3 22.7 70.7 70.7 0.6867 0.7319 21 0100110000011100 52.0 22.7 92.0 70.7 0.7442 0.0000 22 1101110001101110 57.3 36.0 92.0 94.7 0.7529 0.0000 23 0100010001111111 60.0 38.7 70.7 94.7 0.6924 0.0000 24 0100010000011110 57.3 22.7 70.7 70.7 0.6867 0.7319 25 0001011000011011 49.3 22.7 76.0 70.7 0.7117 0.0000 26 0001010100111100 52.0 28.0 73.3 62.7 0.6325 0.6138 27 0100010001111001 44.0 38.7 70.7 62.7 0.6035 0.5428 28 0100010100111111 60.0 28.0 73.3 70.7 0.6538 0.6302 29 0001010101001110 57.3 30.7 73.3 70.7 0.6440 0.6029 30 0100010001111111 60.0 38.7 70.7 70.7 0.5995 0.5056 Population:30, chromosome 16 bits, generation 10, crossover rate 0.6, mutation rate 0.033, N1 840 yds/lb,

concrete works. Due to the limitations above, a fabric design could not proceed more easily and effectively. Plenty of time was wasted on repeated paper drawing of the same types of different materials' colors and patterns. Besides, the different color combinations' outlooks of warp and weft yarn for a piece of fabric could only be obtained through a designer's imagination. Now, a simulation system (Ujevic, 2002) for color matching has already been put to practical use. The user of this system can confirm color matching of yarns by changing colors or patterns of weave structure displayed on the computer monitor of a

Therefore, the application of CAD to simulated woven-fabric appearance has been a major interesting research in recent years and various hardware and software systems are now

N2 840 yds/lb, n1 ends/in, n2 picks/in

computer with the system.

Table 4. Result of the tenth generation (Lin, 2003)

Woven fabrics consist of warp and weft (filling) yarns, which are interlaced with one another according to the class of structure and the form of design desired (Hearle, 1969) (Shie, 1984) (Tsai, 1986). A concrete way of encoding textile weave is illustrated as Figure 4(B), whose weave structure is shown as. Figure 4(A). The unit of weaves was restricted to 8 by 8 for the sake of simplicity. The encoding value of '1' on the weave structure indicates 'warp float', the warp is above the weft and the encoding value of '0' indicates 'weft float', the warp is below the weft. The encoded result of a weave structure can be saved as a two-dimensional matrix and can be transformed into a bit string as a chromosome to proceed with crossover, mutation, and reproduction. After finishing the evolution, we can directly apply the obtained chromosome, i.e., bit string result ('1' denotes warp float, '0' denotes weft float) to plot the weave structure. The color of warp and weft yarn is encoded with 4 bits. There are totally 16 (= 24) kinds of color for each warp or weft yarn.

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

In this study, the fitness function (i.e., evaluation function) is the user's preference. They are completely free for an operator to give a mark to the generated pattern without any restrictions depending on his/her being satisfied with it. GA is of an evolution capability based on the fitness value of each chromosome. The bigger the fitness of a chromosome is, the more probability it has to survive (be chosen). In other words, the gene (the feature) of the chromosome, which has bigger fitness than the others, will survive (be chosen) more easily to proceed with the operators, such as crossover, mutation, and reproduction, to create a brand new chromosome. Thus, the feature of the new generated chromosome will be inherited from the old chromosome composed of the required gene (i.e., feature). Moreover, each result of the generated chromosome for every generation can be reevaluated according to user's preference after examining the displayed pattern of weave structure decoded from generated parameters of WS, Cwarp, and Cweft1~Cweft8. By judging from the status of the displayed pattern, the user gives a mark (i.e., 0~1) to each of the pattern according to the satisfaction degree of each of them to the user. Thus, the fitness function is

Fitness(patterni)=User's preference(patterni) (6)

In this study, we use this system to search pattern parameters afforded to the predetermined specifications set as in Table 5, i.e., unit weave structure: 8 ends × 8 picks, the layout of warp yarn color is adopted as one color for simplification (if necessary, it can be set as various colors), and that of weft yarn is adopted as various colors. The desired pattern style is

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 three pattern parameters mentioned above, a coding scheme for three variables (i.e., the weave structure, warp yarn color, and weft yarn color) must be determined and considered in advance. A multi-parameter coding, consisting of three sub-strings, is required to code each of the three variables into a single

In this study, a binary coding (Gen et al., 1997) (Goldberg, 1989) is utilized and the bit size of encoding for the three variables, i.e., the warp and the weft yarn color were all set as 4 bits, and the weave structure were set according to the size. For instance, the bit size of a weave structure consisting of 8 ends × 8 picks is set as 64 bits. In spite of the same weave structure, the pattern of the fabrics can be various a lot due to the different layout of the yarn color. Therefore, the layout of the warp (or weft) yarn color is a crucial factor for the woven fabric design. The searched result for the pattern of weave fabric is various with the layout of the yarn's color. For simplification, the 16-color (4 bits) layout resolution is applied in this study.

something like being of both the features of regular grid and interlacing twist.

**4.4 Fitness function** 

**4.5 Example** 

string.

the user's preference and can be formed as Equation 6.

**4.5.1 GA coding scheme and chromosome** 

Fig. 4. (A) The schematic weave for the twill weave (B) The strings of the 8-harness twill weave

#### **4.3 Chromosome**

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 (Goldberg, 1989). 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 weave pattern solutions, consisting of proper combination of the three variables, including weave structure (i.e., the combination of warp float and weft float), warp yarn color, and weft yarn color. A multi-parameter coding, consisting of three sub-strings, is required to code each of the three variables into a single string. In this study, a binary coding is utilized and the bit-sizes of the encoding for the three variables are as follows. In a direct problem representation, the weave pattern variables themselves are used as a chromosome. A list of weave structure/warp color/weft color is used as chromosome representation, which represents the permutation of patterns associated with assigned weave structure, warp color and weft color. A gene is an ordered triple (weave structure, warp color, and weft color). This representation belongs to the direct way, which is sketched in Figure 5.

Fig. 5. Representation Scheme of Chromosome
