Class CostBased<T>

java.lang.Object
org.ddolib.ddo.core.heuristics.cluster.CostBased<T>
Type Parameters:
T -
All Implemented Interfaces:
ReductionStrategy<T>

public class CostBased<T> extends Object implements ReductionStrategy<T>
This strategy select the nodes based on the objective value of the best path leading to them. It requires a problem-specific StateRanking comparator to break the ties between nodes of same cost.
  • Constructor Details

  • Method Details

    • defineClusters

      public List<NodeSubProblem<T>>[] defineClusters(List<NodeSubProblem<T>> layer, int maxWidth)
      Select the layer.size() - maxWidth - 1 nodes with the worst cost on the layer. Add the end the maxWidth - 1 unselected nodes are still in the layer
      Specified by:
      defineClusters in interface ReductionStrategy<T>
      Parameters:
      layer - the layer
      maxWidth - the desired maximal width after the restriction and relaxation
      Returns: