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

#include <g_gurobi.h>

Public Member Functions

 CallbackContext (Gurobi *gurobi, void *cb_data, int where)
 For internal use only.
 
int where () const
 The current event of the callback, see Callback Codes in Gurobi docs.
 
Gurobigurobi () const
 
absl::StatusOr< int > CbGetInt (int what) const
 
absl::StatusOr< double > CbGetDouble (int what) const
 
absl::Status CbGetDoubleArray (int what, absl::Span< double > result) const
 
absl::StatusOr< std::string > CbGetMessage () const
 Calls GRBcbget() where what=MSG_STRING (call only at where=MESSAGE).
 
absl::Status CbCut (absl::Span< const int > cutind, absl::Span< const double > cutval, char cutsense, double cutrhs) const
 Calls GRBcbcut().
 
absl::Status CbLazy (absl::Span< const int > lazyind, absl::Span< const double > lazyval, char lazysense, double lazyrhs) const
 Calls GRBcblazy().
 
absl::StatusOr< double > CbSolution (absl::Span< const double > solution) const
 Calls GRBcbsolution().
 

Detailed Description

The argument of Gurobi callbacks, allows you to read callback specific data and send information back to the solver.

Definition at line 171 of file g_gurobi.h.

Constructor & Destructor Documentation

◆ CallbackContext()

operations_research::math_opt::Gurobi::CallbackContext::CallbackContext ( Gurobi * gurobi,
void * cb_data,
int where )

For internal use only.

Definition at line 782 of file g_gurobi.cc.

Member Function Documentation

◆ CbCut()

absl::Status operations_research::math_opt::Gurobi::CallbackContext::CbCut ( absl::Span< const int > cutind,
absl::Span< const double > cutval,
char cutsense,
double cutrhs ) const

Calls GRBcbcut().

Definition at line 817 of file g_gurobi.cc.

◆ CbGetDouble()

absl::StatusOr< double > operations_research::math_opt::Gurobi::CallbackContext::CbGetDouble ( int what) const

Calls GRBcbget() on "what" with result type double, see Callback Codes in Gurobi docs for values of "what".

Definition at line 793 of file g_gurobi.cc.

◆ CbGetDoubleArray()

absl::Status operations_research::math_opt::Gurobi::CallbackContext::CbGetDoubleArray ( int what,
absl::Span< double > result ) const

Calls GRBcbget() on "what" with result type double*, see Callback Codes in Gurobi docs for values of "what".

The user is responsible for ensuring that result is large enough to hold the result.

Definition at line 801 of file g_gurobi.cc.

◆ CbGetInt()

absl::StatusOr< int > operations_research::math_opt::Gurobi::CallbackContext::CbGetInt ( int what) const

Calls GRBcbget() on "what" with result type int, see Callback Codes in Gurobi docs for values of "what".

Definition at line 786 of file g_gurobi.cc.

◆ CbGetMessage()

absl::StatusOr< std::string > operations_research::math_opt::Gurobi::CallbackContext::CbGetMessage ( ) const

Calls GRBcbget() where what=MSG_STRING (call only at where=MESSAGE).

Definition at line 807 of file g_gurobi.cc.

◆ CbLazy()

absl::Status operations_research::math_opt::Gurobi::CallbackContext::CbLazy ( absl::Span< const int > lazyind,
absl::Span< const double > lazyval,
char lazysense,
double lazyrhs ) const

Calls GRBcblazy().

Definition at line 827 of file g_gurobi.cc.

◆ CbSolution()

absl::StatusOr< double > operations_research::math_opt::Gurobi::CallbackContext::CbSolution ( absl::Span< const double > solution) const

Calls GRBcbsolution().

Definition at line 837 of file g_gurobi.cc.

◆ gurobi()

Gurobi * operations_research::math_opt::Gurobi::CallbackContext::gurobi ( ) const
inline

Definition at line 178 of file g_gurobi.h.

◆ where()

int operations_research::math_opt::Gurobi::CallbackContext::where ( ) const
inline

The current event of the callback, see Callback Codes in Gurobi docs.

Definition at line 177 of file g_gurobi.h.


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