0% found this document useful (0 votes)
133 views

Soft Computing-Lab File

Uploaded by

Aaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views

Soft Computing-Lab File

Uploaded by

Aaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Rustamji Institute Of

Technology
Department of Information Technology

IT- 8002 (Soft Computing)

Practical File

Submitted To : Prof J.S. Pahariya Submitted By : Alan Thomas


Enrollment No : 0902IT161005
Semester : 8 th
INDEX

SLNO TOPIC SIGNATURE


1. Form a perceptron net for basic logic gates with binary input and
output.
2. Using Adaline net, generate XOR function with bipolar inputs and
targets.
3. Calculation of new weights for a Back propagation network, given
the values of input pattern, output pattern, target output, learning
rate and activation function.

4. Construction of Radial Basis Function Network.

5. Use of ART algorithm to cluster vectors.

6. Design fuzzy inference system for a given problem.

7. Implement Travelling salesman problem using Genetic Algorithm.

8. Optimisation of problem like Job shop scheduling using Genetic


algorithm
Experiment 1
Form a perceptron net for basic logic gates with binary input and output.

Information flow in a Neural Cell. The input /output and the propagation of information are
shown below. Network Topology for Logic Gate this gives an input vector defined as follows,

I = [I0 I1 ]

and weight matrix defined thus,

W00

Wio = .

W10

The network output then becomes,

if (W00 × I0 ) + (W01 × I1 ) > 0

Implementing the perceptron learning algorithm then becomes a matter of substituting the input
values in Table 1, into the vector I.

Exercise 1:Implementation of a Single Layer perceptron

Implement a single layer perceptron using a programming language with which you are most
familiar

//Architectural Constraints

int input,hidden,output; //no of input,hidden,output units

double **iweights; //weight matrix

double *netin,*netout; //input and output vectors

double lrate; //learning rate

}PERCEPTRON;

Write C functions to populate the structure with data as appropriate. Functions will be needed
to implement the activation function, the presentation of the training data.
// generates a perceptron

void makePerceptron(PERCEPTRON *net,int i,int h,int o);

//Initialises the weight matrix with random numbers

void initialise(PERCEPTRON *net);

// Logical Step Function

float threshold(float input);

//Presents a single pattern to the network

void present(PERCEPTRON *net, double *pattern);

// Shows the state of a perceptron

void showState(PERCEPTRON *net);

//Calculates the network error, and propagates the error backwards

void BackProp(PERCEPTRON *net,double *target);

The McCulloch-Pitts Neuron This is a simplified model of real neurons, known as a Threshold
Logic Unit.

Multi Layer Feed-forward Network : The name suggests, it consists of multiple layers. The
architecture of this class of network, besides having the input and the output layers, also have
one or more intermediary layers called hidden layers. The computational units of the hidden
layer are known as hidden neurons. The hidden layer does intermediate computation before
directing the input to output layer.

- The input layer neurons are linked to the hidden layer neurons;

the weights on these links are referred to as input-hidden layer weights.

- The hidden layer neurons and the corresponding weights are referred to as output-hidden layer
weights.

- A multi-layer feed-forward network with l input neurons, m1 neurons in the first hidden layers,
m2 neurons in the second hidden layers, and n output neurons in the output layers is written as (l
- m1 - m2 – n ).

- Fig. above illustrates a multilayer feed-forward network with a

configuration (l - m – n).

Learning Algorithm for Training Perceptron The training of Perceptron is a supervised learning
algorithm where weights are adjusted to minimize error when ever the output does not match the
desired output.

- Definition :

Perceptron and Linearly Separable Task. Perceptron can not handle tasks which are not
separable. Sets of points in 2-D space are linearly separable if the sets can be separated by a
straight line.

- Generalizing, a set of points in n-dimensional space are linearly separable if there is a hyper
plane of (n-1) dimensions separates the sets.

Create a peceptron with (n+1) input neurons x0 , x1 , . . . . . , . xn , where is the bias input.

Perceptron Learning Algorithm

The algorithm is illustrated step-by-step.

■ Step 1 :

x0 = 1

Let O be the output neuron.

■ Step 2 :
Initialize weight W = (w0 , w1 , . . . . . , . wn ) to random weights.

■ Step 3 :

Iterate through the input patterns Xj of the training set using the

Σ n ie compute the weighted sum of inputs net j = xi wi

weight set;

i=1

for each input pattern j .

■ Step 4 :

Compute the output y j using the step function


Experiment 2
Using Adaline net, generate XOR function with bipolar inputs and targets.

Where weights determined by the normalized. An ADALINE consists of a single neuron of


the McCulloch-Pitts type, least mean square (LMS) training law. It is a well-established
supervised training method that delta rule. its has been used over a wide range of diverse
applications.The basic structure of an ADALINE is similar to a neuron with a linear activation
function and a feedback loop. During the training phase of ADALINE, the input vector as well
as the desired output are presented to the network.

■ During the training phase of ADALINE, the input vector T as well as desired output are
presented

X = [x1 , x2 , . . . , xn]

to the network.

■ The weights are adaptively adjusted based on delta rule.

■ After the ADALINE is trained, an input vector presented to the network with fixed weights
will result in a scalar output.

■ Thus, the network performs ann dimensional mapping to a scalar value.

■ The activation function is not used during the training phase.

Once the weights are properly adjusted, the response of the trained unit can be tested by applying
various inputs, which are not in the training set. If the network produces consistent responses to a
high degree with the test inputs, it is said that the network could generalize. The process of
training and generalization are two important attributes of this network.

Usage of ADLINE :

In practice, an ADALINE is used to

- Make binary decisions; the output is sent through a binary threshold.

- Realizations of logic gates such as AND, NOT and OR .

Realize only those logic functions that are linearly separable.


Experiment 3
Calculation of new weights for a Back propagation network, given the values of input
pattern, output pattern, target output, learning rate and activation function.

Back propagation Learning Rule

Each weight wji is changed by

wji = djoi

dj = oj (1 - oj) (tj - oj) if j is an output unit

dj = oj (1 - oj) Sdk wkj otherwise

where h is a constant called the learning rate,

tj is the correct output for unit j,

dj is an error measure for unit j.

Create a three layer network with N hidden units and fully connect input units to hidden units
and hidden units to output units with small random weights. Until all examples produce the
correct output within e or the mean¬squared error ceases to decrease (or other termination
criteria):

For each example in training set do: Compute the network output for this example. Compute the
error between this output and the
Experiment 4
Consider RBF-network as a function approximative

Using axes aligned Gaussian RBF networks with a single linear output unit.

