Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::PresolveTimer Class Reference

#include <presolve_util.h>

Public Member Functions

 PresolveTimer (std::string name, SolverLogger *logger, TimeLimit *time_limit)
 
void AddToWork (double dtime)
 
void TrackSimpleLoop (int size)
 
bool WorkLimitIsReached () const
 
void AddCounter (std::string name, int64_t count)
 
void AddMessage (std::string name)
 Extra info at the end of the log line.
 
 ~PresolveTimer ()
 Update dtime and log operation summary.
 

Detailed Description

Simple helper class to:

  • log in an uniform way a "time-consuming" presolve operation.
  • track a deterministic work limit.
  • update the deterministic time on finish.

Definition at line 49 of file presolve_util.h.

Constructor & Destructor Documentation

◆ PresolveTimer()

operations_research::sat::PresolveTimer::PresolveTimer ( std::string name,
SolverLogger * logger,
TimeLimit * time_limit )
inline

Definition at line 51 of file presolve_util.h.

◆ ~PresolveTimer()

operations_research::sat::PresolveTimer::~PresolveTimer ( )

Update dtime and log operation summary.

We use absl::Seconds() to get a nicer display.

Definition at line 49 of file presolve_util.cc.

Member Function Documentation

◆ AddCounter()

void operations_research::sat::PresolveTimer::AddCounter ( std::string name,
int64_t count )
inline

Extra stats=value to display at the end. We filter value of zero to have less clutter.

Definition at line 64 of file presolve_util.h.

◆ AddMessage()

void operations_research::sat::PresolveTimer::AddMessage ( std::string name)
inline

Extra info at the end of the log line.

Definition at line 70 of file presolve_util.h.

◆ AddToWork()

void operations_research::sat::PresolveTimer::AddToWork ( double dtime)
inline

Track the work done (which is also the deterministic time). By default we want a limit of around 1 deterministic seconds.

Definition at line 58 of file presolve_util.h.

◆ TrackSimpleLoop()

void operations_research::sat::PresolveTimer::TrackSimpleLoop ( int size)
inline

Definition at line 59 of file presolve_util.h.

◆ WorkLimitIsReached()

bool operations_research::sat::PresolveTimer::WorkLimitIsReached ( ) const
inline

Definition at line 60 of file presolve_util.h.


The documentation for this class was generated from the following files: