**3.4 Encoding and decoding of chromosome**

38 Woven Fabrics

being struck to the local optimum.

**3.3 Chromosome representation** 

Parameter Gene

Warp count (N1) 4 1~4

Warp Density(n1) 4 9~12 Warp Density(n2) 4 13~16

(bits)

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

10011001 01010111

10010100

Fig. 2. Flow chart of genetic algorithm

c. Reproduction

genes. In genetic algorithms, mutation serves the crucial role of preventing system from

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.

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.

Weft count (N2) 4 5~8 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

4 bits n2

Parents Children

Crossover

11001010 11000100

Mutation

11001010

10010100

Reproduction Selection

00011101

11100011

10010100 11001010

Order Layout of Chromosome

11000100 10011010

4 bits n1

4 bits N2

4 bits N1

11100011 00011101

10011010

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 for variable xi is straight forward and completed as follows.

$$\times\_{i} = \text{p}\_{i} + \text{k}\_{i} (\text{q}\_{i} \text{-p}\_{i}) / (2^{n\_{\bullet}} 1) \tag{1}$$

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

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 be obtained.

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 as below.

$$\mathbf{P} = \mathbf{b}\_{11} \dots \mathbf{b}\_{\overline{1}} \mathbf{b}\_{21} \dots \mathbf{b}\_{\overline{2}} \dots \dots \mathbf{b}\_{\overline{1}1} \dots \mathbf{b}\_{\overline{i}} \qquad \mathbf{b}\_{\overline{i}} \in \{0, 1\} \text{ : } \mathbf{i} = 1, 2, \dots, \mathbf{m}; \mathbf{j} = 1, 2, \dots, \mathbf{n}; \tag{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 index kis of the generated chromosome can be obtained by Equation 3.

$$\mathbf{k} \mathbf{=} \mathbf{b}\_{11} \mathbf{\*} \mathbf{2}^{n} \mathbf{+} + \mathbf{b}\_{12} \mathbf{\*} \mathbf{2}^{n} \mathbf{2} + \dots + \mathbf{b}\_{\text{in}} \mathbf{\*} \mathbf{2}^{n \cdot n} \qquad \mathbf{i} \mathbf{=} \mathbf{1}\_{r} \mathbf{2}, \dots, \mathbf{m}; \tag{3}$$

Finally the real number for variable xi can thus be obtained from Equations 1-3. The flow 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

#### **3.5 Object function**

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 is maximized.

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

(2)N1N2 (3)n1X\*0.9 (4)n2Y\*0.9 where

X=a×b×a'/(b×b'+a×c) Y=b×a×b'/(a×a'+b×c')

of warp and weft yarns a,b:maximum number of warp and weft yarn capable of being

laid out per inch

unit weave structure

X,Y:maximum weaving density

a',b': number of warp and weft yarns per unit weave structure c,c': number of interlacing point in warp and weft directions per

Example Known condition and set target Constrained conditions Length(L) constant 120 yds (1)n1n2

constant 6.3%

constant 6.3%

variable 60-100

variable 60-100

variable 20-60 Ne

Variable 20-60 Ne

Table 3. Set target, known conditions, and constrained conditions (Lin, 2003)

constant Cotton/cotton

with the constrained conditions mentioned above that N1 (=30.7) be smaller than N2 (=44.0). Thus, the fitness of this solution is set at zero. Among the thirty chromosomes illustrated in Table 4, a fabric manufacturer can easily choose several solution sets, whose fitness values are closer to 1 and are of appropriate fractional cover. Thus, the manufacturer can avoid designing a woven fabric that cannot be manufactured by the production division. Furthermore, a designer can achieve the goal of considering many essential design factors such as cost, functionality (e.g., hand, air permeability, and heat retaining properties, et al.),

