SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
Transportation problem: Optimizing using Genetic
Algorithm
Indra.K.R1
, Dr.S.Lavanya2
1. Research Scholar, Dept. of Mathematics, Vel’s University
Chennai, E-mail: indrakr@yahoo.com
2. Asst Professor, Dept of Mathematics, Government Arts College
Cuddalore, E-mail: lavanyaprasad1@gmail.com
Abstract:
Genetic algorithms simulate how a system transforms over generations to reach its optimal fitness, a
key to survival. A system consists of a population with individuals each having its own fitness level or
score. The individuals are made to participate in a process of evolution.
Algorithm Implementation Steps:
1. Generation of random population
2. Selection – Selection of individuals / parents based on fitness score
3. Crossover – Mating between individuals
4. Mutation – Introduction of random modifications
A simulated experiment was conducted on a transportation problem to generate a random population
of individuals. The program then identifies two individuals(parents) that are best suited for crossover
based on the fitness score. Crossover and mutation are performed on fit parents and a child individual
is created and added into the population. This process of selection, crossover and mutation is
performed in an iterative manner until the fitness score of the population does not change further.
This final fitness score is considered to be the most optimized solution to the problem. This paper
explains the algorithms used to generate the random population, select parents and perform
crossover and mutation until the optimized solution is achieved.
Keywords:
Transportation Problem, Genetic Algorithm, Fitness, Crossover, Mutation, Population, Random
Introduction to Transportation problem:
Genetic Algorithm(GA) , the search method offers the best solution among many problems. It follows
the mechanism of natural selection. GA is an evolutionary algorithm. By the process of evolution,
from the initial population, a new set of solutions which are appropriate are got. These new solutions
give way to optimal solution. GA is the best method for solving large search space optimization
problems.
Transportation problems have many practical applications. There are many methods to solve them.
Of many methods, GA will be an appropriate method to solve the transportation problem.
Transportation model consists of m points of origin A1, A2, . Am and n destination B1,B2,....BnThe point
Ai (i = 1,2,...m) supplies ai units and destination Bj (j = 1,2,....n) require bj units
∑ai= ∑bj (i = 1,2,.....m) (j = 1,2,....n)
The cost of transporting a unit from AitoBj is cij . To obtain the minimum transportation cost is the
objective of the problem. The supply origin and demand destination should be equal as far as the
number of units are concerned.
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20161
If xij is the number of units transported from Ai to Bj, then the total transportation cost can be found
after determining the xij values (i = 1,2,...m) (j = 1,2,...n)
∑ ∑ cijxij
Subject to
∑ xij = aii = 1,2,...m
∑ xij =bj j = 1,2,...n
Xij ≥ 0
Mathematically a transportation problem is a linear programming model.
The objective function is to minimize the transportation cost
Z = c11x11 + c12x12+ .....+cmnxmn
A transportation problem involves factories and warehouses. Each factory has a certain quantity of
available goods that are supplied to the warehouses. It must be noted that the total availability must
equal the total supply at the end of the allocation. In other words, no item should remain un-allocated
in the end. The following form allows the user to create a custom grid to test the simulation.
Submitting the form above provides the below grid that allows the user to enter the cost of allocating
an item from each factory to each warehouse and the total availability in each factory and the total
supply to each warehouse. The totals of these must be equal. After the values are entered the user
may set the sample count which is a random population of individuals required for selection of
parents. The larger the population, the better are the chances of finding individuals of a higher fitness.
The following is the filled up form:
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20162
1. Process of application of genetic algorithm
In GA, the population is randomly generated. In a standard method such as the North-west corner
rule the initial solution would always be the same and would result in a population where all
individuals are alike. GA works on the principle of identifying fit individuals from a large random
population. This would mean that the number of iterations required to generate random individuals
is very high. It is for this reason that web workers have been used in this program.
1.1 Preference
In real life, most actions are performed based on preferences. Preferences are driven by
environmental conditions and past experiences. Liking to a brand, an art form or a colour are examples
of preferences. In the current context, a factory manager may prefer sending an item to a particular
warehouse. Some of these reasons could be:
a. Specific nature of the good – Example, a refrigeration unit being available at one warehouse.
b. Staff competency – Example, a warehouse having more equipped and knowledgeable staff to
handle situations proactively.
c. Damage reduction – Example, a warehouse that has a high incidence of pests or rough
travelling terrain may have a lesser chance of being chosen.
d. Interpersonal rapport – Example, a warehouse manager who enjoys a high interpersonal
rapport with a factory manager has a greater chance of receiving goods from that factory.
1.1.1 Preference algorithm for allocation
In the simulation developed, allocations from factory to warehouse are done one unit at a time. For
every such unit allocation from the factory, a preference order of warehouses is randomly created and
stored in an array. The program then attempts to allocate the unit to the warehouse in this preference
order. Navigating through the preference the program checks if the warehouse has reached its full
capacity. If the first warehouse in the preference order is full, an attempt is made to allocate the unit
to the next preferred warehouse. The following flowchart describes this procedure.
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20163
1.2 Fitness:
After all the allocation is complete, the fitness of the entire allocation (individual) is determined. In
this simulation, the fitness of an individual is determined by the total cost. Each factory-warehouse
cost is multiplied with the allocation from the particular factory to the warehouse.
1.3. Allocation output:
The below shown is a screen shot of the output simulated from the user inputs set earlier. The program
generated 100 (samples count) individuals as specified. The last row in each of these tables shows the
total cost for the allocation. This is treated as the fitness score when determining the parents.
1.4 Identification of parents
Parents are identified by the fitness score, which is least cost in this case. The program identifies
parents having the lowest cost, as shown below.
1.5 Crossover
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20164
The two most fit individuals or parents are selected and a crossover is performed based on a random
row as indicated in the diagram below.
A crossover done in this manner may change some of the column totals as shown in the table below.
Column 1 Column 2 Column 3
Parent 23 40 20
Child 20 43 20
Difference -3 +3 0
Note: The net change is always zero.
1.6 Mutation
In order to make this a valid individual in the population, it is imperative to ensure that the column
totals are corrected. This is done by mutation.
First level of mutation:
The following steps comprise of the algorithm that is used to perform a mutation for correction.
 Identify the column in the child that has the excess quantity.
 Get a random row in the child that has at least 2 units.
 Remove 1 unit from the identified row (current row).
 Identify the column that has a shortage.
 Add 1 unit to the identified column and current row.
 Repeat until all excess quantities are eliminated.
