Job Shop Scheduling Using Genetic Algorithm
Job Shop Scheduling Using Genetic Algorithm
FACULTY:
DR. RAGHUNATHAN.T
Members:
B.NAVEEN (17BEE0257)
G.ANURAG (17BEE0123)
Acknowledgement
Aim:
To determine the optimum sequence for the desired task to reduce the
maximum time of completion.
Introduction:
Inspiration :
Working:
In the general JSSP, there are j jobs and m machines; each job comprises a set of
tasks1 which must each be done on a different machine for different specified
processing times, in a given job-dependent order. A legal schedule is a schedule of
job sequences on each machine such that each job's task order is preserved, a
machine is not processing two different jobs at once, and different tasks of the
same job are not simultaneously being processed on different machines. The
problem is to minimise the total elapsed time between the beginning of the first
task and the completion of the last task (the makespan). Other measures of
schedule quality exist, but shortest makespan is the simplest and most widely
used criterion
Matlab code:
%selection
for i=1:pop
cross_over_temp_mat(i,:)=x(i,:); end
cross_over_ready_pop=repmat(cross_over_temp_mat,2,1);
cross_over_pop_final=cross_over_ready_pop;
i=1; while
i<(pop-1),
cross_over_pop_temp_one(1,:)=cross_over_ready_pop(i,:); %copied
parents cross_over_pop_temp_two(1,:)=cross_over_ready_pop(i+1,:);
%copied parents
%for child one for
j=1:cross_over_point
for k=j:n
if (cross_over_pop_temp_one(1,j)==cross_over_pop_temp_two(1,k))
cross_over_pop_temp_adjust=cross_over_pop_temp_two(1,j);
cross_over_pop_temp_two(1,j)=cross_over_pop_temp_two(1,k);
cross_over_pop_temp_two(1,k)=cross_over_pop_temp_adjust; break;
end end end for j=1:cross_over_point
cross_over_child_one(1,j)=cross_over_pop_temp_one(1,j);
end for j=cross_over_point:n
cross_over_child_one(1,j)=cross_over_pop_temp_two(1,j);
end
for j=1:cross_over_point
for k=j:n
if (cross_over_pop_temp_one(1,j)==cross_over_pop_temp_two(1,k))
cross_over_pop_temp_adjust=cross_over_pop_temp_two(1,j);
cross_over_pop_temp_two(1,j)=cross_over_pop_temp_two(1,k);
cross_over_pop_temp_two(1,k)=cross_over_pop_temp_adjust;
break; end end end for j=1:cross_over_point
cross_over_child_two(1,j)=cross_over_pop_temp_one(1,j);
end for j=cross_over_point:n
cross_over_child_two(1,j)=cross_over_pop_temp_two(1,j);
end
cross_over_pop_final(i,:)=cross_over_child_one(1,:);
cross_over_child_two_flipped=wrev(cross_over_child_two);
cross_over_pop_final(i+1,:)=cross_over_child_two_flipped(1,:);
i=i+2;
end
%mutation introduced
%mutation occours :at every 5th individual..swapping of two random
% column values(that is queen positions)
cross_over_pop_final(i,mutation_temp_one)=cross_over_pop_final(i,mutation_te
mp_two);
cross_over_pop_final(i,mutation_temp_two)=mutation_temp_data;
end i=i+5; end i=0;
x=cross_over_pop_final;
end references
: