SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship...

35
0 SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI-NETS AND GENETIC ALGORITHM INTERNSHIP PROJECT REPORT by SAMPATHI DIVYA JYOTHI (SC09B038) Department of Aerospace Engineering Indian Institute of Space Science and Technology Thiruvananthapuram July 2012

Transcript of SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship...

Page 1: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

0

SCHEDULING FLEXIBLE MANUFACTURING

SYSTEM USING PETRI-NETS AND

GENETIC ALGORITHM

INTERNSHIP PROJECT REPORT

by

SAMPATHI DIVYA JYOTHI

(SC09B038)

Department of Aerospace Engineering

Indian Institute of Space Science and Technology

Thiruvananthapuram

July 2012

Page 2: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

1

BONAFIDE CERTIFICATE

This is to certify that this project report entitled “Scheduling Flexible

Manufacturing System Using Petri-nets and Genetic Algorithm”

submitted to Indian Institute of Space Science and Technology,

Thiruvananthapuram, in connection with the institute internship program

is a bonafide record of work done by “SAMPATHI DIVYA JYOTHI”

under my supervision from 04th

June 2012 to 18th

July 2012.

Dr. B. S. Girish

Asssitant Professor

Aerospace Engineering

Dr. Kurien Issac, K.

Senior Professor and Head

Aerospace Engineering

IIST, Thiruvananthapuram

Place: IIST, Thiruvananthapuram

Date: 18th July 2012

Page 3: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

2

DECLARATION

This is to declare that this report has been written by me. No

part of the report is plagiarized from other sources. All

information included from other sources have been duly

acknowledged. I aver that if any part of the report is found to be

plagiarized, I shall take full responsibility for it.

Sampathi Divya Jyothi

Sc09B038

Place: IIST, Thiruvanthapuram

Date: 18th

July 2012

Page 4: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

3

ACKNOWLEDGEMENT

This project is a result of faithful culmination effort by many people, some

directly involved, some enlightening with their concealed presence. I extend

my gratitude to Dr. K. S. Dasgupta, Director IIST for providing the

opportunity to work at IIST.

I would like to express my sincere gratitude to the project guide,

Dr. B.S.Girish. for his immense help and guidance during this project. His

guidance and vision has been a major thrust for this project.

I hereby take this opportunity to express my indebtedness to all those who

are directly or indirectly involved in the work.

Page 5: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

4

ABSTRACT

The objective of this internship is to schedule a Flexible manufacturing system

using Petri- Nets and Genetic Algorithm. The Flexible Manufacturing System is

a complex discrete event dynamic system and complete utilization of the

available resources in a system is extremely important to optimize its

productivity. As the number of resources and jobs increases, the complexity in

scheduling FMS increases. In this project this scheduling problem is resolved by

modeling it with Petri-Nets and optimized using an Heuristic method Genetic

Algorithm with the means of GPenSIM. GPenSIM is a General-Purpose Petri

net Simulator, which is flexible, extensible and easy to use for modeling and

simulation of discrete event-driven systems.

Page 6: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

5

Table of Contents

CHAPTER NO. TITLE PAGE NO

Abstract 4

Table of Contents 5

1 INTRODUCTION.............................…………………………..6

1.1 Introduction…………………….................................................6

1.2 Flexible Manufacturing System..................................................7

1.3 Significance and Challenges in Scheduling FMS........................8

1.4 Motivation of This Work……….................................................10

1.5 Modeling using Petri-Nets...........................................................10

1.6 Methodologies for scheduling complex FMS..............................11

1.6.1 Fuzzy logic Approach……………………………………….…12

1.6.2 Heuristic oriented approach…………………...…………….…12

1.6.3 Genetic Algorithm……….........................................................12

2 PROBLEM DESCRIPTION.....................................................13

3 METHODOLOGY…………...................................................16

3.1 Petri-Nets..................................................................................16

3.2 GPenSIM .................................................................................17

3.3 Genetic Algorithm…………………………....……………….20

3.4 Genetic Algorithm for scheduling FMS…………………….23

4 RESULTS AND DISCUSSION……………….....................28

5 CONCLUSION………………………………………………31

Appendices 32

References 32

Page 7: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

6

CHAPTER 1

1.1 INTRODUCTION

Scheduling can be defined as the allocation of resources over time to perform a collection of

tasks (Baker, 1974). Scheduling problems usually arise in the fields such as production,

transportation, distribution and information processing environments .Its theory and

application has grown into an important field of research over the years. The importance of

good scheduling strategies in production environments in today‟s competitive world market

has become more prominent. The need to meet the market demands and to run production

units efficiently gives rise to a complex scheduling system.

Scheduling of manufacturing systems refers to the determination of the sequence in which

jobs are to be processed over the production stages, followed by the determination of the start

time and finish time of processing jobs (Conway et al., 1967). The importance of FMS

scheduling is to increase the utilization of the resources and to reduce the idle time and

reduction of in-process inventory. An effective schedule enables the effective utilization of

resources and helps to attain its strategic objectives. However, the generation of consistently

good schedules has proven to be extremely difficult in medium to large shops and optimal

scheduling involves costly and impractical enumeration procedures (Mikell P. Groover,

2001) [1].

The problems regarding scheduling in the production field has many variations such as single

