Struggling With Genetic Algorithms in Matlab

1 view (last 30 days)
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

Accepted Answer

A Jenkins
A Jenkins on 5 Dec 2014
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!