Priority Dispatching Rules for Virtual Manufacturing Using Genetic Algorithm

Priority Dispatching Rules for Virtual Manufacturing Using Genetic Algorithm Akela M. Al-Atroshi Abdulsatar M. Khudur Technical Institution Technical Institution Sama Talee Azez Al-Aubaidy College of Computer sciences and Mathematics  University of Mosul, Iraq  Received on: 01/07/2007 Accepted on: 26/09/2007 ABSTRACT The current research concentrates on designing and applying an intelligent information system by the use of (Oracle) language based MultiAgents manufacturing process to produce a new product. Every agent (user) has its own roles and privileges. The research focuses on determining the delivery date through using genetic algorithms to simulate Shop floor and specify priorities for dispatching orders according to specific rules which determine the lead time of the product. The importance of the research stems from designing software in c++ to simulate manufacturing processes in the genetic algorithm to realize the following : 1. Attain the best sequences in implementing jobs according to the required rules. 2. Decreasing the queuing time for products and their components in the production processes. 3. Perfect utilization of the available resources. The results of the designed system application have revealed that the operations planning by the use of the GA philosophy will perform a great role in calculating the product's lead time at the manufacturing operations' stages. This role supports the VM philosophy in calculating the industrial part of the products lead time quickly. Also the application results have confirmed that the designed GA software efficiency depends upon the number of jobs available at the time of execution; whenever the number of jobs is bigger, the software execution efficiency is better.


Introduction to the Problem Domain
The worldwide competition and computer revolution have dramatically changed the market characteristics. Today, it is the buyers, market, where capacity is higher than demand. Price is dictated by the market; it is not based on the producers expected profit [14]. Manufacturers must now develop a balance between the internal and external measures. Their focus is changing from local to global optimization by determining what customers want and delivering the right products. This focus and advances in technology are decreasing product life cycle, which together with the high cost of capital make the product time to market one of the major business drivers for many industries. [8] [10] .
The operational unit in Agile Manufacturing Industry is a dynamic virtual enterprise consisting of Multi-Agents who collaborate with each other. The overall objective of an Agile Manufacturing Industry is to achieve quick response to marketing demands, with compatible product quality and lower manufacturing cost [11] [17].
The process of determining the industrial lead-time faces great challenges according to Agile Manufacturing. This could be attributed to the great individual and variable demands of the customers. The problem of the research is about the necessity to count the industrial lead-time for each product accurately and precisely when applying the concept of virtual manufacturing. The constant dialogue between the customer and specialists in scheduling manufacturing processes ends when the product cost and its exact delivery date (which constitute the greatest part of the lead time ) are determined .
The current research focuses on determining the delivery date through using genetic algorithms to simulate Shop floor and specify priorities for dispatching orders according to specific rules which determine the lead time of the product. The importance of the research stems from designing software to stimulate manufacturing processes in the genetic algorithm to realize the following : 1. Attain the best sequences in implementing jobs according to the required rules.
2. Decreasing the lead-time for products and their components .
3. Perfect utilization of the available resources.
4. Realizing integration between the planning and excessive aspects of jobs.
In order to framework this research, the following hypothesis has been adopted: a rapid response to individual and variable demands of the customers according to the philosophy of the virtual manufacturing requires adopting one of the techniques of Artificial intelligence for determining the sequence of jobs in the production lines in order to exactly determine the lead time.
The basic objectives of the research are embodied in designing software using C++ language and genetic algorithm to plan priorities for issuing job commands in order to identify the lead time for each product (in priority planning agent). This Software is characterized by its compatibility with the other agents and within Oracle framework and the proposed system in the thesis. All that is done to realize the objectives of the virtual manufacturing system. Thus, the vision is clear about VM system ; and its benefits can be attained when the system main objectives are identified. Building on the limitation of studies relevant to the VM system and lack of Arabic and Iraqi references require conducting studies in the following domains in order to clarify the conception of this new trend : 1. Identifying the job mechanism in this system by carrying profound studies in determining priorities for executing commands in each cell by using techniques of Neural Network or Fuzzy logic and the like.
2. The role of information and communication between the agents and other factories in order to realize the objectives of the virtual manufacturing.

Concept of a Proposed VM System
The vision of virtual manufacturing is to provide a capability to manufacturing in the computer. Also a new definition of VM can be stated as a system, in which models of manufacturing objects, processes, activities, and principles evolve in a computer based environment to enhance one or more attributes of the manufacturing process [11]. A Virtual Manufacturing Enterprise is a temporary alliance of enterprises that come together to share skills or core competencies and resources in order to better respond to business opportunities, and whose cooperation is supported by computer networks [1].
The virtual system approach takes the best of both the traditional software approach and the computing appliance approach and combines them in a way that delivers both convenience and flexibility. So Several key benefits of VS in manufacturing domain can be cited as follows: [19] 1. Service Driven Operations management: a unique software-based IT service delivery approach to enable synchronizing business and IT. 2. Sophisticated Windows, UNIX and Linux event and performance management from Windows for managing the heterogeneous enterprise 3. Centralized point of control for the network, servers, operating systems, applications and services for correlating and managing all the IT infrastructure components of a business service 4. Extensive out-of-the-box policy-based management intelligence for enhanced time-to-value 5. Superior application management architecture providing a maximum of scalability. 6. Capability to manage both Microsoft, NET and J2EE applications from the same platform. 7. Flexible management concept which allows you to configure sophisticated manager of manager concepts.
The planning and control of the flow of work through a manufacturing system is a complex task. Customer orders must be translated into orders for the many components, subassemblies and assemblies which are required to complete that order. Some components are manufactured in-house while others have to be purchased from external suppliers. The proposed VM system represented by DB schema has been mainly designed by depending on 12 object types, 18 tables, 5 views, 1 trigger and 3 packagesThe package which includes a group of procedures or functions has been used to facilitate granting it an execution privilege by the users or agents to perform the tasks assigned to it. Figure

Priority Planning Agent
Scheduling is defined as the problem of allocation of machines over time to complete jobs. The m*n job shop scheduling problem denotes a problem where a set of n jobs has to be processed on a set of m machines.

Priority planning Agent
Each job consists of a chain of operations, each of which requires a specified processing time on a specific machine [15]. The applied studies in this field have shown that the "Genetic Algorithm" is considered to be the most widely used technology in assigning machines jobs and obtaining best planning for jobs sequences on machines. The attached figure (2) is the structure of the priority-planning agent This research has adopted this style to achieve: 1. Reduction in lead-time for the manufactured products.
2. Best use (exploitation of the available resources). 2. Operators to mutate and hybridize these representations are available GA has been designed as general-purpose optimization methods [21].

Genetic Algorithm Representation
It is a search algorithm that uses operations found in natural genetics to guide the trek through a search space . In GA, each solution is represented in the form of a finite length array called chromosome. [7].

Priority planning Agent
Text file order.dat 1. The resulting software will take manufacturing process plans as inputs and automatically generate a manufacturing jobs sequence for a shop floor, a plant or an enterprise, with estimation of production cost and delivery options. This will allow the manufacturing enterprise to respond to customer requests quickly and therefore to win in the increasingly competitive market.
2. Jobs sequencing is done through negotiation among intelligent agents representing related manufacturing resources, rather than centralized.
Such a jobs sequencing system can quickly respond to changes in the shop floor through dynamic jobs sequencing.
3. Developing an agent-based intelligent job sequencing system using advanced technologies including Intelligent Agents, Genetic Algorithm, Internet, and Web technologies. This will allow managers to monitor the production status anywhere and to jobs sequencing a customer order over the Web. 4. Remoting an online access to the manufacture database. Allowing for prompt customers awareness about the anticipated due dates of their orders assumes developing efficient runtime and quality of solution. Job sequence routine for planning the assignment of the submitted customers orders to the factory's machines.

Genetic Algorithm Design for Job Sequencing
The success of GA strongly depends on how to map the concrete representations toward the abstract searching space in which operators move through [22]. In fact the jobs sequencing is an NP hard problem and that for practical problems in higher dimensions the best solution can only be found by trial and error, so it can use a modeling concept which aims at creating an environment which allows the application of optimization techniques like Genetic Algorithms in dynamic and complex environments. A Genetic Algorithm is an iterative procedure which usually maintains a constant population size. Termination is commonly triggered by reaching a maximum number of generations, or by finding an acceptable solution [4].
Probability of mutation, probability of crossover, and population size, either empirical or trial and error method are used according to the features of problems. [20]. During iteration t, the GA maintains a population P(t) of solutions x t 1. .x t R (the population size R remains fixed).Each solution, x t i is evaluated by a function with E(x t i) being a measure of the fitness of the solution. The fitness value determines the relative ability of an individual to survive and produce offspring in the next generation. In the (t+1) th iteration a new population is formed on the basis of the genetic operators selection, crossover and mutation [7].