Train the network to approximate an unknown function f given a training set TS =

{(x(p),f(x(p)))|1≤p≤q, x(p), f(x(p) in R)}

The number of samples encoded jointly by the basis functions i and j

Error associated with a basis function

Error in the overlapping area of two basis function


Experiment 5
Use of ART algorithm to cluster vectors.

The unsupervised speaker indexing task is to group together audio segments or utterances
belonging to the same speaker in the large audio collection . The application of speaker indexing
in the audio database consists of organizing the audio data according to the speakers presented
in the database. A fast speaker indexing is important for real-time application in particular for
speaker retrieval and adaptation. The unsupervised speaker indexing is closely related with the
unsupervised speaker clustering techniques. The speaker clustering task has been in the focus of
researchers in the last decade. Most of the state-of-the-art systems in the speaker clustering use
second-order statistics such as the BIC , the Kullback-Leibler distance (KL2), the Hotelling T2
statistic, the generalized likelihood ratio (GLR), the cross likelihood ratio (CLR) and also the
Information Bottleneck (IB) principle the variational Bayesian methods, the speaker factors
analysis and some other techniques. In a flexible framework that selects an optimal speaker
model, Gaussian Mixture Models (GMM) or VQ, based on BIC according to the duration of the
utterances is described. Currently some interest in the fast speaker clustering strategy has been
indicated in the recent publications. The proposed in system is based on the IB principle and can
achieve the diarization error rate of 23.2% using for evaluation meeting data. The error rate is
comparable with the Hidden Markov Models (HMM)/GMM baseline system but running faster:
0.3xRT. In the basic idea is to adopt a computationally cheap method to reduce the hypothesis
space of the more expensive and accurate model selection via the BIC. Two strategies based on
the pitch correlogram and the unscented-transform based approximation of the KL divergence
are used independently as a fast-match approach to select the most likely clustering merge. The
new system speeds up the diarization by 41% and is running 0.88xRT without affecting the
diarization error rate. The fast clustering technique becomes practical for the speaker indexing in
the large audio database. Many approaches applied to speaker clustering use a threshold for
merging segments in one cluster. Usually this threshold is evaluated using development data.
The value of the threshold, for example for the BIC based clustering, varied from one application
to another significantly depending on the used features and their dimensionality. For example, in
12 dimensional Mel cepstral Frequency coefficient (MFCC) feature vectors are used and the
value of the threshold l is 12.0. In 26 MFCCs (12 MFCCs + energy + their first

derivative s) are used and l was defined as 3.0. The computation of an adaptive threshold l for
unsupervised speaker segmentation using the BIC is presented in.The turning parameter is
corrected depending on the size of the window used in the BIC. Usually for threshold definition
the development data are required. The threshold definition is a well known task, in particular in
speaker verification applications. Some techniques of threshold definition in speaker verification
are presented in. Another approach of computationally efficient strategy for setting a priori
threshold in the adaptive speaker verification system is presented in. The speaker clustering task
usually includes two tasks : audio segmentation into speaker homogeneous segments and
merging segments belonging to the same speaker in one cluster. In this paper we will focus on
fast merging criterion to speed-up the clustering process. In each of the iteration of the
agglomerative clustering process we exploit a two steps procedure. In the first fast step N-closest
candidates segments for merging are obtained. Then in the second step these N segments are
compared and then the two closest segments are selected for merging using a more
computationally expensive procedure such as the BIC. In the second step the merging criterion is
not limited by using the BIC. The other distance measure based on the CLR, the GLR or other
distance measures could be applied. The suggested method could be also applied to the case
when segments are modeled by the GMM or adapted GMM instead of one Gaussian model with
full covariance as it is used in the BIC. The first step provides fast match and the second step is
used for final precise selection of the merging segments. The described strategy is applied to an
agglomerative speaker clustering (ASC) task. The suggested technique can reduce the speaker
clustering time comparing with the state-of-the-art clustering and provides speaker clustering
much faster than real-time. In speaker clustering, in particular, in the BIC based clustering the
merging criterion depends on the threshold l that is heuristically determined depending on the
used features. This threshold can be obtained manually or using some validation data to find
optimal value for a given data set. In this paper we suggest on-line procedure using actual
clustering data. The rest of the article is organized as follows: section 2 describes a state-of-the-
art algorithm for speaker clustering, section 3 explains the suggested algorithm for speaker
lustering, section 4 explains the on-line algorithm to

2.The BIC base speaker clustering

The BIC for audio application was initially proposed in [2]. In general the BIC is defined as:
BIC(M) = log L(X,M)–0.5l #(M)log(N), (1)

where log L(X,M) denotes likelihood of segment X given by the model M, N is the number of
feature vector in the data, #(M) is the number of free parameter in the model and l is a tuning
parameter. For Gaussian distributions in order to estimate the data distribution turn point
between two segments i and j that have ni and nj frames respectively, the BIC value is computed
as:

DBIC=0.5ni log | Si | +0.5nj | S j | -

0.5 nij log | Sij | +l P (2)

where nij = ni + nj , d is the dimension of the feature vector, Sij is the covariance matrix of the
data points from two segments i and j, i S is the covariance matrix of the data points from the
segment i, S j is the covariance matrix of the data points from segment j and P is the penalty:

P = 0.5(d+0.5d(d+1))log(ni + nj ) . (3)
The BIC is the distance between two Gaussian models. The negative value of the BIC indicates
that two models fit to the data better than one common Gaussian model. The positive value of the
BIC indicates statistical similarity of the compared models. In the ASC, the BIC is used to make
a pair-wise comparison between audio segments. If the BIC corresponding to the two segments
is positive and maximal

with respect to the other pairs of segments these two segments are merged. The comparison
continues until there are no more pairs of the segments with the positive BIC.

Speaker Clustering Based on VQ and BIC

