jopt.csp.search
Interface SearchLimits


public interface SearchLimits

Interface for a class that returns common search limits that can be used to control searching in a CSP problem


Method Summary
 SearchLimit choiceLimit(int maxChoices)
          Creates a new choicepoint search limit that will stop searching after a specified number of choicepoints have been evaluated during searching.
 SearchLimit combinedLimit(SearchLimit[] limits)
          Creates a new combined limit search limit
 SearchLimit deadlineLimit(long endTime)
          Creates a new deadline limit search limiter
 SearchLimit failLimit(int maxFailures)
          Creates a new failure search limit that will stop searching after a specified number of backtracking failures during searching.
 SearchAction limitSearch(SearchLimit limit, SearchAction action)
          Special action that applies a limit to the search technique being used at this point in the search tree
 SearchLimit timeLimit(long timeLimitMs)
          Creates a new time limit that will stop searching after a specified amount of time.
 

Method Detail

timeLimit

public SearchLimit timeLimit(long timeLimitMs)
Creates a new time limit that will stop searching after a specified amount of time.

Parameters:
timeLimitMs - Time in milliseconds to limit search
Returns:
SearchLimit to control search

failLimit

public SearchLimit failLimit(int maxFailures)
Creates a new failure search limit that will stop searching after a specified number of backtracking failures during searching.

Parameters:
maxFailures - Maximum number of backtracks allowed before search stops
Returns:
SearchLimit to control search

choiceLimit

public SearchLimit choiceLimit(int maxChoices)
Creates a new choicepoint search limit that will stop searching after a specified number of choicepoints have been evaluated during searching.

Parameters:
maxChoices - Maximum number of choicepoints to evaluate
Returns:
SearchLimit to control search

deadlineLimit

public SearchLimit deadlineLimit(long endTime)
Creates a new deadline limit search limiter

Parameters:
endTime - Time at which the search should end
Returns:
SearchLimit to control search

combinedLimit

public SearchLimit combinedLimit(SearchLimit[] limits)
Creates a new combined limit search limit

Parameters:
limits - Search limits to combine into single limit
Returns:
SearchLimit to control search

limitSearch

public SearchAction limitSearch(SearchLimit limit,
                                SearchAction action)
Special action that applies a limit to the search technique being used at this point in the search tree

Parameters:
limit - Limit to apply to searching on supplied action
action - Action that will generate the tree to be searched