parallel evolutionary approach report

98
A Parallel Evolutionary Approach for Solving Single Variable Optimization Problems Submitted in partial fulfillment of the requirement for the reward of degree MASTER OF ENGINEERING IN COMPUTER SCIENCE AND APPLICATION THAPAR UNIVERSITY, PATIALA Submitted By: Priti Punia Roll no.601103012 Under the supervision of Mrs. Maninder Kaur Assistant Professor, SMCA JULY 2013 SMCA DEPARTMENT THAPAR UNIVERSITY PATIALA-147004

Upload: priti-punia

Post on 16-Apr-2017

169 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Parallel evolutionary approach report

A Parallel Evolutionary Approach for Solving Single Variable Optimization Problems

Submitted in partial fulfillment of the requirement for the reward of degree

MASTER OF ENGINEERING

IN

COMPUTER SCIENCE AND APPLICATION

THAPAR UNIVERSITY, PATIALA

Submitted By:

Priti Punia

Roll no.601103012

Under the supervision of

Mrs. Maninder Kaur

Assistant Professor, SMCA

JULY 2013

SMCA DEPARTMENT

THAPAR UNIVERSITY

PATIALA-147004

Page 2: Parallel evolutionary approach report

-

Page 3: Parallel evolutionary approach report

i

Page 4: Parallel evolutionary approach report

ii

ACKNOWLEDGEMENT

First of all I would like to thank the Almighty, who has always guided me to work on

the right path of the life. I wish to express my profound gratefulness and appreciation

to Mrs. Maninder Kaur (Assistant Professor), School of Mathematics and

Computer Applications, Thapar University, for introduction to this extremely

interesting topic and for her patient guidance and support throughout the report. She

has been my mentor for help and without whose encouragement the learning would

not have been realized.

I place on record, my sincere gratitude Mr. Ashok Kumar (Project Fellow) for his

expert, sincere and valuable guidance encouragement extended to me.

I am also thankful to our Head of the Department, Dr. Rajesh Kumar as well as

PG Coordinator, Mr. Singara Singh, Assistant Professor, School of Mathematics

and Computer Applications, entire faculty and staff of School of Mathematics and

Computer Applications and then friends who devoted their valuable time and helped

me in all possible ways towards successful completion of this work. I thank all those

who have contributed directly or indirectly to this work. I will be failing in my duty

if I don’t express my gratitude to Dr. S. K. Mohapatra, Senior Professor

and Dean of Academic Affairs the University, for making provisions of

infrastructure such as library facilities, computer labs equipped with net facilities,

immensely useful for the learners to equip themselves with the latest in the field.

I am also thankful to the entire faculty and staff members of School of

Mathematics and Computer Applications for their direct-indirect help, cooperation,

love and affection, which made my stay at Thapar University memorable.

Last but not least, I would like to thank my parents for their wonderful love

and encouragement, without their blessings none of this would have been possible.

I would also like to thank my brother, since he insisted that I should do so. I would

also like to thank my close friends for their constant support.

Priti Punia

(601103012)

Page 5: Parallel evolutionary approach report

iii

ABSTRACT

Single Variable Optimization Problems (SVOP) are generally solved using

conventional mathematical techniques like Direct, Gradient-based technique. Many

simplified mathematical techniques have been incorporated in the past by various

mathematicians for Single Variable Optimization problem such as Linear

Programming, Quadratic Programming, Newton Based Techniques, Golden Section

search method, Random search, etc. All these conventional methods have many

disadvantages associated with them such as insecure convergence, algorithm

complexity, getting stuck in suboptimal solution. A wide variety of advanced

optimization techniques like Evolutionary Programming, Genetic Algorithm, and

Parallel Programming through PVM are proposed in literature for solving SVOP. In

this work, parallelization of Genetic Algorithm is done using PVM for solving SVOP.

An approach is made to the Global PGA (Parallel Genetic algorithm) in order to

implement SVOPGA (Single Variable Optimization Parallel Genetic Algorithm). In

this model, the master distributes individuals among slaves for evaluation. The master

performs all genetic operators and slaves only evaluate individuals. One of the main

reasons for using parallel evolutionary algorithms (PEAs) is to obtain efficient

algorithms with an execution time much lower than that of their sequential

counterparts. PEAs are parallel implementations which may provide considerable

gains in terms of scalability and performance. In the end, a study of set of results

obtained from SVOPGA is done. Graphs between numbers of generations vs. fitness

are plotted. At, last the CPU time is calculated for each host.

Page 6: Parallel evolutionary approach report

iv

LIST OF FIGURES

Figure No. Name of the Figure Page no.

1.1 A flowchart of optimal design procedure……………………………. 5

1.2 Fitness Landscape plot……………………………………………….. 10

1.3 Flow chart of a simple GA…………………………………………… 12

1.4 Roulette Wheel Selection Scheme…………………………………… 16

1.5 Schematic representation of standard parallel approach…………… 24

1.6 A schematic of a coarse-grained parallel GA………………………... 25

1.7 A schematic of a fine-grained parallel GA…………………………… 27

1.8 This hybrid GA combines a coarse-grained GA

and a fine-grained GA………………………………………………… 27

4.1 Setting up Environment Variables……………………………………….. 41

4.2 The creation of Executable Binaries……………………………………... 42

4.3 Initialization of PVM……………………………………………………... 42

4.4 Adding Hosts……………………………………………………………... 43

4.5 Master file spawns at slave……………………………………………….. 44

4.6 Generation of Fitness Value………………………………………………. 44

4.7 Parameters Value………………………………………………………….. 45

5.1 Rectangle inscribed in the given curve………………………………... 50

5.2 Fitness Value versus Number of Generations………………………... 53

5.3 Effect of rate of change of crossover………………………………….. 54

5.4 Effect of change of Mutation Probability………………………………. 55

Page 7: Parallel evolutionary approach report

v

LIST OF TABLES

Table No. Name of the Table Page No.

4.2 Experimental setup for SVOPGA………………………… 39 5.1 List of Parameters………………………………………….. 50 5.2 Output of SVOPGA……………………………………...... 51-53

Page 8: Parallel evolutionary approach report

vi

LIST OF ABBREVIATIONS

Abbreviation Term

GA Genetic algorithm

PGA Parallel genetic algorithm

EA Evolutionary algorithm

PEA Parallel evolutionary algorithm

PVM Parallel virtual machine

SVOP Single variable optimization problem

SVOPGA Single variable optimization parallel genetic algorithm

Page 9: Parallel evolutionary approach report

Table of Contents

Certificate...………………………………………………..………………...…... i

Acknowledgement……………………………………………………………….. ii

Abstract…….……………...……………………………………………………... iii

List of Figures………...………………………………………………………….. iv

List of Tables……………………………………………………………………. v

List of Abbreviations…………………………………………………………… vi

CHAPTER 1. INTRODUCTION …………………………….……………….. 1-29

1.1 OVERVIEW………………………………………………………………… 1

1.2 SINGLE VARIABLE OPTIMIZATION PROBLEM……………………... 5

1.2.1 Optimization Problem……….……..…..….………………….. 6

1.2.2 Optimality Criteria…………...……..………………………... 7

1.2.3 Optimization Algorithms………………………………….….. 7

1.3 INTRODUCTION TO GENETIC ALGORITHMS.….…...……….....……. 8-22

1.3.1 Search Space……….……..…..….……………………........... 9

1.3.2 The Fundamental Theorem of GA…………………….……… 11

1.3.3 A Simple GA……..……...……....…..……………….….….… 12

1.3.4 GA Operators in Further depth……………………………… 13

1.3.4.1 Encoding Problem……………………….…….…..…. 13

1.3.4.1.1 Binary Encoding..………...…..…...………. 13

1.3.4.1.2 Permutation Encoding..………..………....... 13

1.3.4.1.3 Value Encoding..………......….…...…….... 14

1.3.4.1.4 Tree Encoding..………...…..….…...……… 14

1.3.4.2 Selection……………..…………...…...…...………… 15

1.3.4.2.1 Roulette Wheel Selection.…....…..…..…... 15

1.3.4.2.2 Rank Selection..…....………..….………… 16

1.3.4.2.3 Tournament Wheel Selection.…....……..…. 16

1.3.4.3 Crossover and Mutation….…...…..…..…………….. 17

1.3.4.3.1 Binary Encoding……………...…………… 18

1.3.4.3.2 Permutation Encoding…………………… 19

Page 10: Parallel evolutionary approach report

1.3.4.3.3 Tree Encoding……….…...….……....…….. 20

1.3.5 Termination Criteria in GA………....…..………………….…. 20

1.3.6 Fitness Scaling……………...…………………………………. 21

1.3.8 Application areas of GA…...…..……….……………………… 21

1.3.9 Summary……………………………………………………….. 22

1.4 PARALLEL GENETIC ALGORITHMS……………….....…..…………. 22-26

1.4.1 Standard Parallel Approach…………………………………… 24

1.4.2 The Decomposition Approach....…..………………………… 24

1.4.2.1 Coarse-Grained Parallel ….…………..………………. 25

1.4.2.2 Fine-Grained Parallel………………………………….. 26

1.4.2.3 Hybrid Parallel Algorithm…...………………………... 27

1.4.3 Summary...….….………………………….…………………… 28

1.5 SCOPE OF WORK………………….….....…..…….……………………. 29

1.6 DISSERTATION OUTLINE………………………..…......…..………….29

Chapter 2. LITERATURE REVIEW………………...…………………………. 30-35

2.1 INTRODUCTION………………………………………………………… 30

2.2 HISTORY…………………………………………………………............. 30

2.3 RESEARCH GAP………………………………………………………… 31

2.3.1 Drawbacks of Available Methods……………………………… 33

2.4 OBJECTIVES OF THE STUDY………………………………………… 34

2.5 SUMMARY OF THE CHAPTER………………………………………… 35

CHAPTER 3. PROBLEM FORMULATION….……………………………….. 36-37

3.1 PROBLEM DEFINITION………………………………………………… 30

3.2 JUSTIFICATION………..…………………….…………..………............ 36

Page 11: Parallel evolutionary approach report

CHAPTE 4. SVOPGA: THE PROPOSED ALGORITHM...…..……………… 37-49

4.1 REALIZATION OF OPTIMIZED FUNCTION THROUGH GA…............... 38

4.2 SVOPGA EXPERIMENTAL SETUP………………….……….…………… 39

4.3 IMPLEMENTING SVOPGA ALGORITHM………………….…………… 39

4.3.1 Installation of PVM………………...…..….……….……………40

4.3.2 Configuration of PVM to work on different machines….……… 40

4.3.3 The PVM Console……………………………………………… 41

4.4 SVOPGA ALGORITHM……………………………………………………. 46

4.5 REALIZATION OF OPTIMIZED FUNCTION THROUGH GA…….……. 47

4.5.1 Initialization of the population………………………….……… 47

4.5.2 Encoding of the individuals…………………………….…….… 47

4.5.3 Sending and Receiving messages……………………….…….. 47

4.5.4 Calculation of the Fitness value………………………..………. 48

4.5.5 Roulette Wheel Selection……………………………………..… 48

4.5.6 Crossover……………………………………………………….. 48

4.5.7 Replacing old generations………………………………………. 48

4.5.8 Calculation of CPU time………………………………….…….. 48

4.6 SUMMARY OF THE CHAPTER……...…………………………………... 49

Chapter 5.Results………………………………………………………….…….... 50-55

5.1 PARAMETERS USED IN SVOPGA………………………………………. 50

5.2 SVOPGA PROBLEM TAKEN……………………………………………… 50

5.2.1 Calculation of the fitness value………………………………… 51

Chapter 6.Conclusions and Future Scope………………………………………. 56-57

6.1 CONCLUSIONS…………………………………………………………..… 56

6.2 FUTURE SCOPE……………………………………………………………. 57

Appendix A…………….………………………………………………………..… 58-82

References…………………………………………………………………...…….. 83-86

Page 12: Parallel evolutionary approach report
Page 13: Parallel evolutionary approach report

Thapar University, Patiala Page 1

CHAPTER-1

INTRODUCTION

This chapter includes the basic introduction to Single Variable Optimization

Problems (SVOP), Genetic algorithm (GA) and Parallel Genetic algorithm (PGA).

1.1 OVERVIEW

Optimization of single objective and multi-objective problems has been a long

time challenge all around the world for the scientists and researchers. These

optimization problems are related to our real-life problems. Like solving the mystery

of weather, galaxy, universe, planetary movements, plate Tectonics. There are many

traditional techniques in order to solve single objective and multi objective problems

like Direct and search methods. But they have their own loopholes associated with

them.

Classical optimization methods like Newton-Raphson method, Steepest

descent (Cauchy’s) method and Golden section search have some common difficulties

associated with them as follows:

The chosen initial solution is the major deciding factor in the convergence to

an optimal solution.

Most of the algorithms tend to get stuck to a suboptimal solution (local

minima or maxima).

An algorithm efficient in solving one optimization problem may or may not be

equally efficient in solving a different optimization problem.

Traditional algorithms are not as efficient in handling problems having a

discrete search space.

Algorithms cannot be efficiently used on a parallel machine.

For three decades [1], many mathematical programming methods have been

developed to solve optimization problems. However, until now, there has not been a

single totally efficient and robust method to cover all optimization problems that arise

in the different engineering fields. Most engineering application design problems

involve the choice of design variable values that better describe the behaviour of a

Page 14: Parallel evolutionary approach report

Thapar University, Patiala Page 2

system. At the same time, those results should cover the requirements and

specifications imposed by the norms for that system. This last condition leads to

predicting what the entrance parameter values should be whose design results comply

with the norms and also present good performance, which describes the inverse

problem.

Generally, in design problems the variables are discreet from the mathematical

point of view. However, most mathematical optimization applications are focused and

developed for continuous variables. Presently, there are many research articles about

optimization methods; the typical ones are based on calculus, numerical methods, and

random methods. The calculus based methods have been intensely studied and are

subdivided in two main classes:

1. The direct search methods find a local maximum moving on a function over

the relative local gradient directions.

2. The indirect methods usually find the local ends solving a set of non-linear

equations, resultant of equalling the gradient from the object function to zero,

that is, by means of multidimensional generalization of the notion of the

function’s extreme points from elementary calculus give a smooth function

without restrictions to find a possible maximum which is to be restricted to

those points whose slope is zero in all directions.

Both methods have been improved and extended, however they lack

robustness for two main reasons:

1. They have a local focus, since they seek the maximum in the analysed point

neighbourhoods.

2. They depend on the existence of their derivative, which many spaces of

practical parameters respect little the notion of having derivatives and

smoothness.

The real world has many discontinuities and noisy spaces, which are why it is

not surprising that the methods depending upon the restrictive requirements of

continuity and existence of a derivative, are unsuitable for all, but a very limited

problem domain. A number of schemes have been applied in many forms and sizes.

The idea is quite direct inside a finite search space or a discrete infinite search

space, where the algorithms can locate the object function values in each space point

Page 15: Parallel evolutionary approach report

Thapar University, Patiala Page 3

one at a time. The simplicity of this kind of algorithm is very attractive when the

numbers of possibilities are very small. Nevertheless, these outlines are often

inefficient, since they do not complete the requirements of robustness in big or highly

dimensional spaces, making it quite a hard task to find the optimal values. Given the

shortcomings of the calculus based techniques and the numerical ones the random

methods have increased their popularity.

The methods of random search are known as evolutionary algorithms. The

evolutionary techniques are parallel and globally robust optimization methods. They

are based on the principles of natural selection of Darwin [2] and the genetic theory of

the natural selection of R.A. Fisher [3]. The application of evolutionary techniques as

abstractions of the natural evolution has been broadly proven [4]. In general, all

recursive approaches based on population, which use selection and random variation

to generate new solutions, can be seen as evolutionary techniques. Indeed, the study

of non- linear problems using mathematical programming methods that can handle

global optimization problems effectively is of considerable interest. Genetic

Algorithms is one such method which has been a subject of discussion by [5], [6], [7]

and [8].

The genetic algorithm is an example of a search procedure that uses random

selection for optimization of a function by means of the parameters space coding. The

genetic algorithms were developed by Holland [9] and the most popular references are

perhaps Goldberg [10] and a more recent one by Bäck [11]. The genetic algorithms

have been proven successful for robust searches in complex spaces.

Some papers and dissertations, like [4], state the validity of the technique in

applications of optimization and robust search, crediting the genetic algorithms as

efficient and effective in the approach for the search. For these reasons Genetic

Algorithms are broadly used in daily activities, as much in scientific applications as in

business and engineering circles. It is necessary to emphasize that genetic algorithms

are not limited to the search space (relative aspects to the continuity and derivatives

existence among other properties). Besides, genetic algorithms are simple and

extremely capable in their task of searching for the objective improvement.

So, in this dissertation, a step forward to Evolutionary algorithm has been

taken as it has many plus points over traditional methods for optimization.

Evolutionary algorithm is search and optimization algorithms that use the theories of

evolution as a tool to solve problems in science and engineering. They are being used

Page 16: Parallel evolutionary approach report

Thapar University, Patiala Page 4

to solve various real time problems. They are powerful search techniques that are used

to solve difficult problems in many disciplines.

Parallelizing the evolutionary algorithms have further added up to its

efficiency by reducing time and cost. Some of more reasons to go for parallelizing

EAs are as following:

Firstly, as the population needs to be very large and the memory required to

store each individual may be considerable , so in some cases this makes it

impossible to run an application efficiently using a single machine.

Secondly, fitness evaluation is usually very time-consuming.

Third, sequential EAs may get trapped in a sub-optimal region of the search

space thus becoming unable to find better quality solutions.

PEAs can search in parallel different subspaces of the search space, thus

making it less likely to become trapped by low-quality subspaces. Last but not the

least, EAs, also work well with the discrete choices and many of our real-life

problems are having discrete behaviour. One of the most general heuristics used in

optimization techniques is the idea that the value of solutions is to some extent

correlated with how similar the solutions are; crudely, that a good solution is more

likely to be found nearby an arbitrary solution[12]. The simplest notion of similarity

of solutions is their proximity as measured in the problem parameters given.

In any case, the simplest way to use this heuristic is a hill-climbing algorithm:

start with some random solution, try variations of this, and so on. But the actual

success of hill-climber requires a stronger assumption to be true: that from any point

in the solution space there is a path through neighbouring points to a global optimum

and, although, a hill-climber can do better than random guessing on almost all

practical problems we encounter, it usually does not find a global optimum. More

likely, it gets stuck in a local optimum- a sub optimal point or plateau that has no

superior neighbouring points. But hill-climb method is not as effective in finding

global optima as Genetic algorithm, although it outperforms Genetic algorithm in

finding absolute optima. So, in order to find the global optimum solution in solving

SVOP, Parallel Genetic Algorithm is used.

Parallel implementations of genetic algorithms come in two flavours. Coarse-

grained parallel genetic algorithms assume a population on each of the computer

Page 17: Parallel evolutionary approach report

Thapar University, Patiala Page 5

nodes and migration of individuals among the nodes. Fine-grained parallel genetic

algorithms assume an individual on each processor node which acts with

neighbouring individuals for selection and reproduction. Here, the SVOP has been

implemented with the help of Master Slave model using PVM.

1.2 SINGLE VARIABLE OPTIMIZATION PROBLEMS

People optimize. Airline companies schedule crews and aircraft to minimize

cost. Investors seek to create portfolios that avoid excessive risks while achieving a

high rate of return. Manufacturers aim for maximum efficiency in the design and

operation of their production processes. Nature optimizes. Physical systems tend to a

state of minimum energy. The molecules in an isolated chemical system react with

each other until the total potential energy of their electrons is minimized. Rays of light

follow paths that minimize their travel time.

Optimization is an important tool in decision science and in the analysis of

physical systems. To use it, we must first identify some objective, a quantitative

measure of the performance of the system under study. This objective could be profit,

time, potential energy, or any quantity or combination of quantities that can be

represented by a single number.

Figure 1.1: A flowchart of optimal design procedure

Page 18: Parallel evolutionary approach report

Thapar University, Patiala Page 6

The objective [13] depends on certain characteristics of the system, called variables or

unknowns. Our goal is to find values of the variables that optimize the objective.

Often the variables are restricted, or constrained, in some way. For instance, quantities

such as electron density in a molecule and the interest rate on a loan cannot be

negative [13].A simple flow chart (Figure 1.1) of optimal design is as given as above.

However, there is no single method available for efficiently solving all the

optimization problems. Therefore different optimization methods developed for

solving different types of optimization problems. Some of the methods of Operation

Research are listed as below:

Mathematical Programming Techniques: Calculus Method, Calculus of

Variations, Non-Linear Programming, Geometric Programming, Quadratic

Programming, Linear Programming, Dynamic Programming, Integer

Programming, Stochastic Programming, Separable Programming, Multi-

objective Programming, Game Theory, Simulated Annealing, Genetic

Algorithms, Neural Networks, Network Methods: CPM and PERT.

Stochastic Process Techniques: Statistical decision theory, Markov processes,

Queuing theory, Renewal theory, Simulation methods, Reliable theory.

Statistical Methods: Regression analysis, Cluster analysis, Pattern recognition,

Design of experiments, discriminate analysis (factor analysis).

1.2.1 Optimization Problem

An optimization or a mathematical programming problem can be stated as

follows:

Find (x) = {x1, x2, x3,..... ,xn} which minimizes f(X), subject to constraints:

gj(X) <= 0, j = 1,2,...., m

lj(X) =0 , j = 1,2,......p

where,

X is an n-dimensional vector called the design vector, and f(X) is known as

Objective function, and gj (X) and lj(X) are known as inequality and equality

constraints, respectively.

The number of variables n, and the constraints that is m and p may not be related to

each other.

Page 19: Parallel evolutionary approach report

Thapar University, Patiala Page 7

The above stated problem is a constrained optimization problem. The

optimization problems may be either single variable or multivariable problems. In this

dissertation work, the focus is being kept on optimization of single variable problems

only.

1.2.2 Optimality Criteria

Local optimal point: A point or solution x is termed as a local optimal point,

if there exists no point in the neighbourhood of x which is better than x. In the

minimization problems, a point x is a locally minimal point if there is no such

point in the neighbourhood that has a function value smaller than f(x).

Global optimal point: A point or solution x is termed as a global optimal

point, if there exists no point in the entire search space which is better than the

point x. Similarly, a point x is a global minimal point if there is no such point

in the entire search space that has a function value smaller than f(x).

Single variable problems are the basis for many results in economics. To

illustrate, consider the building of a dam where the choice variable, x, is dam capacity.

The dam produces a constant stream of benefits equal to A. The cost of the dam is a

quadratic function of capacity, namely cx2

for a suitable positive constant c. There is

also a probability that the dam may overflow causing damage worth K, and the

probability of this happening is a decreasing function of capacity, given by e-gx

. The

benefit is thus as formulated below:

g(x) = A – e-gx

K –cx

This leads to the following single objective optimization problem:

Max g(x) = A – e-gx

K –cx2 (1.2.1)

The above equation is optimized in order to build the dam with the minimum cost and

with maximum capacity so that the overflow does not take place. Various optimizing

algorithms are thus applied which are discussed in the next section.

1.2.3. Optimization Algorithms

Optimization algorithms are iterative. They begin with an initial guess of the

optimal values of the variables and generate a sequence of improved estimates until

Page 20: Parallel evolutionary approach report

Thapar University, Patiala Page 8

they reach a solution [13]. The strategy used to move from one iterate to the next

distinguishes one algorithm from another. Most strategies make use of the values of

the objective function f, the constraints c, and possibly the first and second derivatives

of these functions.

Some algorithms accumulate information gathered at previous iterations,

while others use only local information from the current point. Regardless of these

specifics all good algorithms should possess the following properties:

Robustness -. They should perform well on a wide variety of problems in their

class, for all reasonable choices of the initial variables.

Efficiency - They should not require too much computer time or storage.

Accuracy -They should be able to identify a solution with precision, without

being overly sensitive to errors in the data or to the arithmetic rounding errors

that occur when the algorithm is implemented on a computer.

These goals may conflict. For example, a rapidly convergent method may

require too much computer storage on large problems. On the other hand, a robust

method may also be the slowest. Trade-offs between convergence rate and storage

requirements and between robustness and speed are central issues in numerical

optimization.

1.3 INTRODUCTION TO GENETIC ALGORITHMS

The book "Adaptation in Natural and Artificial Systems"[9], lays the groundwork for

GAs. A genetic algorithm consists of a population of individuals that reproduce (over

many generations) according to their fitness in an environment. Those individuals that

are most fit are most likely to survive, mate, and bear children. Children are created

by the stochastic application of genetic operators to the (parent) individuals.

Individuals of the population, coupled with the genetic operators, combine to perform

an efficient domain-independent search strategy that makes few assumptions about

the search space.

Each individual in a population is a point in the search space. Traditionally, an

individual in a GA is represented as a bit string of some length n. Each individual thus

represents one point in a space of size 2n. Given a bit string representation, a genetic

Page 21: Parallel evolutionary approach report

Thapar University, Patiala Page 9

algorithm will produce offspring using the genetic operators’ crossover

(recombination) and mutation. Mutation operates at the bit level by randomly flipping

bits within the current population. Mutation rates are low, generally around one bit

per thousand [15].

Goldberg [10] describes Genetic Algorithms as: search procedures based on

the mechanics of natural genetics and natural selection that is they are general search

and optimization algorithms that use the theories of evolution as criteria to solve

problems in science and engineering. This involves evolving a population of

candidate solutions to the particular problem, using operations inspired by natural

genetic variation and natural selection.

Genetic Algorithms are weak optimization methods. That means they do not

use domain-specific knowledge in their search procedure and due to this reason they

can be used to solve a wide range of problems. As a result there is disadvantage, of

course, is that the performance is questioned compared to the algorithms designed

specifically to solve a given problem.

It wasn't until the 1960s that Genetic Algorithms (GAs) were formally

developed by John Holland, along with his students and colleagues from the

University of Michigan. Holland’s GA is a method of moving from one population of

chromosomes (strings of ones and zeros) to a new population using a kind of natural

selection, together with the genetics-inspired operations of crossover, mutation and

inversion. A typical algorithm might consist of the following:

A number of randomly chosen guesses of the solution to the problem – the

initial population.

A means of calculating how good or bad each guess is within the population –

a population fitness function.

A method for mixing fragments of the better solutions to form new and on

average even better solutions – crossover.

An operator to avoid permanent loss of (and to introduce new) diversity within

the solutions-mutation.

1.3.1 Search Space

For many search or optimization problems in science, engineering and

elsewhere, there are a huge or even infinite number of possible solutions. This means

Page 22: Parallel evolutionary approach report

Thapar University, Patiala Page 10

that it is impossible to check each and every possible solution in order to find the

optimum or required one. One approach is to limit the number of possibilities to

within a chosen range with a certain step size or distance between each one. This

method is used in all problems solved using a computer, since after all there is a limit

to the granularity at which a digital computer can represent a problem. The set of

possible solutions is called a search space.

Figure 1.2: Fitness Landscape plot [14]

Associated with the idea of a search space is the concept of a “fitness landscape”

(defined by the biologist Sewell Wright in 1931). The fitness landscape is a measure

of the success, or fitness, of each solution within the search space. This fitness is the

"height" of the landscape. It is this fitness that is used to determine which solutions of

the GA population go forward to produce the new solutions.

In Figure 1.2, the arrows indicate the preferred flow of a population on the

landscape, and the points A and C are local optima. The red ball indicates a

population that moves from a very low fitness value to the top of a peak. This plot can

have a number of peaks (maxima) and troughs (minima). The highest peak is usually

referred to as the global maximum or global optimum. The lesser peaks are referred to

as local maxima or local optima.

For many search problems the goal is to find the global optimum. In general,

GAs attempt to find the highest peak in the fitness landscape of a given problem.

They do this using a combination of exploitation and exploration. That is, when the

algorithm has found a number of good candidate solutions it exploits them by

combining different parts of each solution to form new candidate solutions. This

process is known as crossover.

GAs also explores the fitness landscape through the creation of new candidate

solutions by randomly changing parts of old solutions. This process is known as

Page 23: Parallel evolutionary approach report

Thapar University, Patiala Page 11

mutation. Mutation is a genetic operator used to maintain genetic diversity from one

generation of a population of genetic algorithm chromosomes to the next.

1.3.2 The fundamental theorem of Genetic Algorithms

A genetic algorithm is constructed by stochastic operators, and its robust

search ability is based on the theorem depicted in [8], which states, "short schemata of

low order with aptitude above average, exponentially increase its number by

generations ", this is as following:

( ) ( ) ( )

( )

( )

where m(H,t+1) and m(H,t) are the schemata number H in the generation t+1 and t

respectively, f(H) is the average aptitude value of the strings that is included on the

schemata H, favg is the total population's average aptitude value, l is the total string

length, δ(H) is the schemata length from H, O(H) is the schemata order from H, pc is

the crossover probability and pm is the mutation probability. To illustrate the working

principles of GAs, an unconstrained optimization problem is considered. [17]

1.3.3 A Simple GA

The following pseudo code is the sequence of steps which are followed in

every GA. The communication among the steps can be observed more clearly in the

following flow chart in Figure 1.3. The pseudo code of the simple GA is as following:

1 Randomly initialize a population of individuals (the first generation).

2 Evaluate each individual in the population.

3 Select parents of individuals according to some selection schemes.

4 Create new individuals by mating current individuals; apply crossover and

mutation operators.

5 Delete chosen members of the population to make room for the new

individuals.

6 Evaluate the new individuals and insert them into the population.

7 If time is up, stop and return the best individuals; if not, go to 3.

Page 24: Parallel evolutionary approach report

Thapar University, Patiala Page 12

Figure 1.3: Flow chart of a basic genetic algorithm [16]

Page 25: Parallel evolutionary approach report

Thapar University, Patiala Page 13

1.3.4 GA Operators in Further Depth

1.3.4.1 Encoding a Problem

Encoding of chromosomes is one of the problems, when you are starting to

solve problem with GA. Encoding depends on the problem. In GA terminology, a

solution vector is called an individual or a chromosome. Chromosomes are made of

discrete units called genes. Each gene controls one or more features of the

chromosome. In the original implementation of GA by Holland, genes are assumed to

be binary digits. In later implementations, more varied gene types have been

introduced. Normally, a chromosome corresponds to a unique solution x in the

solution space. This requires a mapping mechanism between the solution space and

the chromosomes. This mapping is called an encoding. In fact, GA works on the

encoding of a problem, not on the problem itself. [18]

1.3.4.1.1 Binary Encoding

Binary encoding is the most common, mainly because first works about GA

used this type of encoding. In binary encoding every chromosome is a string of bits, 0

or 1.

Chromosome A 101100101100101011100101

Chromosome B 111111100000110000011111

Example of Problem: Knapsack problem

The problem: There are things with given value and size. The knapsack has

given capacity. Select things to maximize the value of things in knapsack, but

do not extend knapsack capacity.

Encoding: Each bit says, if the corresponding thing is in knapsack.

1.3.4.1.2 Permutation Encoding

In permutation encoding, every chromosome is a string of numbers, which

represents number in a sequence. Permutation encoding is only useful for ordering

problems.

Page 26: Parallel evolutionary approach report

Thapar University, Patiala Page 14

Chromosome A 1 5 3 2 6 4 7 9 8

Chromosome B 8 5 6 7 2 3 1 4 9

Even for this, problems for some types of crossover and mutation corrections

must be made to leave the chromosome consistent ( that is have real sequence in it).

Example of Problem: Travelling salesman problem (TSP)

The problem: There are cities and given distances between them. Travelling salesman

has to visit all of them, but he does not to travel very much. Find a sequence of cities

to minimize travelled distance.

Encoding: Chromosome says order of cities, in which salesman will visit them.

1.3.4.1.3 Value Encoding

Direct value encoding can be used in problems, where some complicated

value, such as real numbers are used. Use of binary encoding for this type of problems

would be very difficult.

In value encoding, every chromosome is a string of some values. Values can

be anything connected to problem, form numbers, real numbers or chars to some

complicated objects. It is often necessary to develop some new crossover and

mutation specific for the problem for this encoding.

Chromosome A 1.2324 5.3243 0.4556 2.3293 2.4545

Chromosome B ABDJEIFJDHDIERJFDLDFLFEGT

Chromosome C (back), (back), (right), (forward), (left)

Example of Problem: Finding weights for neural network

The problem: There is some neural network with given architecture. Find weights for

inputs of neurons to train the network for wanted output.

Encoding: Real values in chromosomes represent corresponding weights for inputs.

1.3.4.1.4 Tree Encoding

Tree encoding is used mainly for evolving programs or expressions, for

genetic programming. In tree encoding every chromosome is a tree of some objects,

such as functions or commands in programming languages. Programing language

Page 27: Parallel evolutionary approach report

Thapar University, Patiala Page 15

LISP is often used to this, because programs in it are represented in this form and can

be easily parsed as a tree, so the crossover and mutation can be done relatively easily.

Example of Problem: Finding a function from given values

The problem: Some input and output values are given. Task is to find a function,

which will give the best (closest to wanted) output to all inputs.

Encoding: Chromosomes are functions represented in a tree.