In this paper we suggest an effective algorithm that uses the VQ and the BIC for speaker
clustering. In the ASC, the BIC should be applied to test all pairs of segments to select the two
best for merging. The complexity of this algorithm in each iteration with respect to the BIC
calculation is O(n2) where n is the actual number of segments. With the relatively large number
of the speech segments the speaker clustering procedure based on the BIC requires heavy
computational cost. The VQ technique previously was successfully used for speaker recognition
task. The VQ for comparison of short audio utterance was suggested in. In the preprocessing
phase the MFCCs are extracted. Before the ASC, the GMM is estimated on the entire audio data
that should be clustered. The number of the GMM corresponds to the number of speech
segments. The means of the GMMs are exploited as the cluster’s centroids and are used for the
VQ. Each feature vector of speech segment is compared with the cluster centroids that are the
means of the GMMs. Then the nearest centroid is calculated using Euclidean distance. The
number of the nearest cluster centroid is used as a codebook number. For each speech segment
the histogram of the codebook number is calculated. For each audio segment the frequencies of
the cluster numbers are normalized by the sum of these frequencies. The obtained normalized
histograms are considered as secondary feature vectors of the audio segments. The distance
between audio segments are calculated using cosine distance between normalized histograms
that correspond to the compared segments. Each audio segment is described as by the
framebased MFCC vector and by the normalized histogram. We suggest a two step merging
procedure in the ASC algorithm. The suggested speaker clustering algorithm is performed as
follows:

1.Every initial segment in the beginning of the ASC is represented by normal probability
distribution function with mean vector and full covariance matrix and by the normalized
histogram, obtained using vector quantization procedure.

2.The merging procedure includes two steps. In the first step all pairs of segments are compared
based on histogram vectors using cosine distance. The N-closest pairs are selected. In the second
step, BIC is calculated for all N-best selected pairs to find one closest for merging.

3. Then the models and the histogram vector corresponding to the merging segments are updated.
4. The process is repeated until no more segments pairs remain to be merged. The stop criterion
is based on the BIC. The computational complexity of this process is compounded from two
parts. From the computational complexity of the histogram vector comparison, using cosine
distance and the computational complexity of the BIC based comparison of the small number of
the N most nearest segments. The number N << n2 where n is the actual number of the segments.
The computational complexity of the histogram vectors comparison using cosine distance is
quite low. The use of the BIC for a limited number of segments is also computationally not
expensive. Instead of the BIC the GLR, the CLR, the KL2, the arithmetic harmonic sphericity
measure (AHS), the divergence shape (DS), the Hotelling T2 statistic, the Bhatacharyya distance
or other metrics could be used.

4. On-line Threshold Calculation

In the speaker clustering task, in particular, in the BIC based clustering the merging criterion
depends on the threshold l that is heuristically determined depending on the used features. Even
BIC criterion uses penalty, the turning parameter should be specially adjusted depending on the
data dimensionality to obtain better results. This threshold can be obtained using some
validation data to find optimal value for a given data set. The optimal value of tuning parameter
varies significantly depending on the data dimensionality. The online BIC threshold correction in
the speaker segmentation task is suggested in. The correction is based on the size of the window
used in the BIC. In the unsupervised speaker clustering task it is not defined which speakers
belong to the same cluster and which speakers are from the different clusters. In the speaker
clustering task we suppose that each audio segment is homogeneous and belongs to one speaker.
We suggest for the threshold evaluation to compare parts of the same segment. Each audio
segment i available for the clustering is divided into two parts. For each segment i and for their
two parts the BIC is calculated.

5. Database Description

For speaker clustering evaluation two databases are used. The first part of the evaluation data is
from ELRA. This collection is the corpus collected in the French national project ESTER
(Evaluation of Broadcast News enriched transcription systems). The original transcriptions
contain a total of 2,172 different speakers. About one third (744) are female speakers while 1,398
are male speakers. The data obtained from the ELRA (www.elra.info) includes 517 speakers and
47880 audio segments. For experiments 10 audio files from the ESTER collection with the total
duration of 10 hours are used. The data is converted into 16kHz sampling rate and 16 bit per
second. The audio signals are divided into overlapping frames with the size 25 ms. An overlap is
10 ms. The features consist of all-purposes MFCC. In the experiments we use 12 MFCC, energy
and their first derivatives.
6. Evaluation Metric

The performance of the speaker clustering is measured via mapping between reference labels
and system hypothesis. We use purity-based evaluation as was described in. The quality of the
system is evaluated using both speaker purity (SP) and cluster purity (CP) based on the segments
and on the frames level. On the segment level purity evaluation the size of the segments is not
taken into account. It is done to equalize the input of large and small segments into purity value.

7. Experimental Results

For evaluation of the suggested approach some experiments are carried out. In the experiments
we compare the results of clustering using the state-of-the-art algorithm and suggested
algorithm. The suggested algorithm is evaluated using different N-closest segments in the first
stage of the merging process. The value of N is 100, 200, 300, 400 and 500. The speaker purity,
cluster purity based on segment and frame levels and clustering time for the ESTER corpus are
presented on Table 1 and Table 2. Table 3 presents 10 files from the ESTER corpus including
duration of the files, number of actual speakers in the file, number of segments in the files and
number of the clusters obtained using suggested algorithm and obtained using BIC based
clustering. The first number of cluster column shows the number of clusters obtained using
suggested algorithm and the second number shows the number of clusters obtained using
baseline algorithm.

Table 1. Evaluation of clustering results of the ESTER corpus using segment level purity.
Clustering method SP CP Time in xRT

BIC 0.831 0.805 0.22

VQ-BIC 100-best 0.815 0.850 0.03

VQ-BIC 200-best 0.843 0.840 0.04

VQ-BIC 300-best 0.849 0.839 0.05

VQ-BIC 400-best 0.843 0.830 0.05

VQ-BIC 500-best 0.846 0.824 0.06

Table 2. Evaluation of clustering results of the ESTER corpus using frame level purity.
Clustering method S P CP Time in xRT

BIC 0.765 0.787 0.22


VQ-BIC 100-best 0.741 0.771 0.03

VQ-BIC 200-best 0.767 0.794 0.04

VQ-BIC 300-best 0.768 0.795 0.05

VQ-BIC 400-best 0.768 0.794 0.05

VQ-BIC 500-best 0.768 0.795 0.06

Table 3. Clustering results of the ESTER corpus Files Speakers Clusters Segments Duration
(sec.)

1 43 32/32 109 3666

2 24 24/24 102 3549

3 47 41/41 118 3603

4 39 34/34 119 3595

5 43 34/34 100 3625

6 29 27/26 112 3629

7 45 39/39 122 3618

8 42 42/42 131 3625

9 20 23/23 103 3654

10 43 40/40 117 3603

Table 4 presents the experiments of the on-line BIC threshold tuning. The threshold is data
dependent and is evaluated online using data enrolled for the clustering. For clustering BIC
Experiment 6
Design fuzzy inference system for a given problem.

