**4.5.1 GA coding scheme and 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. 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 string.

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.

Parameters

Layout of color yarns

Equation 6.

obtained.

Weave structure (8warp×8weft)

(WS)

Warp color (Cwarp) 8 ends (same)

Weft color (Cweft1) 8 picks (different)

Table 6. Layout of chromosome (Lin, 2008)

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

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 one composed of the required gene (i.e., feature). Moreover, each result for every generation can be reevaluated by examining the pattern display 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 the mark to each of the pattern according to the satisfaction degree for each of them to him/her. In this study, the object function (i.e., fitness function) is the user's preference shown as

The simulation mechanism of the system can illustrate patterns on the monitor to help a designer give each a weighting value (i.e., fitness value). The user interface of the system is developed for helping a designer give each generated chromosome a specific weighting value (i.e., fitness value) ranging from '0' (denotes completely unsatisfied) to '1' (denotes completely satisfied) depending on the degree of his preference through comparing displayed pattern on the screen. Once each generated pattern is given a mark according to the user's preference, search mechanism of system can thus proceed with the operations

Next the user can continue with the evolution of GA to search for the genuine design fabric pattern, with which he/she is satisfied. The user expects a satisfying pattern can finally be obtained. For an instance, eight weave structure patterns are illustrated on the monitor as shown in Figure 6A, the designer can give each of them a fitness value (i.e., weighting value of satisfaction) such as 0.8, 0.2, 0.8, 0.4, 1.0, 0.2, 0.4, and 0.6. After proceeding with several generations of evolution (rate of crossover: 0.6; probability of mutation: 0.033; Initial population:8), there comes up with a satisfying solution for this design case. Figure 6B shows the result of weave pattern after one generation. The designer can obtain a satisfying pattern among the obtained patterns listed on Figure 6B. In case none of them is satisfying, the designer can continue proceeding with the procedure illustrated as Figure 2 for another several generations till there is one can be

such as crossover, mutation, and reproduction to produce the next generation.

of layout Chromosome

Sequence

1~64

Gene size (bits)

1 bit× 64 float

4 bits× 1 end 65~68

4 bits×

8 picks 69~100


Table 5. Set target, known conditions, and constrained condition (Lin, 2008)

If necessary, it is available for the system to adopt more than 16 colors (4 bits) layout resolution. The coding and decoding methods for the color resolution are briefly discussed as follows. For instance, in case of the searching range of yarn's color ranges between 0 and 15 (i.e., 16 colors), 4 bits are needed for encoding. Thus Equation 1 can be reformed as follows.

$$\begin{array}{ll}k=0 & \mathbf{x}=\mathbf{0}+\mathbf{0}\*\left(15-\mathbf{0}\right)/15=\mathbf{0}\\k=1 & \mathbf{x}=\mathbf{0}+\mathbf{1}\*\left(15-\mathbf{0}\right)/15=\mathbf{1}\\k=2 & \mathbf{x}=\mathbf{0}+2\*\left(15-\mathbf{0}\right)/15=\mathbf{2}\\\cdots& \cdots & \cdots & \cdots \cdots \cdots \cdots \cdots \cdots \cdots\\k=15 & \mathbf{x}=\mathbf{0}+15\*\left(15-\mathbf{0}\right)/15=\mathbf{15}\end{array} \tag{7}$$

The chromosome of weave pattern consists of 3 parts, i.e., (1) the gene of weave pattern (1~64 bits) (2) the gene of the layout of the color of warp yarn (65~68 bits) (3) the genes of layout of the color of weft yarn (69~100 bits). For simplification, colors for all the warp yarns are set as the same in this study, the bit size is set to 4 bits. On the other hand, the colors for all the weft yarn (i.e., 8 picks) were set various to one another. Therefore, the size of the first sub-bit-string, representing the weave structure, is 64 bits, that of the second sub-bit-string, representing the color of warp yarn, is 4 bits, and that of the third sub-bit-string, representing all the different weft yarn colors, is 32 bits (=8 picks × 4 bits). Therefore, a chromosome string consisting of 100 bits can be formed and its layout can be shown as Table 6. Besides, if necessary, it is available for the system to set the colors of the warps (8 ends) to be various to one another. In other words, the second sub-bit-string (i.e., the second gene), representing the colors of the warps can be increased as 32 bits (= 8 ends × 4 bits), and the number of bits for the chromosome is reformed as 128 bits as well.

#### **4.5.2 Fitness function and solution search**

GA is of an evolution capability based on the fitness value of each chromosome. The bigger the fitness is, the bigger probability to survive (be chosen) is. In other words, the gene (the


Table 6. Layout of chromosome (Lin, 2008)

46 Woven Fabrics

is of both the features of "regular grid" and "interlacing twist".

successively in a column for an unit weave

(2)There is none of "0" successively in a column for an unit weave

(3) There is none of "1" successively in a row for an unit weave structure (4) There is none of "0" successively in a row for an unit weave structure

(7)

structure

structure

 

Example Known condition and set target Constrained conditions (1) Unit weave structure 8 ends × 8 picks (1)There is none of "1"

> Warp Same color Weft Different colors

(3) Desired pattern The desired pattern style

Table 5. Set target, known conditions, and constrained condition (Lin, 2008)

*k x k x k x*

*k x*

the number of bits for the chromosome is reformed as 128 bits as well.

**4.5.2 Fitness function and solution search** 

If necessary, it is available for the system to adopt more than 16 colors (4 bits) layout resolution. The coding and decoding methods for the color resolution are briefly discussed as follows. For instance, in case of the searching range of yarn's color ranges between 0 and 15 (i.e., 16 colors), 4 bits are needed for encoding. Thus Equation 1 can be reformed as follows.

> 0 0 0 \* (15 0) /15 0 1 0 1 \* (15 0) /15 1 2 0 2 \* (15 0) /15 2 ........................................................ 15 0 15 \* (15 0) /15 15

 

The chromosome of weave pattern consists of 3 parts, i.e., (1) the gene of weave pattern (1~64 bits) (2) the gene of the layout of the color of warp yarn (65~68 bits) (3) the genes of layout of the color of weft yarn (69~100 bits). For simplification, colors for all the warp yarns are set as the same in this study, the bit size is set to 4 bits. On the other hand, the colors for all the weft yarn (i.e., 8 picks) were set various to one another. Therefore, the size of the first sub-bit-string, representing the weave structure, is 64 bits, that of the second sub-bit-string, representing the color of warp yarn, is 4 bits, and that of the third sub-bit-string, representing all the different weft yarn colors, is 32 bits (=8 picks × 4 bits). Therefore, a chromosome string consisting of 100 bits can be formed and its layout can be shown as Table 6. Besides, if necessary, it is available for the system to set the colors of the warps (8 ends) to be various to one another. In other words, the second sub-bit-string (i.e., the second gene), representing the colors of the warps can be increased as 32 bits (= 8 ends × 4 bits), and

GA is of an evolution capability based on the fitness value of each chromosome. The bigger the fitness is, the bigger probability to survive (be chosen) is. In other words, the gene (the

(2) Layout of color yarn

Searching for

pattern

parameters

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 one composed of the required gene (i.e., feature). Moreover, each result for every generation can be reevaluated by examining the pattern display 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 the mark to each of the pattern according to the satisfaction degree for each of them to him/her. In this study, the object function (i.e., fitness function) is the user's preference shown as Equation 6.

The simulation mechanism of the system can illustrate patterns on the monitor to help a designer give each a weighting value (i.e., fitness value). The user interface of the system is developed for helping a designer give each generated chromosome a specific weighting value (i.e., fitness value) ranging from '0' (denotes completely unsatisfied) to '1' (denotes completely satisfied) depending on the degree of his preference through comparing displayed pattern on the screen. Once each generated pattern is given a mark according to the user's preference, search mechanism of system can thus proceed with the operations such as crossover, mutation, and reproduction to produce the next generation.

Next the user can continue with the evolution of GA to search for the genuine design fabric pattern, with which he/she is satisfied. The user expects a satisfying pattern can finally be obtained. For an instance, eight weave structure patterns are illustrated on the monitor as shown in Figure 6A, the designer can give each of them a fitness value (i.e., weighting value of satisfaction) such as 0.8, 0.2, 0.8, 0.4, 1.0, 0.2, 0.4, and 0.6. After proceeding with several generations of evolution (rate of crossover: 0.6; probability of mutation: 0.033; Initial population:8), there comes up with a satisfying solution for this design case. Figure 6B shows the result of weave pattern after one generation. The designer can obtain a satisfying pattern among the obtained patterns listed on Figure 6B. In case none of them is satisfying, the designer can continue proceeding with the procedure illustrated as Figure 2 for another several generations till there is one can be obtained.

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

(a)) of survey results after one generation is shown as in Table 7. In this instance, if the user is not yet satisfied with the searched result illustrated on the monitor, he/she can just proceed the next generation by giving each pattern another weighting value of preference to search for another combination of bit strings. He/She expects that there exists a chromosome with a much better pattern for his/her referring to during design stage by following the processing procedure: Start Show eight patterns on the screen Give each pattern a mark by user

The results of the first generation are shown in Table 7. The decoded value of the first chromosome (i.e., 0011100001010...10101), from right to left, the first 64 bits string (i.e., 10000…1010101), which can be reformed as a two dimensional matrix to represent the weave structure of fabrics, shown as the solution row in Table 7. The next 4 bits string (i.e., 0001), which denotes the color of the warp, is decoded as 1 (i.e., blue). The left 32 bits string (i.e., 0011100…11101), which can be decoded from right to left per four bits as 13 (=Cweft1=light Purple, 1101), 11 (=Cweft2=light Cyan, 1011), 3 (=Cweft3=Cyan, 0011), 6 (=Cweft4=Brown, 0110), 6 (=Cweft5=Brown, 0110), 5 (=Cweft6= Purple, 0101), 8 (=Cweft7=Gray, 1000), and 3 (=Cweft8=Cyan, 0011), respectively for each color of the eight picks of weft yarn. According to these obtained weave structure parameters (WS, Cwarp, and Cweft1~Cweft8), the simulation mechanism of the system can display the simulation image of the weave structure pattern, which is illustrated as in Figure 6B(a) with an expected look of the mixed

System proceed with crossover, mutation, and reproduction End.

feature of both grid and interlacing twist pattern.

Chromosome

Pattern

Solution

Unit weave structure

100000018th weft 010000107th weft 001001006th weft 000110005th weft 000110004th weft 001001003rd weft 010000102nd weft 010101011st weft 12345678 warp

Table 7. Searched results of desired pattern

parameters

Items Pattern of weave structure

0001100000011000001001000100001001010101

001110000101011001100011101111010001100000010100001000100100

Layout of yarn colors

Warp (the same) Weft (the various)

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

0001 0001 0001 0001 0001 0001 0001 0001 1101 1011 0011 0110 0110 0101 1000 0011

1 1 1 1 1 1 1 1 13 11 3 6 6 5 8 3

It is available for the simulation mechanism of the system to display the amplified simulation appearance of each the generated weave structure on the screen. With the assistance of the simulation mechanism, the designer can more precisely give the mark to each generated chromosome as a fitness value (i.e., weighting value of preference)

Fig. 6. (A) Weave pattern decoded from strings in the initial state,(a)~(h): denotes the 1st~8th population (B) Weave pattern after 1 generation of GA, (a)~(h): denotes the 1st~8th population

#### **4.5.3 Necessity to set constrained conditions**

Regarding the gene of the weave structure pattern (1~64 bits), one should check if the weave structure of 8 ends × 8 picks happens that there is complete warp or weft float in a unit weave structure (i.e., There are eight bits of "1" (or "0") successively in a column (or row) for a unit weave structure as shown in Figure 7.). If the above mentioned case does happen, the weft or warp yarn will not be fixed to the fabric's surface because none of crossing point. Thus, the genes (1~64 bits) of the chromosome should be set to "0" to avoid the bad evolution for the next other generations. Thus, the outcome gained after evolutions can be fit for the practical application.

#### **4.5.4 Experiment results**

With the assistance of this system, many solution sets, consisting of weave structure pattern parameters (e.g., WS, Cwarp, Cweft1~ Cweft8) are obtained in a short time to help the designer create a satisfying weave structure pattern more easily during exploring innovative fabrics. The example shown in Table 5, has a GA whose operation conditions of crossover probability, mutation probability, and initial population are set to 0.6, 0.033, and 8, respectively. The desired pattern style for the fabric is something like both the features of regular grid and interlacing twist.

Firstly, the system displays eight default patterns of weave structures on the monitor waiting for the user to give each of them a mark depending on his preference. Then the user can find out the monitor-displayed patterns closely similar to the feature of desired pattern such as Figure 6A(a), (c), (e), (h), which are of both the feature grid and interlacing twist pattern look. Judging from the eight patterns of weave structures illustrated on the monitor, the user can give each of them (i.e., a~h) a fitness value (i.e., weighting value of preference) such as 0.8, 0.2, 0.8, 0.4, 1.0, 0.2, 0.4, and 0.6 respectively.

Finally, the search mechanism proceeds with crossover, mutation, and reproduction to create new chromosomes (i.e., bits strings) fit for his demand. The first chromosome (i.e., Figure 6B

Fig. 6. (A) Weave pattern decoded from strings in the initial state,(a)~(h): denotes the 1st~8th population (B) Weave pattern after 1 generation of GA, (a)~(h): denotes the 1st~8th

Regarding the gene of the weave structure pattern (1~64 bits), one should check if the weave structure of 8 ends × 8 picks happens that there is complete warp or weft float in a unit weave structure (i.e., There are eight bits of "1" (or "0") successively in a column (or row) for a unit weave structure as shown in Figure 7.). If the above mentioned case does happen, the weft or warp yarn will not be fixed to the fabric's surface because none of crossing point. Thus, the genes (1~64 bits) of the chromosome should be set to "0" to avoid the bad evolution for the next other generations. Thus, the outcome gained after evolutions can be fit

(A) (B)

With the assistance of this system, many solution sets, consisting of weave structure pattern parameters (e.g., WS, Cwarp, Cweft1~ Cweft8) are obtained in a short time to help the designer create a satisfying weave structure pattern more easily during exploring innovative fabrics. The example shown in Table 5, has a GA whose operation conditions of crossover probability, mutation probability, and initial population are set to 0.6, 0.033, and 8, respectively. The desired pattern style for the fabric is something like both the features of

Firstly, the system displays eight default patterns of weave structures on the monitor waiting for the user to give each of them a mark depending on his preference. Then the user can find out the monitor-displayed patterns closely similar to the feature of desired pattern such as Figure 6A(a), (c), (e), (h), which are of both the feature grid and interlacing twist pattern look. Judging from the eight patterns of weave structures illustrated on the monitor, the user can give each of them (i.e., a~h) a fitness value (i.e., weighting value of preference)

Finally, the search mechanism proceeds with crossover, mutation, and reproduction to create new chromosomes (i.e., bits strings) fit for his demand. The first chromosome (i.e., Figure 6B

population

for the practical application.

**4.5.4 Experiment results** 

regular grid and interlacing twist.

such as 0.8, 0.2, 0.8, 0.4, 1.0, 0.2, 0.4, and 0.6 respectively.

**4.5.3 Necessity to set constrained conditions** 

(a)) of survey results after one generation is shown as in Table 7. In this instance, if the user is not yet satisfied with the searched result illustrated on the monitor, he/she can just proceed the next generation by giving each pattern another weighting value of preference to search for another combination of bit strings. He/She expects that there exists a chromosome with a much better pattern for his/her referring to during design stage by following the processing procedure: Start Show eight patterns on the screen Give each pattern a mark by user System proceed with crossover, mutation, and reproduction End.

The results of the first generation are shown in Table 7. The decoded value of the first chromosome (i.e., 0011100001010...10101), from right to left, the first 64 bits string (i.e., 10000…1010101), which can be reformed as a two dimensional matrix to represent the weave structure of fabrics, shown as the solution row in Table 7. The next 4 bits string (i.e., 0001), which denotes the color of the warp, is decoded as 1 (i.e., blue). The left 32 bits string (i.e., 0011100…11101), which can be decoded from right to left per four bits as 13 (=Cweft1=light Purple, 1101), 11 (=Cweft2=light Cyan, 1011), 3 (=Cweft3=Cyan, 0011), 6 (=Cweft4=Brown, 0110), 6 (=Cweft5=Brown, 0110), 5 (=Cweft6= Purple, 0101), 8 (=Cweft7=Gray, 1000), and 3 (=Cweft8=Cyan, 0011), respectively for each color of the eight picks of weft yarn. According to these obtained weave structure parameters (WS, Cwarp, and Cweft1~Cweft8), the simulation mechanism of the system can display the simulation image of the weave structure pattern, which is illustrated as in Figure 6B(a) with an expected look of the mixed feature of both grid and interlacing twist pattern.


Table 7. Searched results of desired pattern

It is available for the simulation mechanism of the system to display the amplified simulation appearance of each the generated weave structure on the screen. With the assistance of the simulation mechanism, the designer can more precisely give the mark to each generated chromosome as a fitness value (i.e., weighting value of preference)

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

**Integrated System for Design & Production** 

Outlook Demand Cost Demand

**Weaving Parameters Search Mechanism** 

> Weaving Parameter Width Length N1, N2 n1, n2 Total Weight

innovative weave structure, in order to obtain an integrated pattern of the appearance of above-mentioned characteristics, three basic patterns (as shown in Figure1a, 1c, and 1e) of the eight ones provided by the system, which are of some sorts of required characteristics and are more similar to the desired pattern, are given higher scores (i.e., fitness values) as 0.8, 0.8, and 1.0 respectively than the other five ones. After proceeding with several generations of evolution, there comes up with a satisfying solution as shown in Figure 6(B)a, the amplified of which is illustrated in Figure 7, for the desired pattern style. Secondly, as for finding a manufacturing solution to meet the cost demand (i.e., desired weight of 58 lb) of the fabric, the search mechanism for weaving parameters can help determine the combinations of weaving parameters (i.e., N1, N2, n1, and n2). The searched results of tenth generation are listed in Table 4, from which a designer can easily pick out the solution (i.e., N1=52.0, N2=22.7, n1=70.7, n2=70.7) of maximum fitness 0.7531, which can closely meet the weight demand of 58 lb while manufacturing. Through the assistance of this system, the

Desired Fabric

In this study, an integrated system of design and production for woven fabric is proposed. There are two search mechanisms included in the integrated system. One is for the search of weaving parameters and is of an excellent search capacity to allow the fabric designer to obtain the best combinations of weaving parameters during manufacturing, considering costs. The other is for that of weave structure and can efficiently find appropriate combination sets of the pattern parameters, such as the weave structure (i.e., WS), the layout of colors for warp yarns (i.e., Cwarp), and that for weft yarns (i.e., Cweft1~Cweft8), during pattern design. A fabric designer can efficiently determine what the colors of the warp (weft) yarn and the weave structure should be adopted to manufacture satisfying fabric without the advance sample manufacturing. Both the time and cost consuming for sample

Fig. 8. Integration schemes of design and production for woven fabric

**Weave Structure Search Mechanism**

Weave Pattern Weave Structure Layout of Color Yarn

design and production divisions can thus be integrated together.

**6. Conclusions** 

depending on his own preference. Figure 7 is the pattern for the amplified weave structure of Figure 6B(a). There is none of complete warp (or weft) float in the horizontal or vertical direction of the weave structures as shown in Figure 6B. Thus, the practical use of these generated weave structures can be ensured. Furthermore, in case none of them is satisfied, the designer can still continue proceeding with the GA for another generation till there is a desired one can be obtained.

Fig. 7. Simulation pattern of the 1st chromosome for the first generation
