23#include "gurobi_c++.h"
63 if (where == GRB_CB_BARRIER) {
68 else if (where == GRB_CB_SIMPLEX) {
73 else if (where == GRB_CB_MESSAGE) {
75 string algorithmOutput = getStringInfo(GRB_CB_MSG_STRING);
77 cout << algorithmOutput << endl;
81 catch (GRBException e) {
82 cout <<
"======= GRB ERROR =======" << endl;
83 cout <<
"GRB Error Code: " << e.getErrorCode() << endl;
84 cout << e.getMessage() << endl;
87 cout <<
"GRBCallback error, unrelated to GRB error codes." << endl;
Callback object to communicate with the gurobi solver.
Definition: bcegurobicallback.hpp:30
void setCancelFlagTrue()
Sets cancel flag to 1.
Definition: bcegurobicallback.hpp:54
void setFullOutput(bool toggle)
Controls how much information is printed to the log tab.
Definition: bcegurobicallback.hpp:47
bool isFullOutput
Contains whether solver is currently running Simplex or Barrier.
Definition: bcegurobicallback.hpp:37
bool cancelFlag
Flags if user has cancelled the solve ("true" if cancel has been hit).
Definition: bcegurobicallback.hpp:35
BCEGurobiCallback()
Constructor.
Definition: bcegurobicallback.hpp:42
void callback()
Sends algorithm output to the log file.
Definition: bcegurobicallback.hpp:61