1.3.4.2 Selection

A stage of a genetic algorithm in which individual genomes are chosen from a

population for later breeding (recombination or crossover) [19]. It is the operation

where the candidate solutions (chromosomes) are selected for reproduction. Generally

the probability of selection should be proportional to the fitness of the chromosome.

To make it happen, we must make the following assumptions: firstly, there must be

some measurable quality in order to solve the problem - the fitness, secondly, that the

solution can be found by maximizing the fitness, and lastly, that all fitness values,

both good and bad, should be positive. With these conditions satisfied there are a

number of different ways in which we can select members from the population for

crossover. The most common of these is fitness proportionate selection, also known as

Roulette Wheel Selection.

1.3.4.2.1 Roulette wheel selection

In roulette wheel selection, the probability that individual i is selected, P

(choice = i), is computed as follows:

Page 28: Parallel evolutionary approach report

Thapar University, Patiala Page 16

Figure 1.4: Graphical representation of Fitness-Proportionate Roulette Wheel

Selection scheme [20]

Algorithm: ROULETTE WHEEL SELECTION [21]

1. Sum the fitness of all the population members. Call this TF (total fitness).

2. Generate a random number n, between 0 and TF.

3. Return the first population member whose fitness added to the preceding

population members is greater than or equal to n.

1.3.4.2.2 Rank selection

Each individual in the population is assigned a numerical rank based on

fitness, and selection is based on these ranking rather than absolute differences

in fitness. The advantage of this method is that it can prevent very fit individuals

from gaining dominance early at the expense of less fit ones, which would

reduce the population's genetic diversity and might hinder attempts to find an

acceptable solution [22].

1.3.4.2.3 Tournament Selection

In tournament selection a group of t individuals are randomly chosen

from the population. They may be drawn from the population with or without

Page 29: Parallel evolutionary approach report

Thapar University, Patiala Page 17

replacement. This group takes part in a tournament; that is, a winning individual

is determined depending on its fitness value. The best individual having the

highest fitness value is usually chosen deterministically, although stochastic

selection may occasionally be used. In both cases only the winner is inserted

into the next population, and the process is repeated N times to obtain a new

population. Often, tournaments are held between two individuals (binary

tournament). However, this can be generalized to an arbitrary group of size t

called the tournament size.

Algorithm: TOURNAMENT SELECTION

1 Choose k (the tournament size) individuals from the population at random.

2 Choose the best individual from pool/tournament with probability p

3 Choose the second best individual with probability p*(1-p)

4 Choose the third best individual with probability p*((1-p)^2)

5 Repeat 1 to 4 till tournament size is completed.

Deterministic tournament selection selects the best individual (when p=1) in

any tournament. A 1-way tournament (k=1) selection is equivalent to random

selection [23].

1.3.4.3 Crossover and Mutation

GAs evolves a population of individuals according to the process of natural

selection. During this process, genetic operators create new (child) individuals from

highly fit old (parent) individuals. Recombination (also referred to as crossover in this

report) is one of the genetic operators and is a key to the power of the genetic

algorithm [9]. Once parents have been selected their genes must be combined in some

way to produce offspring. In genetics this process is called crossover. The crossover

operator exchanges subparts (genes) of two chromosomes, roughly mimicking

recombination between two haploid (single chromosome) organisms. There are a

number of ways of which to exchange these genes, most, however, involve using

variations of either single-point crossover.

Page 30: Parallel evolutionary approach report

Thapar University, Patiala Page 18

1.3.4.3.1 Binary Encoding

1.3.4.3.1.1 Crossover

Single point crossover - one crossover point is selected, binary string from beginning

of chromosome to the crossover point is copied from one parent, the rest is copied

from the second parent.

Two point crossover - two crossover point are selected, binary string from beginning

of chromosome to the first crossover point is copied from one parent, the part from

the first to the second crossover point is copied from the second parent and the rest is

copied from the first parent.

Uniform crossover - bits are randomly copied from the first or from the second

parent.

Arithmetic crossover - some arithmetic operation is performed to make a new

offspring.

Page 31: Parallel evolutionary approach report

Thapar University, Patiala Page 19

1.3.4.3.1.2 Mutation

Bit inversion - selected bits are inverted

1.3.4.3.2 Permutation Encoding

1.3.4.3.2.1 Crossover

Single point crossover - one crossover point is selected, till this point the

permutation is copied from the first parent, then the second parent is scanned

and if the number is not yet in the offspring it is added.

(1 2 3 4 5 6 7 8 9) + (4 5 3 6 8 9 7 2 1) = (1 2 3 4 5 6 8 9 7)

1.3.4.3.2.2 Mutation

Order changing - two numbers are selected and exchanged

(1 2 3 4 5 6 8 9 7) => (1 8 3 4 5 6 2 9 7)

1.3.4.3.3 Value Encoding

1.3.4.3.3.1 Crossover

All crossovers from binary encoding can be used.

1.3.4.3.2 Mutation

Adding a small number (for real value encoding) - to selected values is added

(or subtracted) a small number.

(1.29 5.68 2.86 4.11 5.55) => (1.29 5.68 2.73 4.22 5.55)

Page 32: Parallel evolutionary approach report

Thapar University, Patiala Page 20

1.3.4.3.3 Tree Encoding

1.3.4.3.3.1 Crossover

Tree crossover - in both parent one crossover point is selected, parents are

divided in that point and exchange part below crossover point to produce new

offspring.

As in crossover, the mutation operator also has the effect of creating new

population members. It can help create chromosomes that would not otherwise

be formed by selection and crossover alone. In this way, mutation can allow the

GA explore more of the fitness landscape and keep it from getting trapped in

local optimal solutions. Unlike natural genetics, generally, GAs do not make

and then correct errors in the crossover operation, but instead randomly pick and

change a small number of bits in an individual’s chromosome.

1.3.5 Termination criteria in GA

This generational process is repeated until a termination condition has been

reached. Common terminating conditions are:

Fixed number of generations reached

Allocated budget (computation time/money) reached

The highest ranking solution's fitness is reaching or has reached a plateau such

that successive iterations no longer produce better results

The algorithm's termination condition (number of generations, time limit,

acceptable quality threshold, improvement stall, etc. – combination of these is

commonly used) [26].

Page 33: Parallel evolutionary approach report

Thapar University, Patiala Page 21

1.3.6 Fitness Scaling

The two undesirable characteristics of fitness proportionate selection,

premature convergence and stagnation, can cause problems with the selection

procedure. Rather than choosing an alternative selection method, one can choose to

scale the fitness values so as to reduce these unwanted effects, while still using fitness

proportionate selection methods such as roulette wheel selection. We want to maintain

an even selection pressure throughout the genetic algorithm's processing. One useful

scaling procedure is linear scaling where we want to scale the fitness of each

individual in the population such that the scaled fitness is linearly related to the non-

scaled fitness.

1.3.7 Elitism

Even when using the above methods of selection and scaling there is a chance

that the individual representing the correct solution might not get picked. To prevent

it, the best individuals can be placed in a temporary buffer before selection and then

added into the new population after selection, crossover and mutation have been

carried out. The process of keeping these elite individuals is known as elitism. It

allows a potentially optimal solution to be kept current as long as other solutions

generated from previous are no better. [25]

1.3.8 Application areas of GA

Some application areas by Domain:

Industrial design by parameterization: Scheduling Network design by construction,

Routing, Time series predictions, Database mining, Control systems, Artificial life

systems, Chemistry: molecular conformation, Robotics, Pattern Recognition,

Engineering Designs. [27]

Some application areas by technique:

Binary Chromosomes for set membership and function optimization, decision theory,

Real-valued chromosomes for function optimization, Tree-based chromosomes for

genetic programming, database mining and Order-based chromosomes for

optimization by construction.

Page 34: Parallel evolutionary approach report

Thapar University, Patiala Page 22

1.3.9 Summary

A brief overview of simple GA is done along with its basic operators like

encoding, crossover and mutation. Concept of Fitness Landscape and Elitism are also

being given a glance. Various selection strategies for finding the fitness value are

discussed with a brief overview. At last, the terminating conditions for a GA are

being discussed and the area applications are discussed.

In next section, introduction to parallelize this simple GA with the help of

PVM is given and the minute details which are to be kept in mind in order to

distribute the fitness function on different slave machines.

1.4 PARALLEL GENETIC ALGORITHM

For large population sizes, Genetic Algorithm (GA) is computationally

infeasible. The reason why the genetic algorithm is criticized is in most cases due to

the amount of time that has to be spent to compute it in order to obtain a desired result

even on the fastest machines. This is mainly due to a vast number of possible

solutions combined with objective evaluation functions (that is functions that, given a

certain trial input will produce the output) that are also relatively laborious. The

effectiveness of Evolutionary Algorithms (EAs) is limited by their ability to balance

the need for a diverse set of sampling points with the desire to quickly focus search

upon potential solutions. Due to increasing demands such as searching large search

spaces with costly evaluation functions and using large population sizes, there is an

ever growing need for fast implementations to allow quick and flexible

experimentation. Most EAs work with one large panmictic population. Those EAs

suffer from the problem that natural selection relies on the fitness distribution over the

whole population. Parallel processing is the natural route to explore [28].

It is obvious because the genetic algorithm is not a mathematical way to the

solution of the problem, but it is more of a stochastic, discrete, non-linear, and a high-

dimensional seeking algorithm. A simple technique to reduce the execution time of

genetic algorithms (GAs) is to divide the task of evaluating the population among

several processors [29].

Page 35: Parallel evolutionary approach report

Thapar University, Patiala Page 23

A categorization of PEAs is presented based on the two basic approaches

mentioned before, namely the standard parallel approach, and the decomposition

approach. The classification presented is similar to other classifications [28, 29, 30,

and 31].

In the first approach, the sequential EA model is implemented on a parallel

computer. This is usually done by dividing the task of evaluating the population

among several processors.

In a PEA model, the full population exists in distributed form. Either multiple

independent or interacting subpopulations exist (coarse-grained or distributed EA), or

there is only one population with each population member interacting only with a

limited set of neighbours (fine-grained EA). The interaction between populations, or

members of a population, takes place with respect to a spatial structure of the

population. The PEAs are classified according to this spatial structure, the granularity

of the distributed population, and the manner in which the EA operators are applied.

In a coarse-grained PEA, the population is divided into several

subpopulations, each of which runs an EA independently and in parallel on its own

subpopulation. Occasionally, fit individuals migrate randomly from one

subpopulation to another (island model). In some implementations migrant

individuals may move only to geographically nearby subpopulations (islands), rather

than to any arbitrary subpopulation (stepping-stone model).

In a fine-grained PEA, the population is divided so that each individual is

assigned to one processor. Individuals select from, crossover with, and replace only

individuals in a bounded region (neighbourhood/deme). Since neighbourhoods

overlap, fit individuals will propagate through the whole population (Diffusion or

isolation-by-distance or neighbourhood model).

These models maintain more diverse subpopulations mitigating the problem of

premature convergence. They also naturally fit the model of the way evolution is

viewed as occurring, with a large degree of independence in the global population.

Parallel EAs based on Subpopulation Modelling can even be considered as creating

new paradigms within this area and thus establishing a new and promising field of

research.

Page 36: Parallel evolutionary approach report

Thapar University, Patiala Page 24

1.4.1 Standard Parallel Approach

Also referred as global parallelization. This method maintains a single

population and the evaluation of the individuals and/or the application of genetic

operators are done in parallel. A simple way to do this is to parallelize the loop that

creates the next generation from the previous one. Most of the steps in this loop

(evaluation, crossover, mutation, and, if used, local search) can be executed in

parallel. The selection step, depending on the selection algorithm and the problem

solved, usually requires a global ranking that can be a parallel bottleneck.

A single master processor supervises the total population and does the

selection. Slave-processors receive individuals that are recombined to create offspring

(Figure 1.5). These offspring have to be evaluated before they are returned to the

master [33, 34, and 35].

Figure 1.5: Schematic representation of standard parallel approach

The algorithm is synchronous, when the master waits to receive the fitness

values for all the population before proceeding to next generation. Even though most

global parallel EA implementations are synchronous, it is possible to implement

asynchronous global PEAs, where the master does not stop to wait for any slow

processors. The time used in communications depends directly on the number of

slave processors and on the particular hardware used to execute the algorithm. [29]

Using a distributed memory computer, the communication overhead associated with

Page 37: Parallel evolutionary approach report

Thapar University, Patiala Page 25

distributing data structures to processors, and synchronizing and collecting the results,

grows as the square of population's size. This can minimize any performance

improvements due to multiple processors, unless function evaluation (or local search)

is a time-consuming process. This type of parallelism is more efficiently implemented

on shared-memory machines.

1.4.2 The Decomposition Approach

The main characteristic of this approach is that the full population exists in

distributed form.

1.4.2.1 Coarse-Grained Parallel Genetic Algorithms (Migration model)

It is the most popular method and many papers have been written describing

many aspects of their implementation. In a coarse-grained or distributed PEA (Figure

1.6), the population is divided into several subpopulations. Each subpopulation is

assigned to a different processor (island). Each processor runs a sequential EA on its

population. Individuals in a subpopulation are relatively isolated from individuals on

another subpopulation. Isolated populations help maintain genetic diversity.

Figure 1.6: A schematic of a coarse-grained parallel GA.

Therefore the population of each island can explore a different part of the

search space. Occasionally, fit individuals migrate from one population to another [7,

9, 10, 19, 20, 21, 24, 27, 28, 30, 31, 33, 35, 37, 38, and 39]. It is usually implemented

on distributed-memory MIMD computers. Coarse-grained GAs are also known as

“island" parallel GAs because in Population Genetics there is a model for the structure

of a population that considers relatively isolated demes, it is called the island model. It

seems that since the size of the demes is smaller than the population used by a serial

Page 38: Parallel evolutionary approach report

Thapar University, Patiala Page 26

GA, we would expect that the parallel GA will converge faster. However, when we

compare the performance of the serial and the parallel algorithms we must also

consider the quality of the solutions found in each case. It is true that a smaller deme

will converge faster, but it is also true that the quality of the solution might be poorer.

Most implementations run the same EA on each island. Few exceptions are:

The different encodings with different size of individuals on separate islands

[22].

The different mutation rates used on three populations of the GAMA system

[32].

The co-operating populations, where populations are allowed to evolve using a

number of different operators and parameters [4].

Despite the attempts to provide some theoretical foundations, the setting of the

parameters is still implemented using intuition rather than analysis. Some important

choices are:

Which other processors a processor exchanges individuals with.

How often processors exchange individuals (epoch or migration interval or

frequency).

The number of individuals that processors exchange with each other

(migration rate).

What strategy is used in selecting individuals to migrate

1.4.2.2 Fine-Grained Parallel Genetic Algorithms (Neighbourhood Migration)

In a fine-grained PGA, (Figure 1.7) usually one individual is assigned to each

processor. The individuals are allowed to mate only within a neighbourhood, called a

deme. Even though most implementations propose a relatively small deme size, the

critical parameter is the ratio of the radius of the deme to the size of the underlying

grid. Indeed, the ideal case is to have just one individual for every processing element

available. This model is suited for massively parallel computers, but it can be

implemented on any multiprocessor.

Page 39: Parallel evolutionary approach report

Thapar University, Patiala Page 27

Figure 1.7: A schematic of a fine-grained parallel GA.

Shape of deme may be a cross, square, line etc. Demes overlap by an amount

that depends on their shape and size. Thus fit individuals are allowed to propagate

through the whole population. Some important choices are the size of the

neighborhood/deme size, the processor connection topology, and the individual

replacement scheme [6, 11, 12, 17, 25, 26, 29, 34, and 36]

1.4.2.3 Hybrid Parallel Algorithms

Some researchers have tried to combine two or more methods to parallelize

EAs, and this results in hybrid PEAs (Figure 1.8). Some of these new hybrid PEAs

add a new degree of complexity, but other manage to keep the same complexity as

one of their components.

Figure 1.8: This hybrid GA combines a coarse-grained GA (at the high level) and

a fine-grained GA (at the low level).

Page 40: Parallel evolutionary approach report

Thapar University, Patiala Page 28

It is important to emphasize that while the global parallelization method does

not affect the behaviour of the algorithm, the last two methods introduce fundamental

changes in the way the GA works. For example, in the global method the selection

operator takes into account the entire population, but in the other parallel GAs

selection is local to each deme.

Also, in the methods that divide the population it is only possible to mate with

a subset of individuals (the deme), whereas in the global model it is possible to mate

with any other individual. The final method to parallelize GAs uses some combination

of the first three. We call this class of algorithms hybrid parallel GAs. Combining

parallelization techniques results in algorithms that combine the benefits of their