machine scheduling, parallel machine scheduling, flow shop scheduling and job shop

scheduling problems. Each of these problem classes is unique, and each has its own

constraints and objectives. Job shop scheduling is the most common and difficult

combinatorial optimization problems among them. Job shop scheduling (or Job-shop

problem) is an optimization problem in computer science in which ideal jobs are assigned to

resources at particular times. The most basic version is as follows:

We are given n jobs J1, J2, ..., Jn of varying sizes, which need to be scheduled on m

machines with the objective to minimize the makespan. The makespan is the total length of

the schedule (that is, when all the jobs have finished processing). Mostly, the problem is

Page 8: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

7

presented as an online problem, that is, each job is presented, and the online algorithm needs

to make a decision about that job before the next job is presented.

This problem is one of the most well-known online problems, and was the first problem for

which competitive analysis was presented, by (Graham, 1966).

Many variations of the problem exist, which can be summarized as follows:

Machines can be related, independent, equal

Machines can require a certain gap between jobs

Machines can have sequence-dependent setups

Objective function can be to minimize the make span.

Jobs may have constraints, for example a job i needs to finish before job j can be started

Jobs and machines have mutual constraints, for example, certain jobs can be scheduled

on some machines only.

Companies use backward and forward scheduling to allocate plant and machinery resources.

Forward scheduling is planning the tasks from the date resources become available to

determine the shipping date. Backward scheduling is planning the tasks from the due date to

determine the start date and any changes in capacity required (Herrmann and Jeffrey, 2006).

1.2 FLEXIBLE MANUFACTURING SYSTEM

Flexible, the term itself suggests the flexibility in changing the manufacturing environment. It

can be defined as an „integrated computer-controlled configuration of NC (Numerical

controlled) machine tools, other auxiliary production equipment, and a material handling

system (MHS) designed to simultaneously manufacture low to medium volumes of a wide

variety of products at low cost (Mikell P. Groover, 2001). Business firms generally choose to

compete within one or two areas of strength. These areas of strength are often referred to as

distinctive competencies, core competencies, or competitive priorities. Among the options for

competition are price (cost), quality, delivery, service, and flexibility. An ever-increasing

number of firms are choosing to compete in the area of flexibility. Generally, this has meant

that the firm's major strength is flexibility of product (able to easily make changes in the

product) or flexibility of volume (able to easily absorb large shifts in demand). Firms that are

able to do this are said to have flexible capacity, the ability to operate manufacturing

equipment at different production rates by varying staffing levels and operating hours, or

Page 9: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

8

starting and stopping at will. Specifically, manufacturing flexibility consists of three

components: (1) the flexibility to produce a variety of products using the same machines and

to produce the same products on different machines; (2) the flexibility to produce new

products on existing machines; and (3) the flexibility of the machines to accommodate

changes in the design of products, which results in less waste, fewer workstations, quicker

changes of tools, dies, and stamping machinery, reduced downtime, better control over

quality, reduced labour, more efficient use of machinery, work-in-process inventory

reduced, increased capacity, increased production flexibility (Chandra, Charuet et al, (2005)).

Jain (1989) described the development of a scheduling system which communicates on-line

with the factory control system and generates schedules in real-time. The scheduling

decisions are based on the expertise of an experienced scheduler. With this concept the job

can be started at the latest possible time. Conflicts can be resolved by shifting individual jobs

in the schedule forward or backward. The system reacts interactively with the user and

permits solicitation of more information by the user or changing of the schedule.

Chandra et al (2005) explained an enterprise-level flexible manufacturing approach for a

multi-product manufacturer like an automotive company requires a cost-effective mix of

many key enablers, including flexible assembly plants, part commonality between products,

and supply base flexibility. They developed a strategic planning model that determines the

overall business value of flexible manufacturing systems. The model is designed to be

capable of dealing with problems of realistic size and scope. Interpretation of results of the

model gives important strategic insights on factors influencing manufacturing flexibility and

capacity requirements in the presence of these factors. The model is applied to study a

flexibility evaluation problem faced by a major automotive company. The experimental

results show that flexibility enablers such as flexible product to manufacturing facility

assignments and part commonality can lead to improved profitability.

1.3 SIGNIFANCE AND CHALLENGES IN SCHEDULING FMS

The Flexible Manufacturing System (FMS) is a complex discrete event dynamic system

(DEDS) and complete utilization of the available resources in a system is extremely

important to optimize its productivity. The most important objective of FMS scheduling is to

increase the utilization of resources and to reduce the idle time. The resource utilization is

Page 10: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

9

improved by scheduling the set of tasks so as to reduce the makespan. Another important

scheduling objective is to reduce in-process inventory i.e., to reduce the number of tasks

waiting in a given system while the other resources are busy with other tasks. The objective

of scheduling is to reduce the tardiness. In many situations, some or all tasks have due dates

and a penalty is incurred if tasks are finished after that date.

FMS scheduling challenges are concerned with running the FMS during real time once it has

been set up during the planning stage which is in advance of actual production. There are

many possible approaches that can be taken to schedule the manufacture of parts through the

system. Different approaches might be applicable in different situations. Some of the

problems include the following:

(1) Determine the optimal sequence at which the parts of the selected part types are to be

