net.sf.cpsolver.coursett.constraint
Class FlexibleConstraint.Block

java.lang.Object
  extended by net.sf.cpsolver.coursett.constraint.FlexibleConstraint.Block
Enclosing class:
FlexibleConstraint

public class FlexibleConstraint.Block
extends Object

A block is a list of placements sorted by startSlot, which are BTB. maxSlotsBetweenBackToBack determines the number of free slots between two BTB placements


Constructor Summary
FlexibleConstraint.Block(int maxSlotsBetweenBTB)
           
 
Method Summary
 boolean addPlacement(Placement placement)
          Adds placement to the block and updates block's attributes.
 int getEndSlotCurrentBlock()
           
 int getLengthInSlots()
           
 int getNbrPlacements()
           
 List<Placement> getPlacements()
           
 int getStartSlotCurrentBlock()
           
 boolean haveSameStartTime()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlexibleConstraint.Block

public FlexibleConstraint.Block(int maxSlotsBetweenBTB)
Method Detail

addPlacement

public boolean addPlacement(Placement placement)
Adds placement to the block and updates block's attributes.

Parameters:
placement - placement to be added to the block
Returns:
true if the placement was successfully added to the block

haveSameStartTime

public boolean haveSameStartTime()

getStartSlotCurrentBlock

public int getStartSlotCurrentBlock()

getEndSlotCurrentBlock

public int getEndSlotCurrentBlock()

getNbrPlacements

public int getNbrPlacements()

getPlacements

public List<Placement> getPlacements()

getLengthInSlots

public int getLengthInSlots()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 UniTime LLC. All Rights Reserved.