net.sf.cpsolver.coursett.constraint
Class FlexibleConstraint.Block
java.lang.Object
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
FlexibleConstraint.Block
public FlexibleConstraint.Block(int maxSlotsBetweenBTB)
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.