javax.constraints
Interface SearchStrategy

All Known Implementing Classes:
AbstractSearchStrategy, Goal, GoalAddSolution, GoalApplySolution, GoalAssignValue, GoalAssignValues, GoalAssignValuesTimeLimit, GoalAssignValueTimeLimit, GoalBacktrack, GoalCheckMaxNumberOfSolutions, GoalCheckTimeLimit, GoalCheckTotalTimeLimit, GoalConstraint, GoalLog, GoalLogSolution, GoalPrint, GoalSaveSolution, StrategyAsGoal, StrategyLogVar, StrategyLogVariables

public interface SearchStrategy


Nested Class Summary
static class SearchStrategy.SearchStrategyType
           
 
Method Summary
 java.lang.Object getImpl()
          This method should be defined by a concrete solver implementation.
 java.lang.String getName()
          Returns the name of this strategy.
 java.lang.Object getObject()
          This method may be used to get an attached Business Object for this object.
 Solver getSolver()
          Returns a solver to which this strategy belongs.
 SearchStrategy.SearchStrategyType getType()
          Returns a type of this Search Strategy
 ValueSelector getValueSelector()
          Returns a value selector that was set for this strategy
 VarReal[] getVarReals()
          Returns a an array of real variables that is in use by this strategy
 Var[] getVars()
          Returns a an array of integer variables that is in use by this strategy
 VarSelector getVarSelector()
          Returns a variable selector that was set for this strategy
 boolean run()
          This method is used by CUSTOM strategies such as SearchStrategyLog to define its execution logic
 void setImpl(java.lang.Object impl)
          This method defines an Object that represents an actual implementation of this strategy inside a selected solver.
 void setName(java.lang.String name)
          Sets the name of this strategy.
 void setObject(java.lang.Object obj)
          This method may be used to attach a business object to this object.
 void setType(SearchStrategy.SearchStrategyType type)
          Sets a type of this Search Strategy
 void setValueSelector(ValueSelector valueSelector)
          Sets a value selector that may be used (or not) by this strategy
 void setValueSelectorType(ValueSelectorType valueSelectorType)
          Sets a value selector type to be used by this strategy
 void setVarReals(VarReal[] varReals)
          Defines an array of real variables 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 vars)
          Defines an array of integer variables that may be used (or not) by this strategy
 void setVars(VarSet[] setVars)
          Defines an array of integer variables that may be used (or not) by this strategy.
 void setVarSelector(VarSelector varSelector)
          Sets a variable selector that may be used (or not) by this strategy
 void setVarSelectorType(VarSelectorType varSelectorType)
          Sets a variable selector type to be used by this strategy
 void trace()
          Forces the solver to log information about this strategy every time when it is executed
 

Method Detail

getImpl

java.lang.Object getImpl()
This method should be defined by a concrete solver implementation. This method returns an Object that represents an actual implementation of this strategy inside an underlying selected solver.

Returns:
an Object that represents an actual implementation of this strategy inside an underlying selected solver.

getName

java.lang.String getName()
Returns the name of this strategy.

Returns:
the name of this strategy.

getObject

java.lang.Object getObject()
This method may be used to get an attached Business Object for this object.

Returns:
the Business Object attached to this object.

getSolver

Solver getSolver()
Returns a solver to which this strategy belongs.

Returns:
a solver to which this strategy belongs.

getType

SearchStrategy.SearchStrategyType getType()
Returns a type of this Search Strategy

Returns:
SearchStrategyType

getValueSelector

ValueSelector getValueSelector()
Returns a value selector that was set for this strategy


getVarReals

VarReal[] getVarReals()
Returns a an array of real variables that is in use by this strategy


getVars

Var[] getVars()
Returns a an array of integer variables that is in use by this strategy


getVarSelector

VarSelector getVarSelector()
Returns a variable selector that was set for this strategy


run

boolean run()
This method is used by CUSTOM strategies such as SearchStrategyLog to define its execution logic

Returns:
boolean

setImpl

void setImpl(java.lang.Object impl)
This method defines an Object that represents an actual implementation of this strategy inside a selected solver.

Parameters:
impl - the Object that represents an actual implementation of this strategy inside a selected solver.

setName

void setName(java.lang.String name)
Sets the name of this strategy.

Parameters:
name - the name for this strategy.

setObject

void setObject(java.lang.Object obj)
This method may be used to attach a business object to this object.

Parameters:
obj - the business object being attached.

setType

void setType(SearchStrategy.SearchStrategyType type)
Sets a type of this Search Strategy


setValueSelector

void setValueSelector(ValueSelector valueSelector)
Sets a value selector that may be used (or not) by this strategy

Parameters:
valueSelector -

setValueSelectorType

void setValueSelectorType(ValueSelectorType valueSelectorType)
Sets a value selector type to be used by this strategy

Parameters:
valueSelectorType -

setVarReals

void setVarReals(VarReal[] varReals)
Defines an array of real variables that may be used (or not) by this strategy

Parameters:
varReals -

setVars

void setVars(Var[] vars)
Defines an array of integer variables that may be used (or not) by this strategy

Parameters:
vars - an array of integer constrained variables

setVars

void setVars(VarList vars)
Defines an array of integer variables that may be used (or not) by this strategy

Parameters:
vars - a list of integer constrained variables

setVars

void setVars(VarSet[] setVars)
Defines an array of integer variables that may be used (or not) by this strategy. These variables are extracted from the array of set variables passed as a parameter

Parameters:
setVars - an array of set variables

setVarSelector

void setVarSelector(VarSelector varSelector)
Sets a variable selector that may be used (or not) by this strategy

Parameters:
varSelector -

setVarSelectorType

void setVarSelectorType(VarSelectorType varSelectorType)
Sets a variable selector type to be used by this strategy

Parameters:
varSelectorType -

trace

void trace()
Forces the solver to log information about this strategy every time when it is executed