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

Detailed Description

Definition at line 42 of file g_xpress.h.

#include <g_xpress.h>

Public Member Functions

 Xpress ()=delete
absl::Status SetProbName (absl::string_view name)
 ~Xpress ()
absl::Status GetControlInfo (char const *name, int *p_id, int *p_type) const
absl::StatusOr< int > GetIntControl (int control) const
absl::Status SetIntControl (int control, int value)
absl::Status ResetIntControl (int control)
absl::StatusOr< int64_t > GetIntControl64 (int control) const
absl::Status SetIntControl64 (int control, int64_t value)
absl::StatusOr< double > GetDblControl (int control) const
absl::Status SetDblControl (int control, double value)
absl::StatusOr< std::string > GetStrControl (int control) const
absl::Status SetStrControl (int control, std::string const &value)
absl::StatusOr< int > GetIntAttr (int attribute) const
absl::StatusOr< double > GetDoubleAttr (int attribute) const
absl::StatusOr< double > GetObjectiveDoubleAttr (int objidx, int attribute) const
absl::Status AddVars (std::size_t count, absl::Span< const double > obj, absl::Span< const double > lb, absl::Span< const double > ub, absl::Span< const char > vtype)
absl::Status AddNames (int type, absl::Span< const char > names, int first, int last)
absl::Status AddConstrs (absl::Span< const char > sense, absl::Span< const double > rhs, absl::Span< const double > rng)
absl::Status AddConstrs (absl::Span< const char > rowtype, absl::Span< const double > rhs, absl::Span< const double > rng, absl::Span< const int > start, absl::Span< const int > colind, absl::Span< const double > rowcoef)
absl::Status SetObjectiveSense (bool maximize)
absl::Status SetLinearObjective (double constant, absl::Span< const int > col_index, absl::Span< const double > obj_coeffs)
absl::Status SetQuadraticObjective (absl::Span< const int > colind1, absl::Span< const int > colind2, absl::Span< const double > coefficients)
absl::Status ChgCoeffs (absl::Span< const int > rowind, absl::Span< const int > colind, absl::Span< const double > values)
absl::Status LpOptimize (std::string flags)
absl::Status GetLpSol (absl::Span< double > primals, absl::Span< double > duals, absl::Span< double > reducedCosts)
absl::Status Optimize (std::string const &flags="", int *p_solvestatus=nullptr, int *p_solstatus=nullptr)
absl::Status PostSolve ()
absl::Status GetLB (absl::Span< double > lb, int first, int last)
absl::Status GetUB (absl::Span< double > ub, int first, int last)
absl::Status GetColType (absl::Span< char > ctype, int first, int last)
absl::Status ChgBounds (absl::Span< int const > colind, absl::Span< char const > bndtype, absl::Span< double const > bndval)
absl::Status ChgColType (absl::Span< int const > colind, absl::Span< char const > coltype)
void Terminate ()
absl::StatusOr< int > GetDualStatus () const
absl::Status GetBasis (std::vector< int > &rowBasis, std::vector< int > &colBasis) const
absl::Status SetStartingBasis (std::vector< int > &rowBasis, std::vector< int > &colBasis) const
absl::Status AddCbMessage (void(XPRS_CC *cb)(XPRSprob, void *, char const *, int, int), void *cbdata, int prio=0)
absl::Status RemoveCbMessage (void(XPRS_CC *cb)(XPRSprob, void *, char const *, int, int), void *cbdata=nullptr)
absl::Status AddCbChecktime (int(XPRS_CC *cb)(XPRSprob, void *), void *cbdata, int prio=0)
absl::Status RemoveCbChecktime (int(XPRS_CC *cb)(XPRSprob, void *), void *cbdata=nullptr)
absl::StatusOr< std::vector< double > > GetVarLb () const
absl::StatusOr< std::vector< double > > GetVarUb () const
absl::Status Interrupt (int reason)
absl::StatusOr< bool > IsMIP () const
absl::Status GetDuals (int *p_status, std::optional< absl::Span< double > > const &duals, int first, int last)
absl::Status GetSolution (int *p_status, std::optional< absl::Span< double > > const &x, int first, int last)
absl::Status GetRedCosts (int *p_status, std::optional< absl::Span< double > > const &dj, int first, int last)
absl::Status AddMIPSol (absl::Span< double const > vals, absl::Span< int const > colind, char const *name=nullptr)
absl::Status LoadDelayedRows (absl::Span< int const > rows)
absl::Status LoadDirs (absl::Span< int const > cols, std::optional< absl::Span< int const > > const &prio, std::optional< absl::Span< char const > > const &dir, std::optional< absl::Span< double const > > const &up, std::optional< absl::Span< double const > > const &down)
absl::Status SetObjectiveIntControl (int obj, int control, int value)
absl::Status SetObjectiveDoubleControl (int obj, int control, double value)
absl::StatusOr< int > AddObjective (double constant, int ncols, absl::Span< int const > colind, absl::Span< double const > objcoef, int priority, double weight)
absl::StatusOr< double > CalculateObjectiveN (int objidx, double const *solution)
absl::Status AddSets (absl::Span< char const > settype, absl::Span< XPRSint64 const > start, absl::Span< int const > colind, absl::Span< double const > refval)
absl::Status SetIndicators (absl::Span< int const > rowind, absl::Span< int const > colind, absl::Span< int const > complement)
absl::Status AddRows (absl::Span< char const > rowtype, absl::Span< double const > rhs, absl::Span< double const > rng, absl::Span< XPRSint64 const > start, absl::Span< int const > colind, absl::Span< double const > rowcoef)
absl::Status AddQRow (char sense, double rhs, double rng, absl::Span< int const > colind, absl::Span< double const > rowcoef, absl::Span< int const > qcol1, absl::Span< int const > qcol2, absl::Span< double const > qcoef)
absl::Status WriteProb (std::string const &filename, std::string const &flags="")
absl::Status SaveAs (std::string const &filename)

Static Public Member Functions

static absl::StatusOr< std::unique_ptr< Xpress > > New (absl::string_view model_name)

Constructor & Destructor Documentation

◆ Xpress()

operations_research::math_opt::Xpress::Xpress ( )
delete

◆ ~Xpress()

operations_research::math_opt::Xpress::~Xpress ( )

Definition at line 106 of file g_xpress.cc.

Member Function Documentation

◆ AddCbChecktime()

absl::Status operations_research::math_opt::Xpress::AddCbChecktime ( int(XPRS_CC *cb)(XPRSprob, void *) ,
void * cbdata,
int prio = 0 )

Definition at line 96 of file g_xpress.cc.

◆ AddCbMessage()

absl::Status operations_research::math_opt::Xpress::AddCbMessage ( void(XPRS_CC *cb)(XPRSprob, void *, char const *, int, int) ,
void * cbdata,
int prio = 0 )

Definition at line 84 of file g_xpress.cc.

◆ AddConstrs() [1/2]

absl::Status operations_research::math_opt::Xpress::AddConstrs ( absl::Span< const char > rowtype,
absl::Span< const double > rhs,
absl::Span< const double > rng,
absl::Span< const int > start,
absl::Span< const int > colind,
absl::Span< const double > rowcoef )

Definition at line 194 of file g_xpress.cc.

◆ AddConstrs() [2/2]

absl::Status operations_research::math_opt::Xpress::AddConstrs ( absl::Span< const char > sense,
absl::Span< const double > rhs,
absl::Span< const double > rng )

Definition at line 181 of file g_xpress.cc.

◆ AddMIPSol()

absl::Status operations_research::math_opt::Xpress::AddMIPSol ( absl::Span< double const > vals,
absl::Span< int const > colind,
char const * name = nullptr )

Add a mip start that is specified in the original space, i.e., in terms of ortools variables.

Definition at line 446 of file g_xpress.cc.

◆ AddNames()

