Gecode::Search::TimeStop Class Reference
Stop-object based on time More...
#include <gecode/search.hh>
Public Member Functions | |
| TimeStop (double l) | |
| Stop if search exceeds l milliseconds (from creation of this object). | |
| TimeStop (const TimeStop &s) | |
| Copy constructor. | |
| TimeStop & | operator= (const TimeStop &s) |
| Assignment operator. | |
| double | limit (void) const |
| Return current limit in milliseconds. | |
| void | limit (double l) |
| Set current limit to l milliseconds. | |
| void | reset (void) |
| Reset time to zero. | |
| virtual bool | stop (const Statistics &s, const Options &o) |
| Return true if time limit is exceeded. | |
| Stop (void) | |
| Default constructor. | |
| virtual | ~Stop (void) |
| Destructor. | |
Protected Types | |
| using | clock = std::chrono::steady_clock |
| using | clock_rep = clock::time_point::rep |
Protected Attributes | |
| std::atomic< clock_rep > | t0 |
| Clock representation at the start of timing. | |
| std::atomic< double > | l |
| Current limit in milliseconds. | |
Additional Inherited Members | |
| 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 time
Time limits are checked at search boundaries. Expiry does not wake an engine paused by WorkerControl; next() remains blocked until a positive request resumes the engine and it reaches a normal stop check.
Member Typedef Documentation
◆ clock
|
protected |
◆ clock_rep
|
protected |
Constructor & Destructor Documentation
◆ TimeStop() [1/2]
|
inline |
◆ TimeStop() [2/2]
|
inline |
Member Function Documentation
◆ operator=()
◆ limit() [1/2]
|
inline |
◆ limit() [2/2]
|
inline |
◆ reset()
|
inline |
◆ stop()
|
virtual |
Return true if time limit is exceeded.
Implements Gecode::Search::Stop.
Member Data Documentation
◆ t0
|
protected |
◆ l
|
protected |
The documentation for this class was generated from the following files:
