jopt.csp.spi.search.actions
Class InstantiateIntegerAction

java.lang.Object
  extended byjopt.csp.spi.search.tree.AbstractSearchNodeAction
      extended byjopt.csp.spi.search.actions.InstantiateIntegerAction
All Implemented Interfaces:
jopt.csp.search.SearchAction

public class InstantiateIntegerAction
extends AbstractSearchNodeAction

Action that will attempt to assign a value to an integer variable using the search tree. In this context "instantiate" is constraint satisfaction terminology for exploring possible values in the domain of a variable trying to find one that satisfies the constraints; it has nothing to do with the Java instantiation of a class.


Constructor Summary
InstantiateIntegerAction(jopt.csp.variable.CspIntVariable var)
          Creates new instantiation action, using default selector
InstantiateIntegerAction(jopt.csp.variable.CspIntVariable var, jopt.csp.search.IntegerSelector selector)
          Creates new instantiation action
 
Method Summary
 jopt.csp.search.SearchAction performAction()
          Called by search tree to execute this action.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstantiateIntegerAction

public InstantiateIntegerAction(jopt.csp.variable.CspIntVariable var,
                                jopt.csp.search.IntegerSelector selector)
Creates new instantiation action

Parameters:
var - Variable to instantiate
selector - Selector to use in deciding which value in the domain of the variable to try next, as we attempt to reduce the domain of the variable. If none is given, the default is smallest value in domain first.

InstantiateIntegerAction

public InstantiateIntegerAction(jopt.csp.variable.CspIntVariable var)
Creates new instantiation action, using default selector

Parameters:
var - Variable to instantiate
Method Detail

performAction

public jopt.csp.search.SearchAction performAction()
                                           throws jopt.csp.variable.PropagationFailureException
Called by search tree to execute this action.

Returns:
Next action to execute in search
Throws:
jopt.csp.variable.PropagationFailureException

toString

public java.lang.String toString()