jopt.csp.search
Interface SearchGoals


public interface SearchGoals

Interface implemented by a class that creates and returns common search goals that can be used to build a search for locating specific solutions in a CSP problem


Method Summary
 SearchGoal first()
          Creates a goal that will direct the search to end after the first solution is found.
 SearchGoal maximize(CspNumExpr expr)
          Creates a goal that will maximize a numeric expression
 SearchGoal maximize(CspNumExpr expr, boolean useCurrentState)
          Creates a goal that will maximize a numeric expression
 SearchGoal minimize(CspNumExpr expr)
          Creates a goal that will minimize a numeric expression
 SearchGoal minimize(CspNumExpr expr, boolean useCurrentState)
          Creates a goal that will minimize a numeric expression
 SearchGoal strictlyMaximize(CspNumExpr expr, double stepSize)
          Creates a goal that will maximize a numeric expression It will only obtain a solution if it is better than the previous.
 SearchGoal strictlyMaximize(CspNumExpr expr, double stepSize, boolean useCurrentState)
          Creates a goal that will maximize a numeric expression It will only obtain a solution if it is better than the previous.
 SearchGoal strictlyMinimize(CspNumExpr expr, double stepSize)
          Creates a goal that will minimize a numeric expression.
 SearchGoal strictlyMinimize(CspNumExpr expr, double stepSize, boolean useCurrentState)
          Creates a goal that will minimize a numeric expression.
 

Method Detail

minimize

public SearchGoal minimize(CspNumExpr expr)
Creates a goal that will minimize a numeric expression

Parameters:
expr - Expression that should be minimized

maximize

public SearchGoal maximize(CspNumExpr expr)
Creates a goal that will maximize a numeric expression

Parameters:
expr - Expression that should be maximized

strictlyMinimize

public SearchGoal strictlyMinimize(CspNumExpr expr,
                                   double stepSize)
Creates a goal that will minimize a numeric expression. It will only obtain a solution if it is better than the previous.

Parameters:
expr - Expression that should be minimized
stepSize - - the size of the step to take when enforcing a new max or minimum

strictlyMaximize

public SearchGoal strictlyMaximize(CspNumExpr expr,
                                   double stepSize)
Creates a goal that will maximize a numeric expression It will only obtain a solution if it is better than the previous.

Parameters:
expr - Expression that should be maximized
stepSize - - the size of the step to take when enforcing a new max or minimum

minimize

public SearchGoal minimize(CspNumExpr expr,
                           boolean useCurrentState)
Creates a goal that will minimize a numeric expression

Parameters:
expr - Expression that should be minimized
useCurrentState - - if true, uses the current state of the problem as a bound

maximize

public SearchGoal maximize(CspNumExpr expr,
                           boolean useCurrentState)
Creates a goal that will maximize a numeric expression

Parameters:
expr - Expression that should be maximized
useCurrentState - - if true, uses the current state of the problem as a bound

strictlyMinimize

public SearchGoal strictlyMinimize(CspNumExpr expr,
                                   double stepSize,
                                   boolean useCurrentState)
Creates a goal that will minimize a numeric expression. It will only obtain a solution if it is better than the previous.

Parameters:
expr - Expression that should be minimized
stepSize - - the size of the step to take when enforcing a new max or minimum
useCurrentState - - if true, uses the current state of the problem as a bound

strictlyMaximize

public SearchGoal strictlyMaximize(CspNumExpr expr,
                                   double stepSize,
                                   boolean useCurrentState)
Creates a goal that will maximize a numeric expression It will only obtain a solution if it is better than the previous.

Parameters:
expr - Expression that should be maximized
stepSize - - the size of the step to take when enforcing a new max or minimum
useCurrentState - - if true, uses the current state of the problem as a bound

first

public SearchGoal first()
Creates a goal that will direct the search to end after the first solution is found.