V
- the vertex typeE
- the edge typepublic class EsauWilliamsCapacitatedMinimumSpanningTree<V,E> extends AbstractCapacitatedMinimumSpanningTree<V,E>
This implementation is a randomized version described in Ahuja, Ravindra K., Orlin, James B., and Sharma, Dushyant, (1998). New neighborhood search structures for the capacitated minimum spanning tree problem, No WP 4040-98. Working papers, Massachusetts Institute of Technology (MIT), Sloan School of Management.
This version runs in polynomial time dependent on the number of considered operations per
iteration numberOfOperationsParameter
(denoted by p), such that runs is in $O(|V|^3
+ p|V|) = O(|V|^3)$ since $p \leq |V|$.
A Capacitated Minimum Spanning Tree (CMST) is a rooted minimal cost spanning tree that satisfies the capacity constrained on all trees that are connected to the designated root. The problem is NP-hard.
AbstractCapacitatedMinimumSpanningTree.CapacitatedSpanningTreeSolutionRepresentation
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>, CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreeImpl<V,E>
bestSolution, capacity, demands, graph, root
Constructor and Description |
---|
EsauWilliamsCapacitatedMinimumSpanningTree(Graph<V,E> graph,
V root,
double capacity,
Map<V,Double> weights,
int numberOfOperationsParameter)
Constructs an Esau-Williams GRASP algorithm instance.
|
Modifier and Type | Method and Description |
---|---|
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E> |
getCapacitatedSpanningTree()
Computes a capacitated spanning tree.
|
protected AbstractCapacitatedMinimumSpanningTree.CapacitatedSpanningTreeSolutionRepresentation |
getSolution()
Calculates a partition representation of the capacitated spanning tree.
|
public EsauWilliamsCapacitatedMinimumSpanningTree(Graph<V,E> graph, V root, double capacity, Map<V,Double> weights, int numberOfOperationsParameter)
graph
- the graphroot
- the root of the CMSTcapacity
- the capacity constraint of the CMSTweights
- the weights of the verticesnumberOfOperationsParameter
- the parameter how many best vertices are considered in the
procedurepublic CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E> getCapacitatedSpanningTree()
Returns a capacitated spanning tree computed by the Esau-Williams algorithm.
getCapacitatedSpanningTree
in interface CapacitatedSpanningTreeAlgorithm<V,E>
getCapacitatedSpanningTree
in class AbstractCapacitatedMinimumSpanningTree<V,E>
protected AbstractCapacitatedMinimumSpanningTree.CapacitatedSpanningTreeSolutionRepresentation getSolution()
Copyright © 2019. All rights reserved.