components and promise better performance than any of the components alone.

At the higher level this hybrid is a coarse-grained parallel GA where each

node is a global parallel GA. Some hybrids have a coarse-grained EA at the upper

level and a fine-grained EA at the lower [16, 17, 18, 23]. Another way to hybridize a

PEA is to use a form of global parallelization on each of the islands of a coarse-

grained PEA [7] or vice-versa combine master-slave EA with coarse-grained EAs at

the lower level [33].

1.4.3. Summary

This section reviewed some representative publications on PEAs and

presented a categorization into three categories: standard or global parallelization,

decomposition model (coarse- and fine-grained algorithms) and hybrid EAs. The

research on PEAs is dominated by studies on coarse-grained algorithms. The review

suggests that there are several fundamental issues remain to be addressed (migration

rates, communication topology, deme size etc.) questions that remain unanswered.

Hybridization of PEAs seems to be useful, resulting in faster and more robust

algorithms. Generally, PEAs improve the performance of EAs not only in terms of

speedup but also in terms of the quality of the solution found. PEAs maintain more

diverse subpopulations mitigating the problem of premature convergence. They also

naturally fit the model of the way evolution is viewed as occurring, with a large

degree of independence in the global population.

Page 41: Parallel evolutionary approach report

Thapar University, Patiala Page 29

1.5 SCOPE OF WORK

In this dissertation, SVOPGA is applied on a pair of homogeneous machines

in order to solve Single Variable Optimization problem. In fact, this can be easily

extended to work on heterogeneous machines also. This is because PVM is designed

in a way to communicate among homogeneous as well as heterogeneous machines.

Numbers of Hosts are added statically in this work, which can be done dynamically

also that is it can also search the available Hosts at the run time to distribute the work.

1.6 DISSERTATION OUTLINE

Chapter 2: It includes the Literature Review on the SVOP as well as on GA, PGA

and also contains the methods applied to solve Single Variable Optimization Problem

(SVOP). The Research gap in the titled work is mentioned in this chapter. Further, it

concludes with the section Objectives of the Study.

Chapter 3: It describes the formulation of SVO problem. The SVOP formulation is

defined in this chapter along with the reason to choose GA, PGA to solve the stated

problem.

Chapter 4: This chapter includes the proposed solution for SVOP along with the

experimental setup for its implementation. Explanation of the function modules which

are used for implementation of SVOPGA is also done.

Chapter 5: It presents the Results obtained from the implementation of SVOPGA.

The work is concluded with the snapshots of the results, graphs and tables.

Chapter 6: This chapter consists of the Conclusions and the Future Scope. The

Future Scope section tells about the possibility of the extension of the work.

Page 42: Parallel evolutionary approach report

Thapar University, Patiala Page 30

CHAPTER-2

LITERATURE SURVEY

2.1 INTRODUCTION

Optimization problems are common in many domains and various disciplines.

In optimization problems, solutions which are optimal or near-optimal with respect to

some goals are to be found. Genetic algorithms are being used to solve Single as well

as Multi-objective optimization problems. Various models have been suggested in

order to make GA work parallely like Fine-grained model, Coarse-grained model and

Hybrid model. Parallel Evolutionary Algorithm has been developed to reduce the

running time of serial Evolutionary algorithms. In order to make the GA parallel, a

software tool called PVM (Parallel Virtual Machine) is used. PVM is designed to

allow a network of heterogeneous or homogeneous UNIX and/or Windows machines

to be used as a single distributed parallel processor. Thus large computational

problems can be solved more cost effectively by using the aggregate power and

memory of many computers. Simple C or FORTRAN functions are used to program.

The software is portable. However, programmer has to explicitly implement all

parallelization details and it is a bit difficult to debug trace in parallel.

Different optimization techniques that are found in the literature to solve

various Single Variable Problems like Calculus-based techniques, Enumerative

techniques, Random techniques. A different technique that is Parallel Genetic

Algorithm is being used for two reasons. First, that they are nature inspired, so they

have a tendency to repair and reproduce. Their efficiency and robustness have been

appreciated for the past many years. Second, they have the ability to parallelize, thus

capable of enhancing the speedup and decreasing the execution time.

2.2 HISTORY

Lo K. L. et al., [38] gave an overview of Single and Multi-objective

Optimization. An optimization problem with one objective function is known as

Single Objective Optimization. When an optimization problem involves more than

one objective function, the task of finding one or more optimum solutions is known as

Page 43: Parallel evolutionary approach report

Thapar University, Patiala Page 31

Multi-objective Optimization. Optimization is a method to find and compare feasible

solutions until no better solution other than previous one can be found.

The conventional techniques such as Newton-Raphson Method, a Gradient

based methods are overcomed by artificial intelligent computer based mathematical

techniques. The conventional optimization methods has some disadvantages such as

insecure convergence, and may even fail to converge due to inappropriate initial

conditions for Newton based method. Some other problems associated with the

traditional techniques are as follows:

All these methods have some assumption like of continuity and

differentiability of objective function which is not true practically.

All these methods cannot be applied with discrete variables which are

transformer taps.

These methods are not providing the optimal solution as they usually gets

stuck at a local optimum.

Problems may arise due to handling of inequality constraints that presents the

differences of potentially non-convexed or even disjoint feasible regions.

Linear Programming and Non Linear Programming Techniques are not

suitable for constraint problems.

Newton-Raphson Method has a drawback that these are sensitive to the initial

conditions and they may even fail to converge due to the inappropriate initial

conditions.

In Interior Point Method, if the step size is not chosen properly, the sub-linear

problem may have a solution that is infeasible in the original nonlinear

domain.

So as to overcome these problems, artificial intelligence technique like

Genetic Algorithm is used instead of these conventional methods.

Ibrahiem M.M. et al. [39] proposed a new paradigm for solving systems of

non-linear equations through using Genetic Algorithm (GA) techniques. So, a great

attention was presented to illustrate how genetic algorithms (GA) techniques can be

used in finding the solution of a system described by nonlinear equations. To achieve

this purpose, Gauss–Legendre integration is applied as a technique to solve the system

of nonlinear equations then we use genetic algorithm (GA) to find the results without

converting the nonlinear equations to linear equations. The obtained results indicate

Page 44: Parallel evolutionary approach report

Thapar University, Patiala Page 32

that a GA is effective and represents an efficient approach to solve the systems of

nonlinear equations that arise in the implementation of Gauss–Legendre numerical

integration.

Al Dahoud et al. [40] recommended genetic algorithms to find the solution of

a system of linear equations. Since it is difficult to describe the solution set of a linear

system with infinitely many solutions. To avoid the disadvantages of solving large

system of linear equations such as rounding errors, inverting large matrixes, the

genetic algorithms were introduced. The obtained results indicated that a GA was

effective and represented an efficient approach to solve the systems of linear

equations.

Man K.F., et al. [41] introduces genetic algorithms (GA) as a complete entity,

in which knowledge of this emerging technology can be integrated together to form

the framework of a design tool for industrial engineers. The authors have made an

attempt to explain “why’’ and “when” GA should be used as an optimization tool.

The authors successfully made an attempt to outline the features of GA in terms of the

genetic functionality of operators, the problem formulation, the inherent capability of

GA for solving complex and conflicting problems, as well as its various practical

applications.

Rangel-Merino A. et al. [1] characterized the Genetic Algorithm as

following:

The GA work with base code of the variables group (Artificial Genetic

Strings) and not with the variables in themselves.

The GA work with a set of potential solutions (population) instead of trying to

improve a single solution.

The GA do not use information obtained directly from the object function, of

its derivatives or of any other auxiliary knowledge of the same one.

The GA applies probabilistic transition rules not deterministic rules.

Pakhirs M.K., [42] stated that Genetic Algorithm has capability of

parallelism and is used for solving stochastic optimization problems. Holland was first

scientist who coined GA technique but later on it was elaborated and improved by

many other scientists. Genetic Algorithm is random search technique. It is a part of

Artificial Intelligence. However, to make the program run faster, a set of dedicated

computers are needed so as to run it parallelly.

Page 45: Parallel evolutionary approach report

Thapar University, Patiala Page 33

The PVM software (Geist et al. [43]) allows a collection of networked

computers to cooperate on a problem as if they were a single multi-processor parallel

machine. It was developed by Oak Ridge National Laboratory.

Panagiotis A. [28] conveyed a review of current implementation techniques

for EAs on parallel hardware. During recent years the area of Evolutionary

Algorithms (EAs) in general and the field of Parallel Evolutionary Algorithms (PEA)

in particular has matured up to a point, where the application to a complex real-world

problem in some applied science is now potentially feasible and to the benefit of both

fields. The availability of faster and cheaper parallel computers makes it possible to

apply EAs to large populations and very complex populations.

Liu S. et al. [36] have implemented MPI master-slave parallel genetic

algorithm by analysing the basic genetic algorithm and parallel MPI program, and

building a Linux cluster in the mentioned paper. This algorithm is used for the test of

maximum value problems (Rosen brocks function). And thus acquires the factors

influencing the master-slave parallel genetic algorithm by deriving from the analysis

of test data. The experimental data proved that the balanced hardware configuration

and software design optimization can improve the performance of system in the

complexity of the computing environment using the master-slave parallel genetic

algorithms.

Depolli M., et al. [37] presented an implementation of an asynchronous

master slave called as DEMO, an evolutionary algorithm for multi-objective

optimization. AMS-DEMO was designed for solving time-intensive problems

efficiently on both homogeneous and heterogeneous parallel computer architectures.

The algorithm is used as a test case for the asynchronous master-slave parallelization

of multi-objective optimization that has not yet been thoroughly investigated.

Selection lag is identified as the key property of the parallelization method, which

explains how its behaviour depends on the type of computer architecture and the

number of processors.

2.3 RESEARCH GAP ANALYSIS

The state of art in literature survey concludes the fact that there is not much

work done on single variable optimization problems as compared to multi-variable

optimization problems. This may be due to the reason that more complex real world

Page 46: Parallel evolutionary approach report

Thapar University, Patiala Page 34

problems are multi-objective optimization problems. Hence, single variable

optimization problems (SVOP) have not been in lime light for the last so many years

and were under constant dark. This area was left to be solved through the available

mathematical techniques or some other conventional techniques. However, Genetic

algorithm is frequently used to solve number of complex real world problems and

much research is done on this field. Similarly Parallel Genetic algorithm is also an

area of constant interest among scientists.

2.3.1 Drawbacks of Available methods

Most of these techniques take significant amount of time for a single

evaluation and often require large number of evaluations of the objectives and the

constraints. Hence, the solution can be extremely time-consuming. So, in this thesis

work genetic algorithm as an optimization technique is being worked upon as it is

adaptable to parallel computing. Global Parallel Genetic Algorithm is used here in

this dissertation.

This is achieved using PVM. Section 1.3 explains the genetic algorithm

approach for the optimization of single variable problem. The pseudo code for

parallel GA is covered under section 1.3.3 .This work concludes with a successful

implementation of proposed algorithm and discusses possible future scope.

2.4 OBJECTIVES OF THE STUDY

The Single Variable Optimization Problems (SVOP) has been solved by using

conventional mathematical techniques. But these traditional techniques have some

loopholes linked with them, thus a different approach is the need of the hour. The

following are the two objectives of the research work:

Detailed study of the SVOP, Genetic algorithm and Parallel Evolutionary

Algorithm. Study of how Genetic Algorithm can be helpful in solving SVOP.

Further, studying how implementing GA in parallel can be useful.

Development of an algorithm to solve SVOP using PGA. This further requires

two steps: First, is to optimize a single-variable problem using evolutionary

algorithm. Next, parallelism of Evolutionary algorithm using PVM (Parallel

Virtual Machine). Finally, the graph has to be drawn between the numbers of

generations versus average fitness of every generation for observing the

Page 47: Parallel evolutionary approach report

Thapar University, Patiala Page 35

behavior of the fitness with the increase in number of generations. Also the

CPU time is calculated of each host during fitness calculation.

2.5 SUMMARY OF CHAPTER

Single Variable Optimization Problems are the real-time problems although

not as complex as multi-objective optimization problems. GA is parallelized in order

to come out with the solution faster and efficiently. PGA is implemented with the help

of PVM. PVM consists of a run-time environment and library for message-passing,

task and resource management, and fault notification. While PVM will not

automatically make a commercial software package run faster, it does provide a

powerful set of functions for manually parallelizing an existing source program, or for

writing new parallel/distributed programs.

Page 48: Parallel evolutionary approach report

Thapar University, Patiala Page 36

CHAPTER-3

PROBLEM STATEMENT

The related work to the Single Variable Optimization problems, use of Genetic

Algorithm (GA) to solve them and the various models to parallelize GA have been

discussed in the previous chapters. This chapter concentrates on the problem which is

being fixed through the proposed approach discussed in the next chapter.

3.1 PROBLEM DEFINITION

Most real world problems are concerned with either maximizing or minimizing

some quantity so as to optimize some output. The optimization problem is a process to

find values of the variables that minimize or maximize the objective function while

satisfying the given constraints.

Calculus is the principal tool in finding the best solutions to these practical

problems. But this requires one to possess the mathematical knowledge to solve these

optimization problems through mathematical derivations.

Some of the conventional techniques available to solve single variable

optimization problems are Newton-Raphson, Golden section, Gradient based, Direct

techniques. The problem with the traditional techniques are that they demand for

objective function derivatives, convexity, or the linear correlation of variables hence this

make them a less considerable option for solving optimization problems. Hence, a

different approach is needed to be followed.

A more efficient and faster algorithm is the need of the hour to solve any

problem. Thus a way to make any algorithm faster is to parallelize it is to be devised. It

may be with help of various software available. Hence, to optimize any problem, an

algorithm is required which is adaptable, self-repairing and which is easy to parallelize.

3.2 JUSTIFICATION

Optimization of any problem is done to obtain the best result under the given

circumstances. Optimization may be defined as an act of finding the conditions that give

the maximum or minimum value of a given function. Not all the optimization problems

can be solved by one single technique. Thus, a different approach was needed to be

Page 49: Parallel evolutionary approach report

Thapar University, Patiala Page 37

followed to solve such problems. In this dissertation work, focus is mainly on Single

Variable Optimization problems where the objective function consists of a single variable

only. The Single variable optimization problem is discussed under the section 1.2

One general problem of optimization techniques is that there is not always a

guarantee of convergence to the globally optimal solution. Frequently they converge to

local optima. Hence, Genetic Algorithm is approached in order to solve single variable

optimization problems. The Genetic Algorithm is covered under the section 1.3. The GA

may be unexpectedly time consuming, thus a parallel approach is made. The Parallel

Genetic Algorithm is explained under the section 1.4. The GA is made parallel with the

help of PVM, which is explained in Appendix A

.

Page 50: Parallel evolutionary approach report

Thapar University, Patiala Page 38

CHAPTER-4

SVOPGA: THE PROPOSED ALGORITHM

The proposed algorithm is based on the working of Master-Slave model. It is

designed using synchronous model where the master waits until it receives the fitness

value for the entire generation. This has been implemented with the help of software

called PVM (Parallel Virtual Machine) which helps the algorithm to divide the given

task into subtasks and distribute it among the available hosts or slaves.

4.1 REALIZATION OF OPTIMIZED FUNCTION THROUGH GENETIC

ALGORITHM

The Genetic algorithm is a random searching method which has been

developed from the evolution law in the ecological world. As the first population is

generated, it evolves into better approximate solutions using the law of survival of the

fittest from every newly generated generation. An individual is chosen in every

generation based on the fitness value of different individuals in those particular

problem domains. Every time, a new population representing a new set of solution is

produced when different individuals combine together, get crossed, and vary by using

genetic operators like mutation in natural genetics. Genetic algorithm using parallel

approach is applied to optimize the single variable problems in this work. Parallel

genetic algorithm (PGA) is applied using PVM (described in section 1.5).

In this dissertation work, the purposed algorithm is applied as a Global PGA.

As, in a serial genetic algorithm, selection and mating are global that is each

chromosome may compete and mate with any other chromosome. SVOPGA has been

implemented as master slave programs, here the master stores the population and the

slaves evaluate the fitness. The evaluation of the individuals is parallelized, because

the fitness of an individual is independent from the rest of the population and there is

no need to communicate during this phase. Further, synchronous model of Global

PGA has been applied as further evaluations of population wait for the fitness values

achieved from other slaves. Communication with the master occurs only as each slave

receives its subset of individuals to evaluate and when the slaves return the fitness

values.

Page 51: Parallel evolutionary approach report

Thapar University, Patiala Page 39

The following steps summarize the procedure followed used to formulate and

solve Single Variable Optimization Problems. The procedure followed while solving

the problem is outlined as below:

Analyze the process itself to identify the process variables and specific

