Class VRPODGRASPConstructive
java.lang.Object
es.urjc.etsii.grafo.create.Constructive<VRPODSolution,VRPODInstance>
es.urjc.etsii.grafo.create.Reconstructive<VRPODSolution,VRPODInstance>
es.urjc.etsii.grafo.vrpod.constructives.VRPODGRASPConstructive
Adaptation of GRASPConstructor in original VRPOD project, the rest of constructive methods are ignored as this is the only one that was not commented
-
Nested Class Summary
Nested classes/interfaces inherited from class es.urjc.etsii.grafo.create.Constructive
Constructive.NullConstructive<S extends Solution<S,
I>, I extends Instance> -
Constructor Summary
ConstructorsConstructorDescriptionGRASP Constructor, generates a random alpha in each construction, between 0 and 1 (inclusive).VRPODGRASPConstructive
(double alpha) GRASP Constructor, mantains a fixed alpha valueVRPODGRASPConstructive
(double minAlpha, double maxAlpha) GRASP Constructor, generates a random alpha in each construction -
Method Summary
Modifier and TypeMethodDescriptionconstruct
(VRPODSolution solution) Build a solution.reconstruct
(VRPODSolution solution) Rebuild a partially assigned / partially destroyed solutiontoString()
Methods inherited from class es.urjc.etsii.grafo.create.Constructive
nul
-
Constructor Details
-
VRPODGRASPConstructive
GRASP Constructor, mantains a fixed alpha value- Parameters:
alpha
- Randomness, adjusts the candidate list size. Take values between [0,1] being 1 --> totally random, 0 --> full greedy.
-
VRPODGRASPConstructive
public VRPODGRASPConstructive(double minAlpha, double maxAlpha) GRASP Constructor, generates a random alpha in each construction- Parameters:
minAlpha
- minimum value for the random alphamaxAlpha
- maximum value for the random alpha
-
VRPODGRASPConstructive
public VRPODGRASPConstructive()GRASP Constructor, generates a random alpha in each construction, between 0 and 1 (inclusive).
-
-
Method Details
-
reconstruct
Description copied from class:Reconstructive
Rebuild a partially assigned / partially destroyed solution- Specified by:
reconstruct
in classReconstructive<VRPODSolution,
VRPODInstance> - Parameters:
solution
- solution partially built- Returns:
- valid solution completely built
-
construct
Description copied from class:Constructive
Build a solution. Start with an empty solution, end when the solution is valid.- Specified by:
construct
in classConstructive<VRPODSolution,
VRPODInstance> - Parameters:
solution
- Empty solution, the result of calling the constructor.- Returns:
- A valid solution that fulfills all the problem constraints.
-
assignMissingClients
-
toString
Description copied from class:Constructive
- Overrides:
toString
in classConstructive<VRPODSolution,
VRPODInstance>
-