Fuzzy logic is widely used in machine control. The term itself inspires a certain skepticism,
sounding equivalent to "half-baked logic" or "bogus logic", but the "fuzzy" part does not refer to
a lack of rigour in the method, rather to the fact that the logic involved can deal with fuzzy
concepts—concepts that cannot be expressed as "true" or "false" but rather as "partially true".
Although genetic algorithms and neural networks can perform just as well as fuzzy logic in many
cases , fuzzy logic has the advantage that the solution to the problem can be cast in terms that
human operators can understand, so that their experience can be used in the design of the
controller. This makes it easier to mechanize tasks that are already successfully performed by
humans.

Fuzzy logic was first proposed by Lotfi A. Zadeh of the University of California at Berkeley in a
1965 paper. He elaborated on his ideas in a 1973 paper that introduced the concept of "linguistic
variables", which in this article equates to a variable defined as a fuzzy set. Other research
followed, with the first industrial application, a cement kiln built in Denmark, coming on line in
1975.

Fuzzy systems were largely ignored in the U.S. because they were associated with artificial
intelligence, a field that periodically oversells itself, especially in the mid-1980s, resulting in a
lack of credibility within the commercial domain.

The Japanese did not have this prejudice. Interest in fuzzy systems was sparked by Seiji
Yasunobu and Soji Miyamoto of Hitachi, who in 1985 provided simulations that demonstrated
the superiority of fuzzy control systems for the Sendai railway. Their ideas were adopted, and
fuzzy systems were used to control accelerating, braking, and stopping when the line opened in
1987.

Another event in 1987 helped promote interest in fuzzy systems. During an international meeting
of fuzzy researchers in Tokyo that year, Takeshi Yamakawa demonstrated the use of fuzzy
control, through a set of simple dedicated fuzzy logic chips, in an "inverted pendulum"
experiment. This is a classic control problem, in which a vehicle tries to keep a pole mounted on
its top by a hinge upright by moving back and forth.

Observers were impressed with this demonstration, as well as later experiments by Yamakawa in
which he mounted a wine glass containing water or even a live mouse to the top of the
pendulum. The system maintained stability in both cases. Yamakawa eventually went on to
organize his own fuzzy-systems research lab to help exploit his patents in the field.

Following such demonstrations, Japanese engineers developed a wide range of fuzzy systems for
both industrial and consumer applications. In 1988 Japan established the Laboratory for
International Fuzzy Engineering (LIFE), a cooperative arrangement between 48 companies to
pursue fuzzy research.

Japanese consumer goods often incorporate fuzzy systems. Matsushita vacuum cleaners use
microcontrollers running fuzzy algorithms to interrogate dust sensors and adjust suction power
accordingly. Hitachi washing machines use fuzzy controllers to load-weight, fabric-mix, and dirt
sensors and automatically set the wash cycle for the best use of power, water, and detergent.

As a more specific example, Canon developed an autofocusing camera that uses a charge-
coupled device (CCD) to measure the clarity of the image in six regions of its field of view and
use the information provided to determine if the image is in focus. It also tracks the rate of
change of lens movement during focusing, and controls its speed to prevent overshoot.

The camera's fuzzy control system uses 12 inputs: 6 to obtain the current clarity data provided by
the CCD and 6 to measure the rate of change of lens movement. The output is the position of the
lens. The fuzzy control system uses 13 rules and requires 1.1 kilobytes of memory.

As another example of a practical system, an industrial air conditioner designed by Mitsubishi


uses 25 heating rules and 25 cooling rules. A temperature sensor provides input, with control
outputs fed to an inverter, a compressor valve, and a fan motor. Compared to the previous
design, the fuzzy controller heats and cools five times faster, reduces power consumption by
24%, increases temperature stability by a factor of two, and uses fewer sensors.

The enthusiasm of the Japanese for fuzzy logic is reflected in the wide range of other
applications they have investigated or implemented: character and handwriting recognition;
optical fuzzy systems; robots, including one for making Japanese flower arrangements; voice-
controlled robot helicopters, this being no mean feat, as hovering is a "balancing act" rather
similar to the inverted pendulum problem; control of flow of powders in film manufacture;
elevator systems; and so on.

Work on fuzzy systems is also proceeding in the US and Europe, though not with the same
enthusiasm shown in Japan. The US Environmental Protection Agency has investigated fuzzy
control for energy-efficient motors, and NASA has studied fuzzy control for automated space
docking: simulations show that a fuzzy control system can greatly reduce fuel consumption.
Firms such as Boeing, General Motors, Allen-Bradley, Chrysler, Eaton, and Whirlpool have
worked on fuzzy logic for use in low-power refrigerators, improved automotive transmissions,
and energy-efficient electric motors.

In 1995 Maytag introduced an "intelligent" dishwasher based on a fuzzy controller and a "one-
stop sensing module" that combines a thermistor, for temperature measurement; a conductivity
sensor, to measure detergent level from the ions present in the wash; a turbidity sensor that
measures scattered and transmitted light to measure the soiling of the wash; and a
magnetostrictive sensor to read spin rate. The system determines the optimum wash cycle for any
load to obtain the best results with the least amount of energy, detergent, and water. It even
adjusts for dried-on foods by tracking the last time the door was opened, and estimates the
number of dishes by the number of times the door was opened.

Research and development is also continuing on fuzzy applications in software, as opposed to


firmware, design, including fuzzy expert systems and integration of fuzzy logic with neural-
network and so-called adaptive "genetic" software systems, with the ultimate goal of building
"self-learning" fuzzy control systems.

Fuzzy sets

The input variables in a fuzzy control system are in general mapped into by sets of membership
functions similar to this, known as "fuzzy sets". The process of converting a crisp input value to
a fuzzy value is called "fuzzification".

A control system may also have various types of switch, or "ON-OFF", inputs along with its
analog inputs, and such switch inputs of course will always have a truth value equal to either 1 or
0, but the scheme can deal with them as simplified fuzzy functions that happen to be either one
value or another.

Given "mappings" of input variables into membership functions and truth values, the
microcontroller then makes decisions for what action to take based on a set of "rules", each of
the form:

IF brake temperature IS warm AND speed IS not very fast

THEN brake pressure IS slightly decreased.

In this example, the two input variables are "brake temperature" and "speed" that have values
defined as fuzzy sets. The output variable, "brake pressure", is also defined by a fuzzy set that
can have values like "static", "slightly increased", "slightly decreased", and so on.

This rule by itself is very puzzling since it looks like it could be used without bothering with
fuzzy logic, but remember that the decision is based on a set of rules:

• All the rules that apply are invoked, using the membership functions and truth values obtained
from the inputs, to determine the result of the rule.

• This result in turn will be mapped into a membership function and truth value controlling the
output variable.

