public class Machine extends Constraint<Operation,Location>
iConstraintListeners, iId
Constructor and Description |
---|
Machine(int machineNumber)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
computeConflicts(Assignment<Operation,Location> assignment,
Location location,
Set<Location> conflicts)
Adds conflicting operations into the set of conflicts.
|
int |
getMachineNumber()
Get machine number
|
String |
getName()
Name of the machine (e.g.
|
boolean |
inConflict(Assignment<Operation,Location> assignment,
Location location)
True if there is an operation from the machine which violates with the
given assignment.
|
boolean |
isConsistent(Location value1,
Location value2)
True if the two assignments (placement of opeartions of the machine in
time) violates each other.
|
String |
toString()
string representation -- for debuging and printing purposes
|
addConstraintListener, addVariable, assigned, assignedVariables, compareTo, computeConflictsNoForwardCheck, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, hashCode, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variables
public Machine(int machineNumber)
machineNumber
- machine numberpublic int getMachineNumber()
public void computeConflicts(Assignment<Operation,Location> assignment, Location location, Set<Location> conflicts)
computeConflicts
in class Constraint<Operation,Location>
assignment
- current assignmentlocation
- value to be assigned to its variableconflicts
- resultant set of conflicting valuespublic boolean inConflict(Assignment<Operation,Location> assignment, Location location)
inConflict
in class Constraint<Operation,Location>
assignment
- current assignmentlocation
- given valuepublic boolean isConsistent(Location value1, Location value2)
isConsistent
in class Constraint<Operation,Location>
value1
- a valuevalue2
- a value