input into the system. Sometimes the part types have to be produced in certain relative ratios,

say for assembly purposes. A periodic input sequence might also be appropriate for some

types of FMSs. Producing to maintain certain production ratios of part types on the system

may be appropriate. Also, a fixed pre-determined input sequence may be appropriate. In other

situations, a flexible, real-time decision concerning which part to input next may be best.

(2) Appropriate scheduling methods and algorithms have to be developed. Scheduling aids

can range from simple dispatching rules to complex algorithms or procedures incorporating

look-ahead features. In particular, a scheduling algorithm is often applied to some input data,

resulting in a fixed schedule specifying which operations would be performed on which

machine tools and when. More appropriate for an FMS might be a real-time, on-line

scheduling policy, with scheduling decisions based on the actual state of the system (which

machines up, which parts waiting for which machines). If the FMS were carefully set up

during the planning stage, then a real time scheduling function might be easier to apply.

Perhaps more important during the planning stage, the due date criterion could also apply

during the scheduling.

(3) If there are several parts waiting to be processed by the same machine tool, determine the

priorities among these parts. Random processing of parts in batches of size one is commonly

referred to regarding FMS scheduling. However, a small amount of intelligent ordering of

parts can greatly improve an FMS's performance. It may be appropriate to determine an

optimal (dynamic) sequence at each machine tool. Perhaps this sequence could be periodic.

Many of the usual performance measures are important, such as maximize production or

machine utilization (the system is very expensive), or minimize inventory or flow time,

Page 11: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

10

subject to meeting due dates, in systems in which the due-date criteria are relevant. (Stecke,

1985).

1.4 MOTIVATION OF THIS WORK

One of the methods to increase competitiveness in manufacturing is by converting existing

manufacturing systems to flexible manufacturing systems (FMS) and implementing proper

scheduling system. Scheduling in an FMS environment is more complex and difficult than in

a conventional manufacturing environment. To achieve high performance for an FMS, a good

scheduling system should make a right decision at a right time according to system

conditions. Since the late 1970s when the first collection of papers on scheduling of FMS has

been published, it has been one of the most popular topics for researchers.Scheduling of

flexible manufacturing system is quite challenging and frequently encountered in the

industrial environment. Availability of a FMS cell in the manufacturing lab, consists of

ASRS (Automated storage/Retrieval system), specially designed for storing loads/jobs and a

storage/retrieval mechanism capable of storing 18 jobs with one pallet for carrying the job

from one machine to another machine and to the ASRS. A Linear shuttle acts as guide way

for the pallet to take the job from place to place. It also has one Aristo Robot. An Aristo

Robot is a 6 axis Articulated Robot used to load the job to the machine and unload it from the

machine after the machining process. One CNC Lathe and one CNC Milling machine, There

isn’t a scheduler available for the given FMS cell, so through this project we are

generating a scheduler to the FMS cell and modeling it with Petri net. As there is only

one pallet to carry the job, the no of constraints in scheduling the FMS for different

types of jobs has increased, which requires using Heuristic Methods like genetic

algorithm, dispatching rules etc. to optimize the resource utilization in FMS. A detailed

description of the FMS setup and the assumptions taken are given in the Chapter 2 of this

report.

1.5 MODELING FMS USING PETRI-NETS

Petri-Net is a formal model of information flow, which is one of the mathematical modeling

languages with interacting concurrent components used for the description of distributed

system. A structure with four parts or components: a finite set of places, a finite set of

transitions, an input function, and an output function. A Petri net model gives a graphical

notation for stepwise processes like choice, iteration, and concurrent execution.

Page 12: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

11

Petrinet can be used to model the system but as the no of jobs or resources increases

complexity of the problem increases and results in NP-Hard problem (Non-deterministic

polynomial-time hard), which can be solved by Heuristic Methods, through which we

cannot guarantee an optimum solution but a very good solution can be expected, generally

relatively fast and relatively good, depending on problem size the method differs (

Garey and David, 1979).

1.6 METHODOLOGIES FOR SCHEDULING COMPLEX FMS

A complex FMS can be scheduled using different methodologies, based on methodology they

are classified in the following ways:

1. Mathematical programming approach.

2. Multi-criteria decision making approach.

3. Fuzzy logic approach.

4. Heuristics oriented approach.

5. Control theoretic approach.

6. Simulation based approach.

7. Artificial intelligence (AI) based approach.

There is some cross fertilization among these approaches. For example, some AI based

approaches use simulation to generate or evaluate schedules. In the following discussion, the

approaches are classified on the basis of their main emphasis.

Jaikumar and Van Wassenhove (1989) proposed a Hierarchical Planning and scheduling

decomposition of FMS. In first level aggregate production model is used, the essential

constraints are the demand for parts and machine capacity. Second level objective is to

minimize tool changeover. Production requirements and tool and machine allocation are

determined in levels one and two. In the third level determine a feasible schedule that will

fulfil the buffer requirements and material handling constraints.

Lee and Jung (1989) formulated a part selection and allocating problem using goal

programming under Multiple-Criteria Decision Making Approach. They considered the goals

of meeting production requirements, balancing of machine utilization and minimization of

throughput time of parts.

Page 13: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

12

Buzacott and Shanthikumar (1980) under Heuristics Oriented Approach considered the