characteristics of interest, that is make a list of all the variables (Here, Single

variable problems are considered).

Determine the criterion for optimization and specify the objective function in

terms of the above variables together with coefficients.

Develop via mathematical expressions a valid process model that relates the

input- output variables of the process and associated coefficients. Include both

equality and inequality constraints.

Apply SVOPGA for mathematical statement of the problem.

Examine the sensitivity of the result, to changes in the values of the

parameters in the problem and the assumptions.

4.2 SVOPGA EXPERIMENTAL SETUP

The hardware and software requirements for the implementation of SVOPGA

are following:

TABLE 4.2: Experimental setup for SVOPGA

Processor Intel Core i5 Processor , Intel Core i3 Processor

Processor Speed 2.5 GHz , 2.10 GHz

Cache 3 MB

Operating System LINUX ( Ubuntu 12.04, Ubuntu 11.10 )

RAM 2 GB DDR3, 2GB

RAM Support Up to 8 GB

Hard Drive 1 TB , 320 GB

PVM Version 3.4.6

4.3 IMPLEMENTING SVOPGA ALGORITHM

In Ubuntu, the source code files are to be copied to the home. At first, PVM

needs to be installed which is freely available on Internet. PVM is a software system

that allows you to combine a number of computers which are connected over a

network into a Parallel Virtual Machine. This machine can consist of computers with

Page 52: Parallel evolutionary approach report

Thapar University, Patiala Page 40

different architectures, running different types of the Unix/Linux operating systems,

and can still be treated as if it were a single parallel machine. After PVM is installed a

directory with the name pvm3 is created at home. This directory contains the system

executable and libraries reside.

4.3.1 Installation of PVM

At the Terminal: $sudo apt-get install pvm

It is required to check if the PVM libraries in /usr/lib/pvm3 or in /usr/local/lib/pvm3

and include files in /usr/include directory.

4.3.2 Configuration of PVM to work on different machines

First step is to find out which computers are available. Any computer which

acts as hosts must have an account and PVM installed on it.

Next to do task is to edit or create the file .rhosts in the home directory. This

file must have an entry for every computer which is to be used. The entry is in

the form of the name of the computer and the login name on that machine as

following:

ucs.orst.edu kowallih

dogby.physics.edu hans

After this, the environment variables in the .bashrc file are needed to be set by

following commands as in Figure 4.1:

export PVM_ROOT=~/pvm3

export PVM_ARCH=LINUX

export PVM_RSH=`which ssh`

The ROOT and ARCH can be checked also if set properly by following

command:

echo$PVM_ROOT

echo$PVM_ARCH

Page 53: Parallel evolutionary approach report

Thapar University, Patiala Page 41

Figure 4.1: Setting up Environment Variables

Last thing is to create directory, here with the name LINUX, for the

executables:

$mkdir $HOME/pvm3/bin/LINUX4.

4.3.3 The PVM console

The PVM console is the interface between the parallel virtual machine and

the user. It is used to start and stop processes, to display information about the state of

the virtual machine, and most importantly, to start and stop PVM on local and remote

machines.

The first step is to compile the master file with the help of following

command:

$ make install

This command creates the executable binaries of the source code files as

shown in following Figure 4.2:

Page 54: Parallel evolutionary approach report

Thapar University, Patiala Page 42

Figure 4.2: The creation of Executable Binaries

The next task is to start PVM Log into Master by following command (Figure

4.3):

$ pvm

pvm>

Figure 4.3: Initialization of PVM

The number of hosts or slave machines are added as soon as the PVM is

started with following command :

pvm > add “name of the host available” ,for example,

% pvm

pvm> add dws007

Page 55: Parallel evolutionary approach report

Thapar University, Patiala Page 43

1 successful

HOST DTID

dws007 80000

Also, the hosts can be added by making a file in which with each line contains the

name of the host and then start PVM with the name of this file as the command line

argument. The file may be named as .rhosts file.

With the help of the following command, the number of hosts added can be

checked(Figure 4.4):

pvm > conf

Figure 4.4: Adding Hosts

This command checks the configuration of the machines available and

displays the name and id of those hosts added.

After PVM has been started, then the master file is triggered in order to spawn

the slave file with the following command(Figure 4.5) :

pvm > spawn → “name of master file”

Page 56: Parallel evolutionary approach report

Thapar University, Patiala Page 44

Figure 4.5: Master file spawns at slave

Here, the name of the master file is “priti” and the final output is saved in “abc.txt”

file (shown in Chapter 5 as Table 5.2) in Home directory. The CPU time is also

calculated by the host here (Figure 4.5). Few generations may be seen in the following

screenshot:

Figure 4.6: Generation of Fitness Value

If some parameters are to be initialized at the run time for example,

chromosome length, number of generations, seed value, and output file name,

etc. then they are given with spawn command only (as shown in the Figure

4.7).

Page 57: Parallel evolutionary approach report

Thapar University, Patiala Page 45

Figure 4.7: Parameters Value

To stop the PVM following command is used :

pvm> halt

4.4 SVOPGA ALGORITHM

Slave Algorithm:

Initialize( )

while(true)

Receive instruction i from master node

If(i is Evaluation_command)

do evaluation and return the fitness

elsif (i is Finish_command)

process exit

end while

Master Algorithm:

Randomly initialize the population

Evaluate the whole population

while(not meet stop criteria) //number of Generations

Roulette_wheel_selection( ) //select pop(t+1) from pop(t)

Crossover and Mutation( ) // Recombine pop(t+1)

Evaluate_Population( ) // Evaluate pop(t+1); t =t+1

Page 58: Parallel evolutionary approach report

Thapar University, Patiala Page 46

End while

Evaluate_Population:

while(not all the individuals evaluated)

wait(blocking) until a slave node Ni is available

send new individual to Ni

wait (non_blocking) for the fitness return

End while

4.5 FUNCTION MODULES USED IN ALGORITHM

4.5.1 Initialization of the population

For a random population generation, the chromosome length is decided For

this, the single variable problem is analysed. The interval in which the variable lies

and the decimal accuracy up to which the answer is needed decides the chromosome

length. As for example, x lies between 1 and 5. So, x may be 1.5, 1.9, 2, 3.3, 4 or

4.99. Taking 4.99, following 8 bits in an array are required:

[11110011]

Here, 4.99 means multiplying it with 100 while encoding and dividing by 100 while

decoding. Hence, 8 bits are required as the length of chromosome.

A sample population of 2n to 4n is generated, where n is the number of solutions

needed. As n here is 1, so 2 to 4 random individuals in the present generation

population are initialized. This trend will be followed in all the future generations that

is the number of individuals will be four only and the genetic operators will be

applied on these four individuals only to produce next generation. The function

module used for population initialization is as following:

void PopulationInit(Settings *s, Population *p)

4.5.2 Encoding of the individuals

Chromosomes are encoded as strings of 0's and 1’s, which means that Binary

Encoding is used. The individuals are encoded so as to calculate the fitness value and

perform operations with ease. Following function is used to solve the purpose:

void decToBin(int ad, int *barray, int size)

Page 59: Parallel evolutionary approach report

Thapar University, Patiala Page 47

4.5.3 Sending and Receiving Messages

The master file spawns off the slave file and the slave file on each of the hosts

on the virtual machine responds to the master file instructions. The buffer is initialized

and message is sent to the slave. [Appendix A]. The following initsend command

performs two tasks simultaneously that is it initializes the buffer as well as sends the

message.

pvm_initsend( PvmDataDefault )

The default PVM functions are taken into account to manage message

communication. Then, the messages are packed before sending and unpacked upon

receiving as given below (explanation of parameters in Appendix A):

pvm_pkint( int*ip, int nitem, int stride )

pvm_send( int tid, int msgtag )

static void SendMessage(int tid, int message)

static void SendIndividualsFitness(Individual *pop, int *howmany, int *location,

int parent)

pvm_upkint(int *ip, int nitem, int stride )

pvm_recv( int tid, int msgtag)

static void GetIndividuals(Individual **pop, int *howmany, int *location)

Also, the buffer needs to be cleaned up also for further communication. This is done

with the help of following function:

static void Cleanup(Individual **pop, int howmany)

4.5.4 Calculation of the Fitness Value

The encoding of solutions is followed by the calculation of the fitness value at

the slave machines. The Fitness value of all individuals in the population is calculated

and sorted accordingly. The fitness value of randomly initialized population is

calculated at distributed slaves machines or hosts with the following formula:

for (n = 0, x = 0.0; n < i->chromLen; n++){

x = x+ i->chrom[n] * pow(2, l-n) ; //l is the chromosome length

}

Page 60: Parallel evolutionary approach report

Thapar University, Patiala Page 48

return x *( (b-a)/(pow(2,l-1)-1)); // a,b are the interval between which x lies

// and both are positive integers.

The function modules used are:

void PopulationInitFitness(Settings *s, Population *p, IPTR pop)

double Fitness(Individual *i)

void ChooseBest(Settings *s, Population *p)

4.5.5 ROULETTE WHEEL SELECTION

The best individuals among all are chosen to be the parent for next generation.

In Roulette Wheel Selection, the chromosomes or the individuals in any population

with a optimal fitness value will have higher probability of selection. The following

function module is called in every generation for the entire population:

int roulette(IPTR pop, double sumFitness, int popsize)

4.5.6 CROSSOVER

Crossover is applied using two-point crossover to produce the offsprings.

Chromosome function further call mutation function with a probability. This function

mutates or does inversion of bits in any individual with a given probability.

void Crossover(Population *p, Individual *p1, Individual *p2, Individual *c1,

Individual *c2)

int Mutation(Population *p, ChromType x)

4.4.7 REPLACING OLD GENERATION

Again, the fitness value of the individuals in the next generation will be

calculated and the newly introduced chromosomes through crossover replace the old

chromosomes. The following function deletes the chromosomes or individuals in the

population which are having less fitness value. The number of individuals are kept

fixed in every generation.

void PopulationDelete(Population *p)

4.4.8 CACULATION OF CPU TIME

This function is used to calculate the total amount of CPU time by each slave

machine to calculate the fitness value.

clock_t y = gettimeofday(&start, NULL)

Page 61: Parallel evolutionary approach report

Thapar University, Patiala Page 49

4.6 SUMMARY OF CHAPTER

This chapter includes the experimental setup and implementation of proposed

algorithm. The installation of the PVM is discussed along with the commands. The

sequence of steps taken to compile and run SVOPGA is shown with snap shots. All

the function modules used in SVOPGA are discussed in detail. The PVM routines are

discussed in detail in Appendix A. The successful implementation of SVOPGA

presented an approach to Master-slave Parallel GA. The results obtained are discussed

and analysed in the next chapter.

Page 62: Parallel evolutionary approach report

Thapar University, Patiala Page 50

CHAPTER-5

RESULTS

SVOPGA has been successfully implemented using the experimental set up

described in previous chapter. One of the test problems which was taken during

implementation is discussed below. The default settings for parameters are shown

below.

5.1 PARAMETERS USED IN SVOPGA

Following are the parameters that are used while carrying out the results for

SVOPGA using GA on PVM:

Table 5.1: List of Parameters

Population Size 4

Number of Generations 80

Chromosome Length 8

Mutation Probability 0.001

Crossover Probability 0.66

Packet Size 10

5.2 SVOPGA PROBLEM TAKEN:

Following is one of the problems solved by SVOPGA:

Find the dimensions of the rectangle of largest area which can be inscribed in the

closed region bounded by the x-axis, y-axis, and graph of y=8-x3. Constraints: x lies

between 1 and 2. (Answer: x =1.26 (approx) )

Figure 5.1: Rectangle inscribed in the given curve

Page 63: Parallel evolutionary approach report

Thapar University, Patiala Page 51

The following steps are taken in order to implement the mentioned problem through

SVOPGA:

5.2.1 CALCULATION OF FITNESS VALUE

Given a chromosome encoded as:

a = [11000011] for value of x as 1.95 (5.1)

(5.2)

where,

chromlen is the length of the chromosome.

Fitness value corresponding to a is

x = p* (b-a)/(pow(2, chromlen-1)-1) (5.3)

where,

a and b are the intervals in which x lies

As x lies between 1 and 2 thus 8 bits are sufficient as chromosome length, that

is l=8. Thus, according to the formula, to calculate fitness value as: (b-a)/(pow(2,l-1)-

1) ,where a and b are the interval between which the value of x lies and l is the length

of the chromosome.

Fitness function is evaluated as (2-1)/(pow(2,7)-1). Hence, this single variable

problem solves x to be 1.26, hence y becomes 5.90. Thus, largest area which can be

inscribed in the closed region is 7.55 (approx).

The output of the SVOP is as following:

Table 5.2: Output of SVOPGA

Gen maxFit avgFit minFit

1 1.260000 1.162000 1.064000

2 1.260000 1.162000 1.064000

3 1.232000 1.197000 1.092000

4 1.232000 1.232000 1.232000

5 1.232000 1.232000 1.232000

6 1.232000 1.232000 1.232000

7 1.232000 1.232000 1.232000

8 1.232000 1.232000 1.232000

9 1.232000 1.232000 1.232000

10 1.232000 1.232000 1.232000

11 1.232000 1.232000 1.232000

12 1.232000 1.232000 1.232000

Page 64: Parallel evolutionary approach report

Thapar University, Patiala Page 52

Gen maxFit avgFit minFit

13 1.232000 1.232000 1.232000

14 1.232000 1.232000 1.232000

15 1.232000 1.232000 1.232000

16 1.239000 1.233750 1.232000

17 1.239000 1.235500 1.232000

18 1.239000 1.235500 1.232000

19 1.239000 1.237250 1.232000

20 1.239000 1.237250 1.232000

21 1.239000 1.237250 1.232000

22 1.239000 1.239000 1.239000

23 1.239000 1.239000 1.239000

24 1.239000 1.239000 1.239000

25 1.239000 1.239000 1.239000

26 1.239000 1.239000 1.239000

27 1.239000 1.239000 1.239000

28 1.239000 1.239000 1.239000

29 1.239000 1.239000 1.239000

30 1.239000 1.239000 1.239000

31 1.239000 1.239000 1.239000

32 1.267000 1.246000 1.239000

33 1.267000 1.253000 1.239000

34 1.267000 1.267000 1.267000

35 1.267000 1.267000 1.267000

36 1.267000 1.267000 1.267000

37 1.267000 1.267000 1.267000

38 1.267000 1.267000 1.267000

39 1.267000 1.267000 1.267000

40 1.267000 1.267000 1.267000

41 1.267000 1.267000 1.267000

42 1.267000 1.267000 1.267000

43 1.267000 1.267000 1.267000

44 1.267000 1.267000 1.267000

45 1.267000 1.267000 1.267000

46 1.267000 1.267000 1.267000

47 1.267000 1.267000 1.267000

48 1.267000 1.267000 1.267000

49 1.267000 1.267000 1.267000

50 1.267000 1.267000 1.267000

51 1.267000 1.267000 1.267000

52 1.267000 1.267000 1.267000

53 1.267000 1.267000 1.267000

54 1.267000 1.267000 1.267000

55 1.267000 1.267000 1.267000

56 1.267000 1.267000 1.267000

57 1.267000 1.267000 1.267000

58 1.267000 1.267000 1.267000

59 1.267000 1.267000 1.267000

60 1.267000 1.267000 1.267000

Page 65: Parallel evolutionary approach report

Thapar University, Patiala Page 53

Gen maxFit avgFit minFit

61 1.267000 1.267000 1.267000

62 1.267000 1.267000 1.267000

63 1.267000 1.267000 1.267000

64 1.267000 1.267000 1.267000

65 1.267000 1.267000 1.267000

66 1.267000 1.267000 1.267000

67 1.267000 1.267000 1.267000

68 1.267000 1.267000 1.267000

69 1.267000 1.267000 1.267000

70 1.267000 1.267000 1.267000

71 1.267000 1.267000 1.267000

72 1.267000 1.267000 1.267000

73 1.267000 1.267000 1.267000

74 1.267000 1.267000 1.267000

75 1.267000 1.267000 1.267000

76 1.267000 1.267000 1.267000

77 1.267000 1.267000 1.267000

78 1.267000 1.267000 1.267000

79 1.267000 1.267000 1.267000

80 1.267000 1.267000 1.267000

The table 5.2 shows the experimental results of the SVOPGA implementation

in terms of maximum fitness, average fitness and minimum fitness over a set of 80

generations, where maxFit attribute reflects maximum value of fitness, minFit

attribute reflects minimum value of fitness, avgFit attribute reflects an average value

of fitness.

Figure 5.2 is a plot taking fitness value versus number of generations obtained from

SVOPGA

0.95

1

1.05

1.1

1.15

1.2

1.25

