class BoxesLists {
fitness: number;
Box: ItemList;
lenght: int;
first: ItemList;
last: ItemList;
}
class ItemList{
lenght: int;
first: *Node;
last: *Node;
next: ItemList;
previous: ItemList;
}
class Node {
value: int;
next: *Node;
previous: *Node;
}
class Solutions {
local: BoxesList;
global: BoxesLists;
}
Boxes tabuList[n]
while(ponto de parada nao cumprido):
for neighbor in neighbors [ solucaoinicial ]:
localsearch = boxlist.generatelocalSearch()
solution.findBests(localsearch)
neighbors = local_best.findNeighbors(solution)
- Inputs
- box maximum weight
- items amount
- weight of each item
- Local search (greedy algorithm)
- Join items in same boxes
- For each solution, find the local search again to see if it is in the tabu list
- Verify if solution is local best or global best
- Replace the local and/or global best solution
- Add solution to tabu list
- Verify stop