control of FMS as a hierarchical problem

1.6.1 Fuzzy logic approach

Fuzzy logic approaches easily deal with uncertain and incomplete information, and human

expert‟s knowledge can be easily coded into fuzzy rules. Due to these reasons, in recent

years, the use of fuzzy logic approaches in scheduling of flexible manufacturing systems

increased. Fuzzy set theory was introduced in (Zadeh et al, 1965) are probably the first to

propose a production planning and control system that uses fuzzy set theory. They presented

an approach to control the releasing of parts into the flexible manufacturing systems and the

scheduling of parts and tools in flexible manufacturing systems. The approach is based

primarily on fuzzy linear programming and on approximate reasoning. By using simulation

the superiority of these approaches over known priority rule scheduling is demonstrated.

1.6.2 Heuristics oriented approach

Term Heuristic refers to experience-based techniques for problem solving, learning, and

discovery. Heuristics are strategies using readily accessible, though loosely applicable,

information to control problem solving in human beings and machines, these methods are

used to speed up the process of finding a satisfactory solution, which may not be optimum

solution but a good solution. These are called “quick and dirty “methods. Depending on the

problem size the method differs.

1.6.3 Genetic Algorithm

Genetic Algorithm is a technique to solve problems that needs optimization. It loosely

mimics the process of evolution of organisms, where a problem solution stands in for the

organisms genetic strings. It follows a rule survival of the fittest, where potential solutions

replace the weakest solutions and opt for better solution through recombination of solutions

in a mating process and random variations.

“Genetic Algorithms can be applied to any problem that has the following two

characteristics:

(i): A solution can be expressed as a string.

(ii): A value representing the worth of the string can be calculated”

Page 14: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

13

These are subclass of the evolutionary computing and based on the Darwin‟s theory of

evolution- “natural selection-survival of the fittest”.

CHAPTER 2

PROBLEM DESCRIPTION

The machine-loading problem of a flexible manufacturing system (FMS) has been recognized

as one of the most important planning problems. In this research, a Genetic Algorithm (GA)

based heuristic is proposed to solve the machine loading problem of a random type FMS. The

objective of the loading problems is to minimize the system unbalance and maximize the

throughput, satisfying the technological constraints such as availability of machining time,

and tool slots. The proposed GA-based heuristic determines the part type sequence and the

operation-machine allocation that guarantee the optimal solution to the problem, rather than

using fixed predetermined part sequencing rules.

The main objective of the project is to schedule the given FMS cell, modeling with Petri nets

and optimizing using Genetic algorithm and Dispatching rules and comparing both results in

order to conclude with the best option. The given FMS cell consists:

1. CNC Lathe

2. CNC Milling Machine

3. Automated Storage and Retrieval System (ASRS)

4. Linear shuttle

5. Pallet

6. Aristo Robot

ASRS for storing the jobs, a pallet is used to load and unload the jobs from the ASRS and to

transfer it to desired machine for machining the particular job. Linear shuttle acts as the guide

way for the pallet to transfer job, there is only one pallets and only one job is carried at a

time. Each job has particular processing time, particular machining process in a particular

way which complicates the scheduling, so we use Petri Nets to model the problem and

optimize it using Genetic Algorithm and Dispatching rules and compare both results to find

best results.

1. Y

o

u

Page 15: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

14

The above picture represents the given FMS cell.

1

2

3

4

Aristo Robot:

6 axis Articulated robot used to

load the job to be machined from

the pallet to machine and unload

it from machine after the

machining process.

Page 16: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

15

The present ASRS can carry 18 jobs and we have selected 10 jobs of different types and two

machines, CNC Lathe and CNC Milling Machine for the given problem and modeled it using

petri nets and optimization using genetic algorithm.

The problem considered in this project is to develop a scheduler to optimize the resource

utilization by minimizing makespan for the FMS with different no of jobs (2, 6, 8, 10 etc.)

and of different kinds.. The following assumptions were considered to model and solve the

problem.

Assumptions:

1. All machines are available at time zero.

2. Processing timings are deterministic.

3. Breakdowns are not considered.

4. Preemptions of the operations are not considered (operations are not interrupted in

between the process), Machine stops only when the operation is over.

ASRS:

Automated Storage and Retrieval

System is a storage system that

performs storage and retrieval

operations with speed and

accuracy under a degree of

defined automation and is used to

store the jobs which can be

unloaded using pallet and transfer

it to desired machine for

machining.

Page 17: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

16

CHAPTER 3

METHODOLOGY

In this project we have used GPenSIM to model the given problem. GPenSIM is a General-

Purpose Petri net Simulator, which is flexible, extensible and easy to use for modeling and

simulation of discrete event-driven systems.

Flow chart of the Methodology adopted:

Figure 3.1 Flow chart of the Methodology adopted

3.1 PETRI-NETS

A Petri net (place/transition net or P/T net) is one of the several mathematical modeling

languages for the description of distributed systems. A Petri net is a directed bipartite graph,

in which the nodes represent transitions (i.e. events that may occur, signified by bars) and

places (i.e. conditions, signified by circles). The directed arcs describe which places are pre-

and/or post conditions for which transitions (signified by arrows) occurs.

A Petri net consists of places, transitions, and arcs. Arcs run from a place to a transition or

