Struggling With Genetic Algorithms in Matlab

조회 수: 3 (최근 30일)
Nathan
Nathan 2014년 12월 5일
댓글: Nathan 2014년 12월 5일
Hi, This is my first post and I only have a relatively basic knowledge of Matlab so go easy on me! Basically I am undertaking a project at university looking at Job Shop Scheduling and I am trying to develop a code for a Genetic Algorithm.
I am trying to create a population of chromosomes for a situation with 3 jobs which each have 3 operations to complete. I think I can create the random chromosomes with the following:
NumJobs = 3; NumOps = 3; Chromosome = repmat(1:NumOps,NumJobs,1); Order = randperm(NumOps*NumJobs); Chromosome = Chromosome(order)
However the next step is to evaluate each chromosome by its respective fitness, in this case the shortest completion time. Obviously this is calculated from precedence constraints and operation times etc. Basically I was just hoping if there were any tips or if you could point me in the direction of any tutorials or help I could look at?
Any help would be greatly appreciated! Thanks in advance

채택된 답변

A Jenkins
A Jenkins 2014년 12월 5일
If you have the Global Optimization Toolbox, then there are quite a few tutorials and example projects on the Mathworks Genetic Algorithm page.
If not, you could search the File Exchange for examples. There should be several there to help get you started.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by