1.3

1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77

Fitn

ess

No. of Generations

MaxFit

AvgFit

MinFit

Page 66: Parallel evolutionary approach report

Thapar University, Patiala Page 54

Figure 5.2 shows the convergence of maximum fitness, minimum fitness and

average fitness along with the increase in number of generations. It was concluded

that as the number of generations increases, the minimum and maximum value of

fitness becomes comparable with average fitness.

The quality of the solution is analysed with the help of changes in the crossover and

mutation probability. Figure 5.3 shows the effect of change of rate of crossover before

and beyond 0.66.

Figure 5.3 Effect of rate of change of crossover

In figure 5.3 the results showed that the increase in crossover rate beyond 0.66

has an adverse effect on the quality of crossover. A lower crossover rate that is less

than 0.66 showed that more chromosomes being copied as it is in the next population

from the current population resulting in the less diversity in the population in

generation of fewer offspring. In figure at some points the cause of little improvement

in solution quality is a result of increase in more fit individuals in newly generated

population.

Figure 5.4 shows the change in fitness value with the change in probability of

mutation where the crossover probability is kept same that is Pc =0.66.

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Fitn

ess

Val

ue

Probability of Crossover

Change in Fitness Value with change in Crossover Probability

Fitness Value

Page 67: Parallel evolutionary approach report

Thapar University, Patiala Page 55

Figure 5.4: Effect of change of Mutation Probability

Figure 5.4 shows the effect of change in the probability of Mutation. The plot

depicts that the increase in mutation rate has a negative effect on the average fitness.

As the mutation rate increases, each offspring undergoes more mutation thus causing

them to become genetically less likely to be the future parent for the next generation.

Hence, this caused the system to search the present solution space randomly and

limits the convergence of the present population. The default rate of mutation is

helpful in achieving the optimal fitness value.

0

0.5

1

1.5

2Fi

tne

ss V

alu

e

Probability of Mutation

Change in Fitness Value with the change in Probability of Mutation

Crossover Probability: 0.66

Page 68: Parallel evolutionary approach report

Thapar University, Patiala Page 56

CHAPTER-6

CONCLUSIONS AND FUTURE SCOPE

The purpose of this final chapter is to cease the study, discussions and

experimental analysis with the final conclusion. Furthermore, the motivation is to

glance into the future and sketch the most probable forms SVOPGA may take.

6.1 CONCLUSIONS

In this dissertation, SVOPGA algorithm is successfully introduced to obtain

the optimum solution to any Single Variable Optimization Problem. There are various

conventional numerical techniques available (such as the gradient search, the simplex

method)but there have been loopholes attached with those traditional techniques such

as the demand for objective function derivatives, convexity, or the linear correlation

of variables. Thus, SVOPGA is implemented with the help of Genetic Algorithm as

the experimental results shown in chapter 5. The genetic algorithm technique finds the

global optimum in relatively few evaluations compared to the size of the search space.

Chapter 4 incurs the detailed description of the functional modules used

during implementation. Unknown decision variables are coded as binary strings. For

selection of the individuals, Roulette Wheel Selection strategy is being used. A

random value “seed” is provided to the random number generator for the wheel to

spin in order to avoid the same sequence of draws during every run. Two-point

crossover is used for crossing among individuals which demands O(2) calls to a

random number generator to decide the bit mask to apply to the parent strings.

Mutation is used in order to avoid the solution to get stuck at a local optimum.

SVOPGA is developed with the help of parallel GA using Master- Slave

architecture with the help of PVM. Population is stored in “master” machine. Every

generation, which is a part of the population is transmitted to a set of machines called

“slaves”, which calculates the fitness values for received individual and then send

back the results. Given that the selection, recombination and mutation are executed by

the master over the entire population, the evolution of this type of parallel genetic

algorithm is equivalent to that of the serial one.

Advantages of the proposed algorithm is that only the evaluation is

Page 69: Parallel evolutionary approach report

Thapar University, Patiala Page 57

parallelized and not the genetic operators saving the communication time and

ultimately increasing the speed up. The experimental results, demonstrated that the

parallel genetic algorithm can solve small real-world single variable optimization

problems.

6.2 FUTURE SCOPE

The advancement and the modification in the work is important to know as

each new headway will guide the mass to better technology. A number of captivating

areas for future research exist. These involve algorithmic enrichment, performance

improvements and devising for the next generation of parallel computers. In this

work, the experiment is restricted in terms of memory and number of processors due

to which some issues could not be addressed like complexity and speed up factors.

Having gone through the study of PGA, the scope of the work has been identified as:

Selection strategy for the individuals other than the Roulette Wheel Selection

or a hybrid known approach can be opted to improve the SVOPGA. With

changes in various operators like crossover, mutation, faster random number

generator and encoding scheme may be helpful in increasing the effective

speed up time.

The algorithm stops after the specified number of iterations. One approach

might be to stop when the evaluation function value has not changed in a

recent number of iterations or when the known optimal solution is found.

Performance areas are available in several areas. For instance, implementation

elevation would include incremental updating of certain population statistics

that are currently recomputed in full in each generation, hashing to make the

search for duplicates more potent. For high performance, the SVOPGA may

be provided with an associative memory and can be made to work based on

experience.

Next, the work may be observed with a graphical display with the help of the

installation XPVM along with the PVM. XPVM provides the GUI to add and

delete the Hosts at run time with the help of a click of a button rather than the

use of commands through terminal. The CPU time taken by each Host for

completing the given task is displayed by this software in graphical form. Also

the memory use is displayed while the Hosts are performing the given task.

Page 70: Parallel evolutionary approach report

Thapar University, Patiala Page 58

Appendix A

Reference pages for PVM3 routines [44]

This appendix contains an alphabetical listing for all the PVM 3 routines. Each

routine is described in detail for C. There are diagnostics and examples for each

routine.

Pvm_addhosts( )

adds one or more hosts to the Virtual Machine.

Synopsis

int info = pvm_addhosts( char **hosts, int nhosts, int *infos )

Parameters

hosts – an array of pointers to character strings containing the names of the machines

to be added.

nhost - integer specifying the number of hosts to be added.

infos - integer array of length nhost which contains the status code returned by the

routine for the individual hosts. Values less than zero indicate an error.

host - character string containing the name of the machine to be added.

info - integer status code returned by the routine. Values less than nhost indicate

partial failure, values less than 1 indicate total failure.

Discussion

The routine pvm_addhosts adds the list of computers pointed to in hosts to the

existing configuration of computers making up the virtual machine. If pvm_addhosts

is successful info will be equal to nhost. Partial success is indicated by 1

<=info<nhost, and total failure by info< 1. The array infos can be checked to

determine which host caused the error.

If a host fails, the PVM system will continue to function. The user can use this

routine to increase the fault tolerance of the PVM application. The status of hosts can

be requested by the application using pvm_mstat and pvm_config. If a host has failed

it will be automatically deleted from the configuration. Using pvm_addhosts a

replacement host can be added by the application. It is still the responsibility of the

application developer to make the application tolerant of host failure. Another use of

Page 71: Parallel evolutionary approach report

Thapar University, Patiala Page 59

this feature would be to add more hosts as they become available.

Examples:

static char *hosts[] = {

"sparky",

"thud.cs.utk.edu",

};

info = pvm_addhosts( hosts, 2, infos );

Errors

The following error conditions can be returned by pvm_addhosts:

Name Possible cause

PvmBadParam giving an invalid argument value.

PvmAlready already been added.

PvmSysErr local pvmd is not responding.

The following error conditions can be returned in infos:

Name Possible cause

PvmBadParam bad hostname syntax.

PvmNoHost no such host.

PvmCantStart failed to start pvmd on host.

PvmDupHost host already in configuration.

PvmBadVersion remote pvmd version doesn't match.

PvmOutOfRes PVM has run out of system resources.

pvm_config( )

returns information about the present virtual machine configuration.

Synopsis

int info = pvm_config( int *nhost, int *narch, struct pvmhostinfo **hostp )

struct pvmhostinfo{

int hi_tid;

char *hi_name;

char *hi_arch;

int hi_speed;

} hostp;

Page 72: Parallel evolutionary approach report

Thapar University, Patiala Page 60

Parameters

nhost - integer returning the number of hosts (pvmds) in the virtual machine.

narch - integer returning the number of different data formats being used.

hostp - pointer to an array of structures that contain information out each host,

including its pvmd task ID, name, architecture, and relative speed.

dtid - Integer returning pvmd task ID for this host.

name - Character string returning name of this host.

arch - Character string returning name of host architecture.

speed - Integer returning relative speed of this host. Default value is 1000.

info - integer status code returned by the routine. Values less than zero indicate an

error

Discussion

The routine pvm_config returns information about the present virtual machine.

The information returned is similar to that available from the console command conf.

The C function returns information about the entire virtual machine in one call. If

pvm_config is successful, info will be 0. If some error occurs, info will be < 0.

Examples

info = pvm_config( &nhost, &narch, &hostp );

Errors

The following error condition can be returned by pvm_config

Name Possible Cause

PVMSysError pvmd not responding.

pvm_exit( )

tells the local pvmd that this process is leaving PVM.

Synopsis

int info = pvm_exit( void )

Parameters

info - integer status code returned by the routine. Values less than zero indicate an

error.

Discussion

The routine pvm_exit tells the local pvmd that this process is leaving PVM.

This routine does not kill the process, which can continue to perform tasks just like

Page 73: Parallel evolutionary approach report

Thapar University, Patiala Page 61

any other serial process.

Pvm_exit should be called by all PVM processes before they stop or exit for good. It

must be called by processes that were not started with pvm spawn.

Examples

/* Program done */

pvm_exit();

exit();

Errors

Name Possible cause

PvmSysErr pvmd not responding

pvm_getopt( )

Shows various libpvm options

Synopsis

int val = pvm_getopt( int what )

Parameters

what – Integer defining what to get. Options include:

Option Value Meaning

PvmRoute 1 routing policy

PvmDebugMask 2 debugmask

PvmAutoErr 3 auto error reporting

PvmOutputTid 4 stdout device for children

PvmOutputCode 5 output msgtag

PvmTraceTid 6 trace device for children

PvmTraceCode 7 trace msgtag

PvmFragSize 8 message fragment size

PvmResvTids 9 Allow use of reserved msgtags and TIDs

val - Integer specifying value of option. Predefined route values are:

Option value MEANING

PvmDontRoute 1

PvmAllowDirect 2

PvmRouteDirect 3

Page 74: Parallel evolutionary approach report

Thapar University, Patiala Page 62

Discussion

The routine pvm_getopt allows the user to see the value of options set in PVM. See

pvm_setopt for a description of options that can be set.

Examples

route_method = pvm_getopt( PvmRoute );

Errors :

route_method = pvm_getopt( PvmRoute );

Name Possible cause

PvmBadParam giving an invalid argument.

pvm_getrbuf( )

returns the message buffer identifier for the active receive buffer.

Synopsis

int bufid = pvm getrbuf( void )

Parameters

bufid - integer the returned message buffer identifier for the active receive buffer.

Discussion

The routine pvm_getrbuf returns the message buffer identifier bufid for the

active receive buffer or 0 if there is no current buffer.

Examples

bufid = pvm_getrbuf();

Errors

No error conditions are returned by pvm_getrbuf

pvm_getsbuf( )

returns the message buffer identifier for the active send buffer.

Synopsis

int bufid = pvm_getsbuf( void )

Parameters

bufid - integer the returned message buffer identifier for the active send buffer.

Discussion

The routine pvm_getsbuf returns the message buffer identifier bufid for the

active send buffer or 0 if there is no current buffer.

Page 75: Parallel evolutionary approach report

Thapar University, Patiala Page 63

Examples

bufid = pvm_getsbuf();

Errors

No error conditions are returned by pvm_getsbuf

pvm_gettid( )

returns the tid of the process identified by a group name and instance number.

Synopsis

int tid = pvm_gettid( char *group, int inum )

Parameters

group - character string that contains the name of an existing group.

inum - integer instance number of the process in the group.

tid - integer task identifier returned.

Discussion

The routine pvm_gettid returns the tid of the PVM process identified by the

group name group and the instance number inum. If pvm gettid is successful, tid will

be > 0. If some error occurs then tid will be < 0.

Examples

tid = pvm_gettid("worker",0);

Errors:

These error conditions can be returned by pvm_gettid.

Name Possible cause

PvmSysErr Can not contact the local pvmd most likely it is

not running.

PvmBadParam Bad Parameter most likely a NULL character string

PvmNoGroup No group exists by that name.

PvmNoInst No such instance in the group.

Page 76: Parallel evolutionary approach report

Thapar University, Patiala Page 64

pvm_halt( )

shuts down the entire PVM system.

Synopsis

int info = pvm_halt( void )

Parameters

info - Integer returns the error status.

Discussion

The routine pvm_halt shuts down the entire PVM system including remote

tasks, remote pvmd, the local tasks (including the calling task ) and the local pvmd.

Errors

The following error condition can be returned by pvm_halt.

Name Possible cause

PvmSysErr local pvmd is not responding.

pvm hostsync( )

Get time-of-day clock from PVM host.

Synopsis

#include <sys/time.h>

int info = pvm hostsync( int host, struct timeval *clk, struct timeval *delta )

Parameters

host - TID of host.

clk or clksec and clkusec - Returns time-of-day clock sample from host.

delta or deltasec and deltausec - Returns difference between local clock and remote

host clock.

Discussion

pvm_hostsync() samples the time-of day clock of a host in the virtual machine

and returns both the clock value and the difference between local and remote clocks.

To reduce the delta error due to message transit time, local clock samples are taken

before and after reading the remote clock. Delta is the difference between the mean

local clocks and remote clock.

Note that the delta time can be negative. The microseconds held is always

normalized to 0.999999, while the sign of the seconds field gives the sign of the delta.

Page 77: Parallel evolutionary approach report

Thapar University, Patiala Page 65

In C, if clk or delta is input as a null pointer, that parameter is not returned.

Errors

The following error conditions can be returned by pvm_synchost.

Name Possible cause

PvmSysErr local pvmd is not responding.

PvmNoHost no such host.

PvmHostFail host is unreachable (and thus possibly failed).

pvm_initsend( )

clear default send buffer and specify message encoding.

Synopsis

int bufid = pvm_initsend( int encoding )

Parameters

encoding - integer specifying the next message's encoding scheme.

Encoding value MEANING

PvmDataDefault 0 XDR

PvmDataRaw 1 no encoding

PvmDataInPlace 2 data left in place

bufid - integer returned containing the message buffer identifier. Values less than

zero indicate an error.

Discussion

The routine pvm_initsend clears the send buffer and prepares it for packing a

new message. The encoding scheme used for this packing is set by encoding. XDR

encoding is used by default because PVM cannot know if the user is going to add a

heterogeneous machine before this message is sent. If the user knows that the next

message will only be sent to a machine that understands the native format, then he can

use PvmDataRaw encoding and save on encoding costs.

PvmDataInPlace encoding specifies that data be left in place during packing.

The message buffer only contains the sizes and pointers to the items to be sent. When

pvm_send is called the items are copied directly out of the user's memory. This option

decreases the number of times a message is copied at the expense of requiring the user

to not modify the items between the time they are packed and the time they are sent.

Page 78: Parallel evolutionary approach report

Thapar University, Patiala Page 66

The PvmDataInPlace is not implemented in PVM 3.2. If pvm_initsend is successful,

then bufid will contain the message buffer identifier. If some error occurs then bufid

will be < 0.

Examples

bufid = pvm_initsend( PvmDataDefault );

info = pvm_pkint( array, 10, 1 );

msgtag = 3 ;

info = pvm_send( tid, msgtag );

Errors

These error conditions can be returned by pvm_initsend.

Name Possible cause

PvmBadParam giving an invalid encoding value

PvmNoMem Malloc has failed. There is not enough memory to create the

buffer.

pvm_kill( )

terminates a specified PVM process

Synopsis

int info = pvm kill( int tid )

Parameters

tid - integer task identifier of the PVM process to be killed (not yourself).

info - integer status code returned by the routine. Values less than zero indicate an

error.

Discussion

The routine pvm_kill sends a terminate (SIGTERM) signal to the PVM process

identified by tid. In the case of multiprocessors the terminate signal is replaced with a

host dependent method for killing a process. If pvm_kill is successful, info will be 0.

If some error occurs then info will be < 0. pvm_kill is not designed to kill the calling

process. To kill yourself in C call pvm_exit() followed by exit().

Examples

info = pvm_kill( tid );

Errors

These error conditions can be returned by pvm_kill.

Page 79: Parallel evolutionary approach report

Thapar University, Patiala Page 67

Name Possible cause

PvmBadParam giving an invalid tid value.

PvmSysErr pvmd not responding.

pvm_mcast( )

multicasts the data in the active message buffer to a set of tasks.

Synopsis

int info = pvm_mcast( int *tids, int ntask, int msgtag )

Parameters

ntask - integer specifying the number of tasks to be sent to.

tids - integer array of length at least ntask containing the task IDs of the tasks to be

sent to.

msgtag - integer message tag supplied by the user. msgtag should be >= 0.

info - integer status code returned by the routine. Values less than zero indicate an

error.

Discussion

The routine pvm_mcast multicasts a message stored in the active send buffer

to tasks specified in the tids array. The message is not sent to the caller even if its tid

is in tids.. The content of the message can be distinguished by msgtag. If pvm mcast is

successful, info will be 0. If some error occurs then info will be < 0.

The receiving processes can call either pvm_recv or pvm_nrecv to receive

their copy of the multicast. Pvm_mcast is asynchronous. Computation on the sending

processor resumes as soon as the message is safely on its way to the receiving

processors. This is in contrast to synchronous communication, during which

computation on the sending processor halts until the matching receive is executed by

the receiving processor.

pvm_mcast first determines which other pvmds contain the specified tasks.

Then passes the message to these pvmds which in turn distribute the message to their

local tasks without further network traffic. Multicasting is not supported by most

multiprocessor vendors. Typically their native calls only support broadcasting to all

the user's processes on a multiprocessor. Because of this omission, pvm_mcast may

not be an effcient communication method on some multiprocessors except in the

special case of broadcasting to all PVM processes.

Page 80: Parallel evolutionary approach report

Thapar University, Patiala Page 68

Examples

info = pvm_initsend( PvmDataRaw );

info = pvm_pkint( array, 10, 1 );

msgtag= 5 ;

info =pvm_mcast( tids, ntask, msgtag );

Errors

These error conditions can be returned by pvm_mcast

Name Possible cause

PvmBadParam giving a msgtag < 0.

PvmSysErr pvmd not responding.

PvmNoBuf no send buffer.

pvm_mkbuf()

creates a new message buffer.

Synopsis

int bufid = pvm_mkbuf( int encoding )

Parameters

encoding - integer specifying the buffer's encoding scheme.

Options in C are:

Encoding value MEANING

PvmDataDefault 0 XDR

PvmDataRaw 1 no encoding

PvmDataInPlace 2 data left in place

bufid - integer message buffer identifier returned. Values less than zero indicate an

error.

Discussion

The routine pvm_mkbuf creates a new message buffer and sets its encoding

status to encoding. If pvm_mkbuf is successful, bufid will be the identifier for the new

buffer, which can be used as a send buffer. If some error occurs then bufid will be < 0.

With the default setting XDR encoding is used when packing the message because

PVM cannot know if the user is going to add a heterogeneous machine before this

message is sent. The other options to encoding allow the user to take advantage of

knowledge about his virtual machine even when it is heterogeneous. For example, if

Page 81: Parallel evolutionary approach report

Thapar University, Patiala Page 69

the user knows that the next message will only be sent to a machine that understands

the native format, then he can use PvmDataRaw encoding and save on encoding

costs.PvmDataInPlace encoding and save on encoding costs.

PvmDataInPlace encoding specifies that data be left in place during packing.

The message buffer only contains the sizes and pointers to the items to be sent. When

pvm_send is called the items are copied directly out of the user's memory. This option

decreases the number of times a message is copied at the expense of requiring the user

to not modify the items between the time they are packed and the time they are sent.

The PvmDataInPlace is also not implemented in PVM 3.2.

pvm_mkbuf is required if the user wishes to manage multiple message buffers

and should be used in conjunction with pvm_freebuf. pvm_freebuf should be called

for a send buffer after a message has been sent and is no longer needed.

Receive buffers are created automatically by the pvm_recv and pvm_nrecv

routines and do not have to be freed unless they have been explicitly saved with

pvm_setrbuf.

Typically multiple send and receive buffers are not needed and the user can

simply use the pvm_initsend routine to reset the default send buffer.

There are several cases where multiple buffers are useful. One example where

multiple message buffers are needed involves libraries or graphical interfaces that use

PVM and interact with a running PVM application but do not want to interfere with

the application's own communication.

When multiple buffers are used they generally are made and freed for each

message that is packed.

Examples

bufid = pvm_mkbuf( PvmDataRaw );

/* send message */

info = pvm_freebuf( bufid );

Errors

These error condition can be returned by pvm_mkbuf.

Name Possible cause

PvmBadParam giving an invalid encoding value.

PvmNoMem Malloc has failed. There is not enough memory to create the buffer.

Page 82: Parallel evolutionary approach report

Thapar University, Patiala Page 70

pvm_mytid( )

returns the tid of the process

Synopsis

int tid = pvm_mytid( void )

Parameters

tid - integer task identifier of the calling PVM process is returned. Values less than

zero indicate an error.

Discussion

The routine enrolls this process into PVM on its first call and generates a

unique tid if this process was not created by pvm_ spawn. pvm_mytid returns the tid

of the calling process and can be called multiple times in an application. Any PVM

system call (not just pvm mytid) will enroll a task in PVM if the task is not enrolled

before the call. The tid is a 32 bit positive integer created by the local pvmd. The 32

bits are divided into fields that encode various information about this process such as

its location in the virtual machine (that is local pvmd address), the CPU number in the

case where the process is on a multiprocessor, and a process ID field. This

information is used by PVM and is not expected to be used by applications. If PVM

has not been started before an application calls pvm_mytid the returned tid will be <

0.

Examples

tid = pvm_mytid( );

Errors

This error condition can be returned by pvm_mytid.

Name Possible cause

PvmSysErr pvmd not responding.

pvm_notify( )

Request notification of PVM event such as host failure.

Synopsis

int info = pvm_notify( int what, int msgtag,int cnt, int *tids )

Page 83: Parallel evolutionary approach report

Thapar University, Patiala Page 71

Parameters

what - integer identifier of what event should trigger the notification. Presently the

options are:

value MEANING

PvmTaskExit notify if task exits

PvmHostDelete notify if host is deleted

PvmHostAdd notify if host is added

msgtag - integer message tag to be used in notification.

cnt - integer specifying the length of the tids array for PvmTaskExit and

PvmHostDelete. For PvmHostAdd specifies the number of times to notify.

tids - integer array of length ntask that contains a list of task or pvmd tids to be

notified. The array should be empty with the PvmHostAdd option.

info - integer status code returned by the routine. Values less than zero indicate an

error.

Discussion

The routine pvm_notify requests PVM to notify the caller on detecting certain

events. In response to a notify request, some number of messages (see below) are sent

by PVM back to the calling task. The messages are tagged with the code (msgtag)

supplied to notify.

The tids array specifies who to monitor when using TaskExit or HostDelete, it

contains nothing when using HostAdd. If required, the routines pvm_config and

pvm_tasks can be used to obtain task and pvmd tids. The notification messages have

the following format:

PvmTaskExit One notify message for each tid requested. The message body contains

a single tid of exited task.

PvmHostDelete One message for each tid requested. The message body contains a

single pvmd-tid of exited pvmd.

PvmHostAdd Up to cnt notify messages are sent. The message body contains an

integer count followed by a list of pvmd-tids of the new pvmds. The counter of

PvmHostAdd messages remaining is updated by successive calls to pvm notify.

Specifying a cnt of -1 turns on PvmHostAdd messages until a future notify; a count of

zero disables them.

Tids in the notify messages are packed as integers. The calling task(s) are

Page 84: Parallel evolutionary approach report

Thapar University, Patiala Page 72

responsible for receiving the message with the specified msgtag and taking

appropriate action.

Examples

info = pvm_notify( PvmHostAdd, 9999, 1, dummy )

Errors

Name Possible cause

PvmSysErr pvmd not responding.

PvmBadParam giving an invalid argument value.

pvm_pk*( )

pack the active message buffer with arrays of prescribed data type.

Synopsis

info info = pvm_packf( const char *fmt, ... )

info info = pvm_pkbyte( char

info info = *xp, int nitem, int stride )

info info = pvm_pkcplx( float *cp, int nitem, int stride )

info info = pvm_pkdcplx( double *zp, int nitem, int stride )

info info = pvm_pkdouble(double *dp, int nitem, int stride )

info info = pvm_pkfloat( float *fp, int nitem, int stride )

info info = pvm_pkint( int*ip, int nitem, int stride )

info info = pvm_pkuint( unsigned int *ip, int nitem, int stride )

info info = pvm_pkushort( unsigned short *ip, int nitem, int stride )

info info = pvm_pkulong( unsigned long *ip, int nitem, int stride )

info info = pvm_pklong( long *ip, int nitem, int stride )

info info = pvm_pkshort( short *jp, int nitem, int stride )

info info = pvm_pkstr(char*sp )

Parameters

fmt - Printflike format expression specifying what to pack.

nitem - The total number of items to be packed (not the number of bytes).

stride - The stride to be used when packing the items. For example, if stride=2 in

pvm_pkcplx, then every other complex number will be packed.

xp - pointer to the beginning of a block of bytes. Can be any data type, but must

match the corresponding unpack data type.

Page 85: Parallel evolutionary approach report

Thapar University, Patiala Page 73

cp - complex array at least nitem*stride items long.

zp - double precision complex array at least nitem*stride items long.

dp - double precision real array at least nitem*stride items long.

fp - real array at least nitem*stride items long.

ip - integer array at least nitem*stride items long.

jp - integer*2 array at least nitem*stride items long.

sp - pointer to a null terminated character string.

what - integer specifying the type of data being packed.

what options

STRING 0 REAL4 4

BYTE1 1 COMPLEX8 5

INTEGER2 2 REAL8 6

INTEGER4 3 COMPLEX16 7

info - integer status code returned by the routine. Values less than zero indicate an

error.

Discussion

Each of the pvm_pk* routines packs an array of the given data type into the

active send buffer. The arguments for each of the routines are a pointer to the first

item to be packed, nitem which is the total number of items to pack from this array,

and stride which is the stride to use when packing. An exception is pvm_pkstr() which

by definition packs a NULL terminated character string and thus does not need nitem

or stride arguments.

If the packing is successful, info will be 0. If some error occurs then info will

be < 0. A single variable (not an array) can be packed by setting nitem= 1 and stride=

1. C structures have to be packed one data type at a time.

The routine pvm_packf() uses a printflike format expression to specify what

and how to pack data into the send buffer. All variables are passed as addresses if

count and stride are specified; otherwise, variables are assumed to be values. A BNF-

like description of the format syntax is:

format : null | init | format fmt

init : null | '%' '+'

fmt : '%' count stride modifiers fchar

fchar : 'c' | 'd' | 'f' | 'x' | 's'

Page 86: Parallel evolutionary approach report

Thapar University, Patiala Page 74

count : null | [0-9]+ | '*'

stride : null | '.' ( [0-9]+ | '*' )

modifiers : null | modifiers mchar

mchar : 'h' | 'l' | 'u'

Formats:

+ means initsend - must match an int (how) in the param list.

c pack/unpack bytes

d integers

f float

x complex float

s string

Modifiers:

h short (int)

l long (int, float, complex float)

u unsigned (int)

'*' count or stride must match an int in the param list.

Examples

info = pvm_initsend( PvmDataDefault );

info = pvm_pkstr( "initial data" );

info = pvm_pkint( &size, 1, 1 );

info = pvm_pkint( array, size, 1 );

info = pvm_pkdouble( matrix, size*size, 1 );

msgtag= 3 ;

info = pvm_send( tid, msgtag );

Errors

Name Possible cause

PvmNoMem Malloc has failed. Message buffer size has exceeded the available

memory on this host.

PvmNoBuf There is no active send buffer to pack into. Try calling

pvm_initsend before packing message.

pvm_parent( )

returns the tid of the process that spawned the calling process.

Page 87: Parallel evolutionary approach report

Thapar University, Patiala Page 75

Synopsis

int tid = pvm parent( void )

Parameters

tid - integer returns the task identifier of the parent of the calling process. If the

calling process was not created with pvm spawn, then tid = PvmNoParent.

Discussion

The routine pvm_parent returns the tid of the process that spawned the calling

process. If the calling process was not created with pvm spawn, then tid is set to

PvmNoParent.

Examples

tid = pvm_parent();

Errors

this error condition can be returned by pvm_parent.

Name Possible cause

PvmNoParent The calling process was not created with pvm_ spawn.

pvm_recv( )

receive a message

Synopsis

int bufid = pvm_recv( int tid, int msgtag)

Parameters

tid - integer task identifier of sending process supplied by the user. (A -1 in this

argument matches any tid (wildcard).)

msgtag - integer message tag supplied by the user. msgtag should be >= 0. It allows

the user's program to distinguish between different kinds of messages. (A -1 in this

argument matches any message tag (wildcard).)

bufid - integer returns the value of the new active receive buffer identifier. Values

less than zero indicate an error.

Discussion

The routine pvm_recv blocks the process until a message with label msgtag

has arrived from tid. pvm_recv then places the message in a new active receive buffer,

which also clears the current receive buffer. A -1 in msgtag or tid matches anything.

This allows the user the following options. If tid = -1 and msgtag is defined by the

Page 88: Parallel evolutionary approach report

Thapar University, Patiala Page 76

user, then pvm_recv will accept a message from any process which has a matching

msgtag. If msgtag = -1 and tid is defined by the user, then pvm_recv will accept any

message that is sent from process tid. If tid = -1 and msgtag = -1, then pvm_recv will

accept any message from any process.

The PVM model guarantees the following about message order. If task 1 sends

message A to task 2, then task 1 sends message B to task 2, message A will arrive at

task 2 before message B. Moreover, if both messages arrive before task 2 does a

receive, then a wildcard receive will always return message A. If pvm_recv is

successful, bufid will be the value of the new active receive buffer identifier. If some

error occurs then bufid will be < 0.

pvm_recv is blocking which means the routine waits until a message matching

the user specified tid and msgtag values arrives at the local pvmd. If the message has

already arrived then pvm_recv returns immediately with the message.

Once pvm_recv returns, the data in the message can be unpacked into the

user's memory using the unpack routines.

Examples

tid = pvm_parent();

msgtag = 4 ;

bufid = pvm_recv( tid, msgtag );

info = pvm_upkint( tid_array, 10, 1 );

info = pvm_upkint( problem_size, 1, 1 );

info = pvm_upkfloat( input_array, 100, 1 );

Errors

These error conditions can be returned by pvm_recv

Name Possible cause

PvmBadParam giving an invalid tid value, or msgtag < 1.

PvmSysErr pvmd not responding.

pvm_send( )

sends the data in the active message buffer.

Synopsis

int info = pvm_send( int tid, int msgtag )

Parameters

Page 89: Parallel evolutionary approach report

Thapar University, Patiala Page 77

tid - integer task identifier of destination process.

msgtag - integer message tag supplied by the user, msgtag should be >= 0.

info - integer status code returned by the routine. Values less than zero indicate error.

Discussion

The routine pvm_send sends a message stored in the active send buffer to the

PVM process identified by tid. msgtag is used to label the content of the message. If

pvm send is successful, info will be 0. If some error occurs then info will be < 0. The

pvm_send routine is asynchronous. Computation on the sending processor resumes as

soon as the message is safely on its way to the receiving processor.

This is in contrast to synchronous communication, during which computation

on the sending processor halts until the matching receive is executed by the receiving

processor. pvm_send first checks to see if the destination is on the same machine. If

so and this host is a multiprocessor then the vendor's underlying message passing

routines are used to move the data between processes.

Examples

info = pvm_initsend( PvmDataDefault );

info = pvm_pkint( array, 10, 1 );

msgtag= 3 ;

info = pvm_send( tid, msgtag );

Errors

These error conditions can be returned by pvm_send

Name Possible cause

PvmBadParam giving an invalid tid or a msgtag.

PvmSysErr pvmd not responding.

PvmNoBuf no active send buffer. Try calling pvm initsend()before sending.

Pvm_spawn( )

starts new PVM processes.

Synopsis

int numt = pvm spawn( char *task, char **argv, int flag, char *where, int ntask,

int *tids )

Parameters

task - character string containing the executable file name of the PVM process to be

Page 90: Parallel evolutionary approach report

Thapar University, Patiala Page 78

started. The executable must already reside on the host on which it is to be started.

The default location PVM looks is $HOME/pvm3/bin/$PVM_ARCH/filename .

argv - pointer to an array of arguments to the executable with the end of the array

specified by NULL. If the executable takes no arguments, then the second argument

to pvm_spawn is NULL.

flag - integer specifying spawn options.

In C flag should be the sum of:

Option value MEANING

PvmTaskDefault 0 PVM can choose any machine to start task