vice versa, never between places or between transitions. The places from which an arc runs to

Page 18: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

17

a transition are called the input places of the transition; the places to which arcs run from a

transition are called the output places of the transition.

Graphically, places in a Petri net may contain a discrete number of marks called tokens. Any

distribution of tokens over the places will represent a configuration of the net called

a marking. In an abstract sense relating to a Petri net diagram, a transition of a Petri net

may fire whenever there are sufficient tokens at the start of all input arcs; when it fires, it

consumes these tokens, and places tokens at the end of all output arcs. A firing is atomic, i.e.,

a single non-interruptible step.

Execution of Petri nets is nondeterministic: when multiple transitions are enabled at the same

time, any one of them may fire. If a transition is enabled, it may fire, but it doesn't have to.

Since firing is nondeterministic, and multiple tokens may be present anywhere in the net

(even in the same place), Petri nets are well suited for modelling the concurrent behaviour of

distributed systems.

A Petri-Net model of two jobs and two machines problem is shown in the figure 3.2

3.2 GPen-SIM

GPenSIM is a General Purpose Petri net Simulator used to model and simulate the given

FMS scheduling problem. In GPenSIM, definition of a Petri net graph (static details) is given

in the Petri net Definition File (PDF). There may be a number of PDFs, if the Petri net model

is divided into many modules and each module is defined in a separate PDF. While the Petri

net definition file has the static details, the main simulation file (MSF) contains the dynamic

information such as initial tokens in places, firing times of transitions of the Petri net (R.

Davidrajuh,2003).

In addition to these two files (main simulation file - MSF and Petri net definition file - PDF),

there can be a number of transition definition files (TDF) too. These TDF are classified into

two types: TDF_PRE and TDF_POST. TDF_PRE files are run before firing a transition;

TDF_POST files are run after firing a transition.

Page 19: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

18

,

Figure 3.2 Petri-Net model of two job s and two machines problem.

Page 20: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

19

In addition to these two files (main simulation file - MSF and Petri net definition file - PDF),

there can be a number of transition definition files (TDF) too. These TDF are classified into

two types: TDF_PRE and TDF_POST. TDF_PRE files are run before firing a transition;

TDF_POST files are run after firing a transition.

1. The role of PDF: the only use of a PDF is to represent a static Petri net graph.

2. The role of MSF: A PDF will be loaded into memory by MSF right before the

simulation start. Thus, an MSF first loads PDF (or PDFs in modular approach) into

memory and then starts the simulation. MSF will be blocked during simulation runs,

and when simulation is complete, the control will be passed back to MSF along with

the simulation result. Therefore MSF does not have any control of what going on

during simulation.

3. The role of TDF: Though MSF does not have any control of what going on during

simulation, however, TDFs will be called during simulation, before and after

transition firings. Thus, if we want to inspect run-time (simulation) properties then a

TDF can be used as a probe (more details given in the section on TDF).

4. The different files (main simulation file MSF, Petri net definition files PDFs, and

transition definition files TDFs) can access and exchange global parameters values

through a packet called „global_info‟. If a set of values is needed to be passed to

different files then these values are packed together as a global_info packet.

Global_info packet is visible in all the files, so that the values in the packet can be

read and even changed.

5. Integrating GPenSIM with Matlab environment.

Page 21: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

20

The methodology for creating a Petri net model consists of two steps:

Step-1. Defining the Petri net graph in a Petri net Definition File (PDF): this is the static

part. This step consists of three sub-steps:

a. Identifying the basic elements of a Petri net graph: the places,

b. Identifying the basic elements of a Petri net graph: the transitions, and

c. Connecting the elements with arcs

Step-2. Assigning the dynamics of a Petri net in the Main Simulation File (MSF):

a. The initial markings on the places, and possibly

b. The firing times of the transitions

After creating a Petri net model, simulations can be done.

Step-3. After modelling, optimize the problem using Genetic Algorithm. Code the Genetic

Algorithm in the MSF.

3.3 Genetic Algorithms

Genetic Algorithms are computerized search and optimization algorithms based on

mechanics of natural genetics and natural selection. They operate on the principle of “The

survival of the fittest”, where weak individuals die before reproducing, while stronger ones

live longer and bear many off spring and breed children, who often inherit the qualities that

enabled their parents to survive. The reproduced children are in most cases stronger than their

parents.( Eiben, A. E. et al ,1994)

Genetic Algorithm:

Basic Algorithm

Page 22: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

21

1. Creation of a “Population” of chromosomes

2. Evaluation of each chromosome

3. Selection of “best” chromosomes

4. Genetic manipulation to create the new population of chromosomes.

Each cycle produces a new generation of possible solutions for a given problem. At the first

stage an initial population is created as a starting point for the search. Each element of the

population is called a (string) chromosome. In the next stage, a performance (or fitness) of

each individual is evaluated with respect to the constraints imposed by the problem. Based on

each individual‟s fitness, a selection mechanism chooses “mates” for the genetic

manipulation process. The selection process is ultimately responsible for selecting of the best

fitted individuals. The manipulation process uses genetic operators to produce a new

population of individuals (offspring) by manipulation “Genetic information” referred to as

Genes possessed by members (parents) of current population.

It composes two operations: Crossover and Mutation. Crossover recombines the population‟s

