Class AmongSplitter

java.lang.Object
org.btrplace.scheduler.runner.disjoint.splitter.AmongSplitter
All Implemented Interfaces:
ConstraintSplitter<Among>

public class AmongSplitter
extends Object
implements ConstraintSplitter<Among>
Splitter for Among constraints.

When the constraint focuses VMs among different partitions, the constraint is split accordingly. If the nodes groups are also split among different partitions, this leads to a un-solvable problem as it is not possible to synchronize the sub-among constraints to make them choose the same nodes group.

Author:
Fabien Hermenier
  • Constructor Details

  • Method Details

    • getKey

      public Class<Among> getKey()
      Description copied from interface: ConstraintSplitter
      Get the class of the Constraint associated to the splitter.
      Specified by:
      getKey in interface ConstraintSplitter<Among>
      Returns:
      a Class derived from Constraint
    • split

      public boolean split​(Among cstr, Instance origin, List<Instance> partitions, gnu.trove.map.hash.TIntIntHashMap vmsPosition, gnu.trove.map.hash.TIntIntHashMap nodePosition)
      Description copied from interface: ConstraintSplitter
      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
      Specified by:
      split in interface ConstraintSplitter<Among>
      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