PvmTaskHost 1 where specifies a particular host

PvmTaskArch 2 where specifies a type of architecture

PvmTaskDebug 4 start up processes under debugger

PvmTaskTrace 8 processes will generate PVM trace data. *

PvmMppFront 16 Start process on MPP front-end.

PvmHostCompl 32 Use complement host set

where - character string specifying where to start the PVM process. Depending on the

value of flag, where can be a host name such as “ibm1.epm.ornl.gov" or a PVM

architecture class such as “SUN4". If flag is 0, then where is ignored and PVM will

select the most appropriate host.

nrask - integer specifying the number of copies of the executable to start up.

tids - integer array of length at least ntask. On return the array contains the tids of the

PVM processes started by this pvm_spawn call. If there is a error starting a given

task, then that location in the array will contain the associated error code.

numt - integer returning the actual number of tasks started. Values less than zero

indicate a system error. A positive value less than ntask indicates a partial failure. In

this case the user should check the tids array for the error code(s).

Discussion

The routine pvm_spawn starts up ntask copies of the executable named task. On

systems that support environment, spawn passes exported variables in the parent

environment to children tasks. If set, the envar PVM_EXPORT is passed and if

PVM_EXPORT contains other names (separated by ':') they will be passed too. This

is useful for for example:

setenv DISPLAY myworkstation:0.0

Page 91: Parallel evolutionary approach report

Thapar University, Patiala Page 79

setenv MYSTERYVAR 13

setenv PVM_EXPORT DISPLAY:MYSTERYVAR

The hosts on which the PVM processes are started is set by the flag and where

arguments. On return the array tids contains the PVM task identifiers for each process

started.

If pvm_spawn starts one or more tasks, numt will be the actual number of

tasks started. If a system error occurs then numt will be < 0, If numt is less than ntask

then some executables have failed to start and the user should check the last ntask -

numt locations in the tids array which will contain the associated error codes, see

below for meaning.

When flag is set to 0 and where is set to NULL a heuristic is used to distribute

the ntask processes across the virtual machine. Initially the heuristic is round-robin

assignment starting with the next host in the table. Later PVM will use the metrics of

machine load and rated performance (sp=) to determine the most appropriate hosts.

If the PvmHostCompl flag is set, the resulting host set gets complemented.

Also, the TaskHost hostname "." is taken as localhost. This allows spawning tasks on

"." to get the localhost or to spawn n - 1 things on TaskHost|HostCompl "." to get any

but the localhost.

In the special case where a multiprocessor is specified by where, pvm_spawn

will start all ntask copies on this single machine using the vendor's underlying

routines.

If PvmTaskDebug is set, then the pvmd will start the task(s) in a debugger. In

this case, instead of executing pvm3/bin/ARCH/task args it executes

pvm3/lib/debugger pvm3/bin/ARCH/task args. Debugger is a shell script that the

users can modify to their individual tastes. Presently the script starts an xterm with

dbx orcomparable debugger in it.

Examples

numt = pvm_spawn( "host", 0, PvmTaskHost, "sparky", 1, &tid[0] );

numt = pvm_spawn( "host", 0, (PvmTaskHost+PvmTaskDebug),"sparky", 1,

&tid[0]);

numt = pvm_spawn( "node", 0, PvmTaskArch, "RIOS", 1, &tid[i] );

numt = pvm_spawn( "FEM1", args, 0, 0, 16, tids );

numt = pvm_spawn( "pde", 0, PvmTaskHost, "paragon.ornl", 512, tids );

Errors

Page 92: Parallel evolutionary approach report

Thapar University, Patiala Page 80

These error conditions can be returned by pvm_spawn either in numt or in the tids

array.

Name Value Possible cause

PvmBadParam -2 giving an invalid argument value.

PvmNoHost -6 Specified host is not in the virtual machine.

PvmNoFile -7 Specified executable can not be found. The default

location PVM looks in ~/pvm3/bin/ARCH where ARCH is PVM architecture name.

PvmNoMem -10 Malloc failed. Not enough memory on host.

PvmSysErr -14 pvmd not responding.

PvmOutOfRes -27 out of resources.

Pvm_upk*( )

unpack the active message buffer into arrays of prescribed data type.

Synopsis

Int info = pvm_unpackf( const char *fmt, ... )

Int info = pvm_upkbyte( char *xp, int nitem , int stride )

Int info = pvm_upkcplx( float *cp, int nitem, int stride )

Int info = pvm_upkdcplx( double *zp, int nitem, int stride )

Int info = pvm_upkdouble(double *dp, int nitem, int stride )

Int info = pvm_upkfloat( float *fp, int nitem, int stride )

Int info = pvm_upkint(int *ip, int nitem, int stride )

Int info = pvm_upklong(long *ip, int nitem, int stride )

Int info = pvm_upkshort( short *jp, int nitem, int stride )

Int info = pvm_upkstr(char*sp )

Parameters

fmt - Printf-like format expression specifying what to pack. (See discussion)

nitem - The total number of items to be unpacked (not the number of bytes).

stride - The stride to be used when packing the items. For example, if stride= 2 in

pvm upkcplx, then every other complex number will be unpacked.

xp - pointer to the beginning of a block of bytes. Can be any data type, but must

match the corresponding pack data type.

cp - complex array at least nitem*stride items long.

zp - double precision complex array at least nitem*stride items long.

Page 93: Parallel evolutionary approach report

Thapar University, Patiala Page 81

dp - double precision real array at least nitem*stride items long.

fp - real array at least nitem*stride items long.

ip - integer array at least nitem*stride items long.

jp - integer*2 array at least nitem*stride items long.

sp - pointer to a null terminated character string.

Discussion

Each of the pvm_upk* routines unpacks an array of the given data type from

the active receive buffer. The arguments for each of the routines are a pointer to the

array to be unpacked into, nitem which is the total number of items to unpack, and

stride which is the stride to use when unpacking.

An exception is pvm_upkstr() which by definition unpacks a NULL

terminated character string and thus does not need nitem or stride arguments. If the

unpacking is successful, info will be 0. If some error occurs then info will be < 0.A

single variable (not an array) can be unpacked by setting nitem= 1 and stride= 1. All

variables are passed as addresses. A BNF-like description of the format syntax is:

format : null | init | format fmt

init : null | '%' '+'

fmt : '%' count stride modifiers fchar

fchar : 'c' | 'd' | 'f' | 'x' | 's'

count : null | [0-9]+ | '*'

stride : null | '.' ( [0-9]+ | '*' )

modifiers : null | modifiers mchar

mchar : 'h' | 'l' | 'u'

Formats:

+ means initsend - must match an int (how) in the param list.

c pack/unpack bytes

d integer

f float

x complex float

s string

Modifiers:

h short (int)

l long (int, float, complex float)

u unsigned (int)

Page 94: Parallel evolutionary approach report

Thapar University, Patiala Page 82

'*' count or stride must match an int in the param list.

Future extensions to the ‘what’ argument will include 64 bit types when XDR

encoding of these types is available. Meanwhile users should be aware that precision

can be lost when passing data from a 64 bit machine like a Cray to a 32 bit machine

like a SPARCstation. As a mnemonic the ‘what’ argument name includes the number

of bytes of precision to expect. By setting encoding to PVMRAW (see pvm nitsend)

data can be transferred between two 64 bit machines with full precision even if the

PVM configuration is heterogeneous.

Messages should be unpacked exactly like they were packed to insure data

integrity. Packing integers and unpacking them as oats will often fail because a type

encoding will have occurred transferring the data between heterogeneous hosts.

Packing 10 integers and 100 oats then trying to unpack only 3 integers and the 100

floats will also fail.

Examples

info = pvm_recv( tid, msgtag );

info = pvm_upkstr( string );

info = pvm_upkint( &size, 1, 1 );

info = pvm_upkint( array, size, 1 );

info = pvm_upkdouble( matrix, size*size, 1 );

Errors

Name Possible cause

PvmNoData Reading beyond the end of the receive buffer. Most

likely cause is trying to unpack more items than were

originally packed into the buffer.

PvmBadMsg The received message cannot be decoded. Most likely

because the hosts are heterogeneous and the user

specified an incompatible encoding. Try setting the

encoding to PvmDataDefault (see pvm mkbuf).

PvmNoBuf There is no active receive buffer to unpack.

Page 95: Parallel evolutionary approach report

Thapar University, Patiala Page 83

REFERENCES

[1] Rangel-Merino, A., López-Bonilla, J.L. and Miranda, R.”Optimization Method

based on Genetic Algorithms”.Vol. 12, pp. 393-408, Oct 2005.

[2] Cvetkovic, D. and Muhlenbein, H. The Optimal Population Size for Uniform

Crossover and Trucation Selection Technical Report, GMD-AS- TR-94-11,

1994.

[3] Fisher, R.A., The Genetical Theory of Natural Selection. Clarendon press,

Oxford 1930.

[4] Channon, A.D. and Damper, R.I. Towards the Evolutionary Emergence of

increasingly Complex Advantageous Behaviours. International Journal of

systems Science, 31(7), pp. 843-860, (2000).

[5] Toledo, C.D., Genetic Algorithms for the numerical solutions of variational

problems without analytic trial functions, arXiv:Physics/0506188, pp. 1-3,

June 2005.

[6] Holland, J., Genetic Algorithms .Scentific American. pp.114-116, 1992.

[7] Bäck, T. and Schwefel, H.P., "An Overview of Evolutionary Algorithms"

Evolutionary Comput.1: pp. 1-23, 1993.

[8] Tucker, A.B., (Jr.), The Computer Science and Engineering Handbook, CRC

Press, USA, pp.557-571, 1997.

[9] Holland, J.H., Adaptive in Natural and Artificial Systems. Ann Arbor, MI:

University of Michigan Press, 1975.

[10] Goldberg, D.E., Genetic Algorithms, in Search, Optimization & Machine

Learning. Addison Wesley, Publishing Company, Inc., Reading, MA, 1989.

[11] Bäck, T., Evolutionary Algorithms in Theory and Practice: Evolution

Strategies, Evolutionary Programming, Genetic Algorithms. Oxford

University Press, N.Y., 1996.

[12] Knowles, J.D., Watso, R.A. and Corne, D.W., Evolutionary Multi-Criterion

Optimization. Springer, 1993, pp. 269-283. Available:

www.springer.com/computer/theoriticalcomputerscience/book/978-3-540-

4175-3.

[13] Nocedal, J. and Wright, S.J., Numerical Optimization.1993.Available:

www.lania.mx/~ c coello/EMOO/knowles01.ps.gz .

Page 96: Parallel evolutionary approach report

Thapar University, Patiala Page 84

[14] Available at: www.edc.ncl.ac.uk/highlight/rhjanuary2007.php/

[15] Spears, W.M. and Anand, V., A Study of Crossover operators in Genetic

Programming. Proceedings of the Sixth International Symposium on

Methodologies for Intelligent Systems, 1991.

[16] Available at: http://my.opera.com/blu3c4t/blog/show.dml/2636486

[17] Charbonneau, P., An introduction to genetic algorithms for numerical

optimization. NCAR/TN-450+IA,NCAR Technical Note, March 2002.

[18] Konaka, A., Coitb, D.W. and Smith, A.E., “Multi-objective optimization using

genetic algorithms: A tutorial”. Reliability Engineering and System Safety,

Available: www.ElsevierComputerScience.com.

[19] Available at: http://www.sinleb.com/algorithms/ga.php

[20] Available at:http://www.fabioruini.eu/blog/2012/05/22/selection-methods-for-

gas/

[21] Available at:http://people.cs.missouri.edu/~skubicm/375/ParentSelection.htm

[22] Available at:http://www.talkorigins.org/faqs/genalg/genalg.html

[24] Available t:http://www.cse.unr.edu/~sushil/class/gas/notes/scaling/index.html

[25] Chang, W.A., Kim, K.P. and Ramakrishna, R.S. A memory-efficient elitist

genetic algorithm. Proceedings of the 5th International Conference on

Parallel Processing and Applied Mathematics, September 7-10, Springer

Verlag,pp:552- 559, 2003.

[26] Safe, M., Carballido, J., Ponzoni, I. and Brignole, N., On Stopping Criteria

for Genetic Algorithms, Springer Verlag, pp:405-413, 2004.

[27] Man, K.F., Tang, K.S., and Kwong, S., "Genetic Algorithms: Concepts and

Applications [in Engineering Design]," IEEE Trans. Industrial Electronics,

vol. 43, no. 5, pp. 519-534, Oct. 1996.

[28] Adamidis, P., Review of Parallel Genetic Algorithms Bibliography. Technical

report, Automation & Robotics Lab., Dept. of Electrical and Computer Eng.,

Aristotle Univ. of Thessaloniki, Greece, 1994.

[29] Paz, E. C., “Designing efficient master-slave parallel genetic algorithms,”

IllGAL Report 97004, The University of Illinois, (1997), Available: ftp://ftp-

illigal.ge.uiuc.edu/pub/papers/IlliGALs/97004.ps.Z.

[30] Paz, E.C., A Survey of Parallel Genetic Algorithms. IlliGAL Report No.

97003, Illinois Genetic Algorithms Lab., University of Illinois at Urbana-

Champaign, May 1997.

Page 97: Parallel evolutionary approach report

Thapar University, Patiala Page 85

[31] Gordon, V.S. and Whitley, D., Serial and Parallel Genetic Algorithms as

Function Optimizers. In Forrest S. (Ed.), Proceedings of the Fifth

International Conference on Genetic Algorithms (ICGA-93), pp. 177-183,

1993.

[32] Lin, S.C., Punch, W., Goodman, E.D. Coarse-grain parallel genetic

algorithms: Categorization and New Approach. In Sixth IEEE Symposium on

Parallel and Distribute Processing(SPDP), IEEE Computer Society Press, pp.

28-39, 1994.

[33] Abramson, D., A Parallel Genetic Algorithm for Solving the School

Timetabling Problem. Proceedings of the 15th Australian Computer Science

Conference (ACSC-15), Feb. 1992.

[34] Abramson, D., Mills, G. and Perkins, S., Parallelisation of a Genetic

Algorithm for the Computation of Efficient Train Schedules. Proceedings of

1993 Parallel Computing and Transputers Conference, 139-149, Nov. 1993.

[35] Fogarty, T.C. and Huang, R., Implementing the Genetic Algorithm on

Transputer Based Parallel Processing Systems, in H.-P.Schwefel,

R.Manner (Eds.), Proceedings of Parallel Problem Solving from Nature

(PPSN 1), 1st Workshop, p.145-149, Springer-Verlag, Oct. 1990.

[36] LIU. Shuping and CHENG Yanliu. The Design and Implementation of MPI

Master-Slave Genetic Algorithm. International Conference on Education

Technology and Computer(ICETC2012) IACSIT Singapore, Vol. 43,2012.

[37] Depolli., M., Trobec R., Filipic B. Asynchronous Master-Slave Parallelization

of Differential Evolution for Multi-Objective Optimization. MIT Press

Journals, Evolutionary Computation, pp. 261-291, 21(2), May 2013.

[38] K. L. Lo and Z. J. Meng, “Newton-like method for line outrage simulation”.

IEEE proceedings Generation Transmission Distribution, 151(2), pp. 225-231,

March 2004.

[39] El-Emary, Ibrahiem M.M. and El-Kareem, Mona M. Abd. Towards Using

Genetic Algorithm for Solving Nonlinear Equation Systems. World Applied

Sciences Journal, 5(3), pp. 282-289, 2008.

[40] Al Dahoud Ali , Ibrahiem M. M. El Emary, and Mona M. Abd El-Kareem.

“Application of Genetic Algorithm in Solving Linear Equation Systems”,

MASAUM Journal of Basic and Applied Science, p: 179-185 Vol.1, No.2,

Sept. 2009.

Page 98: Parallel evolutionary approach report

Thapar University, Patiala Page 86

[41] Man K. F., Tang K. S., Kwong S.,”Genetic Algorithms: Concepts and

Applications”. IEEE Transaction on Industrial Electronics, Vol. 43, No. 5,

Oct. 1996.

[42] M. K. Pakhirs, “AHybrid Genetic Algorithm using Probabilistic Selection”.

IEEE Journal, Vol. 84, May 2003.

[43] Geist Al., Dongarra J., Manchek R., Jiang W. “Using PVM 3.0 to Run Grand

Challenge applications on a Heterogeneous Network of Parallel Computers”.

Dec, 1992.

[44] Geist A., Beguelin A., Dongaraa J., Jiang W., Manchek R., Sunderam V. PVM

3 USERS GUIDE AND REFERENCE MANUAL , Oak Ridge National

Laboratory/TM-12187, Engineering Physics and Mathematics Division

mathematical Sciences Section, Sept., 1994.