This mutation is performed only to correct the individual.
Second / Third level of mutation:
The greater the randomization in the child, the greater is its chance of becoming a fitter individual. In
order to randomize the child further, a second level of mutationis necessary. A third level of mutation
is advisable. Each mutation is performed by swapping the positions of one unitsuch that the column
totals or row totals do not change. The diagram below shows the swapping:
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20165
1.7 Adding the child to the population
The child is now ready to be added to the population. It replaces the most unfit individual (highest
cost) in the population. The new fit individuals completely and continuously replace the older unfit
individuals over generations.
1.8 Optimal solution:
When the fitness score of individuals in the population does not change any further, the individuals
are said to be most optimized. In this case, when the cost doesn’t reduce further, the optimized
solution is achieved.
2. Result
For the above transportation problem, the solution generated by the conventional method is
compared to that generated by the GA method.
Solution from GA Method
Computation screen shot:
Optimal Solution from GA: 1811
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20166
Solution from Conventional Method
Solution from the conventional method is arrived as below:
 Step 1: Least-cost method to find the initial solution
 Step 2: Applying the MODI method to find the optimal solution.
Optimal allocation:
F1 F2 F3
W1 22 3
W2 18
W3 20
W4 3 17
The optimal transportation cost when the least cost method is applied is :
(22 * 20)+ (3 * 18) + (18 * 30) + (20 * 17) + (3 * 21) + (17 * 20) = 1817
Optimal Solution from Conventional Method: 1817
The GA method offers a better solution than the conventional method.
3. Conclusion
Genetic algorithm is a suitable method of optimization for a transportation problem. However, the
method requires large computational resources as against the paper-pen approach. The use of this
method can be appreciated when the search space is large and the population has multiple fitness
parameters. This paper throws light on the ability of GA to optimize real-life situations.
Web references:
 http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/hmw/article1.html
 http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
Appendices:
Programming Environment:
Language: Javascript
Styling: CSS 3.0
Mark up: HTML5, with web workers
Runtime Environment:
HTML5 browsers such as Chrome, Firefox, Opera, IE9+, iOS Safari, mobile Chrome
Note: The cross-domain policy of Chrome requires web workers to be run from a server
Server: Apache
Acknowledgements:
This research did not receive any specific grant from funding agencies in the public, commercial, or
not-for-profit sectors.
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 20167

Mais conteúdo relacionado

Destaque

