Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::CallbackData Struct Reference

#include <callback.h>

Public Member Functions

 CallbackData (CallbackEvent event, absl::Duration runtime)
 Users will typically not need this function other than for testing.
 
 CallbackData (const ModelStorage *storage, const CallbackDataProto &proto)
 

Public Attributes

CallbackEvent event
 The current state of the underlying solver.
 
std::optional< VariableMap< double > > solution
 
absl::Duration runtime
 Time since Solve() was called. Available for all events.
 
CallbackDataProto::PresolveStats presolve_stats
 Only available for event == CallbackEvent::kPresolve.
 
CallbackDataProto::SimplexStats simplex_stats
 Only available for event == CallbackEvent::kSimplex.
 
CallbackDataProto::BarrierStats barrier_stats
 Only available for event == CallbackEvent::kBarrier.
 
CallbackDataProto::MipStats mip_stats
 

Detailed Description

The input to the Callback function.

The information available depends on the current event.

Definition at line 186 of file callback.h.

Constructor & Destructor Documentation

◆ CallbackData() [1/2]

operations_research::math_opt::CallbackData::CallbackData ( CallbackEvent event,
absl::Duration runtime )

Users will typically not need this function other than for testing.

Definition at line 69 of file callback.cc.

◆ CallbackData() [2/2]

operations_research::math_opt::CallbackData::CallbackData ( const ModelStorage * storage,
const CallbackDataProto & proto )

Users will typically not need this function. Will CHECK fail if proto is not valid.

iOS 11 does not support .value() hence we use operator* here and CHECK below that we have a value.

Definition at line 73 of file callback.cc.

Member Data Documentation

◆ barrier_stats

CallbackDataProto::BarrierStats operations_research::math_opt::CallbackData::barrier_stats

Only available for event == CallbackEvent::kBarrier.

Definition at line 217 of file callback.h.

◆ event

CallbackEvent operations_research::math_opt::CallbackData::event

The current state of the underlying solver.

Definition at line 195 of file callback.h.

◆ mip_stats

CallbackDataProto::MipStats operations_research::math_opt::CallbackData::mip_stats

Only available for event of CallbackEvent::kMip, CallbackEvent::kMipNode, or CallbackEvent::kMipSolution.

Definition at line 221 of file callback.h.

◆ presolve_stats

CallbackDataProto::PresolveStats operations_research::math_opt::CallbackData::presolve_stats

Only available for event == CallbackEvent::kPresolve.

Definition at line 211 of file callback.h.

◆ runtime

absl::Duration operations_research::math_opt::CallbackData::runtime

Time since Solve() was called. Available for all events.

Definition at line 208 of file callback.h.

◆ simplex_stats

CallbackDataProto::SimplexStats operations_research::math_opt::CallbackData::simplex_stats

Only available for event == CallbackEvent::kSimplex.

Definition at line 214 of file callback.h.

◆ solution

std::optional<VariableMap<double> > operations_research::math_opt::CallbackData::solution

If event == CallbackEvent::kMipNode, the primal_solution contains the primal solution to the current LP-node relaxation. In some cases, no solution will be available (e.g. because LP was infeasible or the solve was imprecise). If event == CallbackEvent::kMipSolution, the primal_solution contains the newly found primal (integer) feasible solution. The solution is always present. Otherwise, the primal_solution is not available.

Definition at line 205 of file callback.h.


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