Nowadays, the range of R&D cycle for textiles is much narrowed than ever before. Moreover, it is necessary for the enterprise to afford the demand of marketing change in small quantity and large variety for the commodity (Chen, 2005). Application of computer technology in the textile field is widely spreading. For instance, computers are used for the control of processing machine in the apparel production process. Grading or marking of the cutting machine is one of the successful applications of computer technology. The computer has enhanced a lot not only the functions of the hardware but the applications of software. However, most of its applications in textile industry focus on manufacturing processes and quality improvement (Ujevic et al.,2002), . Some of them are applied to the computer aided design (CAD) systems (Rodel, 2001) (Sano, 2001) (Inui, 2001) (Luo, 2005) (Cho, 2005). In the past, the traditional drawing tools and skills were used to transform designers' ideas into

ends/in

picks/in

Width(width) constant 64 in

Weight(W) constant 58 lb Weave structure constant plain 1/1

and the possibility of weaving during design stage.

**4. Search module for weave structure** 

**4.1 Weave structure in pattern design** 

Shrinkage of warp

Shrinkage of weft

Warp yarn per inch(n1)

Weft yarn per inch(n2)

Count of warp yarn(N1)

Count of weft yarn(N2)

Material yarn (Warp/Weft)

yarn (S1)

yarn(S2)

Searching for weaving parameters

$$Fitness(\mathcal{W}\_{\mathcal{S}}) = 1 - \frac{\left| \mathcal{W} - \mathcal{W}\_{\mathcal{S}} \right|}{\mathcal{W}} \tag{4}$$

Where Wg (lb) is the decoded weight of the yarn for each generation, W(lb) is the target weight of the yarn and can be calculated by using Equation 5.

$$\mathcal{W}(l\text{lb}) = \frac{n\_1 \times \text{L} \times \text{Widuth}}{(\text{1} - \text{S}\_1) \times \text{N}\_1 \times 840} + \frac{n\_2 \times \text{L} \times \text{Width}}{(\text{1} - \text{S}\_2) \times \text{N}\_2 \times 840} \tag{5}$$

Where n1 is the density of the warp (ends/inch), n2 is the density of the weft (picks/inch); N1 is the warp yarn count (840 yd/lb), N2 is the weft yarn count (840 yd/lb), S1 is the shrinkage of the warp yarn (%),S2 is the shrinkage of the weft yarn (%), L (yd) is the length of the fabric, and Width (inches) is the width of the fabric.

#### **3.6 Necessary to set constrained conditions**

Generally speaking, while expecting to increase the production rate, a designer often leaves the weft yarn thicker than the warp yarn. Furthermore, the number of interlacing points will be different depending on the weave structure. There exists a maximum warp or weft weaving density for woven fabrics during weaving (Lin, 1993) (Pon, 1992). As a practical consideration, the weaving mill always adopts 90% of the maximum weaving density for warp and weft yarns to prevent jammed fabrics, which have a bad hand. In order to make the searching mechanism of the system more realistic and approvable, it is necessary to consider the constrained condition mentioned above. The conditions that essentially need to be considered during weaving can be illustrated as follows: (!)n1n2, (2) N1N2 (3) n1 X × 0.9, (4) n2 Y × 0.9, where X is the maximum weaving density of the warp yarn (end/inch), Y is the maximum weaving density of the weft yarn (picks/inch), n1 is the density of the warp (ends/inch), n2 is the density of the weft (picks/inch), N1 is the warp yarn count (840 yd/lb), and N2 is the weft yarn count (840 yd/lb). If the acquired chromosome's decoded part is not live up to the above-mentioned constrained conditions, it is essential for the system to set the fitness value at zero. Thus, the goal of preventing the system from deriving unfit solutions for the designer during the search is achieved.

#### **3.7 Example**

Table 3 is a set of conditions for a manufacture of fabrics. Table 4 is the results of the tenth generation searched by using GA. With the assistance of this system, many solution sets, consisting of weaving parameters (e.g., N1,N2,n1,n2), are obtained in a short time to help the designer make a decision more easily when exploring innovative fabrics. Moreover, the system will figure out the fractional cover (i.e., C) (Lin, 2003) of each solution set depending on the combination of weaving parameters generated after the interactive operation of the GA. For instance, the example shown in Table 3, has a GA whose operation conditions of crossover probability, mutation probability, and initial population are set to 0.6, 0.033, and 30, respectively. The decoded value of the ninth chromosome (i.e., 0100010010010100) from right to left per four bits is 30.7 (=N1, 0100), 44.0 (N2, 1001), 70.7 (=n1, 0100), and 70.7 (=n2, 0100), respectively. By putting these four decoded values into the calculation equation (Lin, 2003) of cover factor, a value of fractional cover can be obtained as 0.6394, yet it conflicts

Where Wg (lb) is the decoded weight of the yarn for each generation, W(lb) is the target

Where n1 is the density of the warp (ends/inch), n2 is the density of the weft (picks/inch); N1 is the warp yarn count (840 yd/lb), N2 is the weft yarn count (840 yd/lb), S1 is the shrinkage of the warp yarn (%),S2 is the shrinkage of the weft yarn (%), L (yd) is the length

Generally speaking, while expecting to increase the production rate, a designer often leaves the weft yarn thicker than the warp yarn. Furthermore, the number of interlacing points will be different depending on the weave structure. There exists a maximum warp or weft weaving density for woven fabrics during weaving (Lin, 1993) (Pon, 1992). As a practical consideration, the weaving mill always adopts 90% of the maximum weaving density for warp and weft yarns to prevent jammed fabrics, which have a bad hand. In order to make the searching mechanism of the system more realistic and approvable, it is necessary to consider the constrained condition mentioned above. The conditions that essentially need to be considered during weaving can be illustrated as follows: (!)n1n2, (2) N1N2 (3) n1 X × 0.9, (4) n2 Y × 0.9, where X is the maximum weaving density of the warp yarn (end/inch), Y is the maximum weaving density of the weft yarn (picks/inch), n1 is the density of the warp (ends/inch), n2 is the density of the weft (picks/inch), N1 is the warp yarn count (840 yd/lb), and N2 is the weft yarn count (840 yd/lb). If the acquired chromosome's decoded part is not live up to the above-mentioned constrained conditions, it is essential for the system to set the fitness value at zero. Thus, the goal of preventing the system from deriving

Table 3 is a set of conditions for a manufacture of fabrics. Table 4 is the results of the tenth generation searched by using GA. With the assistance of this system, many solution sets, consisting of weaving parameters (e.g., N1,N2,n1,n2), are obtained in a short time to help the designer make a decision more easily when exploring innovative fabrics. Moreover, the system will figure out the fractional cover (i.e., C) (Lin, 2003) of each solution set depending on the combination of weaving parameters generated after the interactive operation of the GA. For instance, the example shown in Table 3, has a GA whose operation conditions of crossover probability, mutation probability, and initial population are set to 0.6, 0.033, and 30, respectively. The decoded value of the ninth chromosome (i.e., 0100010010010100) from right to left per four bits is 30.7 (=N1, 0100), 44.0 (N2, 1001), 70.7 (=n1, 0100), and 70.7 (=n2, 0100), respectively. By putting these four decoded values into the calculation equation (Lin, 2003) of cover factor, a value of fractional cover can be obtained as 0.6394, yet it conflicts

11 22 ( ) (1 ) 840 (1 ) 840 *n L Width n L Width W lb SN SN*

*W W*

*W*

(5)

(4)

*g*

*Fitness W*

( )1 *<sup>g</sup>*

weight of the yarn and can be calculated by using Equation 5.

1 2

of the fabric, and Width (inches) is the width of the fabric.

unfit solutions for the designer during the search is achieved.

**3.7 Example** 

**3.6 Necessary to set constrained conditions** 


Table 3. Set target, known conditions, and constrained conditions (Lin, 2003)

with the constrained conditions mentioned above that N1 (=30.7) be smaller than N2 (=44.0). Thus, the fitness of this solution is set at zero. Among the thirty chromosomes illustrated in Table 4, a fabric manufacturer can easily choose several solution sets, whose fitness values are closer to 1 and are of appropriate fractional cover. Thus, the manufacturer can avoid designing a woven fabric that cannot be manufactured by the production division. Furthermore, a designer can achieve the goal of considering many essential design factors such as cost, functionality (e.g., hand, air permeability, and heat retaining properties, et al.), and the possibility of weaving during design stage.