4D Structural Simulation
4D Structural Simulation 4D Structural Simulation
4D Structural Simulation Sajad Memari
 
Financial forecasting and how it works in sim venture
Financial forecasting and how it works in sim ventureFinancial forecasting and how it works in sim venture
Financial forecasting and how it works in sim venturemk015787
 
Pasos para configurar una red
Pasos para configurar una redPasos para configurar una red
Pasos para configurar una redangela guarin
 
نموذج حسن مادة علوم للصف الأول
نموذج حسن مادة علوم للصف الأول نموذج حسن مادة علوم للصف الأول
نموذج حسن مادة علوم للصف الأول Education-cheetah
 
History of earthquakes in pakistan
History of earthquakes in pakistanHistory of earthquakes in pakistan
History of earthquakes in pakistanRizwan Samor
 
Kad huruf bergambar
Kad huruf bergambarKad huruf bergambar
Kad huruf bergambarMelati Senja
 
Kad nama boleh edit
Kad nama boleh editKad nama boleh edit
Kad nama boleh editanum mss
 

Destaque (8)

4D Structural Simulation
4D Structural Simulation 4D Structural Simulation
4D Structural Simulation
 
Financial forecasting and how it works in sim venture
Financial forecasting and how it works in sim ventureFinancial forecasting and how it works in sim venture
Financial forecasting and how it works in sim venture
 
Pasos para configurar una red
Pasos para configurar una redPasos para configurar una red
Pasos para configurar una red
 
نموذج حسن مادة علوم للصف الأول
نموذج حسن مادة علوم للصف الأول نموذج حسن مادة علوم للصف الأول
نموذج حسن مادة علوم للصف الأول
 
Kad imbasan j-qaf
Kad imbasan j-qafKad imbasan j-qaf
Kad imbasan j-qaf
 
History of earthquakes in pakistan
History of earthquakes in pakistanHistory of earthquakes in pakistan
History of earthquakes in pakistan
 
Kad huruf bergambar
Kad huruf bergambarKad huruf bergambar
Kad huruf bergambar
 
Kad nama boleh edit
Kad nama boleh editKad nama boleh edit
Kad nama boleh edit
 

Mais de Iaetsd Iaetsd

iaetsd Survey on cooperative relay based data transmission
iaetsd Survey on cooperative relay based data transmissioniaetsd Survey on cooperative relay based data transmission
iaetsd Survey on cooperative relay based data transmissionIaetsd Iaetsd
 
iaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdliaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdlIaetsd Iaetsd
 
iaetsd Health monitoring system with wireless alarm
iaetsd Health monitoring system with wireless alarmiaetsd Health monitoring system with wireless alarm
iaetsd Health monitoring system with wireless alarmIaetsd Iaetsd
 
iaetsd Equalizing channel and power based on cognitive radio system over mult...
iaetsd Equalizing channel and power based on cognitive radio system over mult...iaetsd Equalizing channel and power based on cognitive radio system over mult...
iaetsd Equalizing channel and power based on cognitive radio system over mult...Iaetsd Iaetsd
 
iaetsd Economic analysis and re design of driver’s car seat
iaetsd Economic analysis and re design of driver’s car seatiaetsd Economic analysis and re design of driver’s car seat
iaetsd Economic analysis and re design of driver’s car seatIaetsd Iaetsd
 
iaetsd Design of slotted microstrip patch antenna for wlan application
iaetsd Design of slotted microstrip patch antenna for wlan applicationiaetsd Design of slotted microstrip patch antenna for wlan application
iaetsd Design of slotted microstrip patch antenna for wlan applicationIaetsd Iaetsd
 
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBS
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBSREVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBS
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBSIaetsd Iaetsd
 
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...Iaetsd Iaetsd
 
Fabrication of dual power bike
Fabrication of dual power bikeFabrication of dual power bike
Fabrication of dual power bikeIaetsd Iaetsd
 
Blue brain technology
Blue brain technologyBlue brain technology
Blue brain technologyIaetsd Iaetsd
 
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...Iaetsd Iaetsd
 
iirdem Surveillance aided robotic bird
iirdem Surveillance aided robotic birdiirdem Surveillance aided robotic bird
iirdem Surveillance aided robotic birdIaetsd Iaetsd
 
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growth
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growthiirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growth
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid GrowthIaetsd Iaetsd
 
iirdem Design of Efficient Solar Energy Collector using MPPT Algorithm
iirdem Design of Efficient Solar Energy Collector using MPPT Algorithmiirdem Design of Efficient Solar Energy Collector using MPPT Algorithm
iirdem Design of Efficient Solar Energy Collector using MPPT AlgorithmIaetsd Iaetsd
 
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...Iaetsd Iaetsd
 
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...Iaetsd Iaetsd
 
iaetsd Shared authority based privacy preserving protocol
iaetsd Shared authority based privacy preserving protocoliaetsd Shared authority based privacy preserving protocol
iaetsd Shared authority based privacy preserving protocolIaetsd Iaetsd
 
iaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesiaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesIaetsd Iaetsd
 
iaetsd Robots in oil and gas refineries
iaetsd Robots in oil and gas refineriesiaetsd Robots in oil and gas refineries
iaetsd Robots in oil and gas refineriesIaetsd Iaetsd
 
iaetsd Modeling of solar steam engine system using parabolic
iaetsd Modeling of solar steam engine system using paraboliciaetsd Modeling of solar steam engine system using parabolic
iaetsd Modeling of solar steam engine system using parabolicIaetsd Iaetsd
 

Mais de Iaetsd Iaetsd (20)

iaetsd Survey on cooperative relay based data transmission
iaetsd Survey on cooperative relay based data transmissioniaetsd Survey on cooperative relay based data transmission
iaetsd Survey on cooperative relay based data transmission
 
iaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdliaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdl
 
iaetsd Health monitoring system with wireless alarm
iaetsd Health monitoring system with wireless alarmiaetsd Health monitoring system with wireless alarm
iaetsd Health monitoring system with wireless alarm
 
iaetsd Equalizing channel and power based on cognitive radio system over mult...
iaetsd Equalizing channel and power based on cognitive radio system over mult...iaetsd Equalizing channel and power based on cognitive radio system over mult...
iaetsd Equalizing channel and power based on cognitive radio system over mult...
 
iaetsd Economic analysis and re design of driver’s car seat
iaetsd Economic analysis and re design of driver’s car seatiaetsd Economic analysis and re design of driver’s car seat
iaetsd Economic analysis and re design of driver’s car seat
 
iaetsd Design of slotted microstrip patch antenna for wlan application
iaetsd Design of slotted microstrip patch antenna for wlan applicationiaetsd Design of slotted microstrip patch antenna for wlan application
iaetsd Design of slotted microstrip patch antenna for wlan application
 
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBS
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBSREVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBS
REVIEW PAPER- ON ENHANCEMENT OF HEAT TRANSFER USING RIBS
 
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...
A HYBRID AC/DC SOLAR POWERED STANDALONE SYSTEM WITHOUT INVERTER BASED ON LOAD...
 
Fabrication of dual power bike
Fabrication of dual power bikeFabrication of dual power bike
Fabrication of dual power bike
 
Blue brain technology
Blue brain technologyBlue brain technology
Blue brain technology
 
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...
iirdem The Livable Planet – A Revolutionary Concept through Innovative Street...
 
iirdem Surveillance aided robotic bird
iirdem Surveillance aided robotic birdiirdem Surveillance aided robotic bird
iirdem Surveillance aided robotic bird
 
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growth
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growthiirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growth
iirdem Growing India Time Monopoly – The Key to Initiate Long Term Rapid Growth
 
iirdem Design of Efficient Solar Energy Collector using MPPT Algorithm
iirdem Design of Efficient Solar Energy Collector using MPPT Algorithmiirdem Design of Efficient Solar Energy Collector using MPPT Algorithm
iirdem Design of Efficient Solar Energy Collector using MPPT Algorithm
 
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...
iirdem CRASH IMPACT ATTENUATOR (CIA) FOR AUTOMOBILES WITH THE ADVOCATION OF M...
 
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...
iirdem ADVANCING OF POWER MANAGEMENT IN HOME WITH SMART GRID TECHNOLOGY AND S...
 
iaetsd Shared authority based privacy preserving protocol
iaetsd Shared authority based privacy preserving protocoliaetsd Shared authority based privacy preserving protocol
iaetsd Shared authority based privacy preserving protocol
 
iaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databasesiaetsd Secured multiple keyword ranked search over encrypted databases
iaetsd Secured multiple keyword ranked search over encrypted databases
 
iaetsd Robots in oil and gas refineries
iaetsd Robots in oil and gas refineriesiaetsd Robots in oil and gas refineries
iaetsd Robots in oil and gas refineries
 
