Research Article

Modelling and Metaheuristic for Gantry Crane Scheduling and Storage Space Allocation Problem in Railway Container Terminals

Algorithm 1

The backtracking search algorithm calculation procedure.
Procedure: transform the tasks to the gantry crane schedule and storage space allocation
Inputs:  // is the total amount of storage spaces in main area, is the
earliest available time of gantry crane is the initial position of   (denoted by the task
number), is the traveling time of crane between the adjacent tasks, is the safety
distance required between the adjacent gantry cranes//
Output:  // is the maximum completion time of all the unloading tasks of the container train//
begin
calculate max0 and sol0 //find a good initial solution//
let pop    (popsize, dim, low, up) ////
let fitness    ()
set fitness(index) =  max0, pop(index,  :) = sol0 //using the initial solution to replace the worst
solution in the population//
set historical_pop = pop //historical_pop is swarm-memory of BSA//
while non_iter <= nonmax && epk <= epoch do //epoch is the maximum iteration counter//
if rand < rand,
historical_pop = pop;
end if
calculatehistorical_pop, and map; // is the scale factor//
if rand < rand,
for  :popsize,
= randperm(dim);
map((1:ceil(DIM_RATEranddim))) = 1;
end for
else
for  :popsize,
map(, randi(dim)) = 1
end for
end if//implement the SELECTION-I process//
offsprings = pop + (map.). (historical_pop-pop)
offsprings = BoundaryControl(offsprings, low, up) //implement the MUTATION and
CROSSOVER process//
calculate fitnessoffsprings;
ind = fitnessoffsprings < fitnesspop;
fitnesspop (ind) = fitnessoffsprings(ind);
pop(ind,  :) = offsprings(ind,  :);
[best, ind] = min(fitnesspop);
if best < globalminimum
globalminimum = best
globalminimizer = pop(ind,  :);
non_iter = 0;
else
non_iter = non_iter + 1;
end if//implement the SELECTON-II process//
best_iter = [best_iter globalminimum];
epk = epk + 1;
end while
end