Journal of Advanced Transportation / 2020 / Article / Alg 2

Research Article

Effective Evolutionary Algorithm for Solving the Real-Resource-Constrained Scheduling Problem

Algorithm 2

Function Reallocate.
Input: b_plan//the best feasible schedule that the algorithm has found until now
  Output://the feasible schedule which is better than the input
(1)Begin
(2) makespan = f(b_plan)
(3) n_plan = b_plan;//the best resource-task assignment plan so far
(4) ← Late(n_plan)//the resource finish its execution latest
(5)←set of tasks is performed by resource
(6) For i = 1 to size//examine the set of tasks performed by resource
(7)   ;
(8)   LiL − Lb//set of resource can perform the task i except
(9)   For j = 1 to size
(10)   //task i will perform the resource
(11)   //task i is eliminated from
(12)   n_makespan = f(n_plan)
(13)   If n_makespan < makespan
(14)   Makespan = n_makespan
(15)   Return b_best;
(16)   End if
(17)  b_plan = n_plan;
(18)  End for
(19) End for
(20) Return n_plan
(21)End Function

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.