iaetsd Modeling of solar steam engine system using parabolic
iaetsd Modeling of solar steam engine system using paraboliciaetsd Modeling of solar steam engine system using parabolic
iaetsd Modeling of solar steam engine system using parabolic
 

Último

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Último (20)

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

Iaetsd transportation problem optimizing using genetic algorithm

  • 1. Transportation problem: Optimizing using Genetic Algorithm Indra.K.R1 , Dr.S.Lavanya2 1. Research Scholar, Dept. of Mathematics, Vel’s University Chennai, E-mail: indrakr@yahoo.com 2. Asst Professor, Dept of Mathematics, Government Arts College Cuddalore, E-mail: lavanyaprasad1@gmail.com Abstract: Genetic algorithms simulate how a system transforms over generations to reach its optimal fitness, a key to survival. A system consists of a population with individuals each having its own fitness level or score. The individuals are made to participate in a process of evolution. Algorithm Implementation Steps: 1. Generation of random population 2. Selection – Selection of individuals / parents based on fitness score 3. Crossover – Mating between individuals 4. Mutation – Introduction of random modifications A simulated experiment was conducted on a transportation problem to generate a random population of individuals. The program then identifies two individuals(parents) that are best suited for crossover based on the fitness score. Crossover and mutation are performed on fit parents and a child individual is created and added into the population. This process of selection, crossover and mutation is performed in an iterative manner until the fitness score of the population does not change further. This final fitness score is considered to be the most optimized solution to the problem. This paper explains the algorithms used to generate the random population, select parents and perform crossover and mutation until the optimized solution is achieved. Keywords: Transportation Problem, Genetic Algorithm, Fitness, Crossover, Mutation, Population, Random Introduction to Transportation problem: Genetic Algorithm(GA) , the search method offers the best solution among many problems. It follows the mechanism of natural selection. GA is an evolutionary algorithm. By the process of evolution, from the initial population, a new set of solutions which are appropriate are got. These new solutions give way to optimal solution. GA is the best method for solving large search space optimization problems. Transportation problems have many practical applications. There are many methods to solve them. Of many methods, GA will be an appropriate method to solve the transportation problem. Transportation model consists of m points of origin A1, A2, . Am and n destination B1,B2,....BnThe point Ai (i = 1,2,...m) supplies ai units and destination Bj (j = 1,2,....n) require bj units ∑ai= ∑bj (i = 1,2,.....m) (j = 1,2,....n) The cost of transporting a unit from AitoBj is cij . To obtain the minimum transportation cost is the objective of the problem. The supply origin and demand destination should be equal as far as the number of units are concerned. ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20161
  • 2. If xij is the number of units transported from Ai to Bj, then the total transportation cost can be found after determining the xij values (i = 1,2,...m) (j = 1,2,...n) ∑ ∑ cijxij Subject to ∑ xij = aii = 1,2,...m ∑ xij =bj j = 1,2,...n Xij ≥ 0 Mathematically a transportation problem is a linear programming model. The objective function is to minimize the transportation cost Z = c11x11 + c12x12+ .....+cmnxmn A transportation problem involves factories and warehouses. Each factory has a certain quantity of available goods that are supplied to the warehouses. It must be noted that the total availability must equal the total supply at the end of the allocation. In other words, no item should remain un-allocated in the end. The following form allows the user to create a custom grid to test the simulation. Submitting the form above provides the below grid that allows the user to enter the cost of allocating an item from each factory to each warehouse and the total availability in each factory and the total supply to each warehouse. The totals of these must be equal. After the values are entered the user may set the sample count which is a random population of individuals required for selection of parents. The larger the population, the better are the chances of finding individuals of a higher fitness. The following is the filled up form: ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20162
  • 3. 1. Process of application of genetic algorithm In GA, the population is randomly generated. In a standard method such as the North-west corner rule the initial solution would always be the same and would result in a population where all individuals are alike. GA works on the principle of identifying fit individuals from a large random population. This would mean that the number of iterations required to generate random individuals is very high. It is for this reason that web workers have been used in this program. 1.1 Preference In real life, most actions are performed based on preferences. Preferences are driven by environmental conditions and past experiences. Liking to a brand, an art form or a colour are examples of preferences. In the current context, a factory manager may prefer sending an item to a particular warehouse. Some of these reasons could be: a. Specific nature of the good – Example, a refrigeration unit being available at one warehouse. b. Staff competency – Example, a warehouse having more equipped and knowledgeable staff to handle situations proactively. c. Damage reduction – Example, a warehouse that has a high incidence of pests or rough travelling terrain may have a lesser chance of being chosen. d. Interpersonal rapport – Example, a warehouse manager who enjoys a high interpersonal rapport with a factory manager has a greater chance of receiving goods from that factory. 1.1.1 Preference algorithm for allocation In the simulation developed, allocations from factory to warehouse are done one unit at a time. For every such unit allocation from the factory, a preference order of warehouses is randomly created and stored in an array. The program then attempts to allocate the unit to the warehouse in this preference order. Navigating through the preference the program checks if the warehouse has reached its full capacity. If the first warehouse in the preference order is full, an attempt is made to allocate the unit to the next preferred warehouse. The following flowchart describes this procedure. ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20163
  • 4. 1.2 Fitness: After all the allocation is complete, the fitness of the entire allocation (individual) is determined. In this simulation, the fitness of an individual is determined by the total cost. Each factory-warehouse cost is multiplied with the allocation from the particular factory to the warehouse. 1.3. Allocation output: The below shown is a screen shot of the output simulated from the user inputs set earlier. The program generated 100 (samples count) individuals as specified. The last row in each of these tables shows the total cost for the allocation. This is treated as the fitness score when determining the parents. 1.4 Identification of parents Parents are identified by the fitness score, which is least cost in this case. The program identifies parents having the lowest cost, as shown below. 1.5 Crossover ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20164
  • 5. The two most fit individuals or parents are selected and a crossover is performed based on a random row as indicated in the diagram below. A crossover done in this manner may change some of the column totals as shown in the table below. Column 1 Column 2 Column 3 Parent 23 40 20 Child 20 43 20 Difference -3 +3 0 Note: The net change is always zero. 1.6 Mutation In order to make this a valid individual in the population, it is imperative to ensure that the column totals are corrected. This is done by mutation. First level of mutation: The following steps comprise of the algorithm that is used to perform a mutation for correction.  Identify the column in the child that has the excess quantity.  Get a random row in the child that has at least 2 units.  Remove 1 unit from the identified row (current row).  Identify the column that has a shortage.  Add 1 unit to the identified column and current row.  Repeat until all excess quantities are eliminated. This mutation is performed only to correct the individual. Second / Third level of mutation: The greater the randomization in the child, the greater is its chance of becoming a fitter individual. In order to randomize the child further, a second level of mutationis necessary. A third level of mutation is advisable. Each mutation is performed by swapping the positions of one unitsuch that the column totals or row totals do not change. The diagram below shows the swapping: ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20165
  • 6. 1.7 Adding the child to the population The child is now ready to be added to the population. It replaces the most unfit individual (highest cost) in the population. The new fit individuals completely and continuously replace the older unfit individuals over generations. 1.8 Optimal solution: When the fitness score of individuals in the population does not change any further, the individuals are said to be most optimized. In this case, when the cost doesn’t reduce further, the optimized solution is achieved. 2. Result For the above transportation problem, the solution generated by the conventional method is compared to that generated by the GA method. Solution from GA Method Computation screen shot: Optimal Solution from GA: 1811 ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20166
  • 7. Solution from Conventional Method Solution from the conventional method is arrived as below:  Step 1: Least-cost method to find the initial solution  Step 2: Applying the MODI method to find the optimal solution. Optimal allocation: F1 F2 F3 W1 22 3 W2 18 W3 20 W4 3 17 The optimal transportation cost when the least cost method is applied is : (22 * 20)+ (3 * 18) + (18 * 30) + (20 * 17) + (3 * 21) + (17 * 20) = 1817 Optimal Solution from Conventional Method: 1817 The GA method offers a better solution than the conventional method. 3. Conclusion Genetic algorithm is a suitable method of optimization for a transportation problem. However, the method requires large computational resources as against the paper-pen approach. The use of this method can be appreciated when the search space is large and the population has multiple fitness parameters. This paper throws light on the ability of GA to optimize real-life situations. Web references:  http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/hmw/article1.html  http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php Appendices: Programming Environment: Language: Javascript Styling: CSS 3.0 Mark up: HTML5, with web workers Runtime Environment: HTML5 browsers such as Chrome, Firefox, Opera, IE9+, iOS Safari, mobile Chrome Note: The cross-domain policy of Chrome requires web workers to be run from a server Server: Apache Acknowledgements: This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. ISBN-13: 978-1535448697 www.iaetsd.in Proceedings of ICRMET-2016 ©IAETSD 20167