Interface ConstraintSplitter<C extends Constraint>

All Known Implementing Classes:
AmongSplitter, BanSplitter, FenceSplitter, GatherSplitter, KilledSplitter, LonelySplitter, MaxOnlineSplitter, OfflineSplitter, OnlineSplitter, OverbookSplitter, PreserveSplitter, QuarantineSplitter, ReadySplitter, RootSplitter, RunningSplitter, SeqSplitter, SleepingSplitter, SplitSplitter, SpreadSplitter

public interface ConstraintSplitter<C extends Constraint>
Interface to specify a method that makes a constraint compatible with multiple partitions.

In practice, the splitter ensures the given constraint does not spread over multiple partitions. This may require to split the constraint.

Author:
Fabien Hermenier
  • Method Summary

    Modifier and Type Method Description
    Class<C> getKey()
    Get the class of the Constraint associated to the splitter.
    boolean split​(C cstr, Instance origin, List<Instance> partitions, gnu.trove.map.hash.TIntIntHashMap vmsPosition, gnu.trove.map.hash.TIntIntHashMap nodePosition)
    Ensure a given constraint fit into a single partition.
  • Method Details

    • getKey

      Class<C> getKey()
      Get the class of the Constraint associated to the splitter.
      Returns:
      a Class derived from Constraint
    • split

      boolean split​(C cstr, Instance origin, List<Instance> partitions, gnu.trove.map.hash.TIntIntHashMap vmsPosition, gnu.trove.map.hash.TIntIntHashMap nodePosition)
      Ensure a given constraint fit into a single partition. If necessary, the constraint may have be split. this call inserts the constrain (or its subdivisions) inside their respective instances
      Parameters:
      cstr - the model constraint
      origin - the original instance to split
      partitions - the possible partitions @return false iff this leads to a problem without solutions.
      vmsPosition - the partition associated to each VM
      nodePosition - the partition associated to each node
      Returns:
      true iff the split was successful. false otherwise