genetic material. The selection process associated with recombination assures that special

genetic structures called building blocks are retained for future generations. These building

blocks then represent the most fitted genetic structures in a population. The recombination

process alone cannot avoid the loss of promising building blocks in the presence of other

genetic structures, which could lead to local minima. Also, it cannot explore search space

sections not represented in the populations genetic structures. Here Mutation comes into

action. (David E. Goldberg,, 1999).

The Mutation operator introduces new genetic structures in the population by randomly

modifying some of its building blocks, helping the search algorithms escape from local

minima‟s traps. Since the modification is not related to any previous genetic structure of the

population, it creates different structures representing other sections of the search space. The

offspring produced by the genetic manipulation process are the next population to be

evaluated. The offspring become parents in the next generation.

Page 23: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

22

Nature Computer

Population

Individual

Fitness

Chromosome

Gene

Reproduction

Set of solutions.

Solution to a problem.

Quality of a solution.

Encoding for a Solution.

Part of the encoding of a solution.

Crossover

Genetic Algorithm Operators

(a). Reproduction

It is usually the first operator applied on a population. It selects good string in a population

and forms a mating pool. In this, the above average string is picked from the current

population and their multiple copies are inserted in the mating pool in a probabilistic manner.

The commonly used reproduction operator is the proportionate reproduction operator where a

string is selected for the mating pool with a probability proportional to its fitness. Since the

population size is usually kept fixed, the sum of the probability of each string selected must

be one.

(b). Crossover

In the crossover operator, new strings are created by exchanging information among string of

the mating pool. Two strings are picked from the mating pool at random and some portions of

the strings are exchanged between the strings. The two strings participating in the crossover

operation are known as parent strings and the resulting strings are known as children strings.

It is intuitive from this construction that good sub-strings from parent strings can be

combined to form better child strings, if an appropriate site is chosen.

Since the knowledge of an appropriate site is usually not known beforehand, a random site is

often chosen.

With a random site, children strings produced may or may not have a combination of good

sub-strings from parent strings, depending on whether or not the crossing site falls in the

appropriate place. Because of good strings are created by crossover, there will be more copies

of them in the next mating pool generated by the reproduction operator. But if good strings

are not created by crossover, they will not survive too long, because reproduction selects

against those strings in subsequent generations.

Page 24: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

23

(c). Mutation

The mutation operator changes 1 to 0 and vice versa with a small mutation probability, pm.

The bit-wise mutation is performed bit by bit by flipping a coin with a probability pm. if at

any bit the outcome is true then the bit is altered, otherwise the bit is kept unchanged. The

need for mutation is to create a point in the neighbourhood of the current point, thereof

achieving a local search around the current solution. The mutation is also used to maintain

diversity in the population.

Advantages of Genetic Algorithm

• Global Search Method: GAs search for the function optimum starting from a

population of points -they can climb many peaks in parallel, reducing the probability

of getting trapped in local minima

• Blind Search Method: GAs only use the information about the objective function -

allowing a number of problems to be solved without the need to formulate restrictive

assumptions.

• GAs are widely applicable-more robust and applicable to a large range of problems-

handling constraints, multimodal, multiobjective, non-differentiable, non-continuous,

NP-complete problems

• The solutions have straightforward interpretation

• Low development costs- i.e. costs to adapt to new problem spaces

• Parallel computing

• Conceptual simplicity

Limitations of Genetic Algorithm

• No solid theoretical basis

• Parameter turning is largely based on trial and error

• No guarantee for finding optimal solutions within a finite amount of time

• Often computationally expensive

3.4 GENETIC ALGORITHM FOR SCHEDULING FMS

The detailed description is as follows.

Input data:

The following data pertaining to the problem are given as input:

Page 25: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

24

Initial markings represent the number of jobs and number of machines available in the given

places.

STEP 1:

Give the population size and generate the storestring using binary encoding.

Initial population: Starting with a subset of n randomly chosen solutions from the search

space (i.e.chromosomes). This is the population. Each chromosome represents the encoding

of a randomly generated solution

Encoding scheme – a GA operator

Binary encoding

Permutation encoding

Value encoding

Selection depends on problem nature.The encoding is stored in the form a string called

storestring. Just as in a chromosome, each gene controls a particular characteristic of the

individual. Similarly, each bit in the string represents a characteristic of the solution.

Binary Encoding –

Most common method of encoding. Chromosomes are strings of 1s and 0s and each position

in the chromosome represents a particular characteristic of the problem.

STEP 2:

Generate fitness using linear scaling mechanism.

Fitness function:

A fitness function quantifies the optimality of a solution (chromosome) so that that particular

solution may be ranked against all the other solutions.

A fitness value is assigned to each solution depending on how close it actually is to solving

the problem.

Ideal fitness function correlates closely to goal and quickly computable.

Genotypes are converted to phenotype information through decoding of chromosome and the

objective value is evaluated which usually becomes the fitness function.

The scaling mechanisms are generally divided into four categories as:

Linear scaling

Page 26: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

25

Sigma Truncation

Power Law Scaling

Exponential Scaling

Exponential Scaling:

In this method the initial fitness is scaled exponentially as:

fi’= exp (fi*k)

Where

k : A problem dependent constant

STEP-3

