public class WeightedHardConflicts extends PlacementSelectionCriterion implements SolutionListener<Lecture,Placement>
Modifier and Type | Class and Description |
---|---|
class |
WeightedHardConflicts.IterationContext |
AbstractCriterion.ValueContext, AbstractCriterion.ValueUpdateType
Modifier and Type | Field and Description |
---|---|
protected ConflictStatistics<Lecture,Placement> |
iStat |
iBest, iDebug, iWeight, sDoubleFormat, sPercentFormat
sMaxSize
Constructor and Description |
---|
WeightedHardConflicts() |
Modifier and Type | Method and Description |
---|---|
void |
bestCleared(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.clearBest() is
called. |
void |
bestRestored(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.restoreBest() is
called. |
void |
bestSaved(Solution<Lecture,Placement> solution)
Called by the solution when method
Solution.saveBest() is called. |
AbstractCriterion.ValueContext |
createAssignmentContext(Assignment<Lecture,Placement> assignment)
Create a new assignment context for the given assignment.
|
void |
getInfo(Solution<Lecture,Placement> solution,
Map<String,String> info)
Called by the solution when it is asked to produce info table, see
Solution.getInfo() . |
void |
getInfo(Solution<Lecture,Placement> solution,
Map<String,String> info,
Collection<Lecture> variables)
Called by the solution when it is asked to produce info table, see
Solution.getInfo() . |
double |
getPlacementSelectionWeightDefault(int level) |
String |
getPlacementSelectionWeightName() |
double |
getValue(Assignment<Lecture,Placement> assignment,
Placement value,
Set<Placement> conflicts)
Value of a proposed assignment (including hard conflicts)
|
boolean |
init(Solver<Lecture,Placement> solver)
Notification that the model was initialized by the solver.
|
void |
solutionUpdated(Solution<Lecture,Placement> solution)
Called by the solution when it is updated, see
Solution.update(double) . |
getInfo, getInfo, getWeightDefault
configure, getPlacementSelectionAdjustmentsName, getPlacementSelectionWeight
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, bestRestored, bestSaved, clearCache, computeBounds, constraintAdded, constraintRemoved, getAbbreviation, getAssignmentContextReference, getBest, getBounds, getBounds, getBounds, getBounds, getContext, getContext, getExtendedInfo, getModel, getName, getPerc, getPercentage, getPercRev, getValue, getValue, getValue, getValue, getValueUpdateType, getWeight, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightName, inc, inc, setAssignmentContextReference, setModel, setValueUpdateType, toString, variableAdded, variableRemoved
protected ConflictStatistics<Lecture,Placement> iStat
public WeightedHardConflicts()
public boolean init(Solver<Lecture,Placement> solver)
ModelListener
init
in interface ModelListener<Lecture,Placement>
init
in class AbstractCriterion<Lecture,Placement>
solver
- IFS solverpublic String getPlacementSelectionWeightName()
getPlacementSelectionWeightName
in class TimetablingCriterion
public double getValue(Assignment<Lecture,Placement> assignment, Placement value, Set<Placement> conflicts)
Criterion
public double getPlacementSelectionWeightDefault(int level)
getPlacementSelectionWeightDefault
in class TimetablingCriterion
public void solutionUpdated(Solution<Lecture,Placement> solution)
SolutionListener
Solution.update(double)
.solutionUpdated
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void getInfo(Solution<Lecture,Placement> solution, Map<String,String> info)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.getInfo
in interface SolutionListener<Lecture,Placement>
solution
- source solutioninfo
- produced info tablepublic void getInfo(Solution<Lecture,Placement> solution, Map<String,String> info, Collection<Lecture> variables)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.getInfo
in interface SolutionListener<Lecture,Placement>
solution
- source solutioninfo
- produced info tablevariables
- only variables from this set are includedpublic void bestCleared(Solution<Lecture,Placement> solution)
SolutionListener
Solution.clearBest()
is
called.bestCleared
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void bestSaved(Solution<Lecture,Placement> solution)
SolutionListener
Solution.saveBest()
is called.bestSaved
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic void bestRestored(Solution<Lecture,Placement> solution)
SolutionListener
Solution.restoreBest()
is
called.bestRestored
in interface SolutionListener<Lecture,Placement>
solution
- source solutionpublic AbstractCriterion.ValueContext createAssignmentContext(Assignment<Lecture,Placement> assignment)
HasAssignmentContext
createAssignmentContext
in interface HasAssignmentContext<Lecture,Placement,AbstractCriterion.ValueContext>
createAssignmentContext
in class AbstractCriterion<Lecture,Placement>
assignment
- an assignment for which there needs to be an assignment context