![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Definition at line 149 of file g_gurobi.h.
#include <g_gurobi.h>
Classes | |
| struct | SparseMat |
| class | CallbackContext |
Public Types | |
| using | Callback = std::function<absl::Status(const CallbackContext&)> |
Public Member Functions | |
| ~Gurobi () | |
| absl::Status | AddVar (double obj, double lb, double ub, char vtype, const std::string &name) |
| absl::Status | AddVar (absl::Span< const int > vind, absl::Span< const double > vval, double obj, double lb, double ub, char vtype, const std::string &name) |
| have size equal to the number of new be | empty (all new variables have objective coefficient 0). - have size equal to the number of new variables |
| have size equal to the number of new be be empty(all new variables have name ""). absl have size equal to the number of new be | empty (all new variables have objective coefficient 0). - have size equal to the number of new variables |
| have size equal to the number of new be be empty(all new variables have name ""). absl have size equal to the number of new be be empty(all new variables have name ""). absl absl::Status | DelVars (absl::Span< const int > ind) |
| absl::Status | AddConstr (char sense, double rhs, const std::string &name) |
| absl::Status | AddConstr (absl::Span< const int > cind, absl::Span< const double > cval, char sense, double rhs, const std::string &name) |
| have size equal to the number of new be empty(all new constraints have name ""). absl absl::Status | DelConstrs (absl::Span< const int > ind) |
| absl::Status | ChgCoeffs (absl::Span< const int > cind, absl::Span< const int > vind, absl::Span< const double > val) |
| absl::Status | AddQpTerms (absl::Span< const int > qrow, absl::Span< const int > qcol, absl::Span< const double > qval) |
| absl::Status | DelQ () |
| absl::Status | SetNthObjective (int index, int priority, double weight, double abs_tol, double rel_tol, const std::string &name, double constant, absl::Span< const int > lind, absl::Span< const double > lval) |
| absl::Status | AddQConstr (absl::Span< const int > lind, absl::Span< const double > lval, absl::Span< const int > qrow, absl::Span< const int > qcol, absl::Span< const double > qval, char sense, double rhs, const std::string &name) |
| absl::Status | DelQConstrs (absl::Span< const int > ind) |
| absl::Status | AddSos (absl::Span< const int > types, absl::Span< const int > beg, absl::Span< const int > ind, absl::Span< const double > weight) |
| absl::Status | DelSos (absl::Span< const int > ind) |
| absl::Status | AddIndicator (const std::string &name, int binvar, int binval, absl::Span< const int > ind, absl::Span< const double > val, char sense, double rhs) |
| absl::Status | DelGenConstrs (absl::Span< const int > ind) |
| absl::StatusOr< int > | GetNnz (int first_var, int num_vars) |
| absl::Status | GetVars (absl::Span< int > vbegin, absl::Span< int > vind, absl::Span< double > vval, int first_var, int num_vars) |
| absl::StatusOr< SparseMat > | GetVars (int first_var, int num_vars) |
| absl::Status | UpdateModel () |
| absl::Status | Optimize (Callback cb=nullptr) |
| void | Terminate () |
| absl::StatusOr< bool > | ComputeIIS (Callback cb=nullptr) |
| bool | IsAttrAvailable (const char *name) const |
| absl::StatusOr< int > | GetIntAttr (const char *name) const |
| absl::Status | SetIntAttr (const char *attr_name, int value) |
| absl::StatusOr< double > | GetDoubleAttr (const char *name) const |
| absl::Status | SetDoubleAttr (const char *attr_name, double value) |
| absl::StatusOr< std::string > | GetStringAttr (const char *name) const |
| absl::Status | SetStringAttr (const char *attr_name, const std::string &value) |
| absl::Status | GetIntAttrArray (const char *name, absl::Span< int > attr_out) const |
| absl::StatusOr< std::vector< int > > | GetIntAttrArray (const char *name, int len) const |
| absl::Status | SetIntAttrArray (const char *name, absl::Span< const int > new_values) |
| absl::Status | SetIntAttrList (const char *name, absl::Span< const int > ind, absl::Span< const int > new_values) |
| absl::Status | GetDoubleAttrArray (const char *name, absl::Span< double > attr_out) const |
| absl::StatusOr< std::vector< double > > | GetDoubleAttrArray (const char *name, int len) const |
| absl::Status | SetDoubleAttrArray (const char *name, absl::Span< const double > new_values) |
| absl::Status | SetDoubleAttrList (const char *name, absl::Span< const int > ind, absl::Span< const double > new_values) |
| absl::Status | GetCharAttrArray (const char *name, absl::Span< char > attr_out) const |
| absl::StatusOr< std::vector< char > > | GetCharAttrArray (const char *name, int len) const |
| absl::Status | SetCharAttrArray (const char *name, absl::Span< const char > new_values) |
| absl::Status | SetCharAttrList (const char *name, absl::Span< const int > ind, absl::Span< const char > new_values) |
| absl::StatusOr< int > | GetIntAttrElement (const char *name, int element) const |
| absl::Status | SetIntAttrElement (const char *name, int element, int new_value) |
| absl::StatusOr< double > | GetDoubleAttrElement (const char *name, int element) const |
| absl::Status | SetDoubleAttrElement (const char *name, int element, double new_value) |
| absl::StatusOr< char > | GetCharAttrElement (const char *name, int element) const |
| absl::Status | SetCharAttrElement (const char *name, int element, char new_value) |
| absl::Status | SetParam (const char *name, const std::string &value) |
| absl::Status | SetIntParam (const char *name, int value) |
| absl::Status | SetDoubleParam (const char *name, double value) |
| absl::Status | SetStringParam (const char *name, const std::string &value) |
| absl::StatusOr< int > | GetIntParam (const char *name) |
| absl::StatusOr< double > | GetDoubleParam (const char *name) |
| absl::StatusOr< std::string > | GetStringParam (const char *name) |
| absl::Status | ResetParameters () |
| absl::Status | SetMultiObjectiveDoubleParam (const char *name, int obj_index, double value) |
| absl::StatusOr< double > | GetMultiObjectiveDoubleParam (const char *name, int obj_index) |
| GRBmodel * | model () const |
| absl::Status | ToStatus (int grb_err, absl::StatusCode code=absl::StatusCode::kInvalidArgument, absl::SourceLocation loc=absl::SourceLocation::current()) const |
Static Public Member Functions | |
| static absl::StatusOr< std::unique_ptr< Gurobi > > | New (GRBenvUniquePtr primary_env=nullptr) |
| static absl::StatusOr< std::unique_ptr< Gurobi > > | NewWithSharedPrimaryEnv (GRBenv *primary_env) |
Public Attributes | |
| have size equal to the number of new | variables |
| have size equal to the number of new be be empty(all new variables have name ""). absl have size equal to the number of new | variables |
| have size equal to the number of new | constraints |
| using operations_research::math_opt::Gurobi::Callback = std::function<absl::Status(const CallbackContext&)> |
Definition at line 222 of file g_gurobi.h.
| operations_research::math_opt::Gurobi::~Gurobi | ( | ) |
Definition at line 233 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddConstr | ( | absl::Span< const int > | cind, |
| absl::Span< const double > | cval, | ||
| char | sense, | ||
| double | rhs, | ||
| const std::string & | name ) |
Definition at line 332 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddConstr | ( | char | sense, |
| double | rhs, | ||
| const std::string & | name ) |
Definition at line 327 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddIndicator | ( | const std::string & | name, |
| int | binvar, | ||
| int | binval, | ||
| absl::Span< const int > | ind, | ||
| absl::Span< const double > | val, | ||
| char | sense, | ||
| double | rhs ) |
Definition at line 466 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddQConstr | ( | absl::Span< const int > | lind, |
| absl::Span< const double > | lval, | ||
| absl::Span< const int > | qrow, | ||
| absl::Span< const int > | qcol, | ||
| absl::Span< const double > | qval, | ||
| char | sense, | ||
| double | rhs, | ||
| const std::string & | name ) |
Definition at line 410 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddQpTerms | ( | absl::Span< const int > | qrow, |
| absl::Span< const int > | qcol, | ||
| absl::Span< const double > | qval ) |
Definition at line 374 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddSos | ( | absl::Span< const int > | types, |
| absl::Span< const int > | beg, | ||
| absl::Span< const int > | ind, | ||
| absl::Span< const double > | weight ) |
Definition at line 443 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddVar | ( | absl::Span< const int > | vind, |
| absl::Span< const double > | vval, | ||
| double | obj, | ||
| double | lb, | ||
| double | ub, | ||
| char | vtype, | ||
| const std::string & | name ) |
Definition at line 257 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::AddVar | ( | double | obj, |
| double | lb, | ||
| double | ub, | ||
| char | vtype, | ||
| const std::string & | name ) |
Definition at line 252 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::ChgCoeffs | ( | absl::Span< const int > | cind, |
| absl::Span< const int > | vind, | ||
| absl::Span< const double > | val ) |
Definition at line 485 of file g_gurobi.cc.
| absl::StatusOr< bool > operations_research::math_opt::Gurobi::ComputeIIS | ( | Callback | cb = nullptr | ) |
Definition at line 544 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelConstrs | ( | absl::Span< const int > | ind | ) |
Definition at line 369 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelGenConstrs | ( | absl::Span< const int > | ind | ) |
Definition at line 480 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelQ | ( | ) |
Definition at line 385 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelQConstrs | ( | absl::Span< const int > | ind | ) |
Definition at line 438 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelSos | ( | absl::Span< const int > | ind | ) |
Definition at line 461 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::DelVars | ( | absl::Span< const int > | ind | ) |
Definition at line 322 of file g_gurobi.cc.
|
new |
|
new |
| absl::Status operations_research::math_opt::Gurobi::GetCharAttrArray | ( | const char * | name, |
| absl::Span< char > | attr_out ) const |
Definition at line 659 of file g_gurobi.cc.
| absl::StatusOr< std::vector< char > > operations_research::math_opt::Gurobi::GetCharAttrArray | ( | const char * | name, |
| int | len ) const |
Definition at line 667 of file g_gurobi.cc.
| absl::StatusOr< char > operations_research::math_opt::Gurobi::GetCharAttrElement | ( | const char * | name, |
| int | element ) const |
Definition at line 732 of file g_gurobi.cc.
| absl::StatusOr< double > operations_research::math_opt::Gurobi::GetDoubleAttr | ( | const char * | name | ) | const |
Definition at line 577 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::GetDoubleAttrArray | ( | const char * | name, |
| absl::Span< double > | attr_out ) const |
Definition at line 644 of file g_gurobi.cc.
| absl::StatusOr< std::vector< double > > operations_research::math_opt::Gurobi::GetDoubleAttrArray | ( | const char * | name, |
| int | len ) const |
Definition at line 652 of file g_gurobi.cc.
| absl::StatusOr< double > operations_research::math_opt::Gurobi::GetDoubleAttrElement | ( | const char * | name, |
| int | element ) const |
Definition at line 718 of file g_gurobi.cc.
| absl::StatusOr< double > operations_research::math_opt::Gurobi::GetDoubleParam | ( | const char * | name | ) |
Definition at line 772 of file g_gurobi.cc.
| absl::StatusOr< int > operations_research::math_opt::Gurobi::GetIntAttr | ( | const char * | name | ) | const |
Definition at line 570 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::GetIntAttrArray | ( | const char * | name, |
| absl::Span< int > | attr_out ) const |
Definition at line 629 of file g_gurobi.cc.
| absl::StatusOr< std::vector< int > > operations_research::math_opt::Gurobi::GetIntAttrArray | ( | const char * | name, |
| int | len ) const |
Definition at line 637 of file g_gurobi.cc.
| absl::StatusOr< int > operations_research::math_opt::Gurobi::GetIntAttrElement | ( | const char * | name, |
| int | element ) const |
Definition at line 704 of file g_gurobi.cc.
| absl::StatusOr< int > operations_research::math_opt::Gurobi::GetIntParam | ( | const char * | name | ) |
Definition at line 766 of file g_gurobi.cc.
| absl::StatusOr< double > operations_research::math_opt::Gurobi::GetMultiObjectiveDoubleParam | ( | const char * | name, |
| int | obj_index ) |
Definition at line 796 of file g_gurobi.cc.
| absl::StatusOr< int > operations_research::math_opt::Gurobi::GetNnz | ( | int | first_var, |
| int | num_vars ) |
Definition at line 496 of file g_gurobi.cc.
| absl::StatusOr< std::string > operations_research::math_opt::Gurobi::GetStringAttr | ( | const char * | name | ) | const |
Definition at line 584 of file g_gurobi.cc.
| absl::StatusOr< std::string > operations_research::math_opt::Gurobi::GetStringParam | ( | const char * | name | ) |
Definition at line 778 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::GetVars | ( | absl::Span< int > | vbegin, |
| absl::Span< int > | vind, | ||
| absl::Span< double > | vval, | ||
| int | first_var, | ||
| int | num_vars ) |
Definition at line 503 of file g_gurobi.cc.
| absl::StatusOr< Gurobi::SparseMat > operations_research::math_opt::Gurobi::GetVars | ( | int | first_var, |
| int | num_vars ) |
Definition at line 517 of file g_gurobi.cc.
| bool operations_research::math_opt::Gurobi::IsAttrAvailable | ( | const char * | name | ) | const |
Definition at line 566 of file g_gurobi.cc.
|
inline |
Definition at line 590 of file g_gurobi.h.
|
static |
Definition at line 189 of file g_gurobi.cc.
|
static |
Definition at line 183 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::Optimize | ( | Callback | cb = nullptr | ) |
Definition at line 536 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::ResetParameters | ( | ) |
Definition at line 784 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetCharAttrArray | ( | const char * | name, |
| absl::Span< const char > | new_values ) |
Definition at line 623 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetCharAttrElement | ( | const char * | name, |
| int | element, | ||
| char | new_value ) |
Definition at line 740 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetCharAttrList | ( | const char * | name, |
| absl::Span< const int > | ind, | ||
| absl::Span< const char > | new_values ) |
Definition at line 694 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetDoubleAttr | ( | const char * | attr_name, |
| double | value ) |
Definition at line 606 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetDoubleAttrArray | ( | const char * | name, |
| absl::Span< const double > | new_values ) |
Definition at line 617 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetDoubleAttrElement | ( | const char * | name, |
| int | element, | ||
| double | new_value ) |
Definition at line 726 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetDoubleAttrList | ( | const char * | name, |
| absl::Span< const int > | ind, | ||
| absl::Span< const double > | new_values ) |
Definition at line 684 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetDoubleParam | ( | const char * | name, |
| double | value ) |
Definition at line 756 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetIntAttr | ( | const char * | attr_name, |
| int | value ) |
Definition at line 602 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetIntAttrArray | ( | const char * | name, |
| absl::Span< const int > | new_values ) |
Definition at line 611 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetIntAttrElement | ( | const char * | name, |
| int | element, | ||
| int | new_value ) |
Definition at line 712 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetIntAttrList | ( | const char * | name, |
| absl::Span< const int > | ind, | ||
| absl::Span< const int > | new_values ) |
Definition at line 674 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetIntParam | ( | const char * | name, |
| int | value ) |
Definition at line 752 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetMultiObjectiveDoubleParam | ( | const char * | name, |
| int | obj_index, | ||
| double | value ) |
Definition at line 788 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetNthObjective | ( | int | index, |
| int | priority, | ||
| double | weight, | ||
| double | abs_tol, | ||
| double | rel_tol, | ||
| const std::string & | name, | ||
| double | constant, | ||
| absl::Span< const int > | lind, | ||
| absl::Span< const double > | lval ) |
Definition at line 387 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetParam | ( | const char * | name, |
| const std::string & | value ) |
Definition at line 747 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetStringAttr | ( | const char * | attr_name, |
| const std::string & | value ) |
Definition at line 597 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::SetStringParam | ( | const char * | name, |
| const std::string & | value ) |
Definition at line 761 of file g_gurobi.cc.
| void operations_research::math_opt::Gurobi::Terminate | ( | ) |
Definition at line 805 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::ToStatus | ( | int | grb_err, |
| absl::StatusCode | code = absl::StatusCode::kInvalidArgument, | ||
| absl::SourceLocation | loc = absl::SourceLocation::current() ) const |
Definition at line 241 of file g_gurobi.cc.
| absl::Status operations_research::math_opt::Gurobi::UpdateModel | ( | ) |
Definition at line 532 of file g_gurobi.cc.
| have size equal to the number of new operations_research::math_opt::Gurobi::constraints |
Definition at line 327 of file g_gurobi.h.
| have size equal to the number of new be be empty (all new variables have name ""). absl have size equal to the number of new operations_research::math_opt::Gurobi::variables |
Definition at line 290 of file g_gurobi.h.
| have size equal to the number of new operations_research::math_opt::Gurobi::variables |
Definition at line 271 of file g_gurobi.h.