• These results are combined to give a specific ("crisp") answer, the actual brake pressure, a
procedure known as "defuzzification".
This combination of fuzzy operations and rule-based "inference" describes a "fuzzy expert
system".

Traditional control systems are based on mathematical models in which the control system is
described using one or more differential equations that define the system response to its inputs.
Such systems are often implemented as "PID controllers" (proportional-integral-derivative
controllers). They are the products of decades of development and theoretical analysis, and are
highly effective.

If PID and other traditional control systems are so well-developed, why bother with fuzzy
control? It has some advantages. In many cases, the mathematical model of the control process
may not exist, or may be too "expensive" in terms of computer processing power and memory,
and a system based on empirical rules may be more effective.

Furthermore, fuzzy logic is well suited to low-cost implementations based on cheap sensors,
low-resolution analog-to-digital converters, and 4-bit or 8-bit one-chip microcontroller chips.
Such systems can be easily upgraded by adding new rules to improve performance or add new
features. In many cases, fuzzy control can be used to improve existing traditional controller
systems by adding an extra layer of intelligence to the current control method.

Fuzzy control in detail

Fuzzy controllers are very simple conceptually. They consist of an input stage, a processing
stage, and an output stage. The input stage maps sensor or other inputs, such as switches,
thumbwheels, and so on, to the appropriate membership functions and truth values. The
processing stage invokes each appropriate rule and generates a result for each, then combines the
results of the rules. Finally, the output stage converts the combined result back into a specific
control output value.

The most common shape of membership functions is triangular, although trapezoidal and bell
curves are also used, but the shape is generally less important than the number of curves and
their placement. From three to seven curves are generally appropriate to cover the required range
of an input value, or the "universe of discourse" in fuzzy jargon.

As discussed earlier, the processing stage is based on a collection of logic rules in the form of IF-
THEN statements, where the IF part is called the "antecedent" and the THEN part is called the
"consequent". Typical fuzzy control systems have dozens of rules.

Consider a rule for a thermostat:

IF (temperature is "cold") THEN (heater is "high")

This rule uses the truth value of the "temperature" input, which is some truth value of "cold", to
generate a result in the fuzzy set for the "heater" output, which is some value of "high". This
result is used with the results of other rules to finally generate the crisp composite output.
Obviously, the greater the truth value of "cold", the higher the truth value of "high", though this
does not necessarily mean that the output itself will be set to "high", since this is only one rule
among many. In some cases, the membership functions can be modified by "hedges" that are
equivalent to adjectives. Common hedges include "about", "near", "close to", "approximately",
"very", "slightly", "too", "extremely", and "somewhat". These operations may have precise
definitions, though the definitions can vary considerably between different implementations.
"Very", for one example, squares membership functions; since the membership values are
always less than 1, this narrows the membership function. "Extremely" cubes the values to give
greater narrowing, while "somewhat" broadens the function by taking the square root.

In practice, the fuzzy rule sets usually have several antecedents that are combined using fuzzy
operators, such as AND, OR, and NOT, though again the definitions tend to vary: AND, in one
popular definition, simply uses the minimum weight of all the antecedents, while OR uses the
maximum value. There is also a NOT operator that subtracts a membership function from 1 to
give the "complementary" function.

There are several different ways to define the result of a rule, but one of the most common and
simplest is the "max-min" inference method, in which the output membership function is given
the truth value generated by the premise.

Rules can be solved in parallel in hardware, or sequentially in software. The results of all the
rules that have fired are "defuzzified" to a crisp value by one of several methods. There are
dozens in theory, each with various advantages and drawbacks.

The "centroid" method is very popular, in which the "center of mass" of the result provides the
crisp value. Another approach is the "height" method, which takes the value of the biggest
contributor. The centroid method favors the rule with the output of greatest area, while the height
method obviously favors the rule with the greatest output value.

The diagram below demonstrates max-min inferencing and centroid defuzzification for a system
with input variables "x", "y", and "z" and an output variable "n". Note that "mu" is standard
fuzzy-logic nomenclature for "truth value":
Notice how each rule provides a result as a truth value of a particular membership function for
the output variable. In centroid defuzzification the values are OR'd, that is, the maximum value is
used and values are not added, and the results are then combined using a centroid calculation.

Fuzzy control system design is based on empirical methods, basically a methodical approach to
trial-and-error. The general process is as follows:

• Document the system's operational specifications and inputs and outputs.

• Document the fuzzy sets for the inputs.

• Document the rule set.

• Determine the defuzzification method.

• Run through test suite to validate system, adjust details as required.

• Complete document and release to production.


As a general example, consider the design of a fuzzy controller for a steam turbine. The block
diagram of this control system appears as follows:

The input and output variables map into the following fuzzy set:

-- where:

N3: Large negative.

N2: Medium negative.

N1: Small negative.

Z: Zero.
P1: Small positive.

P2: Medium positive.

P3: Large positive.

The rule set includes such rules as:

rule 1: IF temperature IS cool AND pressure IS weak,

THEN throttle is P3.

rule 2: IF temperature IS cool AND pressure IS low,

THEN throttle is P2.

rule 3: IF temperature IS cool AND pressure IS ok,

THEN throttle is Z.

rule 4: IF temperature IS cool AND pressure IS strong,

THEN throttle is N2.

In practice, the controller accepts the inputs and maps them into their membership functions and
truth values. These mappings are then fed into the rules. If the rule specifies an AND relationship
between the mappings of the two input variables, as the examples above do, the minimum of the
two is used as the combined truth value; if an OR is specified, the maximum is used. The
appropriate output state is selected and assigned a membership value at the truth level of the
premise. The truth values are then defuzzified. For an example, assume the temperature is in the
"cool" state, and the pressure is in the "low" and "ok" states. The pressure values ensure that only
rules 2 and 3 fire:

The two outputs are then defuzzified through centroid defuzzification:

__________________________________________________________________

| Z P2

1 -+ * *
| ** **

| * * * *

| * ** *

| * 222222222

| * 22222222222

| 333333332222222222222

+---33333333222222222222222-->

+150

__________________________________________________________________

The output value will adjust the throttle and then the control cycle will begin again to generate
the next value.

[edit] Building a fuzzy controller

Consider implementing with a microcontroller chip a simple feedback controller:

A fuzzy set is defined for the input error variable "e", and the derived change in error, "delta", as
well as the "output", as follows:

LP: large positive

SP: small positive

ZE: zero

SN: small negative

LN: large negative

If the error ranges from -1 to +1, with the analog-to-digital converter used having a resolution of
0.25, then the input variable's fuzzy set (which, in this case, also applies to the output variable)
can be described very simply as a table, with the error / delta / output values in the top row and
the truth values for each membership function arranged in rows beneath:
_______________________________________________________________________