Identify the good solutions in a population and make multiple copies of the good

solutions.

Recombination/Selection: “Selects The Best, Discards The Rest”.

The primary objective of the recombination operator is to emphasize the good solutions and

eliminate the bad solutions in a population, while keeping the population size constant and

determines which solutions are to be preserved and allowed to reproduce and which ones

deserve to die out.

Selection techniques – a GA operator

• Roulette wheel selection

• Tournament selection

• Rank selection

The technique which we have used is Roulette wheel selection.

A marble is thrown in the roulette wheel and the chromosome where it stops is selected.

Clearly, the chromosomes with bigger fitness value will be selected more times.

This process can be described by the following algorithm.

1. [Sum] Calculate the sum of all chromosome fitness‟s in population

2. [Select] Generate random number from the interval (r)

3. [Loop] Go through the population and sum the fitness‟s

When the sum s is greater than r, stop and return the chromosome where you are. Of course,

the step 1 is performed only once for each population.

Page 27: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

26

STEP4

Two strings are picked at random to crossover

Crossover operator is the process in which two chromosomes (strings) combine their genetic

material (bits) to produce a new offspring which possesses both their characteristics.

Two strings are picked from the mating pool at random to cross over. Strings are selected

from the population based on crossover probability

Crossover probability: determines the number of chromosomes subjected to crossover

The method chosen depends on the Encoding Method.

Crossover rate should be high generally, about 60%-95%.

Crossover methods:

Single Point Crossover

Two- Point Crossover

Uniform Crossover

Partially Mapped Crossover: These are the crossover points-generated randomly.

STEP 5

Mutation: After a crossover is performed mutation takes place, it is intended to prevent

falling of all solutions in the population into a local optimum of the solved problem.

Mutation is the process by which a string is deliberately changed so as to maintain diversity

in the population set.

Mutation Probability- determines how often the parts of a chromosome will be mutated.

Mutation operation randomly changes the offspring resulted from crossover. The technique of

mutation depends mainly on the encoding of chromosomes. In case of binary encoding we

can switch a few randomly chosen bits from 1 to 0 or from 0 to 1. – called Bit inversion

Mutation rate should be very low. A best rate seems to be about 5% - 15%.

Page 28: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

27

Original offspring 1101111000011110

Mutated offspring 1100111000011110

The number of bits to be inverted depends on the Mutation Probability. For permutation

encoding following methods are used

Swap operation

Shift operation

Rotation operation

We have employed Swap operation

The process of selection, crossover and mutation are repeated until termination criterion is

reached

Commonly used criterion:

• Discovery of an optimal solution (precision ε > 0),

• Discovery of an optimal or near optimal solution.

• Convergence on a single or set of similar solutions.

• A user-specified threshold has been reached.

• A maximum number of cycles/generations are evaluated.

The above mentioned procedure is repeated for different no of jobs and varying parameters

like priority, population size, no of iterations etc.,

Page 29: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

28

CHAPTER 4

RESULTS AND DISCUSSIONS

Scheduling problems with different number of jobs and varying parameters have been

simulated using GPenSIM and the following results were obtained

Each job has given a different priority value s and different machining process timings, the

optimized obtained are as follows.

Checking time, total time required to complete the process for different no of jobs

Checking time to process 10 jobs in the given FMS environment is 2473 mins.

Checking time to process 8 jobs in the given FMS environment is 1975 mins.

Checking time to process 6 jobs in the given FMS environment is 1406 mins.

Checking time to process 12 jobs in the given FMS environment is 2925 mins.

The no of iterations performed for the above problems is 100. By each iteration, the results

have improvised and the checking time got reduced, after certain number of iterations the

checking time is constant and the optimized result is obtained.

We have simulated the above problems with different crossover probability , different

mutation probability for different number of iterations the results were almost equal.

FIGURE 4.1 Convergence graph for 6 jobs.

1405

1406

1407

1408

1409

1410

1411

1412

1413

1414

0 5 10 15 20 25 30 35

CONVERGENCE GRAPH OF 6 JOBS

PROCESSING TIME

Page 30: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

29

FIGURE 4.2 Convergence graph for 8 jobs.

FIGURE 4.3 Convergence graph for 10 jobs.

1970

1980

1990

2000

2010

2020

2030

0 5 10 15 20 25 30 35

CONVERGING GRAPH OF 8 JOBS

PROCESSING TIME

2460

2480

2500

2520

2540

2560

2580

2600

0 5 10 15 20 25 30 35

CONVERGENCE GRAPH OF 10 JOBS

PROCESSING TIME

Page 31: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

30

FIGURE 4.4 Convergence graph for 12 jobs.

Comparison of results between Genetic Algorithm and Smallest Processing Time (STP).

Number of jobs Genetic Algorithm Smallest processing time (STP)

Checking time Checking time

6 jobs 1406 1532

8 jobs 1975 2205

10 jobs 2473 2786

12 jobs 2925 3622

Table 4.1 Results of Genetic Algorithm and STP.

Results show that the implementation of the Genetic algorithm is more effective makespan

time as compared to standard sequencing rules like shortest processing time.

2920

2930

2940

2950

2960

2970

2980

2990

3000

3010

0 5 10 15 20 25 30 35

CONVERGENCE GRAPH OF 12 JOBS