absl::Status operations_research::math_opt::Xpress::AddNames ( int type,
absl::Span< const char > names,
int first,
int last )

Definition at line 118 of file g_xpress.cc.

◆ AddObjective()

absl::StatusOr< int > operations_research::math_opt::Xpress::AddObjective ( double constant,
int ncols,
absl::Span< int const > colind,
absl::Span< double const > objcoef,
int priority,
double weight )

Definition at line 485 of file g_xpress.cc.

◆ AddQRow()

absl::Status operations_research::math_opt::Xpress::AddQRow ( char sense,
double rhs,
double rng,
absl::Span< int const > colind,
absl::Span< double const > rowcoef,
absl::Span< int const > qcol1,
absl::Span< int const > qcol2,
absl::Span< double const > qcoef )

Definition at line 574 of file g_xpress.cc.

◆ AddRows()

absl::Status operations_research::math_opt::Xpress::AddRows ( absl::Span< char const > rowtype,
absl::Span< double const > rhs,
absl::Span< double const > rng,
absl::Span< XPRSint64 const > start,
absl::Span< int const > colind,
absl::Span< double const > rowcoef )

Definition at line 553 of file g_xpress.cc.

◆ AddSets()

absl::Status operations_research::math_opt::Xpress::AddSets ( absl::Span< char const > settype,
absl::Span< XPRSint64 const > start,
absl::Span< int const > colind,
absl::Span< double const > refval )

Definition at line 520 of file g_xpress.cc.

◆ AddVars()

absl::Status operations_research::math_opt::Xpress::AddVars ( std::size_t count,
absl::Span< const double > obj,
absl::Span< const double > lb,
absl::Span< const double > ub,
absl::Span< const char > vtype )

Definition at line 128 of file g_xpress.cc.

◆ CalculateObjectiveN()

absl::StatusOr< double > operations_research::math_opt::Xpress::CalculateObjectiveN ( int objidx,
double const * solution )

Definition at line 510 of file g_xpress.cc.

◆ ChgBounds()

absl::Status operations_research::math_opt::Xpress::ChgBounds ( absl::Span< int const > colind,
absl::Span< char const > bndtype,
absl::Span< double const > bndval )

Definition at line 619 of file g_xpress.cc.

◆ ChgCoeffs()

absl::Status operations_research::math_opt::Xpress::ChgCoeffs ( absl::Span< const int > rowind,
absl::Span< const int > colind,
absl::Span< const double > values )

Definition at line 244 of file g_xpress.cc.

◆ ChgColType()

absl::Status operations_research::math_opt::Xpress::ChgColType ( absl::Span< int const > colind,
absl::Span< char const > coltype )

Definition at line 630 of file g_xpress.cc.

◆ GetBasis()

absl::Status operations_research::math_opt::Xpress::GetBasis ( std::vector< int > & rowBasis,
std::vector< int > & colBasis ) const

Definition at line 373 of file g_xpress.cc.

◆ GetColType()

absl::Status operations_research::math_opt::Xpress::GetColType ( absl::Span< char > ctype,
int first,
int last )

Definition at line 615 of file g_xpress.cc.

◆ GetControlInfo()

absl::Status operations_research::math_opt::Xpress::GetControlInfo ( char const * name,
int * p_id,
int * p_type ) const

Definition at line 275 of file g_xpress.cc.

◆ GetDblControl()

absl::StatusOr< double > operations_research::math_opt::Xpress::GetDblControl ( int control) const

Definition at line 313 of file g_xpress.cc.

◆ GetDoubleAttr()

absl::StatusOr< double > operations_research::math_opt::Xpress::GetDoubleAttr ( int attribute) const

Definition at line 347 of file g_xpress.cc.

◆ GetDuals()

absl::Status operations_research::math_opt::Xpress::GetDuals ( int * p_status,
std::optional< absl::Span< double > > const & duals,
int first,
int last )

Definition at line 424 of file g_xpress.cc.

◆ GetDualStatus()