-1 -0.75 -0.5 -0.25 0 0.25 0.5 0.75 1

_______________________________________________________________________

mu(LP) 0 0 0 0 0 0 0.3 0.7 1

mu(SP) 0 0 0 0 0.3 0.7 1 0.7 0.3

mu(ZE) 0 0 0.3 0.7 1 0.7 0.3 0 0

mu(SN) 0.3 0.7 1 0.7 0.3 0 0 0 0

mu(LN) 1 0.7 0.3 0 0 0 0 0 0

_______________________________________________________________________

-- or, in graphical form (where each "X" has a value of 0.1):

LN SN ZE SP LP

+------------------------------------------------------------------+

| |

-1.0 | XXXXXXXXXX XXX : : : |

-0.75 | XXXXXXX XXXXXXX : : : |

-0.5 | XXX XXXXXXXXXX XXX : : |

-0.25 | : XXXXXXX XXXXXXX : : |

0.0 | : XXX XXXXXXXXXX XXX : |

0.25 | : : XXXXXXX XXXXXXX : |

0.5 | : : XXX XXXXXXXXXX XXX |

0.75 | : : : XXXXXXX XXXXXXX |


1.0 | : : : XXX XXXXXXXXXX |

| |

+------------------------------------------------------------------+

Suppose this fuzzy system has the following rule base:

rule 1: IF e = ZE AND delta = ZE THEN output = ZE

rule 2: IF e = ZE AND delta = SP THEN output = SN

rule 3: IF e = SN AND delta = SN THEN output = LP

rule 4: IF e = LP OR delta = LP THEN output = LN

These rules are typical for control applications in that the antecedents consist of the logical
combination of the error and error-delta signals, while the consequent is a control command
output. The rule outputs can be defuzzified using a discrete centroid computation:

SUM( I = 1 TO 4 OF ( mu(I) * output(I) ) ) / SUM( I = 1 TO 4 OF mu(I) )

Now, suppose that at a given time we have:

e = 0.25

delta = 0.5

Then this gives:

________________________

e delta

________________________

mu(LP) 0 0.3

mu(SP) 0.7 1

mu(ZE) 0.7 0.3


mu(SN) 0 0

mu(LN) 0 0

________________________

Plugging this into rule 1 gives:

rule 1: IF e = ZE AND delta = ZE THEN output = ZE

mu(1) = MIN( 0.7, 0.3 ) = 0.3

output(1) = 0

-- where:

• mu(1): Truth value of the result membership function for rule 1. In terms of a centroid
calculation, this is the "mass" of this result for this discrete case.

• output(1): Value (for rule 1) where the result membership function (ZE) is maximum over the
output variable fuzzy set range. That is, in terms of a centroid calculation, the location of the
"center of mass" for this individual result. This value is independent of the value of "mu". It
simply identifies the location of ZE along the output range.

The other rules give:

rule 2: IF e = ZE AND delta = SP THEN output = SN

mu(2) = MIN( 0.7, 1 ) = 0.7

output(2) = -0.5

rule 3: IF e = SN AND delta = SN THEN output = LP

mu(3) = MIN( 0.0, 0.0 ) = 0

output(3) = 1
rule 4: IF e = LP OR delta = LP THEN output = LN

mu(4) = MAX( 0.0, 0.3 ) = 0.3

output(4) = -1

The centroid computation yields: = − 0.5

-- for the final control output. Simple. Of course the hard part is figuring out what rules actually
work correctly in practice.

If you have problems figuring out the centroid equation, remember that a centroid is defined by
summing all the moments (location times mass) around the center of gravity and equating the
sum to zero. So if X0 is the center of gravity, Xi is the location of each mass, and Mi is each
mass, this gives:

In our example, the values of mu correspond to the masses, and the values of X to location of the
masses (mu, however, only 'corresponds to the masses' if the initial 'mass' of the output functions
are all the same/equivalent. If they are not the same, ie some are narrow triangles, while others
maybe wide trapizoids or shouldered triangles, then the mass or area of the output function must
be known or calculated. It is this mass that is then scaled by mu and multiplied by it's location
X_i).

This system can be implemented on a standard microprocessor, but dedicated fuzzy chips are
now available. For example, Adaptive Logic INC of San Jose, California, sells a "fuzzy chip",
the AL220, that can accept four analog inputs and generate four analog outputs. A block diagram
of the chip is shown below:
+---------+ +-------+

analog --4-->| analog | | mux / +--4--> analog

in | mux | | SH | out

+----+----+ +-------+

| ^

V |

+-------------+ +--+--+

| ADC / latch | | DAC |

+------+------+ +-----+

| ^

| |

8 +-----------------------------+

| | |

| V |

| +-----------+ +-------------+ |

+-->| fuzzifier | | defuzzifier +--+

+-----+-----+ +-------------+

| ^

| +-------------+ |

| | rule | |

+->| processor +--+

| (50 rules) |

+------+------+

|
+------+------+

| parameter |

| memory |

| 256 x 8 |

+-------------+

ADC: analog-to-digital converter

DAC: digital-to-analog converter

SH: sample/hold

Antilock brakes

As a first example, consider an anti-lock braking system, directed by a microcontroller chip. The
microcontroller has to make decisions based on brake temperature, speed, and other variables in
the system.

The variable "temperature" in this system can be subdivided into a range of "states": "cold",
"cool", "moderate", "warm", "hot", "very hot". The transition from one state to the next is hard to
define.

An arbitrary static threshold might be set to divide "warm" from "hot". For example, at exactly
90 degrees, warm ends and hot begins. But this would result in a discontinuous change when the
input value passed over that threshold. The transition wouldn't be smooth, as would be required
in braking situations.

The way around this is to make the states fuzzy. That is, allow them to change gradually from
one state to the next. In order to do this there must be a dynamic relationship established between
different factors.

We start by defining the input temperature states using "membership functions":


With this scheme, the input variable's state no longer jumps abruptly from one state to the next.
Instead, as the temperature changes, it loses value in one membership function while gaining
value in the next. In other words, its ranking in the category of cold decreases as it becomes more
highly ranked in the warmer category.

At any sampled timeframe, the "truth value" of the brake temperature will almost always be in
some degree part of two membership functions: i.e.: '0.6 nominal and 0.4 warm', or '0.7 nominal
and 0.3 cool', and so on.

The above example demonstrates a simple application, using the abstraction of values from
multiple values. This only represents one kind of data, however, in this case, temperature.

