#include <Driver.h>
Public Member Functions | |
| Driver (Problem &problem, Filter &filter) | |
| void | registerDecomposition (Decomposition &decomposition) |
| void | unregisterDecomposition (Decomposition &decomposition) |
| size_t | decompositions () const |
| Return the number of decomposition algorithms registered. | |
| Decomposition & | decomposition (size_t n) const |
| const Resources & | resources () const |
| Resources & | resources () |
| const timeval & | timeLimit () const |
| timeval | setTimeLimit (const timeval &timeLimit) |
| bool | timeLimitExceeded () const |
| Return `true' if the algorithm timed out, `false' otherwise. | |
| const ulonglong | nodeLimit () const |
| ulonglong | setNodeLimit (const ulonglong nodeLimit) |
| bool | nodeLimitExceeded () const |
| ulonglong | solutions () const |
| Return the number of solutions found so far. | |
| bool | canYield (size_t index) const |
| void | setSolutionCallback (bool(*solutionCallback)(Decomposition &, bool &)) |
| ulonglong | search () |
| void | yield (size_t fromIndex, bool voluntary) |
| double | staticOptimismPercentage () const |
| void | setStaticOptimismPercentage (double percentage) |
| double | dynamicOptimismPercentage () const |
| void | setDynamicOptimismPercentage (double percentage) |
| ulonglong | yields () const |
| Return the number of times the driver's yield method was called. | |
| ulonglong | voluntaryYields () const |
| ulonglong | totalCCKS () const |
| Return the number of constraint checks performed so far. | |
| ulonglong | failedCCKS () const |
| Return the current number of constraint failures. | |
|
||||||||||||
|
Constructor for the driver.
|
|
|
Decomposition algorithms that are capable of yielding control to other decomposition algorithms through the driver should ask the the driver first if that is indeed possible (i.e. whether the or not the driver's table of decomposition algorithms contains another algorithm after `index').
|
|
|
Return the nth decomposition algorithm registered.
|
|
|
Return the percentage of dynamic optimism. See setDynamicOptimismPercentage() for details. |
|
|
Return the number of nodes the search is allowed to create. |
|
|
Return `true' if the search exceeded the number of nodes allowed, `false' otherwise. |
|
|
Register a new decomposition algorithm at the end of the chain.
|
|
|
The non-const version of the above. |
|
|
Return the resources associated with this driver. These are in fact the resources associated with the first decomposition in the driver's chain, as that counts the times and resources of all others as well. The driver must have at least one decomposition in the chain.
|
|
|
The driver's search method.
|
|
|
Set the dynamic optimism percentage. If the decomposition's optimism percentage is greater than 0, then each variable's domain of values is sorted according to the first value ordering heuristic, then the given percentage of values is removed from the end of the sorted domain. A decomposition that implements this should return `true' in `supportsOptimism()'.
|
|
|
Control the number of nodes the search is allowed to create. setNodeLimit() should be called _after_ all the decomposition algorithms have been registered.
|
|
|
Set the function to be called when a solution is found by a decomposition algorithm. This affects all the registered decomposition algorithms.
|
|
|
Set the static optimism percentage. If the decomposition's optimism percentage is greater than 0, then each variable's domain of values is sorted according to the first value ordering heuristic, then the given percentage of values is removed from the end of the sorted domain. The search will proceed on the resulting problem, with the expectation that at least one solution will still be found in the smaller problem, potentiall much faster.
|
|
|
Control the amount of time the search is allowed to run. This is always relative to the moment the algorithm started. setTimeLimit() should be called _after_ all the decomposition algorithms have been registered.
|
|
|
Return the percentage of static optimism. See setStaticOptimismPercentage() for details. |
|
|
Return the amount of time the search is allowed to run from the moment it has been started. |
|
|
Unregister a previously registered decomposition algorithm.
|
|
|
Return the number of times the driver's yield method was called voluntarily. |
|
||||||||||||
|
Yield control to another decomposition algorithm in the chain. If the control is yield voluntary, then control goes to the next decomposition algorithm in the chain (one is assumed to exist, since the algorithms are required to call canYield() first). Otherwise, control goes to the first algorithm in the chain.
|
1.3.9.1