absl::StatusOr< int > operations_research::math_opt::Xpress::GetDualStatus ( ) const

Definition at line 363 of file g_xpress.cc.

◆ GetIntAttr()

absl::StatusOr< int > operations_research::math_opt::Xpress::GetIntAttr ( int attribute) const

Definition at line 340 of file g_xpress.cc.

◆ GetIntControl()

absl::StatusOr< int > operations_research::math_opt::Xpress::GetIntControl ( int control) const

Definition at line 280 of file g_xpress.cc.

◆ GetIntControl64()

absl::StatusOr< int64_t > operations_research::math_opt::Xpress::GetIntControl64 ( int control) const

Definition at line 301 of file g_xpress.cc.

◆ GetLB()

absl::Status operations_research::math_opt::Xpress::GetLB ( absl::Span< double > lb,
int first,
int last )

Definition at line 609 of file g_xpress.cc.

◆ GetLpSol()

absl::Status operations_research::math_opt::Xpress::GetLpSol ( absl::Span< double > primals,
absl::Span< double > duals,
absl::Span< double > reducedCosts )

Definition at line 256 of file g_xpress.cc.

◆ GetObjectiveDoubleAttr()

absl::StatusOr< double > operations_research::math_opt::Xpress::GetObjectiveDoubleAttr ( int objidx,
int attribute ) const

Definition at line 354 of file g_xpress.cc.

◆ GetRedCosts()

absl::Status operations_research::math_opt::Xpress::GetRedCosts ( int * p_status,
std::optional< absl::Span< double > > const & dj,
int first,
int last )

Definition at line 436 of file g_xpress.cc.

◆ GetSolution()

absl::Status operations_research::math_opt::Xpress::GetSolution ( int * p_status,
std::optional< absl::Span< double > > const & x,
int first,
int last )

Definition at line 430 of file g_xpress.cc.

◆ GetStrControl()

absl::StatusOr< std::string > operations_research::math_opt::Xpress::GetStrControl ( int control) const

Definition at line 324 of file g_xpress.cc.

◆ GetUB()

absl::Status operations_research::math_opt::Xpress::GetUB ( absl::Span< double > ub,
int first,
int last )

Definition at line 612 of file g_xpress.cc.

◆ GetVarLb()

absl::StatusOr< std::vector< double > > operations_research::math_opt::Xpress::GetVarLb ( ) const

Definition at line 393 of file g_xpress.cc.

◆ GetVarUb()

absl::StatusOr< std::vector< double > > operations_research::math_opt::Xpress::GetVarUb ( ) const

Definition at line 402 of file g_xpress.cc.

◆ Interrupt()

absl::Status operations_research::math_opt::Xpress::Interrupt ( int reason)

Definition at line 412 of file g_xpress.cc.

◆ IsMIP()

absl::StatusOr< bool > operations_research::math_opt::Xpress::IsMIP ( ) const

Definition at line 416 of file g_xpress.cc.

◆ LoadDelayedRows()

absl::Status operations_research::math_opt::Xpress::LoadDelayedRows ( absl::Span< int const > rows)

Definition at line 458 of file g_xpress.cc.

◆ LoadDirs()

absl::Status operations_research::math_opt::Xpress::LoadDirs ( absl::Span< int const > cols,
std::optional< absl::Span< int const > > const & prio,
std::optional< absl::Span< char const > > const & dir,
std::optional< absl::Span< double const > > const & up,
std::optional< absl::Span< double const > > const & down )

Definition at line 465 of file g_xpress.cc.

◆ LpOptimize()

absl::Status operations_research::math_opt::Xpress::LpOptimize ( std::string flags)

Definition at line 252 of file g_xpress.cc.

◆ New()

absl::StatusOr< std::unique_ptr< Xpress > > operations_research::math_opt::Xpress::New ( absl::string_view model_name)
static

Definition at line 67 of file g_xpress.cc.

◆ Optimize()

absl::Status operations_research::math_opt::Xpress::Optimize ( std::string const & flags = "",
int * p_solvestatus = nullptr,
int * p_solstatus = nullptr )

Definition at line 267 of file g_xpress.cc.

◆ PostSolve()

absl::Status operations_research::math_opt::Xpress::PostSolve ( )

Definition at line 263 of file g_xpress.cc.

◆ RemoveCbChecktime()

absl::Status operations_research::math_opt::Xpress::RemoveCbChecktime ( int(XPRS_CC *cb)(XPRSprob, void *) ,
void * cbdata = nullptr )

Definition at line 101 of file g_xpress.cc.

◆ RemoveCbMessage()

absl::Status operations_research::math_opt::Xpress::RemoveCbMessage ( void(XPRS_CC *cb)(XPRSprob, void *, char const *, int, int) ,
void * cbdata = nullptr )

Definition at line 90 of file g_xpress.cc.

◆ ResetIntControl()

absl::Status operations_research::math_opt::Xpress::ResetIntControl ( int control)

Definition at line 291 of file g_xpress.cc.

◆ SaveAs()

absl::Status operations_research::math_opt::Xpress::SaveAs ( std::string const & filename)

Definition at line 605 of file g_xpress.cc.

◆ SetDblControl()

absl::Status operations_research::math_opt::Xpress::SetDblControl ( int control,
double value )

Definition at line 320 of file g_xpress.cc.

◆ SetIndicators()

absl::Status operations_research::math_opt::Xpress::SetIndicators ( absl::Span< int const > rowind,
absl::Span< int const > colind,
absl::Span< int const > complement )

Definition at line 535 of file g_xpress.cc.

◆ SetIntControl()

absl::Status operations_research::math_opt::Xpress::SetIntControl ( int control,
int value )

Definition at line 287 of file g_xpress.cc.

◆ SetIntControl64()

absl::Status operations_research::math_opt::Xpress::SetIntControl64 ( int control,
int64_t value )

Definition at line 309 of file g_xpress.cc.

◆ SetLinearObjective()

absl::Status operations_research::math_opt::Xpress::SetLinearObjective ( double constant,
absl::Span< const int > col_index,
absl::Span< const double > obj_coeffs )

Definition at line 223 of file g_xpress.cc.

◆ SetObjectiveDoubleControl()

absl::Status operations_research::math_opt::Xpress::SetObjectiveDoubleControl ( int obj,
int control,
double value )

Definition at line 481 of file g_xpress.cc.

◆ SetObjectiveIntControl()

absl::Status operations_research::math_opt::Xpress::SetObjectiveIntControl ( int obj,
int control,
int value )

Definition at line 478 of file g_xpress.cc.

◆ SetObjectiveSense()

absl::Status operations_research::math_opt::Xpress::SetObjectiveSense ( bool maximize)

Definition at line 218 of file g_xpress.cc.

◆ SetProbName()

absl::Status operations_research::math_opt::Xpress::SetProbName ( absl::string_view name)

Definition at line 75 of file g_xpress.cc.

◆ SetQuadraticObjective()

absl::Status operations_research::math_opt::Xpress::SetQuadraticObjective ( absl::Span< const int > colind1,
absl::Span< const int > colind2,
absl::Span< const double > coefficients )

Definition at line 236 of file g_xpress.cc.

◆ SetStartingBasis()

absl::Status operations_research::math_opt::Xpress::SetStartingBasis ( std::vector< int > & rowBasis,
std::vector< int > & colBasis ) const

Definition at line 383 of file g_xpress.cc.

◆ SetStrControl()

absl::Status operations_research::math_opt::Xpress::SetStrControl ( int control,
std::string const & value )

Definition at line 336 of file g_xpress.cc.

◆ Terminate()

void operations_research::math_opt::Xpress::Terminate ( )

Definition at line 273 of file g_xpress.cc.

◆ WriteProb()

absl::Status operations_research::math_opt::Xpress::WriteProb ( std::string const & filename,
std::string const & flags = "" )

Definition at line 599 of file g_xpress.cc.


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