Adding additional sophistication to this braking system, could be done by additional factors such
as traction, speed, inertia, set up in dynamic functions, according to the designed fuzzy system.

Logical interpretation of fuzzy control

In spite of the appearance there are several difficulties to give a rigorous logical interpretation of
the IF-THEN rules. As an example, interpret a rule as IF (temperature is "cold") THEN (heater is
"high") by the first order formula Cold(x)→High(y) and assume that r is an input such that
Cold(r) is false. Then the formula Cold(r)→High(t) is true for any t and therefore any t gives a
correct control given r. Obviously, if we consider systems of rules in which the class antecedent
define a partition such a paradoxical phenomenon does not arise. In any case there is sometime
of unsatisfactory in considering two variables x and y in a rule without some kind of functional
dependence. A rigorous logical justification of fuzzy control is given in Hájek's book (see
Chapter 7) where fuzzy control is represented as a theory of Hájek's basic logic. Also in Gerla
2005 a logical approach to fuzzy control is proposed based on the following idea. Denote by f the
fuzzy function associated with the fuzzy control system, i.e., given the input r, s(y) = f(r,y) is the
fuzzy set of possible outputs. Then given a possible output 't', we interpret f(r,t) as the truth
degree of the claim "t is a good answer given r". More formally, any system of IF-THEN rules
can be translate into a fuzzy program in such a way that the fuzzy function f is the interpretation
of a vague predicate Good(x,y) in the associated least fuzzy Herbrand model. In such a way
fuzzy control becomes a chapter of fuzzy logic programming. The learning process becomes a
question belonging to inductive logic theory.
Experiment 7
Implement Travelling salesman problem using Genetic Algorithm.

A majority of texts on the Internet will tell you exactly what a Genetic Algorithm is. This article
won't. It will show you how to solve an actual problem using Genetic Algorithms. The problem
that we will discuss throughout this article is the Travelling Salesman Problem. In summary, this
problem can be expressed as optimizing a path to link a group of two dimensions positions.

The reader should be familiar with Genetic Algorithms; the principles of fitness, random wheel
selection, crossover, mutation, etc. The article will also require some very basic understanding of
2D vector mathematics (the distance between two points in two dimensions).

First, if you want to compile the code that came with this article, you must use a C++ standard
compliant compiler. The code will be as "standard" as possible, but since it can't be tested on
every compiler, some corrections might need to be done to the source code for some compilers.
If you don't have a C++ compiler but would still want to test the code, you can try gcc or djgpp.

In order to understand what the code really does, you need some object-oriented programming
experience so C++ and Java programmers will have no difficulty reading it.

If anyone wishes to port the code to other languages, go ahead, it can help others understand
what's going on under the hood.

Implementation

Here we will try to describe the main functions used by the algorithm to find the shortest closed
path through a group of two dimensions positions.

Since this article is not a programming class, we will try to stay as straight forward as possible,
staying away from bit shifts and other complicated techniques. For this reason, you will notice a
few "magic" numbers. Almost every variable will be stored on a single byte, which means 8 bits.
Since a bit can hold the values 0 or 1, most of our variables will have values between 0 and 28-1
(255) which means we will have 28 (256) different values possible per variable.

The search domain

Our search domain will be defined as a rectangular area of 256 x 256 entries, ranging from 0 to
255 in both directions (x,y). Each pair (x,y) possible in this domain represents the position of a
point.

We then pick 256 of these pairs at random to populate our group of two dimentionnal positions.
We index, or label, these pairs from 0 to 255.

The population
Our population will be formed of 100 strings of 256 genes. Each of our genes within a string will
represent a unique index corresponding to a pair picked in the previous step. Having unique
genes will force us to write custom genes inheriting, crossing and mutating functions.

The operators

The inheriting and crossing functions will both use a pool of free indices from which used
indices will be removed to keep the uniqueness of the transferred indices. The roulette wheel
selection function The parent strings of a string that will exist on the next generation are picked
by a roulette wheel selection algorithm. This means that higher fitness strings represent bigger
parts of the wheel so they have more chances to be picked.

The fitness function

The fitness of a string will represent "how short" the line connecting the points formed by the
pairs indexed by the value of the genes from 0 to 255 then back to 0, which will close the line.
To get higher values for smaller line length values, we will set to fitness to

n(i) = value of the (i modulo 256) th gene of a string

Vn(i) = vector representing the n(i) th initial position

l = 255

i=0 |®

