jopt.csp.spi.search.actions
Class GenerateIntegerAction

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

public class GenerateIntegerAction
extends AbstractSearchNodeAction

Action that will generate values for an array of variables. It tries to bind each variable to a single value such that all constraints are satisfied and finishes searching upon finding the first consistent assignment.


Constructor Summary
GenerateIntegerAction(jopt.csp.variable.CspIntVariable[] vars)
          Creates new generation action
GenerateIntegerAction(jopt.csp.variable.CspIntVariable[] vars, jopt.csp.search.IntegerSelector selector)
          Creates new generation 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

GenerateIntegerAction

public GenerateIntegerAction(jopt.csp.variable.CspIntVariable[] vars)
Creates new generation action

Parameters:
vars - Variable to instantiate

GenerateIntegerAction

public GenerateIntegerAction(jopt.csp.variable.CspIntVariable[] vars,
                             jopt.csp.search.IntegerSelector selector)
Creates new generation action

Parameters:
vars - Variable to instantiate
selector - Used to select next value to reduce domain of variable
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()