PROCESSING TIME

Page 32: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

31

CONCLUSION:

With the objective to schedule the given FMS in the machine shop, considering assumptions

and constraints the scheduling problem has resulted into an N-P Hard problem. We have

taken up different problems by varying the number of jobs and other parameter values .In

order to solve the taken up problems, optimization technique Genetic Algorithm has been

employed. The given problem is modeled using Petri-Nets and simulated and optimized using

Genetic Algorithm by the means of GPenSIM programming in Matlab environment. Results

obtained are compared with the standard sequencing rules like STP and found out that

Genetic Algorithm is the very effective technique to be employed for scheduling FMS.

.

Page 33: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

32

REFERENCES:

Chandra, Charu, Mark Everson, and Janis Grabis, 2005, "Evaluation of enterprise

Level Benefits of Manufacturing Flexibility."

C. G. Cassandras and S. Lafortune, Introduction to Discrete Event Systems. Boston,

MA:Springer Science+Business Media, LLC, 2007.

C. A. Petri and W. Reisig, "Petri net," Scholarpedia, vol. 3, p. 6477, 2008.

David E. Goldberg, “Genetic Algorithms in search & Machine Learning” Addison

Wesley Longman (1999).

Darren J. Wilkinson, “Stochastic Modelling for Systems Biology”, Chapman &

Hall/CRC, NY, 2006. ISBN-10 1-58488-540-8. Read especially about Gillespi‟s

algorithm in chapter 06.

Davidrajuh, R. (2007). “A Service-Oriented Approach for Developing Adaptive

Distribution Chain”, International Journal of Services and Standards (ISSN (Online):

1740-8857 - ISSN (Print): 1740-8849), Vol. 3, No.1, pp. 64 – 78Mikell P. Groover,

Automation, Production Systems, and Computer- Integrated Manufacturing,

Second edition (2001).

Eiben, A. E. et al (1994). "Genetic algorithms with multi-parent recombination".

PPSN III: Proceedings of the International Conference on Evolutionary Computation.

The Third Conference on Parallel Problem Solving from Nature: 78–87. ISBN 3-540-

58484-6

GPenSIM web page: http://www.davidrajuh.net/gpensim/

Hillion H.P., Proth J. M. et Xie X.L., A heuristic algorithm for the periodic scheduling

and sequencing job shop problem, 26th IEEE Conference on Decision and Control,

Los Angeles, U.S.A., 1987, pp.612-617.

Hintz G.W, Zimmermann H.J, Theory and methodology A method to control flexible

manufacturing systems, European Journal of Operational Research, Volume 41,

Issues 3, 1989, Pp. 321-334.

I.J. Chen and C.H. Chung, “Effects of loading and routing decisions on performance

of Flexible Manufacturing Systems”, International Journal of Production Research,

1991.

J.A. Buzacott and J.G. Shanthikumar, “Models for understanding Flexible

Manufacturing Systems”, AIIE Transactions, 1980.

Page 34: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

33

K. Jensen, Coloured Petri Nets - Basic Concepts, Analysis Methods and Practical

Use, 2. ed. vol. 1: Springer, 1997.

Mikell P. Groover, “Automation, Production systems, and Computer Integrated

manufacturing”, Pearson education (1987).

R. Jaikumar and L.N. Van Wassenhove, “A production planning framework for

Flexible Manufacturing Systems”, Journal of Manufacturing Operations Management,

1989.

Reggie Davidrajuh, University of Stavanger, Norway, A Tool for Modelling and

Simulation of Discrete-Event Systems GPenSIM

R. Davidrajuh, "Event-driven simulation, modeling, and analysis with GPenSIM,"

Communications of the IIMA (Published by the International Information

Management Association), vol. 3, pp. 53-71, 2003

R. Davidrajuh and I. Molnar, "Designing a new tool for modeling and simulation of

discrete event systems," Issues in Information Systems, vol. X, pp. 472-477, 2009

Stateflow (2010) The MathWorks Inc, "Stateflow 7.4 - Design and simulate state

machines and control logic," http://www.mathworks.com/products/stateflow/, 2010.

S.M. Lee and H. Jung, “A multi-objective production planning model in a Flexible

Manufacturing environment”, International journal of Production Research, 1989.

T. Murata, "Petri nets: Properties, analysis and applications," Proceedings of the

IEEE, vol. 77, pp. 541-580, 1989.

STECKE, "Design, Planning, Scheduling, and Control Problems of Flexible

Manufacturing Systems", Annals of Operations Research, Vol.p 1 985a, forthcoming.

Zhou, M.C. and Robbi, A.D., 1994, “Application of Petri net methodology to

manufacturing systems”, Computer Control of Flexible Manufacturing Systems :

Research and Development ( Edited by : Joshi, S.B. and Smith, J.S.), Chapman &

Hall, Hong Hong..

Zadeh, L.A. (1965). "Fuzzy sets". Information and Control 8 (3): 338–

353. doi:10.1016/S0019-9958(65)90241-X . ISSN 0019-9958.

Page 35: SCHEDULING FLEXIBLE MANUFACTURING SYSTEM USING PETRI …€¦ · The objective of this internship is to schedule a Flexible manufacturing system using Petri- Nets and Genetic Algorithm.

34