Class TSPListManager
java.lang.Object
es.urjc.etsii.grafo.create.grasp.GRASPListManager<TSPListManager.TSPGRASPMove,TSPSolution,TSPInstance>
es.urjc.etsii.grafo.TSP.algorithms.constructives.grasp.TSPListManager
public class TSPListManager
extends GRASPListManager<TSPListManager.TSPGRASPMove,TSPSolution,TSPInstance>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildInitialCandidateList
(TSPSolution solution) Generate initial candidate list.updateCandidateList
(TSPSolution solution, TSPListManager.TSPGRASPMove move, List<TSPListManager.TSPGRASPMove> candidateList, int index) Update candidate list after each movement.Methods inherited from class es.urjc.etsii.grafo.create.grasp.GRASPListManager
afterGRASP, beforeGRASP, nul, toString
-
Constructor Details
-
TSPListManager
public TSPListManager()
-
-
Method Details
-
buildInitialCandidateList
Generate initial candidate list. The list will be sorted if necessary by the constructive method.- Specified by:
buildInitialCandidateList
in classGRASPListManager<TSPListManager.TSPGRASPMove,
TSPSolution, TSPInstance> - Parameters:
solution
- Current solution- Returns:
- a candidate list
-
updateCandidateList
public List<TSPListManager.TSPGRASPMove> updateCandidateList(TSPSolution solution, TSPListManager.TSPGRASPMove move, List<TSPListManager.TSPGRASPMove> candidateList, int index) Update candidate list after each movement. The list will be sorted by the constructor.- Specified by:
updateCandidateList
in classGRASPListManager<TSPListManager.TSPGRASPMove,
TSPSolution, TSPInstance> - Parameters:
solution
- Current solution, move has been already appliedmove
- Chosen movecandidateList
- original candidate listindex
- index of the chosen move in the candidate list- Returns:
- an UNSORTED candidate list, where the best candidate is on the first position and the worst in the last
-