javax.constraints.impl.search.goal
Class GoalAssignValues

java.lang.Object
  extended by javax.constraints.impl.CommonBase
      extended by javax.constraints.impl.search.AbstractSearchStrategy
          extended by javax.constraints.impl.search.goal.Goal
              extended by javax.constraints.impl.search.goal.GoalAssignValues
All Implemented Interfaces:
SearchStrategy

public class GoalAssignValues
extends Goal


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.constraints.SearchStrategy
SearchStrategy.SearchStrategyType
 
Constructor Summary
GoalAssignValues(Solver solver)
          This is equivalent to GoalAssignValues(solver, solver.getProblem().getVars());
GoalAssignValues(Solver solver, Var[] vars)
           
GoalAssignValues(Var[] vars, VarSelector varSelector)
          This is equivalent to GoalAssignValues(vars,varSelector,new ValueSelectorMin());
GoalAssignValues(Var[] vars, VarSelector varSelector, ValueSelector valueSelector)
          Creates a Goal that instantiates (assign values to) all variables inside the array "vars".
 
Method Summary
 Goal execute()
          Method that executes an underlying goal in the proper implementation.
 void setGoals(Var[] vars)
           
 void setValueSelector(ValueSelector valueSelector)
          Sets a value selector that may be used (or not) by this strategy
 void setVars(Var[] vars)
          Defines an array of integer variables that may be used (or not) by this strategy
 void setVars(VarList varList)
          Defines an array of integer variables that may be used (or not) by this strategy
 
Methods inherited from class javax.constraints.impl.search.goal.Goal
and, getSolver, or, trace
 
Methods inherited from class javax.constraints.impl.search.AbstractSearchStrategy
getType, getValueSelector, getVarReals, getVars, getVarSelector, run, setType, setValueSelectorType, setVarReals, setVars, setVarSelector, setVarSelectorType
 
Methods inherited from class javax.constraints.impl.CommonBase
getImpl, getName, getObject, getProblem, setImpl, setName, setObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.constraints.SearchStrategy
getImpl, getName, getObject, setImpl, setName, setObject
 

Constructor Detail

GoalAssignValues

public GoalAssignValues(Solver solver)
This is equivalent to GoalAssignValues(solver, solver.getProblem().getVars());


GoalAssignValues

public GoalAssignValues(Solver solver,
                        Var[] vars)

GoalAssignValues

public GoalAssignValues(Var[] vars,
                        VarSelector varSelector)
This is equivalent to GoalAssignValues(vars,varSelector,new ValueSelectorMin());


GoalAssignValues

public GoalAssignValues(Var[] vars,
                        VarSelector varSelector,
                        ValueSelector valueSelector)
Creates a Goal that instantiates (assign values to) all variables inside the array "vars". The "varSelector" defines an order in which the variables from "vars" will be selected to be instantiated. The "valueSelector" defines an order in which the values of a variable will be selected to be assigned.

Parameters:
vars - the array of Var variables to be enumerated.
varSelector - a variable selector, defining the order in which to instantiate the variables.
valueSelector - a value selector, defining the order in which to assign the values.
Method Detail

execute

public Goal execute()
             throws java.lang.Exception
Description copied from class: Goal
Method that executes an underlying goal in the proper implementation.

Specified by:
execute in class Goal
Returns:
goal or null
Throws:
java.lang.Exception

setGoals

public void setGoals(Var[] vars)

setValueSelector

public void setValueSelector(ValueSelector valueSelector)
Description copied from interface: SearchStrategy
Sets a value selector that may be used (or not) by this strategy

Specified by:
setValueSelector in interface SearchStrategy
Overrides:
setValueSelector in class AbstractSearchStrategy

setVars

public void setVars(Var[] vars)
Description copied from interface: SearchStrategy
Defines an array of integer variables that may be used (or not) by this strategy

Specified by:
setVars in interface SearchStrategy
Overrides:
setVars in class AbstractSearchStrategy
Parameters:
vars - an array of integer constrained variables

setVars

public void setVars(VarList varList)
Description copied from class: AbstractSearchStrategy
Defines an array of integer variables that may be used (or not) by this strategy

Specified by:
setVars in interface SearchStrategy
Overrides:
setVars in class AbstractSearchStrategy
Parameters:
varList - a list of integer constrained variables