omnics.strategy
Class ConsistentAssignment

java.lang.Object
  extended by omnics.strategy.AbstractStrategy
      extended by omnics.strategy.ConsistentAssignment
All Implemented Interfaces:
java.io.Serializable, AssignmentStrategy, SolverStrategy

public class ConsistentAssignment
extends AbstractStrategy
implements AssignmentStrategy

A special implementation of AssignmentStrategy that selects the values acording to the domain order, assuming that the problem currently beeing solved is arc-consistent.

This heuristic must be used only together with a global filter that maintains arc-consistency. The advantage of this heuristic is it does not need to verify that the tuple obtained by extending the current solution with this instantion is consistent, since that is ensured by the arc-consistency property.

Author:
Cristian Frasinaru
See Also:
Serialized Form

Field Summary
 
Fields inherited from class omnics.strategy.AbstractStrategy
solver
 
Constructor Summary
ConsistentAssignment()
           
 
Method Summary
 java.lang.Object assign(Var var)
          Returns the value that will be assigned to the specified variable.
 
Methods inherited from class omnics.strategy.AbstractStrategy
getSolver, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface omnics.strategy.SolverStrategy
getSolver, setSolver
 

Constructor Detail

ConsistentAssignment

public ConsistentAssignment()
Method Detail

assign

public java.lang.Object assign(Var var)
Description copied from interface: AssignmentStrategy
Returns the value that will be assigned to the specified variable.

Specified by:
assign in interface AssignmentStrategy
Parameters:
var - a variable from the candidates set
Returns:
the value that will be assigned to var or null if no assignment is possible.