Initialization
The GA initialization process, in which a set of initial random solutions are generated, is conducted using a randomized version. So the initial population (chromosomes) of individuals (solution candidates) is generated randomly or heuristically. During each iteration step, called a generation, the individuals in the current population are evaluated and given a fitness value. In order to form a new population, individuals are selected with a probability proportional to their relative fitness which ensures that the expected number of times an individual is chosen is approximately proportional to its relative performance in the population [3].
a. First generated chromosome has the same jobs sequence in the order, second chromosome has reverse order (crom1=a, b, c and crom2=c, b, a).

Evaluation of Fitness
The fitness of each chromosome is evaluated by substituting the values of decoded variables into fitness function [4]. An evaluation or fitness function plays the role of the environment in distinguishing between good and bad solutions [7]. Sequencing jobs in work centers according to one of effectiveness measures is used as a fitness function. The decision-maker or CAPP user selects one of the following four constructed fitness functions according to customer opinion.

…. (9)
Flow Time FT is the amount of time a job spends in the simulated production system [Patrick, 2000[Patrick, , p.2661. Flow time for Ji, FT(i) calculated as follows: …. (10)

3 Selection
Selection is the process of searching for parents. Selection procedure alone cannot produce any new solution candidates in the search space [18], but it gives a straightforward way of choosing offspring for the next generation. Select return the population index value corresponding to the selected individual [2] [5]. We suggest a binary selection which is a robust, commonly used mechanism that provides a good convergence rates, avoiding a sub optimal solutions, and proved to be efficient and simple to code. The algorithm is as follows:

PMX Crossover Operator Mechanisms and Design
Crossover is the most important reproduction operator to find new starting points for search. It takes two individuals, called parents selected by call select function two times, and produces one or two new individuals (in our case produce one) called the offspring by swapping parts of the parents.
Crossover combines two chromosomes (parents) to produce a new chromosome (offspring). That new chromosome may be better than both of the parents if it takes the best characteristics from each of the parents. In its simplest form the operator works by exchanging substrings after a randomly selected crossover point [21]. The crossover operator, which combines the features of two parent structures to form two similar offsprings; this is applied under a random position cross with a probability of performance (the crossover probability) Pc [7]. Crossover operators are an essential part of GA as they help in inheriting better characteristics from the fittest solutions among generations [22].
There are two schemes of Crossover. One is Uniform Crossover in which a child genome is created with its own genetics that consists of genetics passed from one of parents with some probability p and those from another one with the probability 1−p. Each genotype is occupied by the genes from parents independently. Another scheme is 2-point Crossover that parents genomes whose forms are not strings but rings are split into 2 parts at two cross points chosen at random, and then combined to make a new genome. The different point between them is that 2-point Crossover might suppress some increase of its action rather than Uniform Crossover.
Diversity is to have high probability of a production of an interesting child genome is, however, assured by Uniform Crossover rather than 2-point Crossover. The problem which remains and to be expected is how to update the population. Generally, C children produced from C parents replace all the parents. Then, the next generation becomes totally new. This scheme is called spawning. The diversity of the population depends, however, strongly on the selection of the parents [24].
Partially Mapped Crossover PMX is a kind of two-point crossover operation. Delivery jobs sequence for a selected set of jobs will be exchanged between two parent solutions. In this case, the delivery jobs sequence or production decision for each job is defined in the parent solutions. In GA implementation, the horizontal exchange of rows between two different solutions as the crossover operator is used. This is done by randomly selecting any number of job sequences and exchanging their delivery amounts between the two solutions to generate two new child solutions [22]. Goldberg

Binary Mutation Operation
Mutation is the process of modifying genes of the chromosome itself. It arbitrarily alters one or more components of a selected structure so as to increase the structural variability and robustness of the population.
Each position of each solution vector in the population undergoes a random change according to a probability defined by the mutation rate (the mutation probability) Pm [7]. Mutation is essentially an arbitrary modification introduced to prevent premature convergence to local optima by randomly Offspring1 = 9 8 4 2 3 10 1 6 5 7 Offspring2 = 8 10 1 5 6 7 9 2 4 3 sampling new points in the search space. In the case of bit strings, mutation is applied by simply flipping bits randomly in a string with a certain probability called mutation rate [4].
Mutation operators are applied to each child solution resulting from the crossover operation. They help the GA to reach further solutions in the search space. The idea of the mutation operation is to randomly mutate a solution's genes (the values assigned to each cell in our two-dimensional matrix structure) and hence produces a new and better solution [22].
Proposed for mutation a simple swapping of two unique elements randomly selected in the offspring. The mutation operator is designed to conduct delivery exchanges in a random fashion. Mutation procedure uses the function flip to determine whether or not to exchange two genes selected randomly from the new chromosome (child) that is generated by crossover recently [5]. Child is the input to the procedure, the exchange occurs two times in it, and the algorithm is as follows:

Test
After 20 iterations, the program displayed the best overall optimum solution found to that point, and asked the user if he wanted to continue searching, try to find a better optimum solution, starting from latest new population. Else, at the completion of the program, the final result saved in text file jobs.dat to store it in oracle database later. In case of performing sequence of jobs for the first time, they will be stored directly in the job_sched database table. If the optimal solution obtained is better than the stored one, it will be updated otherwise, the database table will stay unchanged.

Priority Planning Agent Interface
The P.P. agent prepares the order.dat file which includes the customer order and the process time as well as the due date for each product. The file is then sent (as a message) through the interface (which is the DDE) to enter C++ software and execute the program job_schd.exe specialized in GA which in its turn reads order.dat file then it selects the fitness function to decide the job sequences by the P.P. agent. The optimal solution lies in storing the jobs.dat file then exiting from GA execution and going back to oracle form so that it will be possible to read the file and update the database according to that result..

Discussion and Analysis of the Application Results
The Priority Planning Agent receives the order.dat file from the process Planning Agent. This file contains the required information about the orders and is considered as one of the main inputs for those software designed by the use of C++ language according to the genetic algorithm logic for planning job priorities in the shop floor.
By cooperation with the Supervisor Agent, one of the rules relied on in designing software to plan for job priorities is selected. The rule of the Average Completion time has been selected to be a fitness function according to which the optimal sequence for executing the manufacturing planned jobs has also been selected. This rule aims at reducing the lead time for products' manufacturing and achieving quick response for the customers' orders.
1. According to what has been mentioned above, table (1)

%
The execution results are naturally stored in the database specialized in the order; namely in the Job_Shed Table. It is worth to mention here that in case an execution repetition for the same order and for the same objective function takes place, the planned software will have the capacity of changing the stabilized result in the file with a new fitness function if this new fitness function has a lower value, otherwise the stabilized value remains unchanged in the file.
3. After calculating the order's lead time with the products involved, estimating the product's costs and consequently the order's total cost, the customer is informed with all this information. As soon as the customer agrees on this, the Supervisor Agent will issue an order release for the product to be manufactured in the factory. The table (2) explains the manufacturing order's Price and Lead time.
It has been shown so far that the basic idea of our system design and its application is to manufacture a product by the use of the computer, as procedures end as soon as commands are given to manufacture an order at the shop floor inside the factory. Accordingly, the application process represents assimilation to the actual manufacturing environment under study. As it has been explained before two orders which have, to some extent, some different features have been chosen. In order to explain the capabilities of the designed system at different stages of manufacturing, and within the framework of integration between (CAD/CAPP/HLMRP) and after all for the sake of implementing the philosophy of the virtual manufacturing, each order consists of a number of products. In the same way and concept the network, designed by the use of window server 2003 to the server and the window XP assigned to the clients, has a great role in achieving the concept of the VM. This has been demonstrated by the efficient flow of information and data throughout the manufacturing environment.
While the application has embodied the second objective of the thesis, it has, at the same time, provided integrated information to attain the other objectives. The application results will be analyzed within the frame of the following domains.

Conclusions
The results of the designed system application have revealed that the operations planning by the use of the GA philosophy will perform a great role in calculating the product's lead time at the manufacturing operations' stages. This role supports the VM philosophy in calculating the industrial part of the products lead time quickly. The following points have been observed on executing the GA software: 1. The application results have confirmed that the designed GA software efficiency depends upon the number of jobs available at the time of execution; whenever the number of jobs is bigger, the software execution efficiency is better.
2. If we have to wait for two jobs only then the Job_Schd.exe program will choose the best fitness because there are only two probabilities without going to (entering) the GA. But if the number of jobs is equal to three or four then the population size = 2, otherwise the population size = 6.
3. The designed software includes (Job_schd.exe) according to GA logic in programming four rules from the rules special to the job priorities. The execution process of the system has confirmed to be easy to add new rules or to include several rules in one new rule and execute it on many jobs by giving very accurate results. 4. It has been confirmed by execution that the (Job_schd.exe) program has the ability to reexecute the same order and for the same fitness function in case that the reexecution results are better according to the adopted fitness function; the stored result in the database will be executed by the new value, otherwise the stored result will stay as it was. 5. The execution results of the (Job_schd.exe) program concerning the job sequencing for the first order with seven jobs confirmed two of the jobs sequence: