- Open Access
Jacquard pattern optimizing in weft knitted fabrics via interactive genetic algorithm
Fashion and Textiles volume 1, Article number: 17 (2014)
A genetic algorithm is a method to respond to troubles that are indissoluble by common methods and must be utilized to try and fault method. It is difficult to appraise all of responses if there are many answers. Algorithm genetic can contain a large vast of responses and find the best of them by receiving feedbacks from problems. Several designs with different colors can be done in weft knitted Jacquard designing system. However, many patterns might not have enough attractiveness and beauty. The choice of interesting and stylish patterns of the huge set of designs according to customer judgment is difficult. An interactive genetic algorithm that received necessary feedbacks from the user, can be used in design optimization and choosing ideal patterns. In this paper a software has been constructed to optimize jacquard pattern in weft knitted fabrics based on interactive genetic algorithm.
Design methodology and procedure are studied, dissected and implemented in different contexts and can include principles from various disciplines. Unlike scientific inquiry, to which design methodology has sometimes been compared, design is about innovation rather than an interrogation into the nature of what exists (Parsons and Campbell 2004).
Mass customization and automated custom clothing have been regarded as promising methods in the apparel industry to create well-fitting clothing for clients. Nevertheless, custom patternmaking software cannot generate custom clothing with the perfect fit and the system cannot accomplish effectively for some customers (Song and Ashdown 2012). Song and Ashdown (2012) built up a set of basic pants patterns optimized for three lower body shape groups, and tried.
Optimizing problems can be warranted by different methods which can be split into two major groups; deterministic methods and stochastic methods. Among the latter group genetic algorithm is of more importance because of its ease in use of computers (Chamber 1995).
A genetic algorithm is a direction of optimization which is animated by the environment in which supplementary natural mechanisms such as cross over; mutation and survival of the fittest are used for machine learning. This method is widely applied in the optimization and classification problems (Goldberg 1989).
Several designs with different colors can be done in weft knitted Jacquard designing system. However, many patterns might not have enough attractiveness and beauty and opting patterns among a wide domain of customers’ taste can be a large challenge. To resolve such a challenge an optimization and designing a scheme founded on artificial intelligence can be applied. In this method a designing system based on customer’s preference and market demand is devised which progressively connects with users and gather feedbacks and perform acceptable results to users.
Kim and Cho (2000) searched on the interactive genetic algorithm used in the manner in which a database that had designing elements such as cloth body, collar, sleeve and their colors was applied which were preserved in 3D fashions.
Gu et al. (2006) used interactive genetic algorithm in designing 3D cartoon characters in which parameters such as nose, ears, eyes, mouth and shape of head were taken into account.
Genetic algorithm in designing carpet plan and woven fabrics was used (Peivandi et al. 2007a). Also interactive genetic algorithm was used for optimizing the designation of woven fabrics and similar to former research databases containing preliminary supplies were used for initializing optimization process. In this method two databases were utilized; one is connected to primary patterns and another is related to colors (Peivandi et al. 2007b). In this paper a software has been constructed to optimize jacquard pattern in weft knitted fabrics based on interactive genetic algorithm.
Like chromosomes that change in nature because of genes change, in genetic algorithm these elements are also changing continuously in order to become more complete and powerful populations. Chromosomes size and number of genes are related to the type of problem; in fact genes are true determiners of required problem optimization variables. Chromosome fitness determines the efficiency and functionality of the ones for solving required problem. In such problems that are related to peoples tastes and feelings direct fitness determination is used instead of its function by the user which are called interactive genetic algorithm. To train the following generations of chromosomes populations, the crossover operator on chromosomes is used which are in different methods; single-point crossover, two points-point crossover, cut & splice, uniform crossover (UX) & half uniform crossover (HUX) and crossover for orders chromosomes (Holland 1975). Another parameter which is effective on chromosomes is a mutation which can change some genes in a low rate accidentally. Probably for this operator is normally considered very low, about 0.001 (Mitchell 1999). A mutation in genetic algorithm is used to prevent the local convergence of the algorithm. Some of the best chromosomes in each generation are transferred to next one without any changes. Using elite chromosome traits in genetic algorithm causes an improvement in its performing trend (Mitchell 1999). Evolutionary algorithms use different evolutionary simulations in three stages of gene-chromosomes, person and generation. Genetic algorithm uses evolutionary simulation in a gene and chromosome level in which the population is consisted of chromosomes which are the same size arguments. Producing new generation is generally caused by chromosome linkage and partially by mutation.
An interactive genetic algorithm is similar to genetic algorithm; however there is a slight difference that in the first one at that place is no fitness function and the amount of fitness for each chromosome is seen by the user. Interactive genetic algorithm can communicate with users and consequently be affected by user feeling and is utilized in the areas of artistry and design (Nakanishi 1996a,[b]; Ohsaki et al. 1998; Takagi 1998). Software for optimization of designs is developed by MATLAB and for this; different portions of it such as Graphical User Interface Builder (GUIED) and Genetic Algorithm Tod are used.
The devised software has six sections. Patterns and colors made by the software are demonstrated to the user in the main piece which takes user score. In other parts user can observe the existing patterns in pattern database and create, edit or delete desired pattern and impose it to the database. User can also make out the same for the colors in a component of software and finally introduce the limit of knitting machine in pattern and color. Each pattern is formed by a 3D matrix in which each component represents a loop, the number of rows represents the number of course and the number of columns shows the number of wale in the pattern. The first dimension of matrix shows the amount of red, the second one shows the same for green and the third one shows the same for blue. In training to create a new pattern user first sees the number of course and wale and color of the design, then designs his own design and add it to the database.
Developing fabrics with the desired texture by the means of knitting machines is limited due to the limitation of number of feeders and increase of colors which causes a reduce in production. Since it is probable that all the patterns in the database are not capable of being produced by jacquard knitting machine, patterns database is modified by a user based on imposing limitations on the number of machine colors and patterns with more colors than machine restriction will be eliminated.
Genetic algorithm parameters such as population size, the number of transferring parents to the following generation, crossover fraction rate, mutation rate, number of generations and time limit are specified. Default population size for each generation is defined 20 patterns. The number of transferring parents to the next generation is considered one. The crossover fraction rate is 0.5. For each generation pattern must be broken from the point that gens are attached together and crossover cannot do within the gens. There is no time limit for performing algorithm and chromosome population is considered as a vector which means all the chromosomes are sent to a fitness function through a matrix in which the number of rows equals the number of chromosomes and the number of columns equals the number of genes. Thus, the fitness function is recalled only once for each generation and algorithm performing speed increases. After determining required parameters, the genetic algorithm function is executed. In the mentioned function the number of genes, upper and lower bounds of each gene and former parameters, use as inputs and the final chromosome population and their scores use as end products. Since there is a possibility that in final population some chromosomes might be the same with some other chromosomes, the similar ones must be rejected and a fresh population with different chromosomes should be formed and best patterns are established to the user. After optimization of patterns, color of selected patterns will be optimized. Figure 1 shows the schematic of algorithm structure.
2.1 Pattern optimization
Chromosome structure has eight genes, each of which has a specific task. The first gene determines the number of patterns in design. If this gene is one, the formed design will be constituted of one pattern. Other quantities of the mentioned gene causes using two designs in production program and therefore the chance of producing the design from two patterns will be 75%. Second to forth genes refer to first pattern and fifth to seventh genes refer to second pattern and if the first gene is one, other ones are considered zero and has no effect in producing design. Second and fifth genes determine the practical pattern in producing a new generation of pattern database. Third and sixth genes determine whether the practical pattern is split or none. Patterns can be split in two directions, horizontal and vertical in which right or left or upwards and down directions can be applied to create a pattern. Figure 2 shows the patterns division.
Regarding to the quantity of the genes, the probability of pattern division is considered 25% and else is 75%. Fourth and seventh genes determine the amount of rotation. Patterns can rotate in 90, 180, and 270 degrees, which are depicted in Figure 3. According to the amount of genes the probability of patterns’ rotation is 25% and their stability is 75%.
The eighth gene determines the arrangement of patterns. Patterns can be arranged in four types of horizontal, vertical, ascending diagonal and descending diagonal. Pattern arrangement is shown in Figure 4. Pattern optimization has considered complete repeat, when the length of pattern repeat was increasing the size of patterns changed based on their repeat.
Table 1 shows the upper and lower boundaries of design chromosome gene values. Regarding to chromosome gene values, the function of making design arranges patterns in several ways. The derived designs from this function are sent to designs fitness function and then to designs show function. The fitness function saves the scores that the user finds out for patterns and delivers to the algorithm. At that point is besides an automatic scoring system for repeated patterns in this piece. Some designs are scored by the user and may transfer without change from previous population to present population as a result of high score or some designs might be similar in appearance to previous ones because of the asymmetric form of constructional patterns. Thus, in order to prevent user from repeated scores for such designs and to prevent scoring differently for same designs, system scores repeated designs based on their performance appraisal.
2.2 Color optimization
Unlike design chromosomes with the same number of genes, the number of genes for color chromosomes can change and is determined according to color variety of selected designs. Number of genes equals the number of selected design colors. Color chromosome has an auxiliary gene for determining the number of colors or in other words the number of genes which will be eliminated after the color chromosome structure is formed. The main color chromosome genes gain the required value based on the number of existing colors in color database. For example, if there are sixteen colors in color database the first gene gets a value 1 to 16 after the auxiliary gene is eliminated. The following genes cannot take the previous genes values because the design may encounter to unsolicited changes.
Regarding to the selected design chromosome in a case that the design is formed from one pattern, the number of colors in color chromosome equals the number of first pattern colors and if it is from two patterns the number of colors equals the number of a pattern with broader color variety. After eliminating auxiliary gene final color chromosomes are sent to algorithm. Selected color chromosome of design and color matrix are sent to selected design coloring function and this function colors the selected design with vast colors and sends it to the fitness function to show it to user for scoring. Like automatic scoring section in design fitness function, similar colors in different generations of a selected design will be racked up in color fitness function. This function also imposes limitations on genes of color chromosomes for coloring designs and edits them, if necessary. Figure 5 shows the optimization procedure.
3Results and discussion
Chromosomes population size is 12 and the number of transferring chromosomes to the next generation is one and the rate of crossover chromosomes is 0.8 and there are 5 generations. The first generation of patterns has been made from simple patterns that saved in database for starting genetic algorithm, however they could be changed by the user. The scope of user scoring is from 1 to 9 and the more attractive the design is the higher score is. Subsequently the first generation has been scored, next generations are created based on user scores. The selection operation is interactive operation that is performed by the user, and the number of patterns in the database is invariant for each generation, for this reason, Patterns that have low fitness value have eliminated and do not transfer to the next generation. The mean fitness of each generation and best fitness among different generations are depicted in Figure 6. The best design in each generation, is the design that has the maximum fitness value or best fitness value in that generation, and the average fitness value is the mean of all fitness value in that generation. While producing new generations the average fitness tends to higher scores which show prospering the designed pattern and better user scores. After scoring designs, the ones which get the highest scores from user are shown. Figure 7 shows the final selected patterns.
In color optimization step, each selected design is evaluated and optimized based on coloring. The best patterns indicate to users with various coloring and are graded to decide the final design coloring. Figure 8 shows average fitness and best colors fitness in different generations for the first selected patterns.
Color optimization has a lower rate than the design optimization which is caused by a wide variety of colors.
The devised software has an acceptable capability for design and color optimization. The user interface is powerful software in obtaining data and tastes from the user which can adjust itself to different positions and impressions. This software can create more beautiful and attractive designs and colors in the standpoint of the user during making new generations. Fitness diagrams also indicate an improvement in color and design scores.
Color optimization has a lower rate than the design optimization. Due to a wider variety of colors, their scoring range is broader, too. Consequently, more generations are necessary in this instance. Moreover, automatic scoring of repeated designs helps the software performs faster. One of the significant aspects of this software is the existence of a variable database which can make a better optimization and increase design range size.
Chamber L: Practical Handbook of Genetic Algorithms. 1995, CRC Press, Boca Raton
Goldberg DE: Genetic Algorithms in Search, Optimization and Machine Learning. 1989, Addison-Wesley Publishing Co. Inc, Boston
Gu Z, Tang MX, Frazer JH: Capturing aesthetic intention during interactive evolution. Computer-Aided Design. 2006, 38: 224-237. 10.1016/j.cad.2005.10.008.
Holland J: Adaptation in Natural and Artificial Systems. 1975, University of Michigan Press, Michigan
Kim HS, Cho SB: Application of interactive genetic algorithm to fashion design. Engineering of Artificial Intelligence. 2000, 13 (6): 635-644. 10.1016/S0952-1976(00)00045-2.
Mitchell M: An Introduction to Genetic Algorithms. 1999, MIT Press, London
Nakanishi Y: “Applying evolutionary systems to design aid system”, Proc. Of Artificial Life V (Poster Presentation). 1996
Nakanishi Y: “Capturing preference into a function using interactions with a manual evolutionary design aid system”, Genetic Programming 1996 Late-Breaking Papers. 1996
Ohsaki M, Takagi H, Ingu T: “Methods to reduce the human burden of interactive evolutionary computation”, Proc. Of Asia Fuzzy Systems Symposium. 1998
Parsons JL, Campbell JR: Digital apparel design process: Placing a new technology into a framework for the creative design process. Clothing and Textiles Research Journal. 2004, 22 (1/2): 52-88.
Peivandi P, Latifi M, Amani-Tehran M: “Genetic algorithm aided loading layout of machine-made carpet”, 6th International Conference of Textile. 2007, Isfahan University of Technology, Iran
Peivandi P, Latifi M, Amani-Tehran M, Akbari-Moayed H: “Woven pattern design using interactive algorithm genetic”, 6th International Conference of Textile. 2007, Isfahan University of Technology, Iran
Song HK, Ashdown SP: Development of Automated Custom-Made Pants Driven by Body Shape. Clothing and Textiles Research Journal. 2012, 30 (4): 315-329. 10.1177/0887302X12462058.
Takagi H: “Interactive evolutionary computation-cooperation of computational intelligence and human KANSEI”, Proc. Of Int. Conference on Soft Computing. 1998
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
About this article
Cite this article
Semnani, D., Hadjianfar, M., Aziminia, H. et al. Jacquard pattern optimizing in weft knitted fabrics via interactive genetic algorithm. Fashion and Textiles 1, 17 (2014). https://doi.org/10.1186/s40691-014-0017-2
- Genetic algorithm
- Weft knitted