( ®

Vn(i) - ®

Vn(i + 1)

fitness

1/l
The crossover function

Our crossover function will be a bit uncommon. Since our genes are unique, we can't simply pick
a random crossing point then swap the values between two randomly picked strings.

First, we'll have to identify what makes a high fitness string. To get better strings after crossing,
we'll have to imagine a clever way to cross strings to keep this information and achieve to better
strings after crossing.

In our problem, geographically nearer points will give better fitness. Since crossover cuts the
string in half, it is very unlikely that looping information, the length calculated between the pairs
indexed at genes 255 and 0, will be kept. Since we have to reconstruct those strings, lets choose
to reconstruct them from the point the furthest from these two genes, the crossing point. What we
will do is add genes in Child A from Parent A, starting from the crossing site, until we reach the
head of the string. We then fill the right side of the string by querying the free indices pool with
Parent B's genes; if a gene is still free, we set it, else we skip the gene and leave it empty until we
reach the tail of the string. We then fill the empty genes randomly with the indices remaining in
the pool. We do the same thing with Child B but we use the Parent B first, then fill the left part
of the string with Parent A's genes.

Here's a quick example of how the algorithm should work, if you don't understand it, please refer
to the source code.

Lets pick two random strings, Parent A and Parent B.

Parent A

141, 133, 21, ... , 14, 87, 172

Parent B

2, 127, 221, ... , 47, 122, 251

We only show 6 of the 256 unique terms to simplify the example. We pick a random number
from 0 to 253 and add 1 to it to be our crossover point. This means that a crossover point can
only be between two genes.

For example, lets say the random number ended up to be 86 (87 with the plus 1) . This means
that Child A should be constituted from exactly 87 genes from Parent A and about 169 genes
from Parent B. At the opposite, Child B will have exactly 169 genes from Parent B and about 87
from Parent A. It is very important to note that since the genes are unique, there are chances that
for example Child A receives first a gene from Parent A that should also be transferred from
Parent B. In this case, as stated earlier, we should leave the gene empty until the transfer of all
free genes is completed. Next thing to do is to fill these empty genes with all the remaining pairs
in the pool.

To illustrate this method, here are a few genes around our crossover point of Parent A and Parent
B.

Parent A

..., 110, 34, 192 | 74, 1, 65, ...

Parent B

..., 55, 67, 204 | 34, 147, 104, ...

From this, we will construct Child A. First we will transfer all the first 87 genes of Parent A into
Child A, then, we fill it with genes from Parent B. When we come to the point of transferring the
88th gene from Parent B, we notice that Parent A already transferred the value 34, so we leave
the 88th gene of Child A empty. We continue until we reach the tail of the string.

In a second pass, all we need to do is fill the gaps with the remaining indices that haven't been
used yet.

The mutation function

The mutation function is quite simple here. The only thing it does is swap two genes within the
same string.

The main loop

Prior to the main loop, we must first initialize our population. As stated earlier, we decided to use
a population of 100 strings, so we must create 100 strings composed of a randomized list of
indices from 0 to 255. Then, each iteration of our main loop represents a new generation. Every
generation creates a new population of strings and destroys the old one. On every generation, we
first calculate the fitness of every string. Using the random wheel selection, we pick two parents.
We then check if crossover occurs (it should occur 70 percent of the time). If it occurs, we cross
the parents to create two new child, if not, we simply copy the parents into their child without
modifications. With a very low probability, say 1 percent, we apply mutation. You can play with
these probabilities to see the algorithm evolve from a stiffer algorithm to a more random
algorithm.

This way, the global fitness of the population should increase after each iteration, towards a
unique shortest path. Since we don't know at the start what this shortest path will be, we should
loop until the best fitness stalls for n iterations.

Conclusion

In this article, we showed how easy it could be to solve real problems with Genetic Algorithms.
Just for fun, you could try to compare the performances you're getting with this algorithm with a
brute force method. I hope the results will be convincing enough.
Experiment 8
Optimisation of problem like Job shop scheduling using Genetic algorithm

Scheduling problem is one of the most important problems in the combinatorial optimization
problems, and it is applied to various fields about engineering. It is generally NP-hard
combinational problem. The scheduling problem is a problem of deciding which job in which
order to be done with which machine, when several jobs are processed with several machines. In
general, the scheduling problem is classified into several types, if the problem has plural
machines. The job shop scheduling problem is one of the most difficult problems of those types.
The job shop scheduling problem has several machines of which each machine has each
function, and each job is processed according to the specific order. Many works have been
reported for this problem using Genetic Algorithm (GA). The GA is one of the most powerful
optimization methods based on the mechanics of natural evolution. However, the problem of the
processing time stemming from a population-based search exists in GA. In this paper, we
propose a new genetic coding for the job shop scheduling problem. In GA, one individual
generally represents one solution. And then, the method of representing one individual coding.
Thus, several coding methods can exist for one problem. Therefore, the coding influences the
searching performance of GA greatly. In other words, the searching performance of GA is
decided depending on the coding method. The proposed genetic coding improves the searching
performance while keeping the run time in comparison with the conventional one. Simulation
results using benchmark data prove the validity of the proposed genetic coding comparison with
the conventional one. This paper organized as follows. Section 2 explains the job shop problem
in detail and introduces related work as preliminaries. Section 3 explains the proposed genetic
coding and Section 4 verifies the validities of the proposed one. Finally, Section 5 summarizes
and concludes this study.

2 Preliminaries

Job shop scheduling problem

The job shop scheduling problem has several machines of which each machine has each
function, and each job is processed according to the specific order. We explain the job shop
scheduling problem using Fig.1 as a concrete example. In this example three jobs are processed
by two machines. In addition, each job consists of two tasks. Specifically, the job J0 processes
the first task by machine M1 during 4 processing time. Usually, the processing time which is
required by each task is called make span. And then, the second task of J0 is processed by
machine M0 during 5 processing time. Regarding the job J1, it processes the first task by
machine M1 during processing time. And then, the second task of J1 is processed by machine
M0 during 5 processing time. Similarly, the job J2 processes the first task by machine M0 during
2 processing time. And then, the second task of J2 is processed by machine M2 during 6
processing time. In this example, the best scheduling result, which minimizes the total processing
time.

2.2 Related work

Regarding the coding method for job shop scheduling problem, the coding methods using Gantt
chart, those using the order of job number, and those using the number of machines have been
reported. Moreover, the optimization techniques using Immune Algorithm (IA) and Ant Colony
Optimization (ACO) for the job shop scheduling problem have been reported. Here, IA one of
the adaptive biological systems whose functions are to identify and eliminate foreign material
and it can obtain multi optimal solutions. ACO is based on food behavior of ants and it shows
better capability than GA when it is applied to the traveling salesman problem.

3 Improved Genetic Coding

In this study, gene is represented as the passed time of each task on scheduling. That is, the
proposed coding method has genes as the scheduling order on pheno type and it differs from the
conventional one which consists of each job number. Specifically, each gene of the proposed
coding method has the passed time of each task as shown in Fig.3. Example of the proposed
coding The processing order is sequentially operated from the left side. In this example, the first
order is T1, the second order is T2, and it continues. In the proposed coding method, each T has
the information of the priority of the scheduling. This priority decides whether to allocate the
most delayed task or the most proceeded task. This coding method considers the conversion
processing from geno type to pheno type. The concrete

procedure is as follows.

Step1: The first task to schedule is decided.

Step2: It decides either the most delayed task or the most proceeded task according to the
cording genes. Here, it is selected at random, when the several passed time are existing.

Step3: The task which minimizes the total processing time has the most important priority on
each task.

Step4: The task is allocated before the proceeded task if possible, while maintaining the
constraint for the active scheduling. 4 Experimental Results

To evaluate the proposed genetic coding method, we compared it with the conventional coding
method, using JSP LIB benchmark data. Table.1 shows the

benchmark data. The experimental condition is as follows. The OS is Windows XP, the CPU is
Pentium4 3GHz, and memory is 1Gbyte. Regarding GA parameters are shown in Table.2.

5 Conclusion
In this paper, we proposed a new genetic cording method for job shop scheduling problem. The
proposed coding method utilized the passed time and the priority scheduling, in order to improve
searching performance of GA. Thus, the proposed coding method considered the mechanism of
the conversion processing from geno type to pheno type. The experiments proved the validity of
the proposed genetic coding in comparison with the conventional coding method. Regarding
future work, applying it to the large scale scheduling problem is the most important priority. We
will also apply the proposed algorithm to the dynamic scheduling problems. This study is
partially supported by TAF. The authors would like to thank their supports.

You might also like