Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 2.33 KB

README.md

File metadata and controls

52 lines (37 loc) · 2.33 KB

Optimization_of_waiting_time_using_genetic_algorithm

The main steps of applying GA to any problem have been presented as follows.

  • Step 1: Code the problem as a binary chromosome
  • Step 2: Choose the size of a chromosome population N
  • Step 3.Select genetic operators as crossover probability pc and the mutation probability pm.
  • Step 4: Define a fitness function.
  • Step 5: Randomly generate an initial population of N
  • Step 6: Calculate the fitness of each individual chromosome:
  • Step 7: Select a pair of chromosomes to generate next generation.
  • Step 8: Create a pair of offspring chromosomes
  • Step 9: Place the created offspring chromosomes in the new population.
  • Step 10: Replace the initial (parent) chromosome population with the new (offspring) population.
  • Step 11: Go to Step 6, and repeat the process

Few parameters used in Algorithem

  • HC_DFi : destination floor of HCi

  • maxHC_DF↑ : maximum destination floor of upHCs greater than CFn

  • maxHC↓ : maximum down HC

  • minHC_DF↓ : minimum destination floor of down HCs less than CFn

  • m inH C↑ : minimum up HC

  • CAR_DF: matrix of car destination floors (if car is stopped, it is equal to CF)

  • Y: maximum of the destination floors of up HCs less than CFn

  • Z: minimum of the destination floors of down HCs greater than CFn

  • MAX = max( HC_DF , CAR_DF, HC )↑ ↓

  • MIN = minMIN=min( HC_DF , HC )

Algorithm used if Lift will initially go up

-up_algo

Algorithm used if Lift will initially go down

-down_algo

Time parameters

test_data1

Test Data

test_da

Result According to Genatic Algorithem for above given data

-output_ga

Result According to Above code for above given data

-output