Stop object based on nodes, failures, and time. More...
#include <gecode/driver/script.hpp>
Public Types | |
| enum | { SR_NODE = 1 << 0 , SR_FAIL = 1 << 1 , SR_TIME = 1 << 2 , SR_RESTART = 1 << 3 , SR_INT = 1 << 4 } |
| Reason why search has been stopped. More... | |
Public Member Functions | |
| virtual bool | stop (const Search::Statistics &s, const Search::Options &o) |
| Test whether search must be stopped. | |
| int | reason (const Search::Statistics &s, const Search::Options &o) |
| Report reason why search has been stopped. | |
| ~CombinedStop (void) | |
| Destructor. | |
| Stop (void) | |
| Default constructor. | |
| virtual | ~Stop (void) |
| Destructor. | |
Static Public Member Functions | |
| static Search::Stop * | create (unsigned long long int node, unsigned long long int fail, double time, unsigned long long int restart, bool intr) |
| Create appropriate stop-object. | |
| static void | interrupt (int) |
| Handler for catching Ctrl-C. | |
| static void | installCtrlHandler (bool install, bool force=false) |
| Install handler for catching Ctrl-C. | |
| static Stop * | node (unsigned long long int l) |
| Stop if node limit l has been exceeded. | |
| static Stop * | fail (unsigned long long int l) |
| Stop if failure limit l has been exceeded. | |
| static Stop * | time (double l) |
| Stop if time limit l (in milliseconds) has been exceeded. | |
| static Stop * | restart (unsigned long long int l) |
| Stop if restart limit l has been exceeded. | |
| Static Public Member Functions inherited from Gecode::HeapAllocated | |
| static void * | operator new (size_t s) |
| Memory management. | |
| static void | operator delete (void *p) |
| Free memory allocated from heap. | |
Detailed Description
Stop object based on nodes, failures, and time.
Definition at line 50 of file script.hpp.
Member Enumeration Documentation
◆ anonymous enum
| anonymous enum |
Reason why search has been stopped.
| Enumerator | |
|---|---|
| SR_NODE | Node limit reached. |
| SR_FAIL | Fail limit reached. |
| SR_TIME | Time limit reached. |
| SR_RESTART | Time limit reached. |
| SR_INT | Interrupted by user. |
Definition at line 71 of file script.hpp.
Constructor & Destructor Documentation
◆ ~CombinedStop()
|
inline |
Destructor.
Definition at line 137 of file script.hpp.
Member Function Documentation
◆ stop()
|
inlinevirtual |
Test whether search must be stopped.
Implements Gecode::Search::Stop.
Definition at line 79 of file script.hpp.
◆ reason()
|
inline |
Report reason why search has been stopped.
Definition at line 88 of file script.hpp.
◆ create()
|
inlinestatic |
Create appropriate stop-object.
Definition at line 98 of file script.hpp.
◆ interrupt()
|
inlinestatic |
Handler for catching Ctrl-C.
Definition at line 121 of file script.hpp.
◆ installCtrlHandler()
|
inlinestatic |
Install handler for catching Ctrl-C.
Definition at line 127 of file script.hpp.
The documentation for this class was generated from the following files:
- gecode/driver/script.hpp
- gecode/driver/script.cpp
