XPRSProblem
Xpress solver problem. More...
#include <xpress.hpp>

Classes |
|
class | AbstractUserFunction |
Base class for user functions. More... |
|
class | Attributes |
Attributes API. More... |
|
class | Controls |
Controls API. More... |
|
class | GeneralConstraintInfo |
Return value for getGenCons(int, int) . More... |
|
class | IISData |
Return value for getIISData(int) ;. More... |
|
class | IISStatusInfo |
Return value for IISStatus() . More... |
|
class | MapDeltaFunction |
An R -> R function that also provides the derivative. More... |
|
class | MapFunction |
An R -> R function. More... |
|
class | MatrixInfo |
Return value for getCols(int, int) , getRows(int, int) , getMQObj(int, int) . More... |
|
class | MIPEntityInfo |
Return value for getMipEntities() , getDiscreteCols() , getSetDefinitions() . More... |
|
class | MultiMapDeltaFunction |
An R^n -> R^m function that also provides partial derivatives. More... |
|
class | MultiMapFunction |
An R^n -> R^m function. More... |
|
class | RowInfo |
Sparse row information. More... |
|
class | Solution |
Solution data. More... |
|
class | StatusSolution |
Solution information that also contains a status value. More... |
|
class | VecMapDeltaFunction |
An R^n -> R function that also provides partial derivatives. More... |
|
class | VecMapFunction |
An R^n -> R function. More... |
|
Public Member Functions |
|
XPRSProblem (bool) | |
Create a new instance without allocating a license. |
|
XPRSProblem (char const *name=nullptr, char const *licpath=nullptr) | |
Create a new instance with name and allocating a license. |
|
auto | addAfterObjectiveCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add an afterobjective callback. |
|
auto | addBarIterationCallback (std::function< void(XPRSProblem &, int *)> callback, int prio=0) -> CallbackHandle |
Add a bariteration callback. |
|
auto | addBarlogCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a barlog callback. |
|
auto | addBeforeObjectiveCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a beforeobjective callback. |
|
auto | addBeforeSolveCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a beforesolve callback. |
|
auto | addChangeBranchObjectCallback (std::function< void(XPRSProblem &, BranchObject *, BranchObject **)> callback, int prio=0) -> CallbackHandle |
Add a changebranchobject callback. |
|
auto | addCheckTimeCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a checktime callback. |
|
void | addCols (int ncols, int ncoefs, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub) |
Adds columns to the optimizer matrix. |
|
void | addCols (int ncols, XPRSint64 ncoefs, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub) |
Adds columns to the optimizer matrix. |
|
auto | addColumn (double lb, double ub, ColumnType type, std::optional< std::string > name) -> int |
Add a single column to this problem. |
|
template<typename Coll0 , typename K1 = typename Coll0::value_type, typename Coll0IsCollection = typename std::enable_if<xpress::is_collection<Coll0>::value>::type> | |
auto | addColumns (Coll0 const &coll1) -> VariableBuilder::ColumnMapBuilder< K1 > |
Create an 1-dimensional map of columns. |
|
template<typename Coll0 , typename Coll1 , typename K1 = typename Coll0::value_type, typename K2 = typename Coll1::value_type, typename Coll0IsCollection = typename std::enable_if<xpress::is_collection<Coll0>::value>::type, typename Coll1IsCollection = typename std::enable_if<xpress::is_collection<Coll1>::value>::type> | |
auto | addColumns (Coll0 const &coll1, Coll1 const &coll2) -> VariableBuilder::ColumnMap2Builder< K1, K2 > |
Create an 2-dimensional map of columns. |
|
template<typename Coll0 , typename Coll1 , typename Coll2 , typename K1 = typename Coll0::value_type, typename K2 = typename Coll1::value_type, typename K3 = typename Coll2::value_type, typename Coll0IsCollection = typename std::enable_if<xpress::is_collection<Coll0>::value>::type, typename Coll1IsCollection = typename std::enable_if<xpress::is_collection<Coll1>::value>::type, typename Coll2IsCollection = typename std::enable_if<xpress::is_collection<Coll2>::value>::type> | |
auto | addColumns (Coll0 const &coll1, Coll1 const &coll2, Coll2 const &coll3) -> VariableBuilder::ColumnMap3Builder< K1, K2, K3 > |
Create an 3-dimensional map of columns. |
|
template<typename Coll0 , typename Coll1 , typename Coll2 , typename Coll3 , typename K1 = typename Coll0::value_type, typename K2 = typename Coll1::value_type, typename K3 = typename Coll2::value_type, typename K4 = typename Coll3::value_type, typename Coll0IsCollection = typename std::enable_if<xpress::is_collection<Coll0>::value>::type, typename Coll1IsCollection = typename std::enable_if<xpress::is_collection<Coll1>::value>::type, typename Coll2IsCollection = typename std::enable_if<xpress::is_collection<Coll2>::value>::type, typename Coll3IsCollection = typename std::enable_if<xpress::is_collection<Coll3>::value>::type> | |
auto | addColumns (Coll0 const &coll1, Coll1 const &coll2, Coll2 const &coll3, Coll3 const &coll4) -> VariableBuilder::ColumnMap4Builder< K1, K2, K3, K4 > |
Create an 4-dimensional map of columns. |
|
template<typename Coll0 , typename Coll1 , typename Coll2 , typename Coll3 , typename Coll4 , typename K1 = typename Coll0::value_type, typename K2 = typename Coll1::value_type, typename K3 = typename Coll2::value_type, typename K4 = typename Coll3::value_type, typename K5 = typename Coll4::value_type, typename Coll0IsCollection = typename std::enable_if<xpress::is_collection<Coll0>::value>::type, typename Coll1IsCollection = typename std::enable_if<xpress::is_collection<Coll1>::value>::type, typename Coll2IsCollection = typename std::enable_if<xpress::is_collection<Coll2>::value>::type, typename Coll3IsCollection = typename std::enable_if<xpress::is_collection<Coll3>::value>::type, typename Coll4IsCollection = typename std::enable_if<xpress::is_collection<Coll4>::value>::type> | |
auto | addColumns (Coll0 const &coll1, Coll1 const &coll2, Coll2 const &coll3, Coll3 const &coll4, Coll4 const &coll5) -> VariableBuilder::ColumnMap5Builder< K1, K2, K3, K4, K5 > |
Create an 5-dimensional map of columns. |
|
auto | addColumns (int dim) -> VariableBuilder::ColumnArrayBuilder |
Create an 1-dimensional array of columns. |
|
auto | addColumns (int dim1, int dim2) -> VariableBuilder::ColumnArray2Builder |
Create an 2-dimensional array of columns. |
|
auto | addColumns (int dim1, int dim2, int dim3) -> VariableBuilder::ColumnArray3Builder |
Create an 3-dimensional array of columns. |
|
auto | addColumns (int dim1, int dim2, int dim3, int dim4) -> VariableBuilder::ColumnArray4Builder |
Create an 4-dimensional array of columns. |
|
auto | addColumns (int dim1, int dim2, int dim3, int dim4, int dim5) -> VariableBuilder::ColumnArray5Builder |
Create an 5-dimensional array of columns. |
|
template<typename K1 > | |
auto | addColumns (xpress::SizedArray< K1 const > const &arr1) -> VariableBuilder::ColumnMapBuilder< K1 > |
Create an 1-dimensional map of columns. |
|
template<typename K1 , typename K2 > | |
auto | addColumns (xpress::SizedArray< K1 const > const &arr1, xpress::SizedArray< K2 const > const &arr2) -> VariableBuilder::ColumnMap2Builder< K1, K2 > |
Create an 2-dimensional map of columns. |
|
template<typename K1 , typename K2 , typename K3 > | |
auto | addColumns (xpress::SizedArray< K1 const > const &arr1, xpress::SizedArray< K2 const > const &arr2, xpress::SizedArray< K3 const > const &arr3) -> VariableBuilder::ColumnMap3Builder< K1, K2, K3 > |
Create an 3-dimensional map of columns. |
|
template<typename K1 , typename K2 , typename K3 , typename K4 > | |
auto | addColumns (xpress::SizedArray< K1 const > const &arr1, xpress::SizedArray< K2 const > const &arr2, xpress::SizedArray< K3 const > const &arr3, xpress::SizedArray< K4 const > const &arr4) -> VariableBuilder::ColumnMap4Builder< K1, K2, K3, K4 > |
Create an 4-dimensional map of columns. |
|
template<typename K1 , typename K2 , typename K3 , typename K4 , typename K5 > | |
auto | addColumns (xpress::SizedArray< K1 const > const &arr1, xpress::SizedArray< K2 const > const &arr2, xpress::SizedArray< K3 const > const &arr3, xpress::SizedArray< K4 const > const &arr4, xpress::SizedArray< K5 const > const &arr5) -> VariableBuilder::ColumnMap5Builder< K1, K2, K3, K4, K5 > |
Create an 5-dimensional map of columns. |
|
auto | addComputeRestartCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a computerestart callback. |
|
auto | addCut (int cuttype, RowInfo cut) -> void |
Add a single cut to the problem. |
|
auto | addCut (int cuttype, xpress::SizedArray< int const > const &colind, xpress::SizedArray< double const > const &colval, char rowtype, double rhs) -> void |
Add a single cut to the problem. |
|
auto | addCutlogCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a cutlog callback. |
|
void | addCuts (int ncuts, Array< int const > const &cuttype, Array< char const > const &rowtype, Array< double const > const &rhs, Array< int const > const &start, Array< int const > const &colind, Array< double const > const &cutcoef) |
Adds cuts directly to the matrix at the current node. |
|
void | addCuts (int ncuts, Array< int const > const &cuttype, Array< char const > const &rowtype, Array< double const > const &rhs, Array< XPRSint64 const > const &start, Array< int const > const &colind, Array< double const > const &cutcoef) |
Adds cuts directly to the matrix at the current node. |
|
auto | addGapNotifyCallback (std::function< void(XPRSProblem &, double *, double *, double *, double *)> callback, int prio=0) -> CallbackHandle |
Add a gapnotify callback. |
|
void | addGenCons (int ncons, int ncols, int nvals, Array< GenConsType const > const &contype, Array< int const > const &resultant, Array< int const > const &colstart, Array< int const > const &colind, Array< int const > const &valstart, Array< double const > const &val) |
Adds one or more general constraints to the problem. |
|
void | addGenCons (int ncons, XPRSint64 ncols, XPRSint64 nvals, Array< GenConsType const > const &contype, Array< int const > const &resultant, Array< XPRSint64 const > const &colstart, Array< int const > const &colind, Array< XPRSint64 const > const &valstart, Array< double const > const &val) |
Adds one or more general constraints to the problem. |
|
auto | addInfnodeCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add an infnode callback. |
|
auto | addIntsolCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add an intsol callback. |
|
auto | addLplogCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a lplog callback. |
|
auto | addMessageCallback (std::function< void(XPRSProblem &, char const *, int, int)> callback, int prio=0) -> CallbackHandle |
Add a message callback. |
|
auto | addMiplogCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a miplog callback. |
|
void | addMipSol (int length, Array< double const > const &solval, Array< int const > const &colind, std::optional< std::string > const &name) |
Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer. |
|
auto | addMipSol (xpress::SizedArray< double const > const &val, xpress::SizedArray< int const > const &ind) -> void |
Add a MIP solution. |
|
auto | addMipSol (xpress::SizedArray< double const > const &val, xpress::SizedArray< int const > const &ind, std::optional< std::string > name) -> void |
Add a MIP solution. |
|
auto | addMipThreadCallback (std::function< void(XPRSProblem &, XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a mipthread callback. |
|
auto | addMipThreadDestroyCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a mipthreaddestroy callback. |
|
auto | addMsJobEndCallback (std::function< int(XPRSProblem &, void *, char const *, int *)> callback, int prio=0) -> CallbackHandle |
Add a msjobend callback. |
|
auto | addMsJobStartCallback (std::function< int(XPRSProblem &, void *, char const *, int *)> callback, int prio=0) -> CallbackHandle |
Add a msjobstart callback. |
|
auto | addMsWinnerCallback (std::function< int(XPRSProblem &, void *, char const *)> callback, int prio=0) -> CallbackHandle |
Add a mswinner callback. |
|
void | addNames (int type, Array< std::string const > const &names, int first, int last) |
When a model is loaded, the rows, columns, sets, piecewise linear and general constraints of the model may not have names associated with them. |
|
auto | addNames (xpress::Namespaces type, xpress::SizedArray< std::optional< std::string > const > const &names, int first, int last) -> void |
Add names to model. |
|
auto | addNewnodeCallback (std::function< void(XPRSProblem &, int, int, int)> callback, int prio=0) -> CallbackHandle |
Add a newnode callback. |
|
auto | addNlpCoefEvalErrorCallback (std::function< int(XPRSProblem &, int, int)> callback, int prio=0) -> CallbackHandle |
Add a nlpcoefevalerror callback. |
|
auto | addNodecutoffCallback (std::function< void(XPRSProblem &, int)> callback, int prio=0) -> CallbackHandle |
Add a nodecutoff callback. |
|
auto | addNodeLPSolvedCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a nodelpsolved callback. |
|
void | addObj (int ncols, Array< int const > const &colind, Array< double const > const &objcoef, int priority, double weight) |
Appends an objective function with the given coefficients to a multi-objective problem. |
|
auto | addOptnodeCallback (std::function< void(XPRSProblem &, int *)> callback, int prio=0) -> CallbackHandle |
Add an optnode callback. |
|
auto | addPreIntsolCallback (std::function< void(XPRSProblem &, int, int *, double *)> callback, int prio=0) -> CallbackHandle |
Add a preintsol callback. |
|
auto | addPrenodeCallback (std::function< void(XPRSProblem &, int *)> callback, int prio=0) -> CallbackHandle |
Add a prenode callback. |
|
auto | addPresolveCallback (std::function< void(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a presolve callback. |
|
void | addPwlCons (int npwls, int npoints, Array< int const > const &colind, Array< int const > const &resultant, Array< int const > const &start, Array< double const > const &xval, Array< double const > const &yval) |
Adds one or more piecewise linear constraints to the problem. |
|
void | addPwlCons (int npwls, XPRSint64 npoints, Array< int const > const &colind, Array< int const > const &resultant, Array< XPRSint64 const > const &start, Array< double const > const &xval, Array< double const > const &yval) |
Adds one or more piecewise linear constraints to the problem. |
|
void | addQMatrix (int row, int ncoefs, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef) |
Adds a new quadratic matrix into a row defined by triplets. |
|
void | addQMatrix (int row, XPRSint64 ncoefs, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef) |
Adds a new quadratic matrix into a row defined by triplets. |
|
auto | addRow (RowInfo row) -> int |
Add a single row to the problem. |
|
auto | addRow (RowInfo row, std::optional< std::string > name) -> int |
Add a single row to the problem. |
|
auto | addRow (xpress::SizedArray< int const > const &colind, xpress::SizedArray< double const > const &colval, char rowtype, double rhs) -> int |
Add a single row to the problem. |
|
auto | addRow (xpress::SizedArray< int const > const &colind, xpress::SizedArray< double const > const &colval, char rowtype, double rhs, double rng, std::optional< std::string > name) -> int |
Add a single row to the problem. |
|
auto | addRow (xpress::SizedArray< int const > const &colind, xpress::SizedArray< double const > const &colval, char rowtype, double rhs, std::optional< std::string > name) -> int |
Add a single row to the problem. |
|
void | addRows (int nrows, int ncoefs, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< int const > const &start, Array< int const > const &colind, Array< double const > const &rowcoef) |
Adds rows to the optimizer matrix. |
|
void | addRows (int nrows, int ncoefs, Array< char const > const &rowtype, Array< double const > const &rhs, Array< int const > const &start, Array< int const > const &colind, Array< double const > const &rowcoef) |
Adds rows to the optimizer matrix. |
|
void | addRows (int nrows, XPRSint64 ncoefs, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< XPRSint64 const > const &start, Array< int const > const &colind, Array< double const > const &rowcoef) |
Adds rows to the optimizer matrix. |
|
void | addRows (int nrows, XPRSint64 ncoefs, Array< char const > const &rowtype, Array< double const > const &rhs, Array< XPRSint64 const > const &start, Array< int const > const &colind, Array< double const > const &rowcoef) |
Adds rows to the optimizer matrix. |
|
auto | addSet (xpress::SetType type, xpress::SizedArray< int const > const &elements, xpress::SizedArray< double const > const &weights, std::optional< std::string > name) -> int |
Add a single set constraint to this problem. |
|
void | addSetNames (Array< std::string const > const &names, int first, int last) |
When a model with MIP entities is loaded, any special ordered sets may not have names associated with them. |
|
auto | addSets (int count, xpress::SizedArray< int const > const &start, xpress::SizedArray< SetType const > const &type, xpress::SizedArray< int const > const &setind, xpress::SizedArray< double const > const &setref, xpress::SizedArray< std::optional< std::string > const > const &names) -> std::vector< int > |
Create multiple set constraints. |
|
void | addSets (int nsets, int nelems, Array< char const > const &settype, Array< int const > const &start, Array< int const > const &colind, Array< double const > const &refval) |
Allows sets to be added to the problem after passing it to the Optimizer using the input routines. |
|
void | addSets (int nsets, XPRSint64 nelems, Array< char const > const &settype, Array< XPRSint64 const > const &start, Array< int const > const &colind, Array< double const > const &refval) |
Allows sets to be added to the problem after passing it to the Optimizer using the input routines. |
|
auto | addSets (std::vector< xpress::SetType > type, xpress::SizedArray< std::vector< int > > const &elements, xpress::SizedArray< std::vector< double > > const &weights, xpress::SizedArray< std::optional< std::string > const > const &name) -> std::vector< int > |
Add multiple set constraints to the problem. |
|
auto | addSlpCascadeEndCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpcascadeend callback. |
|
auto | addSlpCascadeStartCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpcascadestart callback. |
|
auto | addSlpCascadeVarCallback (std::function< int(XPRSProblem &, int)> callback, int prio=0) -> CallbackHandle |
Add a slpcascadevar callback. |
|
auto | addSlpCascadeVarFailCallback (std::function< int(XPRSProblem &, int)> callback, int prio=0) -> CallbackHandle |
Add a slpcascadevarfail callback. |
|
auto | addSlpConstructCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpconstruct callback. |
|
auto | addSlpDrColCallback (std::function< int(XPRSProblem &, int, int, double, double *, double, double)> callback, int prio=0) -> CallbackHandle |
Add a slpdrcol callback. |
|
auto | addSlpIntSolCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpintsol callback. |
|
auto | addSlpIterEndCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpiterend callback. |
|
auto | addSlpIterStartCallback (std::function< int(XPRSProblem &)> callback, int prio=0) -> CallbackHandle |
Add a slpiterstart callback. |
|
auto | addSlpIterVarCallback (std::function< int(XPRSProblem &, int)> callback, int prio=0) -> CallbackHandle |
Add a slpitervar callback. |
|
auto | addSlpPreUpdateLinearizationCallback (std::function< int(XPRSProblem &, int *)> callback, int prio=0) -> CallbackHandle |
Add a slppreupdatelinearization callback. |
|
auto | addUserSolNotifyCallback (std::function< void(XPRSProblem &, char const *, int)> callback, int prio=0) -> CallbackHandle |
Add an usersolnotify callback. |
|
void | alter (std::optional< std::string > const &filename) |
Alters or changes matrix elements, right hand sides and constraint senses in the current problem. |
|
auto | basisStability (int type, int norm, int scaled) -> double |
Calculates various measures for the stability of the current basis, including the basis condition number. |
|
void | bndSA (int ncols, Array< int const > const &colind, Array< double > const &lblower, Array< double > const &lbupper, Array< double > const &ublower, Array< double > const &ubupper) |
Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds. |
|
void | bTran (Array< double > const &vec) |
Post-multiplies a (row) vector provided by the user by the inverse of the current basis. |
|
auto | calcObjective (Array< double const > const &solution) -> double |
Calculates the objective value of a given solution. |
|
auto | calcObjN (int objidx, Array< double const > const &solution) -> double |
Calculates the objective value of the given objective function in a multi-objective problem. |
|
auto | calcReducedCosts (Array< double const > const &duals, Array< double const > const &solution) -> std::vector< double > |
Calculates the reduced cost values for a given (row) dual solution. |
|
auto | calcSlacks (Array< double const > const &solution) -> std::vector< double > |
Calculates the row slack values for a given solution. |
|
auto | calcSolInfo (Array< double const > const &solution, Array< double const > const &duals, int property) -> double |
Calculates the required property of a solution, like maximum infeasibility of a given primal and dual solution. |
|
auto | chgBounds (int j, double lb, double ub) -> void |
Change bounds of a single column. |
|
void | chgBounds (int nbounds, Array< int const > const &colind, Array< char const > const &bndtype, Array< double const > const &bndval) |
Used to change the bounds on columns in the matrix. |
|
void | chgCoef (int row, int col, double coef) |
Used to change a single coefficient in the matrix. |
|
void | chgColType (int ncols, Array< int const > const &colind, Array< char const > const &coltype) |
Used to change the type of a specified set of columns in the matrix. |
|
void | chgGlbLimit (int ncols, Array< int const > const &colind, Array< double const > const &limit) |
Used to change semi-continuous or semi-integer lower bounds, or upper limits on partial integers. |
|
auto | chgLB (int j, double lb) -> void |
Change the lower bound of a single column. |
|
void | chgMCoef (int ncoefs, Array< int const > const &rowind, Array< int const > const &colind, Array< double const > const &rowcoef) |
Used to change multiple coefficients in the matrix. |
|
void | chgMCoef (XPRSint64 ncoefs, Array< int const > const &rowind, Array< int const > const &colind, Array< double const > const &rowcoef) |
Used to change multiple coefficients in the matrix. |
|
void | chgMQObj (int ncoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef) |
Used to change multiple quadratic coefficients in the objective function. |
|
void | chgMQObj (XPRSint64 ncoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef) |
Used to change multiple quadratic coefficients in the objective function. |
|
void | chgObj (int ncols, Array< int const > const &colind, Array< double const > const &objcoef) |
Used to change the objective function coefficients. |
|
void | chgObjN (int objidx, int ncols, Array< int const > const &colind, Array< double const > const &objcoef) |
Modifies one or more coefficients of an objective function in a multi-objective problem. |
|
void | chgObjSense (ObjSense objsense) |
Changes the problem's objective function sense to minimize or maximize. |
|
void | chgQObj (int objqcol1, int objqcol2, double objqcoef) |
Used to change a single quadratic coefficient in the objective function corresponding to the variable pair (objqcol1,objqcol2) of the Hessian matrix. |
|
void | chgQRowCoeff (int row, int rowqcol1, int rowqcol2, double rowqcoef) |
Changes a single quadratic coefficient in a row. |
|
void | chgRhs (int nrows, Array< int const > const &rowind, Array< double const > const &rhs) |
Used to change right—hand side values of the problem. |
|
void | chgRhsRange (int nrows, Array< int const > const &rowind, Array< double const > const &rng) |
Used to change the range for a row of the problem matrix. |
|
void | chgRowType (int nrows, Array< int const > const &rowind, Array< char const > const &rowtype) |
Used to change the type of a row in the matrix. |
|
auto | chgUB (int j, double ub) -> void |
Change the upper bound of a single column. |
|
void | clearIIS () |
Resets the search for Irreducible Infeasible Sets (IIS). |
|
auto | clearObjective () -> void |
Clear the objective function. |
|
void | clearRowFlags (Array< int const > const &flags, int first, int last) |
Clears extra information attached to a range of rows. |
|
void | copyControls (XPRSProblem const &src) |
Copies controls defined for one problem to another. |
|
void | copyProb (XPRSProblem const &src, std::optional< std::string > const &name) |
Copies information defined for one problem to another. |
|
auto | crossoverLpSol () -> int |
Provides a basic optimal solution for a given solution of an LP problem. |
|
virtual void | delCols (int ncols, Array< int const > const &colind) |
Delete columns from a matrix. |
|
void | delCPCuts () |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes. |
|
void | delCPCuts (int cuttype, int interp) |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes. |
|
void | delCPCuts (int cuttype, int interp, int ncuts, Array< XPRScut const > const &cutind) |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes. |
|
void | delCPCuts (int ncuts, Array< XPRScut const > const &cutind) |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes. |
|
void | delCuts (int basis) |
Deletes cuts from the matrix at the current node. |
|
void | delCuts (int basis, int cuttype, int interp) |
Deletes cuts from the matrix at the current node. |
|
void | delCuts (int basis, int cuttype, int interp, double delta) |
Deletes cuts from the matrix at the current node. |
|
void | delCuts (int basis, int cuttype, int interp, double delta, int ncuts, Array< XPRScut const > const &cutind) |
Deletes cuts from the matrix at the current node. |
|
void | delCuts (int basis, int ncuts, Array< XPRScut const > const &cutind) |
Deletes cuts from the matrix at the current node. |
|
virtual void | delGenCons (int ncons, Array< int const > const &conind) |
Delete general constraints from a problem. |
|
auto | delIndicator (int row) -> void |
Delete a single indicator constraint. |
|
void | delIndicators (int first, int last) |
Delete indicator constraints. |
|
void | delObj (int objidx) |
Removes an objective function from a multi-objective problem. |
|
virtual void | delPwlCons (int npwls, Array< int const > const &pwlind) |
Delete piecewise linear constraints from a problem. |
|
void | delQMatrix (int row) |
Deletes the quadratic part of a row or of the objective function. |
|
virtual void | delRows (int nrows, Array< int const > const &rowind) |
Delete rows from a matrix. |
|
virtual void | delSets (int nsets, Array< int const > const &setind) |
Delete sets from a problem. |
|
void | destroyProb () |
Removes a given problem and frees any memory associated with it following manipulation and optimization. |
|
void | dumpControls () |
Displays the list of controls and their current value for those controls that have been set to a non default value. |
|
void | estimateRowDualRanges (int nrows, Array< int const > const &rowind, int iterlim, Array< double > const &mindual, Array< double > const &maxdual) |
Performs a dual side range sensitivity analysis, i.e. |
|
auto | firstIIS (int mode) -> int |
Initiates a search for an Irreducible Infeasible Set (IIS) in an infeasible problem. |
|
void | fixMipEntities (int options) |
Fixes all the MIP entities to the values of the last found MIP solution. |
|
void | fTran (Array< double > const &vec) |
Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix. |
|
void | getAttribInfo (std::optional< std::string > const &name, int *p_id, ParameterType *p_type) |
Accesses the id number and the type information of an attribute given its name. |
|
void | getBasis (Array< int > const &rowstat, Array< int > const &colstat) |
Returns the current basis into the user's data arrays. |
|
void | getBasisVal (int row, int col, int *p_rowstat, int *p_colstat) |
Returns the current basis status for a specific column or row. |
|
auto | getCallbackDual (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackDual (int index) const -> double |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackDuals () const -> std::vector< double > |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackDuals (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackDuals (bool *p_available, Array< double > const &duals, int first, int last) const |
Returns the dual values from the solution associated with the current callback. |
|
auto | getCallbackDuals (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackDuals (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveDual (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveDual (int index) const -> double |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveDuals () const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackPresolveDuals (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackPresolveDuals (bool *p_available, Array< double > const &duals, int first, int last) const |
Returns the dual values from the solution to the presolved problem associated with the current callback. |
|
auto | getCallbackPresolveDuals (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveDuals (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveRedCost (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveRedCost (int index) const -> double |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveRedCosts () const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackPresolveRedCosts (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackPresolveRedCosts (bool *p_available, Array< double > const &djs, int first, int last) const |
Returns the reduced costs from the solution to the presolved problem associated with the current callback. |
|
auto | getCallbackPresolveRedCosts (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveRedCosts (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveSlack (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveSlack (int index) const -> double |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveSlacks () const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackPresolveSlacks (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackPresolveSlacks (bool *p_available, Array< double > const &slacks, int first, int last) const |
Returns the slack values from the solution to the presolved problem associated with the current callback. |
|
auto | getCallbackPresolveSlacks (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveSlacks (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveSolution () const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackPresolveSolution (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackPresolveSolution (bool *p_available, Array< double > const &x, int first, int last) const |
Returns the solution to the presolved problem associated with the current callback. |
|
auto | getCallbackPresolveSolution (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveSolution (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackPresolveSolution (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackPresolveSolution (int index) const -> double |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackRedCost (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackRedCost (int index) const -> double |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackRedCosts () const -> std::vector< double > |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackRedCosts (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackRedCosts (bool *p_available, Array< double > const &djs, int first, int last) const |
Returns the reduced costs from the solution associated with the current callback. |
|
auto | getCallbackRedCosts (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackRedCosts (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackSlack (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackSlack (int index) const -> double |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackSlacks () const -> std::vector< double > |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackSlacks (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackSlacks (bool *p_available, Array< double > const &slacks, int first, int last) const |
Returns the slack values from the solution associated with the current callback. |
|
auto | getCallbackSlacks (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackSlacks (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackSolution () const -> std::vector< double > |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getCallbackSolution (bool *p_available) const -> std::vector< double > |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getCallbackSolution (bool *p_available, Array< double > const &x, int first, int last) const |
Returns the solution associated with the current callback. |
|
auto | getCallbackSolution (bool *p_available, int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackSolution (bool *p_available, int index) const -> double |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCallbackSolution (int first, int last) const -> std::vector< double > |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getCallbackSolution (int index) const -> double |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getCoef (int row, int col) -> double |
Returns a single coefficient in the constraint matrix. |
|
void | getCols (Array< int > const &start, Array< int > const &rowind, Array< double > const &rowcoef, int maxcoefs, int *p_ncoefs, int first, int last) |
Returns the nonzeros in the constraint matrix for the columns in a given range. |
|
auto | getCols (Array< int > const &start, Array< int > const &rowind, Array< double > const &rowcoef, int maxcoefs, int first, int last) -> int |
Returns the nonzeros in the constraint matrix for the columns in a given range. |
|
auto | getCols (Array< XPRSint64 > const &start, Array< int > const &rowind, Array< double > const &rowcoef, XPRSint64 maxcoefs, int first, int last) -> XPRSint64 |
Returns the nonzeros in the constraint matrix for the columns in a given range. |
|
void | getCols (Array< XPRSint64 > const &start, Array< int > const &rowind, Array< double > const &rowcoef, XPRSint64 maxcoefs, XPRSint64 *p_ncoefs, int first, int last) |
Returns the nonzeros in the constraint matrix for the columns in a given range. |
|
auto | getCols (int first, int last) -> xpress::XPRSProblem::MatrixInfo |
Get range of columns. |
|
auto | getColType (int first, int last) -> std::vector< char > |
Returns the column types for the columns in a given range. |
|
auto | getColumnName (int index) -> std::string |
Get a column name. |
|
auto | getColumnNames (int first, int last) -> std::vector< std::string > |
Get names of columns. |
|
void | getControlInfo (std::optional< std::string > const &name, int *p_id, ParameterType *p_type) |
Accesses the id number and the type information of a control given its name. |
|
void | getCPCutList (int cuttype, int interp, double delta, int *p_ncuts, int maxcuts, Array< XPRScut > const &cutind, Array< double > const &viol) |
Returns a list of cut indices from the cut pool. |
|
auto | getCPCutList (int cuttype, int interp, double delta, int maxcuts, Array< XPRScut > const &cutind, Array< double > const &viol) -> int |
Returns a list of cut indices from the cut pool. |
|
auto | getCPCutList (int maxcuts, Array< XPRScut > const &cutind, Array< double > const &viol) -> int |
Returns a list of cut indices from the cut pool. |
|
void | getCPCuts (Array< XPRScut const > const &rowind, int ncuts, int maxcoefs, Array< int > const &cuttype, Array< char > const &rowtype, Array< int > const &start, Array< int > const &colind, Array< double > const &cutcoef, Array< double > const &rhs) |
Returns cuts from the cut pool. |
|
void | getCPCuts (Array< XPRScut const > const &rowind, int ncuts, XPRSint64 maxcoefs, Array< int > const &cuttype, Array< char > const &rowtype, Array< XPRSint64 > const &start, Array< int > const &colind, Array< double > const &cutcoef, Array< double > const &rhs) |
Returns cuts from the cut pool. |
|
void | getCutList (int cuttype, int interp, int *p_ncuts, int maxcuts, Array< XPRScut > const &cutind) |
Retrieves a list of cut pointers for the cuts active at the current node. |
|
auto | getCutList (int cuttype, int interp, int maxcuts, Array< XPRScut > const &cutind) -> int |
Retrieves a list of cut pointers for the cuts active at the current node. |
|
auto | getCutList (int maxcuts, Array< XPRScut > const &cutind) -> int |
Retrieves a list of cut pointers for the cuts active at the current node. |
|
auto | getCutMap (int ncuts, Array< XPRScut const > const &cutind) -> std::vector< int > |
Used to return in which rows a list of cuts are currently loaded into the Optimizer. |
|
auto | getCutSlack (XPRScut cutind) -> double |
Used to calculate the slack value of a cut with respect to the current LP relaxation solution. |
|
auto | getDblAttrib (int attrib) const -> double |
Enables users to retrieve the values of various double problem attributes. |
|
auto | getDblControl (int control) const -> double |
Retrieves the value of a given double control parameter. |
|
auto | getDirs () -> int |
Used to return the directives that have been loaded into a matrix. |
|
auto | getDirs (Array< int > const &indices, Array< int > const &prios, Array< char > const &branchdirs, Array< double > const &uppseudo, Array< double > const &downpseudo) -> int |
Used to return the directives that have been loaded into a matrix. |
|
void | getDirs (int *p_ndir, Array< int > const &indices, Array< int > const &prios, Array< char > const &branchdirs, Array< double > const &uppseudo, Array< double > const &downpseudo) |
Used to return the directives that have been loaded into a matrix. |
|
auto | getDiscreteCols () -> xpress::XPRSProblem::MIPEntityInfo |
Get information about MIP entities. |
|
auto | getDual (int *status, int index) const -> double |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getDual (int index) const -> double |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that queries only a single value. |
|
void | getDualRay (Array< double > const &ray, int *p_hasray) |
Retrieves a dual ray (dual unbounded direction) for the current problem, if the problem is found to be infeasible. |
|
auto | getDuals () const -> std::vector< double > |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getDuals (int *status) const -> std::vector< double > |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getDuals (int *status, Array< double > const &duals, int first, int last) const |
Used to obtain the dual values associated with the incumbent solution during or after optimization of a continuous problem with XPRSoptimize , XPRSlpoptimize or XPRSnlpoptimize . |
|
auto | getDuals (int *status, int first, int last) const -> std::vector< double > |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getDuals (int first, int last) const -> std::vector< double > |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const that allocates the output array. |
|
void | getGenCons (Array< GenConsType > const &contype, Array< int > const &resultant, Array< int > const &colstart, Array< int > const &colind, int maxcols, int *p_ncols, Array< int > const &valstart, Array< double > const &val, int maxvals, int *p_nvals, int first, int last) |
Returns the general constraints y = f(x1, ..., xn, c1, ..., cm) in a given range. |
|
void | getGenCons (Array< GenConsType > const &contype, Array< int > const &resultant, Array< XPRSint64 > const &colstart, Array< int > const &colind, XPRSint64 maxcols, XPRSint64 *p_ncols, Array< XPRSint64 > const &valstart, Array< double > const &val, XPRSint64 maxvals, XPRSint64 *p_nvals, int first, int last) |
Returns the general constraints y = f(x1, ..., xn, c1, ..., cm) in a given range. |
|
auto | getGenCons (int first, int last) -> xpress::XPRSProblem::GeneralConstraintInfo |
Query a range of general constraints. |
|
auto | getGenConsName (int index) -> std::string |
Get a general constraint name. |
|
auto | getGenConsNames (int first, int last) -> std::vector< std::string > |
Get names of general constraints. |
|
void | getIISData (int iis, int *p_nrows, int *p_ncols, Array< int > const &rowind, Array< int > const &colind, Array< char > const &contype, Array< char > const &bndtype, Array< double > const &duals, Array< double > const &djs, Array< char > const &isolationrows, Array< char > const &isolationcols) |
Returns information for an Irreducible Infeasible Set: size, variables and constraints (row and column vectors), and conflicting sides of the variables. |
|
auto | getIISData (int number) -> xpress::XPRSProblem::IISData |
Get information about an IIS. |
|
auto | getIndex (int type, std::optional< std::string > const &name) -> int |
Returns the index for a specified row or column name. |
|
auto | getIndicator (int row) -> std::optional< xpress::IndicatorInfo > |
Get indicator information for a single row. |
|
void | getIndicators (Array< int > const &colind, Array< int > const &complement, int first, int last) |
Returns the indicator constraint condition (indicator variable and complement flag) associated to the rows in a given range. |
|
auto | getIndicators (int first, int last) -> std::vector< xpress::IndicatorInfo > |
Get indicator information for a range of rows. |
|
void | getInfeas (int *p_nprimalcols, int *p_nprimalrows, int *p_ndualrows, int *p_ndualcols, Array< int > const &x, Array< int > const &slack, Array< int > const &duals, Array< int > const &djs) |
Returns a list of infeasible primal and dual variables. |
|
auto | getIntAttrib (int attrib) const -> int |
Enables users to recover the values of various integer problem attributes. |
|
auto | getIntControl (int control) const -> int |
Enables users to recover the values of various integer control parameters. |
|
void | getLastBarSol (Array< double > const &x, Array< double > const &slack, Array< double > const &duals, Array< double > const &djs, int *p_status) |
Used to obtain the last barrier solution values following optimization that used the barrier solver. |
|
auto | getLB (int first, int last) -> std::vector< double > |
Returns the lower bounds for the columns in a given range. |
|
auto | getLongAttrib (int attrib) const -> XPRSint64 |
Enables users to recover the values of various integer problem attributes. |
|
auto | getLongControl (int control) const -> XPRSint64 |
Enables users to recover the values of various integer control parameters. |
|
void | getLpSol (Array< double > const &x) |
Used to obtain the LP solution values following optimization. |
|
void | getLpSol (Array< double > const &x, Array< double > const &slack, Array< double > const &duals, Array< double > const &djs) |
Used to obtain the LP solution values following optimization. |
|
void | getLpSolVal (int col, int row, double *p_x, double *p_slack, double *p_dual, double *p_dj) |
Used to obtain a single LP solution value following optimization. |
|
auto | getMessageStatus (int msgcode) -> int |
Retrieves the current suppression status of a message. |
|
auto | getMipEntities () -> xpress::XPRSProblem::MIPEntityInfo |
Get information about MIP entities and SOS. |
|
auto | getMipEntities (Array< char > const &coltype, Array< int > const &colind, Array< double > const &limit) -> int |
Retrieves integr and entity information about a problem. |
|
void | getMipEntities (int *p_nentities, Array< char > const &coltype, Array< int > const &colind, Array< double > const &limit) |
Retrieves integr and entity information about a problem. |
|
void | getMipEntities (int *p_nentities, int *p_nsets, Array< char > const &coltype, Array< int > const &colind, Array< double > const &limit, Array< char > const &settype, Array< int > const &start, Array< int > const &setcols, Array< double > const &refval) |
Retrieves integr and entity information about a problem. |
|
void | getMipEntities (int *p_nentities, int *p_nsets, Array< char > const &coltype, Array< int > const &colind, Array< double > const &limit, Array< char > const &settype, Array< XPRSint64 > const &start, Array< int > const &setcols, Array< double > const &refval) |
Retrieves integr and entity information about a problem. |
|
void | getMipSol (Array< double > const &x) |
Used to obtain the solution values of the last MIP solution that was found. |
|
void | getMipSol (Array< double > const &x, Array< double > const &slack) |
Used to obtain the solution values of the last MIP solution that was found. |
|
void | getMipSolVal (int col, int row, double *p_x, double *p_slack) |
Used to obtain a single solution value of the last MIP solution that was found. |
|
void | getMQObj (Array< int > const &start, Array< int > const &colind, Array< double > const &objqcoef, int maxcoefs, int *p_ncoefs, int first, int last) |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. |
|
auto | getMQObj (Array< int > const &start, Array< int > const &colind, Array< double > const &objqcoef, int maxcoefs, int first, int last) -> int |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. |
|
auto | getMQObj (Array< XPRSint64 > const &start, Array< int > const &colind, Array< double > const &objqcoef, XPRSint64 maxcoefs, int first, int last) -> XPRSint64 |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. |
|
void | getMQObj (Array< XPRSint64 > const &start, Array< int > const &colind, Array< double > const &objqcoef, XPRSint64 maxcoefs, XPRSint64 *p_ncoefs, int first, int last) |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range. |
|
auto | getMQObj (int first, int last) -> xpress::XPRSProblem::MatrixInfo |
Get quadratic objective matrix for range of columns. |
|
auto | getName (int type, int elt) -> std::string |
Get the name of a single element. |
|
auto | getName (xpress::Namespaces type, int elt) -> std::string |
Get the name of a single element. |
|
auto | getNameList (int type, int first, int last) -> std::vector< std::string > |
Returns the names for the rows, columns, sets, piecewise linear constraints, general constraints or objectives in a given range. |
|
auto | getNames (int type, int first, int last) -> std::vector< std::string > |
Get names. |
|
auto | getNames (xpress::Namespaces type, int first, int last) -> std::vector< std::string > |
Get names. |
|
void | getNlpsol (Array< double > const &x, Array< double > const &slack, Array< double > const &duals, Array< double > const &djs) |
Obtain the current SLP solution values. |
|
auto | getObj (int first, int last) -> std::vector< double > |
Returns the objective function coefficients for the columns in a given range. |
|
auto | getObjDblAttrib (int solveidx, int attrib) -> double |
Retrieves the value of a given double attribute associated with a multi-objective solve. |
|
auto | getObjDblControl (int objidx, ObjControl control) -> double |
Retrieves the value of a given double control parameter associated with an objective function. |
|
auto | getObjIntAttrib (int solveidx, int attrib) -> int |
Retrieves the value of a given integer attribute associated with a multi-objective solve. |
|
auto | getObjIntControl (int objidx, ObjControl control) -> int |
Retrieves the value of a given integer control parameter associated with an objective. |
|
auto | getObjLongAttrib (int solveidx, int attrib) -> XPRSint64 |
Retrieves the value of a given integer attribute associated with a multi-objective solve. |
|
auto | getObjN (int objidx, int first, int last) -> std::vector< double > |
For a given objective function, returns the objective coefficients for the columns in a given range. |
|
auto | getPivotOrder () -> std::vector< int > |
Returns the pivot order of the basic variables. |
|
void | getPivots (int enter, Array< int > const &outlist, Array< double > const &x, double *p_objval, int *p_npivots, int maxpivots) |
Returns a list of potential leaving variables if a specified variable enters the basis. |
|
void | getPresolveBasis (Array< int > const &rowstat, Array< int > const &colstat) |
Returns the current basis from memory into the user's data areas. |
|
void | getPresolveMap (Array< int > const &rowmap, Array< int > const &colmap) |
Returns the mapping of the row and column numbers from the presolve problem back to the original problem. |
|
void | getPresolveSol (Array< double > const &x) |
Returns the solution for the presolved problem from memory. |
|
void | getPresolveSol (Array< double > const &x, Array< double > const &slack, Array< double > const &duals, Array< double > const &djs) |
Returns the solution for the presolved problem from memory. |
|
void | getPrimalRay (Array< double > const &ray, int *p_hasray) |
Retrieves a primal ray (primal unbounded direction) for the current problem, if the problem is found to be unbounded. |
|
auto | getProbName () -> std::string |
Returns the current problem name. |
|
void | getPwlCons (Array< int > const &colind, Array< int > const &resultant, Array< int > const &start, Array< double > const &xval, Array< double > const &yval, int maxpoints, int *p_npoints, int first, int last) |
Returns the piecewise linear constraints y = f(x) in a given range. |
|
void | getPwlCons (Array< int > const &colind, Array< int > const &resultant, Array< XPRSint64 > const &start, Array< double > const &xval, Array< double > const &yval, XPRSint64 maxpoints, XPRSint64 *p_npoints, int first, int last) |
Returns the piecewise linear constraints y = f(x) in a given range. |
|
auto | getPWLName (int index) -> std::string |
Get a PWL constraint name. |
|
auto | getPWLNames (int first, int last) -> std::vector< std::string > |
Get names of PWL constraints. |
|
auto | getQObj (int objqcol1, int objqcol2) -> double |
Returns a single quadratic objective function coefficient corresponding to the variable pair (objqcol1, objqcol2) of the Hessian matrix. |
|
auto | getQRowCoeff (int row, int rowqcol1, int rowqcol2) -> double |
Returns a single quadratic constraint coefficient corresponding to the variable pair (rowqcol1 , rowqcol2 ) of the Hessian of a given constraint. |
|
void | getQRowQMatrix (int row, Array< int > const &start, Array< int > const &colind, Array< double > const &rowqcoef, int maxcoefs, int *p_ncoefs, int first, int last) |
Returns the nonzeros in a quadratic constraint coefficients matrix for the columns in a given range. |
|
auto | getQRowQMatrix (int row, Array< int > const &start, Array< int > const &colind, Array< double > const &rowqcoef, int maxcoefs, int first, int last) -> int |
Returns the nonzeros in a quadratic constraint coefficients matrix for the columns in a given range. |
|
auto | getQRowQMatrixTriplets (int row, Array< int > const &rowqcol1, Array< int > const &rowqcol2, Array< double > const &rowqcoef) -> int |
Returns the nonzeros in a quadratic constraint coefficients matrix as triplets (index pairs with coefficients). |
|
void | getQRowQMatrixTriplets (int row, int *p_ncoefs, Array< int > const &rowqcol1, Array< int > const &rowqcol2, Array< double > const &rowqcoef) |
Returns the nonzeros in a quadratic constraint coefficients matrix as triplets (index pairs with coefficients). |
|
auto | getQRows () -> int |
Returns the list indices of the rows that have quadratic coefficients. |
|
auto | getQRows (Array< int > const &rowind) -> int |
Returns the list indices of the rows that have quadratic coefficients. |
|
void | getQRows (int *p_nrows, Array< int > const &rowind) |
Returns the list indices of the rows that have quadratic coefficients. |
|
auto | getRedCost (int *status, int index) const -> double |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getRedCost (int index) const -> double |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getRedCosts () const -> std::vector< double > |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getRedCosts (int *status) const -> std::vector< double > |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getRedCosts (int *status, Array< double > const &djs, int first, int last) const |
Used to obtain the reduced costs associated with the incumbent solution during or after optimization of a continuous problem with XPRSoptimize , XPRSlpoptimize or XPRSnlpoptimize . |
|
auto | getRedCosts (int *status, int first, int last) const -> std::vector< double > |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getRedCosts (int first, int last) const -> std::vector< double > |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getRhs (int first, int last) -> std::vector< double > |
Returns the right hand side elements for the rows in a given range. |
|
auto | getRhsRange (int first, int last) -> std::vector< double > |
Returns the right hand side range values for the rows in a given range. |
|
auto | getRowFlags (int first, int last) -> std::vector< int > |
Retrieve if a range of rows have been set up as special rows. |
|
auto | getRowName (int index) -> std::string |
Get a row name. |
|
auto | getRowNames (int first, int last) -> std::vector< std::string > |
Get names of rows. |
|
void | getRows (Array< int > const &start, Array< int > const &colind, Array< double > const &colcoef, int maxcoefs, int *p_ncoefs, int first, int last) |
Returns the nonzeros in the constraint matrix for the rows in a given range. |
|
auto | getRows (Array< int > const &start, Array< int > const &colind, Array< double > const &colcoef, int maxcoefs, int first, int last) -> int |
Returns the nonzeros in the constraint matrix for the rows in a given range. |
|
auto | getRows (Array< XPRSint64 > const &start, Array< int > const &colind, Array< double > const &colcoef, XPRSint64 maxcoefs, int first, int last) -> XPRSint64 |
Returns the nonzeros in the constraint matrix for the rows in a given range. |
|
void | getRows (Array< XPRSint64 > const &start, Array< int > const &colind, Array< double > const &colcoef, XPRSint64 maxcoefs, XPRSint64 *p_ncoefs, int first, int last) |
Returns the nonzeros in the constraint matrix for the rows in a given range. |
|
auto | getRows (int first, int last) -> xpress::XPRSProblem::MatrixInfo |
Get range of rows. |
|
auto | getRowType (int first, int last) -> std::vector< char > |
Returns the row types for the rows in a given range. |
|
void | getScale (Array< int > const &rowscale, Array< int > const &colscale) |
Returns the the current scaling of the matrix. |
|
void | getScaledInfeas (int *p_nprimalcols, int *p_nprimalrows, int *p_ndualrows, int *p_ndualcols, Array< int > const &x, Array< int > const &slack, Array< int > const &duals, Array< int > const &djs) |
Returns a list of scaled infeasible primal and dual variables for the original problem. |
|
auto | getSetDefinitions () -> xpress::XPRSProblem::MIPEntityInfo |
Get information about SOS. |
|
auto | getSetName (int index) -> std::string |
Get a set (SOS) name. |
|
auto | getSetNames (int first, int last) -> std::vector< std::string > |
Get names of sets (SOS). |
|
auto | getSlack (int *status, int index) const -> double |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getSlack (int index) const -> double |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getSlacks () const -> std::vector< double > |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getSlacks (int *status) const -> std::vector< double > |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getSlacks (int *status, Array< double > const &slacks, int first, int last) const |
Used to obtain the slack values associated with the incumbent solution during or after optimization with XPRSoptimize , XPRSmipoptimize , XPRSlpoptimize or XPRSnlpoptimize . |
|
auto | getSlacks (int *status, int first, int last) const -> std::vector< double > |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getSlacks (int first, int last) const -> std::vector< double > |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getSolution () const -> std::vector< double > |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
auto | getSolution (int *status) const -> std::vector< double > |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that allocates the output array and queries all elements. |
|
void | getSolution (int *status, Array< double > const &x, int first, int last) const |
Used to obtain the incumbent solution during or after optimization with XPRSoptimize , XPRSmipoptimize , XPRSlpoptimize or XPRSnlpoptimize . |
|
auto | getSolution (int *status, int first, int last) const -> std::vector< double > |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getSolution (int *status, int index) const -> double |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getSolution (int first, int last) const -> std::vector< double > |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that allocates the output array. |
|
auto | getSolution (int index) const -> double |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const that queries only a single value. |
|
auto | getStrAttrib (int attrib) const -> std::string |
Enables users to recover the values of various string problem attributes. |
|
auto | getStrControl (int control) const -> std::string |
Returns the value of a given string control parameters. |
|
void | getStringControl (int control, char *value, int maxbytes, int *p_nbytes) const |
Returns the value of a given string control parameters. |
|
void | getStrStringAttrib (int attrib, char *value, int maxbytes, int *p_nbytes) const |
Enables users to recover the values of various string problem attributes. |
|
auto | getUB (int first, int last) -> std::vector< double > |
Returns the upper bounds for the columns in a given range. |
|
auto | getUnbVec () -> int |
Returns the index vector which causes the primal simplex or dual simplex algorithm to determine that a matrix is primal or dual unbounded respectively. |
|
void | IISAll () |
Performs an automated search for independent Irreducible Infeasible Sets (IIS) in an infeasible problem. |
|
void | IISIsolations (int iis) |
Performs the isolation identification procedure for an Irreducible Infeasible Set (IIS). |
|
auto | IISStatus () -> xpress::XPRSProblem::IISStatusInfo |
Get the IIS status. |
|
void | IISStatus (int *p_niis, Array< int > const &nrows, Array< int > const &ncols, Array< double > const &suminfeas, Array< int > const &numinfeas) |
Returns statistics on the Irreducible Infeasible Sets (IIS) found so far by XPRSiisfirst (IIS ), XPRSiisnext (IIS -n ) or XPRSiisall (IIS -a ). |
|
void | interrupt (StopType reason) |
Interrupts the Optimizer algorithms. |
|
void | loadBasis (Array< int const > const &rowstat, Array< int const > const &colstat) |
Loads a basis from the user's areas. |
|
void | loadBranchDirs (int ncols, Array< int const > const &colind, Array< int const > const &dir) |
Loads directives into the current problem to specify which MIP entities the Optimizer should continue to branch on when a node solution is integer feasible. |
|
void | loadCuts (int cuttype, int interp) |
Loads cuts from the cut pool into the matrix. |
|
void | loadCuts (int cuttype, int interp, int ncuts, Array< XPRScut const > const &cutind) |
Loads cuts from the cut pool into the matrix. |
|
void | loadCuts (int ncuts, Array< XPRScut const > const &cutind) |
Loads cuts from the cut pool into the matrix. |
|
void | loadDelayedRows (int nrows, Array< int const > const &rowind) |
Specifies that a set of rows in the matrix will be treated as delayed rows during a tree search. |
|
void | loadDirs (int ndirs, Array< int const > const &colind, Array< int const > const &priority, Array< char const > const &dir, Array< double const > const &uppseudo, Array< double const > const &downpseudo) |
Loads directives into the matrix. |
|
void | loadLp (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub) |
Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file. |
|
void | loadLp (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub) |
Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file. |
|
auto | loadLpSol (Array< double const > const &x, Array< double const > const &slack, Array< double const > const &duals, Array< double const > const &djs) -> int |
Loads an LP solution for the problem into the Optimizer. |
|
void | loadMip (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< int const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a MIP problem into the Optimizer data structures. |
|
void | loadMip (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< XPRSint64 const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a MIP problem into the Optimizer data structures. |
|
auto | loadMipSol (Array< double const > const &x) -> int |
Loads a starting MIP solution for the problem into the Optimizer. |
|
void | loadMIQCQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nqrows, Array< int const > const &qrowind, Array< int const > const &nrowqcoefs, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< int const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a mixed integer quadratic problem with quadratic constraints into the Optimizer data structure. |
|
void | loadMIQCQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, XPRSint64 nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nqrows, Array< int const > const &qrowind, Array< XPRSint64 const > const &nrowqcoefs, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< XPRSint64 const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a mixed integer quadratic problem with quadratic constraints into the Optimizer data structure. |
|
void | loadMIQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< int const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a MIQP problem, hence a MIP with quadratic objective coefficients, into the Optimizer data structures. |
|
void | loadMIQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, XPRSint64 nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nentities, int nsets, Array< char const > const &coltype, Array< int const > const &entind, Array< double const > const &limit, Array< char const > const &settype, Array< XPRSint64 const > const &setstart, Array< int const > const &setind, Array< double const > const &refval) |
Used to load a MIQP problem, hence a MIP with quadratic objective coefficients, into the Optimizer data structures. |
|
void | loadModelCuts (int nrows, Array< int const > const &rowind) |
Specifies that a set of rows in the matrix will be treated as model cuts. |
|
void | loadPresolveBasis (Array< int const > const &rowstat, Array< int const > const &colstat) |
Loads a presolved basis from the user's areas. |
|
void | loadPresolveDirs (int ndirs, Array< int const > const &colind, Array< int const > const &priority, Array< char const > const &dir, Array< double const > const &uppseudo, Array< double const > const &downpseudo) |
Loads directives into the presolved matrix. |
|
void | loadQCQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nqrows, Array< int const > const &qrowind, Array< int const > const &nrowqcoef, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef) |
Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure. |
|
void | loadQCQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, XPRSint64 nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef, int nqrows, Array< int const > const &qrowind, Array< XPRSint64 const > const &nrowqcoef, Array< int const > const &rowqcol1, Array< int const > const &rowqcol2, Array< double const > const &rowqcoef) |
Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure. |
|
void | loadQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< int const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, int nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef) |
Used to load a quadratic problem into the Optimizer data structure. |
|
void | loadQP (std::optional< std::string > const &probname, int ncols, int nrows, Array< char const > const &rowtype, Array< double const > const &rhs, Array< double const > const &rng, Array< double const > const &objcoef, Array< XPRSint64 const > const &start, Array< int const > const &collen, Array< int const > const &rowind, Array< double const > const &rowcoef, Array< double const > const &lb, Array< double const > const &ub, XPRSint64 nobjqcoefs, Array< int const > const &objqcol1, Array< int const > const &objqcol2, Array< double const > const &objqcoef) |
Used to load a quadratic problem into the Optimizer data structure. |
|
void | loadSecureVecs (int nrows, int ncols, Array< int const > const &rowind, Array< int const > const &colind) |
Allows the user to mark rows and columns in order to prevent the presolve removing these rows and columns from the matrix. |
|
void | lpOptimize () |
This function begins a search for the optimal continuous (LP) solution. |
|
void | lpOptimize (std::optional< std::string > const &flags) |
This function begins a search for the optimal continuous (LP) solution. |
|
virtual auto | makeChild (XPRSprob pointer) -> XPRSProblem * |
Create a new problem from an existing low-level pointer. |
|
void | mipOptimize () |
This function begins a tree search for the optimal MIP solution. |
|
void | mipOptimize (std::optional< std::string > const &flags) |
This function begins a tree search for the optimal MIP solution. |
|
void | msAddCustomPreset (std::optional< std::string > const &description, int preset, int maxjobs, int ninitial, Array< int const > const &colind, Array< double const > const &initial, int nintcontrols, Array< int const > const &intcontrolid, Array< int const > const &intcontrolval, int ndblcontrols, Array< int const > const &dblcontrolid, Array< double const > const &dblcontrolval, void *data) |
A combined version of XSLPmsaddjob and XSLPmsaddpreset. |
|
void | msAddJob (std::optional< std::string > const &description, int ninitial, Array< int const > const &colind, Array< double const > const &initial, int nintcontrols, Array< int const > const &intcontrolid, Array< int const > const &intcontrolval, int ndblcontrols, Array< int const > const &dblcontrolid, Array< double const > const &dblcontrolval, void *data) |
Adds a multistart job to the multistart pool. |
|
void | msAddPreset (std::optional< std::string > const &description, int preset, int maxjobs, void *data) |
Loads a preset of jobs into the multistart job pool. |
|
void | msClear () |
Removes all scheduled jobs from the multistart job pool. |
|
auto | newBranchObject (bool isOriginal) -> BranchObject * |
Create a new branching object. |
|
auto | nextIIS () -> int |
Continues the search for further Irreducible Infeasible Sets (IIS), or calls XPRSiisfirst (IIS ) if no IIS has been identified yet. |
|
void | nlpAddFormulas (int ncoefs, Array< int const > const &rowind, Array< int const > const &formulastart, int parsed, Array< int const > const &type, Array< double const > const &value) |
Add non-linear formulas to the SLP problem. |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int nIn, int nOut, int options, MultiMapDeltaFunctor functor) -> xpress::XPRSProblem::MultiMapDeltaFunction * |
Register a user function of type "multi map with partial derivatives". |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int nIn, int nOut, int options, MultiMapFunctor functor) -> xpress::XPRSProblem::MultiMapFunction * |
Register a user function of type "multi map". |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int nIn, int options, VecMapDeltaFunctor functor) -> xpress::XPRSProblem::VecMapDeltaFunction * |
Register a user function of type "vector map with partial derivatives". |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int nIn, int options, VecMapFunctor functor) -> xpress::XPRSProblem::VecMapFunction * |
Register a user function of type "vector map". |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int options, MapDeltaFunctor functor) -> xpress::XPRSProblem::MapDeltaFunction * |
Register a user function of type "map with derivative". |
|
auto | nlpAddUserFunction (std::optional< std::string > funcname, int options, MapFunctor functor) -> xpress::XPRSProblem::MapFunction * |
Register a user function of type "map". |
|
void | nlpCalcSlacks (Array< double const > const &solution, Array< double > const &slack) |
Calculate the slack values for the provided solution in the non-linear problem. |
|
void | nlpChgFormula (int row, int parsed, Array< int const > const &type, Array< double const > const &value) |
Add or replace a single matrix formula using a parsed or unparsed formula. |
|
void | nlpChgFormulaStr (int row, std::optional< std::string > const &formula) |
Add or replace a single matrix formula using a character string for the formula. |
|
void | nlpCurrentIV () |
Transfer the current solution to initial values. |
|
void | nlpDelFormulas (int nformulas, Array< int const > const &rowind) |
Delete nonlinear formulas from the current problem. |
|
void | nlpDelUserFunction (int type) |
Delete a user function from the current problem. |
|
auto | nlpEvaluateFormula (int parsed, Array< int const > const &type, Array< double const > const &values) -> double |
Evaluate a formula using the current values of the variables. |
|
void | nlpGetFormula (int row, int parsed, int maxtypes, int *p_ntypes, Array< int > const &type, Array< double > const &value) |
Retrieve a single matrix formula as a formula split into tokens. |
|
void | nlpGetFormulaRows (int *p_nformulas, Array< int > const &rowind) |
Retrieve the list of positions of the nonlinear formulas in the problem. |
|
void | nlpGetFormulaStr (int row, char *formula, int maxbytes, int *p_nbytes) |
Retrieve a single matrix formula in a character string. |
|
void | nlpImportLibFunc (std::optional< std::string > const &libname, std::optional< std::string > const &funcname, XPRSfunctionptr *p_function, int *p_status) |
Imports a function from a library file to be called as a user function. |
|
void | nlpLoadFormulas (int nnlpcoefs, Array< int const > const &rowind, Array< int const > const &formulastart, int parsed, Array< int const > const &type, Array< double const > const &value) |
Load non-linear formulas into the SLP problem. |
|
void | nlpOptimize (std::optional< std::string > const &flags) |
Maximize or minimize an SLP problem. |
|
void | nlpPostsolveProb () |
Restores the problem to its pre-solve state. |
|
void | nlpPrintEvalInfo () |
Print a summary of any evaluation errors that may have occurred during solving a problem. |
|
void | nlpSetFunctionError () |
Set the function error flag for the problem. |
|
void | nlpSetInitVal (int nvars, Array< int const > const &colind, Array< double const > const &initial) |
Set the initial value of a variable. |
|
void | nlpValidate () |
Validate the feasibility of constraints in a converged solution. |
|
void | nlpValidateKKT (int mode, int respectbasis, int updatemult, double violtarget) |
Validates the first order optimality conditions also known as the Karush-Kuhn-Tucker (KKT) conditions versus the currect solution |
|
void | nlpValidateRow (int row) |
Prints an extensive analysis on a given constraint of the SLP problem. |
|
void | nlpValidateVector (Array< double const > const &solution, double *p_suminf, double *p_sumscaledinf, double *p_objval) |
Validate the feasibility of constraints for a given solution. |
|
void | objSA (int ncols, Array< int const > const &colind, Array< double > const &lower, Array< double > const &upper) |
Returns upper and lower sensitivity ranges for specified objective function coefficients. |
|
auto | optimize () -> int |
Convenience wrapper for optimize(std::optional<std::string> const &, int *, int *) . |
|
void | optimize (std::optional< std::string > const &flags, int *solvestatus, int *solstatus) |
This function begins a search for the optimal solution of the problem. |
|
auto | optimize (std::optional< std::string > flags) -> int |
Convenience wrapper for optimize(std::optional<std::string> const &, int *, int *) . |
|
void | pivot (int enter, int leave) |
Performs a simplex pivot by bringing variable enter into the basis and removing leave . |
|
void | postSolve () |
Postsolve the current matrix when it is in a presolved state. |
|
auto | postSolveSol (Array< double const > const &prex) -> std::vector< double > |
Postsolves a primal solution formulated in the presolved space into the corresponding solution formulated in the original space. |
|
void | presolveRow (char rowtype, int norigcoefs, Array< int const > const &origcolind, Array< double const > const &origrowcoef, double origrhs, int maxcoefs, int *p_ncoefs, Array< int > const &colind, Array< double > const &rowcoef, double *p_rhs, int *p_status) |
Presolves a row formulated in terms of the original variables such that it can be added to a presolved matrix. |
|
auto | presolveRow (xpress::SizedArray< int const > const &ind, xpress::SizedArray< double const > const &val, char type, double rhs) -> std::optional< xpress::XPRSProblem::RowInfo > |
Presolve a row. |
|
auto | presolveRow (xpress::XPRSProblem::RowInfo row) -> std::optional< xpress::XPRSProblem::RowInfo > |
Presolve a row. |
|
void | printIIS (int iis) |
Prints a given Irreducible Infeasible Set (IIS) in the log. |
|
void | readBasis () |
Instructs the Optimizer to read in a previously saved basis from a file. |
|
void | readBasis (std::optional< std::string > const &filename) |
Instructs the Optimizer to read in a previously saved basis from a file. |
|
void | readBasis (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Instructs the Optimizer to read in a previously saved basis from a file. |
|
void | readBinSol () |
Reads a solution from a binary solution file. |
|
void | readBinSol (std::optional< std::string > const &filename) |
Reads a solution from a binary solution file. |
|
void | readBinSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Reads a solution from a binary solution file. |
|
void | readDirs () |
Reads a directives file to help direct the tree search. |
|
void | readDirs (std::optional< std::string > const &filename) |
Reads a directives file to help direct the tree search. |
|
void | readProb (std::optional< std::string > const &filename) |
Reads an (X)MPS or LP format matrix from file. |
|
void | readProb (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Reads an (X)MPS or LP format matrix from file. |
|
void | readSlxSol () |
Reads an ASCII solution file [.slx ] created by the XPRSwriteslxsol function. |
|
void | readSlxSol (std::optional< std::string > const &filename) |
Reads an ASCII solution file [.slx ] created by the XPRSwriteslxsol function. |
|
void | readSlxSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Reads an ASCII solution file [.slx ] created by the XPRSwriteslxsol function. |
|
void | removeAfterObjectiveCallback (CallbackHandle const &callback) |
Remove an afterobjective callback. |
|
void | removeAfterObjectiveCallbacks () |
Remove all afterobjective callbacks. |
|
void | removeBarIterationCallback (CallbackHandle const &callback) |
Remove a bariteration callback. |
|
void | removeBarIterationCallbacks () |
Remove all bariteration callbacks. |
|
void | removeBarlogCallback (CallbackHandle const &callback) |
Remove a barlog callback. |
|
void | removeBarlogCallbacks () |
Remove all barlog callbacks. |
|
void | removeBeforeObjectiveCallback (CallbackHandle const &callback) |
Remove a beforeobjective callback. |
|
void | removeBeforeObjectiveCallbacks () |
Remove all beforeobjective callbacks. |
|
void | removeBeforeSolveCallback (CallbackHandle const &callback) |
Remove a beforesolve callback. |
|
void | removeBeforeSolveCallbacks () |
Remove all beforesolve callbacks. |
|
void | removeChangeBranchObjectCallback (CallbackHandle const &callback) |
Remove a changebranchobject callback. |
|
void | removeChangeBranchObjectCallbacks () |
Remove all changebranchobject callbacks. |
|
void | removeCheckTimeCallback (CallbackHandle const &callback) |
Remove a checktime callback. |
|
void | removeCheckTimeCallbacks () |
Remove all checktime callbacks. |
|
void | removeComputeRestartCallback (CallbackHandle const &callback) |
Remove a computerestart callback. |
|
void | removeComputeRestartCallbacks () |
Remove all computerestart callbacks. |
|
void | removeCutlogCallback (CallbackHandle const &callback) |
Remove a cutlog callback. |
|
void | removeCutlogCallbacks () |
Remove all cutlog callbacks. |
|
void | removeGapNotifyCallback (CallbackHandle const &callback) |
Remove a gapnotify callback. |
|
void | removeGapNotifyCallbacks () |
Remove all gapnotify callbacks. |
|
void | removeInfnodeCallback (CallbackHandle const &callback) |
Remove an infnode callback. |
|
void | removeInfnodeCallbacks () |
Remove all infnode callbacks. |
|
void | removeIntsolCallback (CallbackHandle const &callback) |
Remove an intsol callback. |
|
void | removeIntsolCallbacks () |
Remove all intsol callbacks. |
|
void | removeLplogCallback (CallbackHandle const &callback) |
Remove a lplog callback. |
|
void | removeLplogCallbacks () |
Remove all lplog callbacks. |
|
void | removeMessageCallback (CallbackHandle const &callback) |
Remove a message callback. |
|
void | removeMessageCallbacks () |
Remove all message callbacks. |
|
void | removeMiplogCallback (CallbackHandle const &callback) |
Remove a miplog callback. |
|
void | removeMiplogCallbacks () |
Remove all miplog callbacks. |
|
void | removeMipThreadCallback (CallbackHandle const &callback) |
Remove a mipthread callback. |
|
void | removeMipThreadCallbacks () |
Remove all mipthread callbacks. |
|
void | removeMipThreadDestroyCallback (CallbackHandle const &callback) |
Remove a mipthreaddestroy callback. |
|
void | removeMipThreadDestroyCallbacks () |
Remove all mipthreaddestroy callbacks. |
|
void | removeMsJobEndCallback (CallbackHandle const &callback) |
Remove a msjobend callback. |
|
void | removeMsJobEndCallbacks () |
Remove all msjobend callbacks. |
|
void | removeMsJobStartCallback (CallbackHandle const &callback) |
Remove a msjobstart callback. |
|
void | removeMsJobStartCallbacks () |
Remove all msjobstart callbacks. |
|
void | removeMsWinnerCallback (CallbackHandle const &callback) |
Remove a mswinner callback. |
|
void | removeMsWinnerCallbacks () |
Remove all mswinner callbacks. |
|
void | removeNewnodeCallback (CallbackHandle const &callback) |
Remove a newnode callback. |
|
void | removeNewnodeCallbacks () |
Remove all newnode callbacks. |
|
void | removeNlpCoefEvalErrorCallback (CallbackHandle const &callback) |
Remove a nlpcoefevalerror callback. |
|
void | removeNlpCoefEvalErrorCallbacks () |
Remove all nlpcoefevalerror callbacks. |
|
void | removeNodecutoffCallback (CallbackHandle const &callback) |
Remove a nodecutoff callback. |
|
void | removeNodecutoffCallbacks () |
Remove all nodecutoff callbacks. |
|
void | removeNodeLPSolvedCallback (CallbackHandle const &callback) |
Remove a nodelpsolved callback. |
|
void | removeNodeLPSolvedCallbacks () |
Remove all nodelpsolved callbacks. |
|
void | removeOptnodeCallback (CallbackHandle const &callback) |
Remove an optnode callback. |
|
void | removeOptnodeCallbacks () |
Remove all optnode callbacks. |
|
void | removePreIntsolCallback (CallbackHandle const &callback) |
Remove a preintsol callback. |
|
void | removePreIntsolCallbacks () |
Remove all preintsol callbacks. |
|
void | removePrenodeCallback (CallbackHandle const &callback) |
Remove a prenode callback. |
|
void | removePrenodeCallbacks () |
Remove all prenode callbacks. |
|
void | removePresolveCallback (CallbackHandle const &callback) |
Remove a presolve callback. |
|
void | removePresolveCallbacks () |
Remove all presolve callbacks. |
|
void | removeSlpCascadeEndCallback (CallbackHandle const &callback) |
Remove a slpcascadeend callback. |
|
void | removeSlpCascadeEndCallbacks () |
Remove all slpcascadeend callbacks. |
|
void | removeSlpCascadeStartCallback (CallbackHandle const &callback) |
Remove a slpcascadestart callback. |
|
void | removeSlpCascadeStartCallbacks () |
Remove all slpcascadestart callbacks. |
|
void | removeSlpCascadeVarCallback (CallbackHandle const &callback) |
Remove a slpcascadevar callback. |
|
void | removeSlpCascadeVarCallbacks () |
Remove all slpcascadevar callbacks. |
|
void | removeSlpCascadeVarFailCallback (CallbackHandle const &callback) |
Remove a slpcascadevarfail callback. |
|
void | removeSlpCascadeVarFailCallbacks () |
Remove all slpcascadevarfail callbacks. |
|
void | removeSlpConstructCallback (CallbackHandle const &callback) |
Remove a slpconstruct callback. |
|
void | removeSlpConstructCallbacks () |
Remove all slpconstruct callbacks. |
|
void | removeSlpDrColCallback (CallbackHandle const &callback) |
Remove a slpdrcol callback. |
|
void | removeSlpDrColCallbacks () |
Remove all slpdrcol callbacks. |
|
void | removeSlpIntSolCallback (CallbackHandle const &callback) |
Remove a slpintsol callback. |
|
void | removeSlpIntSolCallbacks () |
Remove all slpintsol callbacks. |
|
void | removeSlpIterEndCallback (CallbackHandle const &callback) |
Remove a slpiterend callback. |
|
void | removeSlpIterEndCallbacks () |
Remove all slpiterend callbacks. |
|
void | removeSlpIterStartCallback (CallbackHandle const &callback) |
Remove a slpiterstart callback. |
|
void | removeSlpIterStartCallbacks () |
Remove all slpiterstart callbacks. |
|
void | removeSlpIterVarCallback (CallbackHandle const &callback) |
Remove a slpitervar callback. |
|
void | removeSlpIterVarCallbacks () |
Remove all slpitervar callbacks. |
|
void | removeSlpPreUpdateLinearizationCallback (CallbackHandle const &callback) |
Remove a slppreupdatelinearization callback. |
|
void | removeSlpPreUpdateLinearizationCallbacks () |
Remove all slppreupdatelinearization callbacks. |
|
void | removeUserSolNotifyCallback (CallbackHandle const &callback) |
Remove an usersolnotify callback. |
|
void | removeUserSolNotifyCallbacks () |
Remove all usersolnotify callbacks. |
|
auto | repairInfeas (char penalty, char phase2, char flags, double lepref, double gepref, double lbpref, double ubpref, double delta) -> int |
Provides a simplified interface for XPRSrepairweightedinfeas . |
|
auto | repairWeightedInfeas (Array< double const > const &lepref, Array< double const > const &gepref, Array< double const > const &lbpref, Array< double const > const &ubpref, char phase2, double delta, std::optional< std::string > const &flags) -> int |
By relaxing a set of selected constraints and bounds of an infeasible problem, it attempts to identify a 'solution' that violates the selected set of constraints and bounds minimally, while satisfying all other constraints and bounds. |
|
auto | repairWeightedInfeasBounds (Array< double const > const &lepref, Array< double const > const &gepref, Array< double const > const &lbpref, Array< double const > const &ubpref, Array< double const > const &lerelax, Array< double const > const &gerelax, Array< double const > const &lbrelax, Array< double const > const &ubrelax, char phase2, double delta, std::optional< std::string > const &flags) -> int |
An extended version of XPRSrepairweightedinfeas that allows for bounding the level of relaxation allowed. |
|
void | restore () |
Restores the Optimizer's data structures from a file created by XPRSsave (SAVE ). |
|
void | restore (std::optional< std::string > const &probname) |
Restores the Optimizer's data structures from a file created by XPRSsave (SAVE ). |
|
void | restore (std::optional< std::string > const &probname, std::optional< std::string > const &flags) |
Restores the Optimizer's data structures from a file created by XPRSsave (SAVE ). |
|
void | rhsSA (int nrows, Array< int const > const &rowind, Array< double > const &lower, Array< double > const &upper) |
Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients. |
|
void | save () |
Saves the current data structures, i.e. |
|
void | saveAs (std::optional< std::string > const &sSaveFileName) |
Saves the current data structures, i.e. |
|
void | scale (Array< int const > const &rowscale, Array< int const > const &colscale) |
Re-scales the current matrix. |
|
void | setDblControl (int control, double value) |
Sets the value of a given double control parameter. |
|
void | setDefaultControl (int control) |
Sets a single control to its default value. |
|
void | setDefaults () |
Sets all controls to their default values. |
|
auto | setIndicator (int rowind, int colind, int complement) -> void |
Add a single indicator constraint. |
|
void | setIndicators (int nrows, Array< int const > const &rowind, Array< int const > const &colind, Array< int const > const &complement) |
Specifies that a set of rows in the matrix will be treated as indicator constraints during a tree search. |
|
void | setIntControl (int control, int value) |
Sets the value of a given integer control parameter. |
|
void | setLogFile (std::optional< std::string > const &filename) |
This directs all Optimizer output to a log file. |
|
void | setLongControl (int control, XPRSint64 value) |
Sets the value of a given integer control parameter. |
|
void | setMessageStatus (int msgcode, int status) |
Manages suppression of messages. |
|
void | setObjDblControl (int objidx, ObjControl control, double value) |
Sets the value of a given double control parameter associated with an objective. |
|
auto | setObjective (xpress::SizedArray< int const > const &ind, xpress::SizedArray< double const > const &val) -> void |
Set objective to a linear function. |
|
auto | setObjective (xpress::SizedArray< int const > const &ind, xpress::SizedArray< double const > const &val, xpress::ObjSense sense) -> void |
Set objective to a linear function. |
|
void | setObjIntControl (int objidx, ObjControl control, int value) |
Sets the value of a given integer control parameter associated with an objective. |
|
void | setProbName (std::optional< std::string > const &probname) |
Sets the current default problem name. |
|
void | setStrControl (int control, std::optional< std::string > const &value) |
Used to set the value of a given string control parameter. |
|
void | slpAddCoefs (int ncoefs, Array< int const > const &rowind, Array< int const > const &colind, Array< double const > const &factor, Array< int const > const &formulastart, int parsed, Array< int const > const &type, Array< double const > const &value) |
Add non-linear coefficients to the SLP problem. |
|
void | slpCascadeOrder () |
Establish a re-calculation sequence for SLP variables with determining rows. |
|
void | slpCascadeSol () |
Re-calculate consistent values for SLP variables based on the current values of the remaining variables. |
|
void | slpChgCascadeNLimit (int col, int limit) |
Set a variable specific cascade iteration limit. |
|
void | slpChgCoef (int row, int col, double *factor, int parsed, Array< int const > const &type, Array< double const > const &value) |
Add or change a single matrix coefficient using a parsed or unparsed formula. |
|
void | slpChgCoefStr (int row, int col, double *factor, std::optional< std::string > const &formula) |
Add or change a single matrix coefficient using a character string for the formula. |
|
void | slpChgDeltaType (int nvars, Array< int const > const &varind, Array< int const > const &deltatypes, Array< double const > const &values) |
Changes the type of the delta assigned to a nonlinear variable. |
|
auto | slpChgRowStatus (int row) -> int |
Change the status setting of a constraint. |
|
void | slpChgRowWt (int row, double *weight) |
Set or change the initial penalty error weight for a row. |
|
void | slpConstruct () |
Create the full augmented SLP matrix and data structures, ready for optimization. |
|
void | slpDelCoefs (int ncoefs, Array< int const > const &rowind, Array< int const > const &colind) |
Delete coefficients from the current problem. |
|
auto | slpEvaluateCoef (int row, int col) -> double |
Evaluate a coefficient using the current values of the variables. |
|
void | slpFixPenalties (int *p_status) |
Fixe the values of the error vectors. |
|
void | slpGetCoefFormula (int row, int col, double *p_factor, int parsed, int maxtypes, int *p_ntypes, Array< int > const &type, Array< double > const &value) |
Retrieve a single matrix coefficient as a formula split into tokens. |
|
void | slpGetCoefs (int *p_ncoefs, Array< int > const &rowind, Array< int > const &colind) |
Retrieve the list of positions of the nonlinear coefficients in the problem. |
|
void | slpGetCoefStr (int row, int col, double *p_factor, char *formula, int maxbytes, int *p_nbytes) |
Retrieve a single matrix coefficient as a formula in a character string. |
|
void | slpGetRowStatus (int row, int *p_status) |
Retrieve the status setting of a constraint. |
|
auto | slpGetRowWT (int row) -> double |
Get the initial penalty error weight for a row. |
|
void | slpLoadCoefs (int ncoefs, Array< int const > const &rowind, Array< int const > const &colind, Array< double const > const &factor, Array< int const > const &formulastart, int parsed, Array< int const > const &type, Array< double const > const &coef) |
Load non-linear coefficients into the SLP problem. |
|
void | slpReInitialize () |
Reset the SLP problem to match a just augmented system. |
|
void | slpSetDetRow (int nvars, Array< int const > const &colind, Array< int const > const &rowind) |
Set the determining row of a variable. |
|
void | slpUnConstruct () |
Removes the augmentation and returns the problem to its pre-linearization state. |
|
void | slpUpdateLinearization () |
Updates the current linearization. |
|
void | sparseBTran (Array< double > const &val, Array< int > const &ind, int *p_ncoefs) |
Post-multiplies a (row) vector provided by the user by the inverse of the current matrix. |
|
void | sparseFTran (Array< double > const &val, Array< int > const &ind, int *p_ncoefs) |
Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix. |
|
auto | storeCuts (int ncuts, int nodups, Array< int const > const &cuttype, Array< char const > const &rowtype, Array< double const > const &rhs, Array< int const > const &start, Array< int const > const &colind, Array< double const > const &cutcoef) -> std::vector< XPRScut > |
Stores cuts into the cut pool, but does not apply them to the current node. |
|
auto | storeCuts (int ncuts, int nodups, Array< int const > const &cuttype, Array< char const > const &rowtype, Array< double const > const &rhs, Array< XPRSint64 const > const &start, Array< int const > const &colind, Array< double const > const &cutcoef) -> std::vector< XPRScut > |
Stores cuts into the cut pool, but does not apply them to the current node. |
|
void | strongBranch (int nbounds, Array< int const > const &colind, Array< char const > const &bndtype, Array< double const > const &bndval, int iterlim, Array< double > const &objval, Array< int > const &status) |
Performs strong branching iterations on all specified bound changes. |
|
void | strongBranchCB (int nbounds, Array< int const > const &colind, Array< char const > const &bndtype, Array< double const > const &bndval, int iterlim, Array< double > const &objval, Array< int > const &status, std::function< int(XPRSProblem &, int)> callback) |
Performs strong branching iterations on all specified bound changes. |
|
void | tune (std::optional< std::string > const &flags) |
This function begins a tuner session for the current problem. |
|
void | tuneProbSetFile (std::optional< std::string > const &setfile, int ifmip, int sense) |
This function begins a tuner session for a set of problems. |
|
void | tunerReadMethod (std::optional< std::string > const &methodfile) |
This function loads a user defined tuner method from the given file. |
|
void | tunerWriteMethod (std::optional< std::string > const &methodfile) |
This function writes the current tuner method to a given file or prints it to the console. |
|
void | unloadProb () |
Unloads and frees all memory associated with the current problem. |
|
void | writeBasis () |
Writes the current basis to a file for later input into the Optimizer. |
|
void | writeBasis (std::optional< std::string > const &filename) |
Writes the current basis to a file for later input into the Optimizer. |
|
void | writeBasis (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Writes the current basis to a file for later input into the Optimizer. |
|
void | writeBinSol () |
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer. |
|
void | writeBinSol (std::optional< std::string > const &filename) |
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer. |
|
void | writeBinSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer. |
|
void | writeDirs () |
Writes the tree search directives from the current problem to a directives file. |
|
void | writeDirs (std::optional< std::string > const &filename) |
Writes the tree search directives from the current problem to a directives file. |
|
void | writeIIS (int iis, std::optional< std::string > const &filename, int filetype) |
Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS). |
|
void | writeIIS (int iis, std::optional< std::string > const &filename, int filetype, std::optional< std::string > const &flags) |
Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS). |
|
void | writeProb () |
Writes the current problem to an MPS or LP file. |
|
void | writeProb (std::optional< std::string > const &filename) |
Writes the current problem to an MPS or LP file. |
|
void | writeProb (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Writes the current problem to an MPS or LP file. |
|
void | writePrtSol () |
Writes the current solution to a fixed format ASCII file, problem_name .prt . |
|
void | writePrtSol (std::optional< std::string > const &filename) |
Writes the current solution to a fixed format ASCII file, problem_name .prt . |
|
void | writePrtSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Writes the current solution to a fixed format ASCII file, problem_name .prt . |
|
void | writeSlxSol () |
Creates an ASCII solution file (.slx ) using a similar format to MPS files. |
|
void | writeSlxSol (std::optional< std::string > const &filename) |
Creates an ASCII solution file (.slx ) using a similar format to MPS files. |
|
void | writeSlxSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Creates an ASCII solution file (.slx ) using a similar format to MPS files. |
|
void | writeSol () |
Writes the current solution to a CSV format ASCII file, problem_name.asc (and .hdr ). |
|
void | writeSol (std::optional< std::string > const &filename) |
Writes the current solution to a CSV format ASCII file, problem_name.asc (and .hdr ). |
|
void | writeSol (std::optional< std::string > const &filename, std::optional< std::string > const &flags) |
Writes the current solution to a CSV format ASCII file, problem_name.asc (and .hdr ). |
|
Static Public Member Functions |
|
static void | console (XPRSProblem &prob, char const *msg, int msglen, int msgtype) |
Default implementation for message listener. |
|
Public Attributes |
|
Attributes | attributes |
Attributess for this problem. |
|
Controls | controls |
Controlss for this problem. |
|
Static Public Attributes |
|
static constexpr char const | EQ = 'E' |
Constraint sense for == constraints. |
|
static constexpr char const | GEQ = 'G' |
Constraint sense for >= constraints. |
|
static constexpr char const | LEQ = 'L' |
Constraint sense for <= constraints. |
|
Protected Member Functions |
|
XPRSProblem (XPRSprob p) | |
Create a new instance from an existing low-level pointer. |
|
Detailed Description
Xpress solver problem.
This class represents a problem instances as well as the solver solving that problem.
Constructor & Destructor Documentation
XPRSProblem()
|
inline |
Create a new instance with name and allocating a license.
- Parameters
-
name The problem name. licpath Path to license file.
Member Function Documentation
addAfterObjectiveCallback()
|
inline |
Add an afterobjective
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addBarIterationCallback()
|
inline |
Add a bariteration
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addBarlogCallback()
|
inline |
Add a barlog
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addBeforeObjectiveCallback()
|
inline |
Add a beforeobjective
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addBeforeSolveCallback()
|
inline |
Add a beforesolve
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addChangeBranchObjectCallback()
|
inline |
Add a changebranchobject
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addCheckTimeCallback()
|
inline |
Add a checktime
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addCols() [1/2]
|
inline |
Adds columns to the optimizer matrix.
- Parameters
-
ncols Number of new columns. ncoefs Number of new nonzeros in the added columns. objcoef Double array of length ncols
containing the objective function coefficients of the new columns. As of version 43.00 this can benull
to indicate that all newly created variables have an objective coefficient of 0 (zero).start Integer array of length ncols
containing the offsets in therowind
androwcoef
arrays of the start of the elements for each column. This can benull
if thencols
or thencoefs
argument is 0 (zero).rowind Integer array of length ncoefs
containing the row indices for the elements in each column.rowcoef Double array of length ncoefs
containing the element values.lb Double array of length ncols
containing the lower bounds on the added columns. This can benull
in which case all variables will have a lower bound of 0.ub Double array of length ncols
containing the upper bounds on the added columns. This can benull
in which hcase all variables will have an infinite upper bound.
addCols() [2/2]
|
inline |
Adds columns to the optimizer matrix.
- Parameters
-
ncols Number of new columns. ncoefs Number of new nonzeros in the added columns. objcoef Double array of length ncols
containing the objective function coefficients of the new columns. As of version 43.00 this can benull
to indicate that all newly created variables have an objective coefficient of 0 (zero).start Integer array of length ncols
containing the offsets in therowind
androwcoef
arrays of the start of the elements for each column. This can benull
if thencols
or thencoefs
argument is 0 (zero).rowind Integer array of length ncoefs
containing the row indices for the elements in each column.rowcoef Double array of length ncoefs
containing the element values.lb Double array of length ncols
containing the lower bounds on the added columns. This can benull
in which case all variables will have a lower bound of 0.ub Double array of length ncols
containing the upper bounds on the added columns. This can benull
in which hcase all variables will have an infinite upper bound.
addColumn()
|
inline |
Add a single column to this problem.
- Parameters
-
lb Lower bound for column. ub Upper bound for column. type Type for column. name Name for column, can be std::nullopt
.
- Since
- 44.00
addColumns() [1/15]
|
inline |
Create an 1-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns std::unordered_map<K1 ,int> x = prob->addColumns(coll1 ) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMapBuilder
for details of how to modify the specification in the builder.
- Parameters
-
coll1 Data for dimension 1.
- Template Parameters
-
Coll0 Something that supports begin()
andend()
and contains values of typeK1
.K1 Data type for dimension 1.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [2/15]
|
inline |
Create an 2-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap2<K1 ,K2,int> x = prob->addColumns(coll1 ,coll2) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap2Builder
for details of how to modify the specification in the builder.
- Parameters
-
coll1 Data for dimension 1. coll2 Data for dimension 2.
- Template Parameters
-
Coll0 Something that supports begin()
andend()
and contains values of typeK1
.Coll1 Something that supports begin()
andend()
and contains values of typeK2
.K1 Data type for dimension 1. K2 Data type for dimension 2.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [3/15]
|
inline |
Create an 3-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap3<K1 ,K2 ,K3,int> x = prob->addColumns(coll1 ,coll2 ,coll3) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap3Builder
for details of how to modify the specification in the builder.
- Parameters
-
coll1 Data for dimension 1. coll2 Data for dimension 2. coll3 Data for dimension 3.
- Template Parameters
-
Coll0 Something that supports begin()
andend()
and contains values of typeK1
.Coll1 Something that supports begin()
andend()
and contains values of typeK2
.Coll2 Something that supports begin()
andend()
and contains values of typeK3
.K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [4/15]
|
inline |
Create an 4-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap4<K1 ,K2 ,K3 ,K4,int> x = prob->addColumns(coll1 ,coll2 ,coll3 ,coll4) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap4Builder
for details of how to modify the specification in the builder.
- Parameters
-
coll1 Data for dimension 1. coll2 Data for dimension 2. coll3 Data for dimension 3. coll4 Data for dimension 4.
- Template Parameters
-
Coll0 Something that supports begin()
andend()
and contains values of typeK1
.Coll1 Something that supports begin()
andend()
and contains values of typeK2
.Coll2 Something that supports begin()
andend()
and contains values of typeK3
.Coll3 Something that supports begin()
andend()
and contains values of typeK4
.K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3. K4 Data type for dimension 4.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [5/15]
|
inline |
Create an 5-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap5<K1 ,K2 ,K3 ,K4 ,K5,int> x = prob->addColumns(coll1 ,coll2 ,coll3 ,coll4 ,coll5) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap5Builder
for details of how to modify the specification in the builder.
- Parameters
-
coll1 Data for dimension 1. coll2 Data for dimension 2. coll3 Data for dimension 3. coll4 Data for dimension 4. coll5 Data for dimension 5.
- Template Parameters
-
Coll0 Something that supports begin()
andend()
and contains values of typeK1
.Coll1 Something that supports begin()
andend()
and contains values of typeK2
.Coll2 Something that supports begin()
andend()
and contains values of typeK3
.Coll3 Something that supports begin()
andend()
and contains values of typeK4
.Coll4 Something that supports begin()
andend()
and contains values of typeK5
.K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3. K4 Data type for dimension 4. K5 Data type for dimension 5.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [6/15]
|
inline |
Create an 1-dimensional array of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toArray()
function.
// Create a multi-dimensional array of binary columns std::vector< int> x = prob->addColumns(dim) .withType(xpress::objects::ColumnType.Binary) .toArray();
See xpress::VariableBuilder::ColumnArrayBuilder
for details of how to modify the specification in the builder.
- Parameters
-
dim Dimension.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [7/15]
|
inline |
Create an 2-dimensional array of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toArray()
function.
// Create a multi-dimensional array of binary columns std::vector< std::vector<int> > x = prob->addColumns(dim1 ,dim2) .withType(xpress::objects::ColumnType.Binary) .toArray();
See xpress::VariableBuilder::ColumnArray2Builder
for details of how to modify the specification in the builder.
- Parameters
-
dim1 Dimension 1. dim2 Dimension 2.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [8/15]
|
inline |
Create an 3-dimensional array of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toArray()
function.
// Create a multi-dimensional array of binary columns std::vector< std::vector< std::vector<int> > > x = prob->addColumns(dim1 ,dim2 ,dim3) .withType(xpress::objects::ColumnType.Binary) .toArray();
See xpress::VariableBuilder::ColumnArray3Builder
for details of how to modify the specification in the builder.
- Parameters
-
dim1 Dimension 1. dim2 Dimension 2. dim3 Dimension 3.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [9/15]
|
inline |
Create an 4-dimensional array of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toArray()
function.
// Create a multi-dimensional array of binary columns std::vector< std::vector< std::vector< std::vector<int> > > > x = prob->addColumns(dim1 ,dim2 ,dim3 ,dim4) .withType(xpress::objects::ColumnType.Binary) .toArray();
See xpress::VariableBuilder::ColumnArray4Builder
for details of how to modify the specification in the builder.
- Parameters
-
dim1 Dimension 1. dim2 Dimension 2. dim3 Dimension 3. dim4 Dimension 4.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [10/15]
|
inline |
Create an 5-dimensional array of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toArray()
function.
// Create a multi-dimensional array of binary columns std::vector< std::vector< std::vector< std::vector< std::vector<int> > > > > x = prob->addColumns(dim1 ,dim2 ,dim3 ,dim4 ,dim5) .withType(xpress::objects::ColumnType.Binary) .toArray();
See xpress::VariableBuilder::ColumnArray5Builder
for details of how to modify the specification in the builder.
- Parameters
-
dim1 Dimension 1. dim2 Dimension 2. dim3 Dimension 3. dim4 Dimension 4. dim5 Dimension 5.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [11/15]
|
inline |
Create an 1-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns std::unordered_map<K1 ,int> x = prob->addColumns(coll1 ) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMapBuilder
for details of how to modify the specification in the builder.
- Parameters
-
arr1 Data for the builder.
- Template Parameters
-
K1 Data type for dimension 1.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [12/15]
|
inline |
Create an 2-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap2<K1 ,K2,int> x = prob->addColumns(coll1 ,coll2) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap2Builder
for details of how to modify the specification in the builder.
- Parameters
-
arr1 Data for the builder. arr2 Data for the builder.
- Template Parameters
-
K1 Data type for dimension 1. K2 Data type for dimension 2.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [13/15]
|
inline |
Create an 3-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap3<K1 ,K2 ,K3,int> x = prob->addColumns(coll1 ,coll2 ,coll3) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap3Builder
for details of how to modify the specification in the builder.
- Parameters
-
arr1 Data for the builder. arr2 Data for the builder. arr3 Data for the builder.
- Template Parameters
-
K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [14/15]
|
inline |
Create an 4-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap4<K1 ,K2 ,K3 ,K4,int> x = prob->addColumns(coll1 ,coll2 ,coll3 ,coll4) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap4Builder
for details of how to modify the specification in the builder.
- Parameters
-
arr1 Data for the builder. arr2 Data for the builder. arr3 Data for the builder. arr4 Data for the builder.
- Template Parameters
-
K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3. K4 Data type for dimension 4.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addColumns() [15/15]
|
inline |
Create an 5-dimensional map of columns.
This function returns a builder that generates columns according to a specification. The specification can be modified. In order to actually create the columns and get their indices, you have to call the returned builder's toMap()
function.
// Create a multi-dimensional array of binary columns xpress::maps::HashMap5<K1 ,K2 ,K3 ,K4 ,K5,int> x = prob->addColumns(coll1 ,coll2 ,coll3 ,coll4 ,coll5) .withType(xpress::objects::ColumnType.Binary) .toMap();
See xpress::VariableBuilder::ColumnMap5Builder
for details of how to modify the specification in the builder.
- Parameters
-
arr1 Data for the builder. arr2 Data for the builder. arr3 Data for the builder. arr4 Data for the builder. arr5 Data for the builder.
- Template Parameters
-
K1 Data type for dimension 1. K2 Data type for dimension 2. K3 Data type for dimension 3. K4 Data type for dimension 4. K5 Data type for dimension 5.
- Returns
- A builder that will create the columns.
- Since
- 44.00
addComputeRestartCallback()
|
inline |
Add a computerestart
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addCut() [1/2]
|
inline |
Add a single cut to the problem.
- Parameters
-
cuttype The type of the cut. cut The cut to add
- See also
- addCut(int, std::vector<int>, std::vector<double>, char, double)
- Since
- 44.00
addCut() [2/2]
|
inline |
Add a single cut to the problem.
- Parameters
-
cuttype The type of the cut. This can be any number chosen by the user to identify their cuts. colind Array of column indices for the non-zeros for the cut. This can be nullptr
. If notnullptr
then it must have the same length ascolval
andcolval[k]
must be the non-zero coefficient in the cut for columncolind[k]
.colval Array of column values for the non-zeros for the cut. This can be nullptr
. If notnullptr
then it must have the same length ascolind
andcolval[k]
must be the non-zero coefficient in the cut for columncolind[k]
.rowtype The row type of the cut (less-or-equal, equal, greater-or-equal). The type is specified as 'L'
,'E'
, or'G'
.rhs The right-hand side for the cut.
- See also
- addCuts(int, std::vector<int>, std::vector<byte>, std::vector<double>, std::vector<int>, std::vector<int>, std::vector<double>)
- Since
- 44.00
addCutlogCallback()
|
inline |
Add a cutlog
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addCuts() [1/2]
|
inline |
Adds cuts directly to the matrix at the current node.
The cuts will automatically be added to the cut pool. Cuts added to a node will automatically be inherited on any descendant node, unless explicitly deleted with a call to XPRSdelcuts
.
- Parameters
-
ncuts Number of cuts to add. cuttype Integer array of length ncuts
containing the user assigned cut types. The cut types can be any integer chosen by the user, and are used to identify the cuts in other cut manager routines using user supplied parameters. The cut type can be interpreted as an integer or a bitmap- see
XPRSdelcuts
.
rowtype Character array of length ncuts
containing the row types:-
L
: indicates a <= row; -
G
: indicates a >= row; -
E
: indicates an = row.
rhs Double array of length ncuts
containing the right hand side elements for the cuts.start Integer array containing offset into the colind
andcutcoef
arrays indicating the start of each cut. This array is of lengthncuts+1
with the last element,start[ncuts]
, being where cutncuts+1
would start.colind Integer array of length start[ncuts]
containing the column indices in the cuts.cutcoef Double array of length start[ncuts]
containing the matrix values for the cuts. - see
addCuts() [2/2]
|
inline |
Adds cuts directly to the matrix at the current node.
The cuts will automatically be added to the cut pool. Cuts added to a node will automatically be inherited on any descendant node, unless explicitly deleted with a call to XPRSdelcuts
.
- Parameters
-
ncuts Number of cuts to add. cuttype Integer array of length ncuts
containing the user assigned cut types. The cut types can be any integer chosen by the user, and are used to identify the cuts in other cut manager routines using user supplied parameters. The cut type can be interpreted as an integer or a bitmap- see
XPRSdelcuts
.
rowtype Character array of length ncuts
containing the row types:-
L
: indicates a <= row; -
G
: indicates a >= row; -
E
: indicates an = row.
rhs Double array of length ncuts
containing the right hand side elements for the cuts.start Integer array containing offset into the colind
andcutcoef
arrays indicating the start of each cut. This array is of lengthncuts+1
with the last element,start[ncuts]
, being where cutncuts+1
would start.colind Integer array of length start[ncuts]
containing the column indices in the cuts.cutcoef Double array of length start[ncuts]
containing the matrix values for the cuts. - see
addGapNotifyCallback()
|
inline |
Add a gapnotify
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addGenCons() [1/2]
|
inline |
Adds one or more general constraints to the problem.
Each general constraint y = f(x1, ..., xn, c1, ..., cn)
consists of one or more (input) columns xi, zero or more constant values ci and a resultant (output column) y, different from all xi. General constraints include maximum
and minimum
(arbitrary number of input columns of any type and arbitrary number of input values, at least one total), and
and or
(at least one binary input column, no constant values, binary resultant) and absolute value
(exactly one input column of arbitrary type, no constant values).
- Parameters
-
ncons The number of general constraints to add. ncols The total number of input variables in general constraints that should be added. nvals The total number of constant values in general constraints that should be added. contype Integer array of length ncons
containing the types of the general constraints:-
XPRS_GENCONS_MAX (0)
: indicates amaximum
constraint; -
XPRS_GENCONS_MIN (1)
: indicates aminimum
constraint; -
XPRS_GENCONS_AND (2)
: indicates anand
constraint. -
XPRS_GENCONS_OR (3)
: indicates anor
constraint; -
XPRS_GENCONS_ABS (4)
: indicates anabsolute value
constraint.
resultant Integer array of length ncons
containing the indices of the output variables of the general constraints.colstart Integer array of length ncons
containing the start index of each general constraint in thecolind
array.colind Integer array of length ncols
containing the input variables in all general constraints.valstart Integer array of length ncons
containing the start index of each general constraint in theval
array (may benull
ifncoefs = 0
).val Double array of length nvals
containing the constant values in all general constraints (may benull
ifncoefs = 0
). -
addGenCons() [2/2]
|
inline |
Adds one or more general constraints to the problem.
Each general constraint y = f(x1, ..., xn, c1, ..., cn)
consists of one or more (input) columns xi, zero or more constant values ci and a resultant (output column) y, different from all xi. General constraints include maximum
and minimum
(arbitrary number of input columns of any type and arbitrary number of input values, at least one total), and
and or
(at least one binary input column, no constant values, binary resultant) and absolute value
(exactly one input column of arbitrary type, no constant values).
- Parameters
-
ncons The number of general constraints to add. ncols The total number of input variables in general constraints that should be added. nvals The total number of constant values in general constraints that should be added. contype Integer array of length ncons
containing the types of the general constraints:-
XPRS_GENCONS_MAX (0)
: indicates amaximum
constraint; -
XPRS_GENCONS_MIN (1)
: indicates aminimum
constraint; -
XPRS_GENCONS_AND (2)
: indicates anand
constraint. -
XPRS_GENCONS_OR (3)
: indicates anor
constraint; -
XPRS_GENCONS_ABS (4)
: indicates anabsolute value
constraint.
resultant Integer array of length ncons
containing the indices of the output variables of the general constraints.colstart Integer array of length ncons
containing the start index of each general constraint in thecolind
array.colind Integer array of length ncols
containing the input variables in all general constraints.valstart Integer array of length ncons
containing the start index of each general constraint in theval
array (may benull
ifncoefs = 0
).val Double array of length nvals
containing the constant values in all general constraints (may benull
ifncoefs = 0
). -
addInfnodeCallback()
|
inline |
Add an infnode
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addIntsolCallback()
|
inline |
Add an intsol
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addLplogCallback()
|
inline |
Add a lplog
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMessageCallback()
|
inline |
Add a message
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMiplogCallback()
|
inline |
Add a miplog
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMipSol() [1/3]
|
inline |
Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.
- Parameters
-
length Number of columns for which a value is provided. solval Double array of length length
containing solution values.colind Optional integer array of length length
containing the column indices for the solution values provided insolval
. Should benull
whenlength
is equal toCOLS
, in which case it is assumed thatsolval
provides a complete solution vector.name An optional name to associate with the solution. Can be null.
addMipSol() [2/3]
|
inline |
Add a MIP solution.
This is a convenience wrapper for addMipSol(int, Array<double const> const&, Array<int const> const&, std::optional<std::string> const &)
.
- Parameters
-
val objects.Variable values. ind objects.Variable indices.
- See also
- addMipSol(int, Array<double const> const&, Array<int const> const&, std::optional<std::string> const &)
- Since
- 44.00
addMipSol() [3/3]
|
inline |
Add a MIP solution.
This is a convenience wrapper for addMipSol(int, Array<double const> const&, Array<int const> const&, std::optional<std::string> const &)
.
- Parameters
-
val objects.Variable values. ind objects.Variable indices. name Name of solution.
- See also
- addMipSol(int, Array<double const> const&, Array<int const> const&, std::optional<std::string> const &)
- Since
- 44.00
addMipThreadCallback()
|
inline |
Add a mipthread
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMipThreadDestroyCallback()
|
inline |
Add a mipthreaddestroy
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMsJobEndCallback()
|
inline |
Add a msjobend
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMsJobStartCallback()
|
inline |
Add a msjobstart
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addMsWinnerCallback()
|
inline |
Add a mswinner
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addNames() [1/2]
|
inline |
When a model is loaded, the rows, columns, sets, piecewise linear and general constraints of the model may not have names associated with them.
This may not be important as the rows, columns, sets, piecewise linear and general constraints can be referred to by their sequence numbers. However, if you wish row, column, set, piecewise linear and general constraint names to appear in the ASCII solutions files, the names for a range of rows/columns/... can be added with XPRSaddnames
.
- Parameters
-
type -
XPRS_NAMES_ROW
:(=1)
for row names; -
XPRS_NAMES_COLUMN
:(=2)
for column names; -
XPRS_NAMES_SET
:(=3)
for set names; -
XPRS_NAMES_PWLCONS
:(=4)
for piecewise linear constraint names; -
XPRS_NAMES_GENCONS
:(=5)
for general constraint names; -
XPRS_NAMES_OBJECTIVE
:(=6)
for objective names.
names Character buffer containing the null-terminated string names. The length of an individual name (including the terminating NUL
) must not exceed 1MB.first Start of the range of rows, columns, sets, piecewise linear constraints, general constraints or objectives. last End of the range of rows, columns, sets, piecewise linear constraints, general constraints or objectives. -
addNames() [2/2]
|
inline |
Add names to model.
Note that if this method fails, then it is unspecified how many of the names were changed.
- Parameters
-
type Type of objects to which to add name. names The names to set. Must not be nullptr
and must have length at least1 + last - first
.first Index of first object to set the name for. last Index of last object to set the name for.
- Since
- 44.00
addNewnodeCallback()
|
inline |
Add a newnode
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addNlpCoefEvalErrorCallback()
|
inline |
Add a nlpcoefevalerror
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addNodecutoffCallback()
|
inline |
Add a nodecutoff
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addNodeLPSolvedCallback()
|
inline |
Add a nodelpsolved
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addObj()
|
inline |
Appends an objective function with the given coefficients to a multi-objective problem.
The weight and priority of the objective are set to the given values.
- Parameters
-
ncols Number of objective function coefficient elements to add. colind Integer array of length ncols
containing the indices of the columns whose objective coefficients will change. An index of-1
indicates that the fixed part of the objective function on the right hand side should change.objcoef Double array of length ncols
giving the new objective function coefficients.priority The priority for the objective function. During optimization, objectives with the same priority are combined together in a weighted sum. weight The weight for the objective function. If the weight is negative, the sense of this objective is reversed.
addOptnodeCallback()
|
inline |
Add an optnode
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addPreIntsolCallback()
|
inline |
Add a preintsol
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addPrenodeCallback()
|
inline |
Add a prenode
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addPresolveCallback()
|
inline |
Add a presolve
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addPwlCons() [1/2]
|
inline |
Adds one or more piecewise linear constraints to the problem.
Each piecewise linear constraint y = f(x)
consists of an (input) column x, a (different) resultant (output column) y and a piecewise linear function f. The piecewise linear function f is described by at least two breakpoints, which are given as combinations of x- and y-values. Discontinuous piecewise linear functions are supported, in this case both the left and right limit at a given point need to be entered as breakpoints. To differentiate between left and right limit, the breakpoints need to be given as a list with non-decreasing x-values.
- Parameters
-
npwls The number of piecewise linear constraints to add. npoints The total number of breakpoints of all piecewise linear constraints that should be added. colind Integer array of length npwls
containing the indices of the input variables x of the piecewise linear functions.resultant Integer array of length npwls
containing the indices of the output variables y of the piecewise linear functions.start Integer array of length npwls
containing the start index of each piecewise linear constraint in thexval
andyval
arrays.xval Double array of length npoints
containing the x-values of the breakpoints.yval Double array of length npoints
containing the y-values of the breakpoints.
addPwlCons() [2/2]
|
inline |
Adds one or more piecewise linear constraints to the problem.
Each piecewise linear constraint y = f(x)
consists of an (input) column x, a (different) resultant (output column) y and a piecewise linear function f. The piecewise linear function f is described by at least two breakpoints, which are given as combinations of x- and y-values. Discontinuous piecewise linear functions are supported, in this case both the left and right limit at a given point need to be entered as breakpoints. To differentiate between left and right limit, the breakpoints need to be given as a list with non-decreasing x-values.
- Parameters
-
npwls The number of piecewise linear constraints to add. npoints The total number of breakpoints of all piecewise linear constraints that should be added. colind Integer array of length npwls
containing the indices of the input variables x of the piecewise linear functions.resultant Integer array of length npwls
containing the indices of the output variables y of the piecewise linear functions.start Integer array of length npwls
containing the start index of each piecewise linear constraint in thexval
andyval
arrays.xval Double array of length npoints
containing the x-values of the breakpoints.yval Double array of length npoints
containing the y-values of the breakpoints.
addQMatrix() [1/2]
|
inline |
Adds a new quadratic matrix into a row defined by triplets.
- Parameters
-
row Index of the row where the quadratic matrix is to be added. ncoefs Number of triplets used to define the quadratic matrix. This may be less than the number of coefficients in the quadratic matrix, since off diagonals and their transposed pairs are defined by one triplet. rowqcol1 First index in the triplets. rowqcol2 Second index in the triplets. rowqcoef Coefficients in the triplets.
addQMatrix() [2/2]
|
inline |
Adds a new quadratic matrix into a row defined by triplets.
- Parameters
-
row Index of the row where the quadratic matrix is to be added. ncoefs Number of triplets used to define the quadratic matrix. This may be less than the number of coefficients in the quadratic matrix, since off diagonals and their transposed pairs are defined by one triplet. rowqcol1 First index in the triplets. rowqcol2 Second index in the triplets. rowqcoef Coefficients in the triplets.
addRow() [1/5]
|
inline |
Add a single row to the problem.
- Parameters
-
row The row to add.
- Returns
- The index of the newly created row.
- See also
- addRow(std::vector<int>, std::vector<double>, char, double, double, std::optional<std::string>)
- Since
- 44.00
addRow() [2/5]
|
inline |
Add a single row to the problem.
- Parameters
-
row The row to add. name The name for the row, can be std::nullopt
.
- Returns
- The index of the newly created row.
- See also
- addRow(std::vector<int>, std::vector<double>, char, double, double, std::optional<std::string>)
- Since
- 44.00
addRow() [3/5]
|
inline |
Add a single row to the problem.
This is a short cut for addRow(colind, colval, rowtype, rhs, nullptr, nullptr)
.
- Parameters
-
colind Array of column indices for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolval
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.colval Array of column values for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolind
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.rowtype The type of the row. rhs The right-hand side for the row
- Returns
- The index of the newly created row.
- See also
- addRow(std::vector<int>, std::vector<double>, char, double, double, std::optional<std::string>)
- Since
- 44.00
addRow() [4/5]
|
inline |
Add a single row to the problem.
- Parameters
-
colind Array of column indices for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolval
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.colval Array of column values for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolind
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.rowtype The type of the row. rhs The right-hand side for the row. rng The range value for the row. name The name of the row. This can be std::nullopt
.
- Returns
- The index of the newly created row.
- See also
- addRows(int, int, std::vector<char>, std::vector<double>, std::vector<double>, std::vector<int>, std::vector<int>, std::vector<double>)
- Since
- 44.00
addRow() [5/5]
|
inline |
Add a single row to the problem.
- Parameters
-
colind Array of column indices for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolval
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.colval Array of column values for the non-zeros for the row. This can be nullptr
. If notnullptr
then it must have the same length ascolind
andcolval[k]
must be the non-zero coefficient in the row for columncolind[k]
.rowtype The type of the row. rhs The right-hand side for the row. name The name of the row. This can be std::nullopt
.
- Returns
- The index of the newly created row.
- See also
- addRows(int, int, std::vector<char>, std::vector<double>, std::vector<double>, std::vector<int>, std::vector<int>, std::vector<double>)
- Since
- 44.00
addRows() [1/4]
|
inline |
Adds rows to the optimizer matrix.
- Parameters
-
nrows Number of new rows. ncoefs Number of new nonzeros in the added rows. rowtype Character array of length nrows containing the row types: -
L
: indicates a <= row; -
G
: indicates >= row; -
E
: indicates an = row. -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side elements.rng Double array of length nrows
containing the row range elements. This may benull
if there are no ranged constraints. The values in therng
array will only be read forR
type rows. The entries for other type rows will be ignored. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.start Integer array of length nrows
containing the offsets in thecolind
androwcoef
arrays of the start of the elements for each row.colind Integer array of length ncoefs
containing the (contiguous) column indices for the elements in each row.rowcoef Double array of length ncoefs
containing the (contiguous) element values. -
addRows() [2/4]
|
inline |
Adds rows to the optimizer matrix.
- Parameters
-
nrows Number of new rows. ncoefs Number of new nonzeros in the added rows. rowtype Character array of length nrows containing the row types: -
L
: indicates a <= row; -
G
: indicates >= row; -
E
: indicates an = row. -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side elements.start Integer array of length nrows
containing the offsets in thecolind
androwcoef
arrays of the start of the elements for each row.colind Integer array of length ncoefs
containing the (contiguous) column indices for the elements in each row.rowcoef Double array of length ncoefs
containing the (contiguous) element values. -
addRows() [3/4]
|
inline |
Adds rows to the optimizer matrix.
- Parameters
-
nrows Number of new rows. ncoefs Number of new nonzeros in the added rows. rowtype Character array of length nrows containing the row types: -
L
: indicates a <= row; -
G
: indicates >= row; -
E
: indicates an = row. -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side elements.rng Double array of length nrows
containing the row range elements. This may benull
if there are no ranged constraints. The values in therng
array will only be read forR
type rows. The entries for other type rows will be ignored. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.start Integer array of length nrows
containing the offsets in thecolind
androwcoef
arrays of the start of the elements for each row.colind Integer array of length ncoefs
containing the (contiguous) column indices for the elements in each row.rowcoef Double array of length ncoefs
containing the (contiguous) element values. -
addRows() [4/4]
|
inline |
Adds rows to the optimizer matrix.
- Parameters
-
nrows Number of new rows. ncoefs Number of new nonzeros in the added rows. rowtype Character array of length nrows containing the row types: -
L
: indicates a <= row; -
G
: indicates >= row; -
E
: indicates an = row. -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side elements.start Integer array of length nrows
containing the offsets in thecolind
androwcoef
arrays of the start of the elements for each row.colind Integer array of length ncoefs
containing the (contiguous) column indices for the elements in each row.rowcoef Double array of length ncoefs
containing the (contiguous) element values. -
addSet()
|
inline |
Add a single set constraint to this problem.
- Parameters
-
type Set type. elements The elements in the set. weights Weights for elements. If this is nullptr
then weights 1, 2, 3, ... will be used.name Name of set. Can be std::nullopt
.
- Returns
- The set constraint.
- Since
- 44.00
addSetNames()
|
inline |
When a model with MIP entities is loaded, any special ordered sets may not have names associated with them.
If you wish names to appear in the ASCII solutions files, the names for a range of sets can be added with this function.
- Parameters
-
names Character buffer containing the null-terminated string names. first Start of the range of sets. last End of the range of sets.
addSets() [1/4]
|
inline |
Create multiple set constraints.
- Parameters
-
count Number of sets to add. start Array of length at least count
that indicates where insetind
andsetref
the data for each set starts.type Array of length at least count
that specifies the set types.setind The columns in each set. setref Reference values for columns in each set. This can be nullptr
in which case values 1, 2, 3, ... will be used for each set.names Set names. Can be std::nullopt
.
- Returns
- Indices of the newly created sets.
- Since
- 44.00
addSets() [2/4]
|
inline |
Allows sets to be added to the problem after passing it to the Optimizer using the input routines.
- Parameters
-
nsets Number of new sets. nelems Number of new nonzeros in the added sets. settype Character array of length nsets containing the set types: -
1
: indicates a SOS1; -
2
: indicates a SOS2;
start Integer array of length nsets
containing the offsets in thecolind
andrefval
arrays of the start of the elements for each set.colind Integer array of length nelems
containing the (contiguous) column indices for the elements in each set.refval Double array of length nelems
containing the (contiguous) reference values. These define the order for SOS2 constraints and may be used in branching for both types. -
addSets() [3/4]
|
inline |
Allows sets to be added to the problem after passing it to the Optimizer using the input routines.
- Parameters
-
nsets Number of new sets. nelems Number of new nonzeros in the added sets. settype Character array of length nsets containing the set types: -
1
: indicates a SOS1; -
2
: indicates a SOS2;
start Integer array of length nsets
containing the offsets in thecolind
andrefval
arrays of the start of the elements for each set.colind Integer array of length nelems
containing the (contiguous) column indices for the elements in each set.refval Double array of length nelems
containing the (contiguous) reference values. These define the order for SOS2 constraints and may be used in branching for both types. -
addSets() [4/4]
|
inline |
Add multiple set constraints to the problem.
- Parameters
-
type Constraint types. elements Elements in each constraint. weights Weights for each constraint. If this is nullptr
then weights 1, 2, 3, ... will be used.name Constraint names. Can be nullptr
.
- Returns
- The set constraints.
- Since
- 44.00
addSlpCascadeEndCallback()
|
inline |
Add a slpcascadeend
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpCascadeStartCallback()
|
inline |
Add a slpcascadestart
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpCascadeVarCallback()
|
inline |
Add a slpcascadevar
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpCascadeVarFailCallback()
|
inline |
Add a slpcascadevarfail
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpConstructCallback()
|
inline |
Add a slpconstruct
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpDrColCallback()
|
inline |
Add a slpdrcol
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpIntSolCallback()
|
inline |
Add a slpintsol
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpIterEndCallback()
|
inline |
Add a slpiterend
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpIterStartCallback()
|
inline |
Add a slpiterstart
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpIterVarCallback()
|
inline |
Add a slpitervar
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addSlpPreUpdateLinearizationCallback()
|
inline |
Add a slppreupdatelinearization
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
addUserSolNotifyCallback()
|
inline |
Add an usersolnotify
callback.
- Parameters
-
callback Callback function. prio Callback priority.
- Returns
- A handle that can be used to remove the callback later.
alter()
|
inline |
Alters or changes matrix elements, right hand sides and constraint senses in the current problem.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters specifying the file to be read. If omitted, the default problem_name is used with a.alt
extension.
basisStability()
|
inline |
Calculates various measures for the stability of the current basis, including the basis condition number.
- Parameters
-
type -
0
: Condition number of the basis. -
1
: Stability measure for the solution relative to the current basis. -
2
: Stability measure for the duals relative to the current basis. -
3
: Stability measure for the right hand side relative to the current basis. -
4
: Stability measure for the basic part of the objective relative to the current basis.
norm -
0
: Use the infinity norm. -
1
: Use the 1 norm. -
2
: Use the Euclidian norm for vectors, and the Frobenius norm for matrices.
scaled If the stability values are to be calculated in the scaled, or the unscaled matrix. -
bndSA()
|
inline |
Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds.
If the bounds are varied within these ranges the current basis remains optimal and feasible.
- Parameters
-
ncols Number of variables whose sensitivity is sought. colind Integer array of length ncols
containing the indices of the columns whose bounds' ranges are required.lblower Double array of length ncols
where the variable lower bound lower range values are to be returned.lbupper Double array of length ncols
where the variable lower bound upper range values are to be returned.ublower Double array of length ncols
where the variable upper bound lower range values are to be returned.ubupper Double array of length ncols
where the variable upper bound upper range values are to be returned.
bTran()
|
inline |
Post-multiplies a (row) vector provided by the user by the inverse of the current basis.
- Parameters
-
vec Double array of length ROWS
containing the values by which the basis inverse is to be multiplied. The transformed values will also be returned in this array.
calcObjective()
|
inline |
Calculates the objective value of a given solution.
- Parameters
-
solution Double array of length COLS that holds the solution.
calcObjN()
|
inline |
Calculates the objective value of the given objective function in a multi-objective problem.
- Parameters
-
objidx Index of the objective function to calculate. solution Double array of length COLS
that holds the solution, ornull
to use the current solution.
calcReducedCosts()
|
inline |
Calculates the reduced cost values for a given (row) dual solution.
- Parameters
-
duals Double array of length ROWS that holds the dual solution to calculate the reduced costs for. solution Optional double array of length COLS that holds the primal solution. This is necessary for quadratic problems.
calcSlacks()
|
inline |
Calculates the row slack values for a given solution.
- Parameters
-
solution Double array of length COLS that holds the solution to calculate the slacks for.
calcSolInfo()
|
inline |
Calculates the required property of a solution, like maximum infeasibility of a given primal and dual solution.
- Parameters
-
solution Double array of length COLS that holds the solution. May be null
when asking for dual infeasibility.duals Double array of length ROWS that holds the dual solution. May be null
when asking for primal/MIP infeasibility.property Defined the property to be calculated. -
XPRS_SOLINFO_ABSPRIMALINFEAS
: the calculated maximum absolute primal infeasibility is returned. -
XPRS_SOLINFO_RELPRIMALINFEAS
: the calculated maximum relative primal infeasibility is returned. -
XPRS_SOLINFO_ABSDUALINFEAS
: the calculated maximum absolute dual infeasibility is returned. -
XPRS_SOLINFO_RELDUALINFEAS
: the calculated maximum relative dual infeasibility is returned. -
XPRS_SOLINFO_MAXMIPFRACTIONAL
: the calculated maximum absolute MIP fractionality or SOS infeasibility. -
XPRS_SOLINFO_ABSMIPINFEAS
: the calculated maximum absolute MIP infeasibility (including delayed rows, indicators, general and piecewise linear constraints) is returned. -
XPRS_SOLINFO_RELMIPINFEAS
: the calculated maximum relative MIP infeasibility (including delayed rows, indicators, general and piecewise linear constraints) is returned.
-
chgBounds() [1/2]
|
inline |
Change bounds of a single column.
- Parameters
-
j Column to change. lb New lower bound. ub New upper bound.
- See also
- chgBounds(int, std::vector<int>, std::vector<char>, std::vector<double>)
- Since
- 44.00
chgBounds() [2/2]
|
inline |
Used to change the bounds on columns in the matrix.
- Parameters
-
nbounds Number of bounds to change. colind Integer array of size nbounds
containing the indices of the columns on which the bounds will change.bndtype Character array of length nbounds
indicating the type of bound to change:-
U
: indicates change the upper bound; -
L
: indicates change the lower bound; -
B
: indicates change both bounds, i.e. fix the column.
bndval Double array of length nbounds
giving the new bound values. -
chgCoef()
|
inline |
Used to change a single coefficient in the matrix.
If the coefficient does not already exist, a new coefficient will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new row.
- Parameters
-
row Row index for the coefficient. col Column index for the coefficient. coef New value for the coefficient. If coef
is zero, any existing coefficient will be deleted.
chgColType()
|
inline |
Used to change the type of a specified set of columns in the matrix.
- Parameters
-
ncols Number of columns to change. colind Integer array of length ncols
containing the indices of the columns.coltype Character array of length ncols
giving the new column types:-
C
: indicates a continuous column; -
B
: indicates a binary column; -
I
: indicates an integer column. -
S
: indicates a semi—continuous column. The semi—continuous lower bound will be set to1.0
. -
R
: indicates a semi—integer column. The semi—integer lower bound will be set to1.0
. -
P
: indicates a partial integer column. The partial integer limit will be set to1.0
.
-
chgGlbLimit()
|
inline |
Used to change semi-continuous or semi-integer lower bounds, or upper limits on partial integers.
- Parameters
-
ncols Number of column limits to change. colind Integer array of size ncols
containing the indices of the semi-continuous, semi-integer or partial integer columns that should have their limits changed.limit Double array of length ncols
giving the new limit values.
chgLB()
|
inline |
Change the lower bound of a single column.
- Parameters
-
j The column to change. lb The lower bound.
- See also
- chgBounds(int, std::vector<int>, std::vector<char>, std::vector<double>)
- Since
- 44.00
chgMCoef() [1/2]
|
inline |
Used to change multiple coefficients in the matrix.
If any coefficient does not already exist, it will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new one.
- Parameters
-
ncoefs Number of new coefficients. rowind Integer array of length ncoefs
containing the row indices of the coefficients to be changed.colind Integer array of length ncoefs
containing the column indices of the coefficients to be changed.rowcoef Double array of length ncoefs
containing the new coefficient values. If an element ofrowcoef
is zero, the coefficient will be deleted.
chgMCoef() [2/2]
|
inline |
Used to change multiple coefficients in the matrix.
If any coefficient does not already exist, it will be added to the matrix. If many coefficients are being added to a row of the matrix, it may be more efficient to delete the old row of the matrix and add a new one.
- Parameters
-
ncoefs Number of new coefficients. rowind Integer array of length ncoefs
containing the row indices of the coefficients to be changed.colind Integer array of length ncoefs
containing the column indices of the coefficients to be changed.rowcoef Double array of length ncoefs
containing the new coefficient values. If an element ofrowcoef
is zero, the coefficient will be deleted.
chgMQObj() [1/2]
|
inline |
Used to change multiple quadratic coefficients in the objective function.
If any of the coefficients does not exist already, new coefficients will be added to the objective function.
- Parameters
-
ncoefs The number of coefficients to change. objqcol1 Integer array of size ncol
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size ncol
containing the column index of the second variable in each quadratic term.objqcoef New values for the coefficients. If an entry in objqcoef
is0
, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.
chgMQObj() [2/2]
|
inline |
Used to change multiple quadratic coefficients in the objective function.
If any of the coefficients does not exist already, new coefficients will be added to the objective function.
- Parameters
-
ncoefs The number of coefficients to change. objqcol1 Integer array of size ncol
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size ncol
containing the column index of the second variable in each quadratic term.objqcoef New values for the coefficients. If an entry in objqcoef
is0
, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.
chgObj()
|
inline |
Used to change the objective function coefficients.
- Parameters
-
ncols Number of objective function coefficient elements to change. colind Integer array of length ncols
containing the indices of the columns whose objective coefficients will change. An index of-1
indicates that the fixed part of the objective function on the right hand side should change.objcoef Double array of length ncols
giving the new objective function coefficients.
chgObjN()
|
inline |
Modifies one or more coefficients of an objective function in a multi-objective problem.
If the objective already exists, any coefficients not present in the colind
and objcoef
arrays will unchanged. If the objective does not exist, it will be added to the problem.
- Parameters
-
objidx Index of the objective function to add or modify. ncols Number of objective function coefficient elements to change. colind Integer array of length ncols
containing the indices of the columns whose objective coefficients will change. An index of-1
indicates that the fixed part of the objective function on the right hand side should change.objcoef Double array of length ncols
giving the new objective function coefficients.
chgObjSense()
|
inline |
Changes the problem's objective function sense to minimize or maximize.
- Parameters
-
objsense XPRS_OBJ_MINIMIZE
to change into a minimization, orXPRS_OBJ_MAXIMIZE
to change into maximization problem.
chgQObj()
|
inline |
Used to change a single quadratic coefficient in the objective function corresponding to the variable pair (objqcol1,objqcol2)
of the Hessian matrix.
- Parameters
-
objqcol1 Column index for the first variable in the quadratic term. objqcol2 Column index for the second variable in the quadratic term. objqcoef New value for the coefficient in the quadratic Hessian matrix. If an entry in objqcoef
is0
, the corresponding entry will be deleted.
chgQRowCoeff()
|
inline |
Changes a single quadratic coefficient in a row.
- Parameters
-
row Index of the row where the quadratic matrix is to be changed. rowqcol1 First index of the coefficient to be changed. rowqcol2 Second index of the coefficient to be changed. rowqcoef The new coefficient.
chgRhs()
|
inline |
Used to change right—hand side values of the problem.
- Parameters
-
nrows Number of right hand side values to change. rowind Integer array of length nrows
containing the indices of the rows on which the right hand side values will change.rhs Double array of length nrows
giving the right hand side values.
chgRhsRange()
|
inline |
Used to change the range for a row of the problem matrix.
- Parameters
-
nrows Number of range elements to change. rowind Integer array of length nrows
containing the indices of the rows on which the range elements will change.rng Double array of length nrows
giving the range values.
chgRowType()
|
inline |
Used to change the type of a row in the matrix.
- Parameters
-
nrows Number of rows to change. rowind Integer array of length nrows
containing the indices of the rows.rowtype Character array of length nrows
giving the new row types:-
L
: indicates a <= row; -
E
: indicates an = row; -
G
: indicates a >= row; -
R
: indicates a range row; -
N
: indicates a free row.
-
chgUB()
|
inline |
Change the upper bound of a single column.
- Parameters
-
j The column to change. ub The upper bound.
- See also
- chgBounds(int, std::vector<int>, std::vector<char>, std::vector<double>)
- Since
- 44.00
clearObjective()
|
inline |
Clear the objective function.
- Since
- 44.00
clearRowFlags()
|
inline |
Clears extra information attached to a range of rows.
- Parameters
-
flags Int array of length last-first+1
including type of extra information to remove (see below)first First row index to be checked last Last row index to be checked
console()
|
inlinestatic |
Default implementation for message listener.
- Parameters
-
prob The problem on which the callback is invoked. msg The message to be sent. This can be nullptr
(ifmsglen
is zero). If notnullptr
then it is terminated by aNUL
character.msglen The length of msg
.msgtype Type of message. See the reference documentation for XPRSaddcbmessage
for details about this.
copyControls()
|
inline |
Copies controls defined for one problem to another.
- Parameters
-
src The problem from which the controls are copied.
copyProb()
|
inline |
Copies information defined for one problem to another.
- Parameters
-
src The old problem pointer from which information is copied. name A string of up to 1024 characters [including null
terminator] containing the name for the problem copy. This must be unique when file writing is to be expected, and particularly for MIP problems.
crossoverLpSol()
|
inline |
Provides a basic optimal solution for a given solution of an LP problem.
This function behaves like the crossover after the barrier algorithm.
delCols()
|
inlinevirtual |
Delete columns from a matrix.
- Parameters
-
ncols Number of columns to delete. colind Integer array of length ncols
containing the columns to delete.
Reimplemented in xpress::objects::XpressProblem.
delCPCuts() [1/4]
|
inline |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes.
These cuts may be removed from a given node using XPRSdelcuts
, but if this is to be applied in a large number of cases, it may be preferable to remove the cut completely from the cut pool. This is achieved using XPRSdelcpcuts
.
delCPCuts() [2/4]
|
inline |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes.
These cuts may be removed from a given node using XPRSdelcuts
, but if this is to be applied in a large number of cases, it may be preferable to remove the cut completely from the cut pool. This is achieved using XPRSdelcpcuts
.
- Parameters
-
cuttype User defined cut type to match against. interp Way in which the cut cuttype
is interpreted:-
-1
: match all cut types; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - delete if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - delete if all bits match those set incuttype
.
-
delCPCuts() [3/4]
|
inline |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes.
These cuts may be removed from a given node using XPRSdelcuts
, but if this is to be applied in a large number of cases, it may be preferable to remove the cut completely from the cut pool. This is achieved using XPRSdelcpcuts
.
- Parameters
-
cuttype User defined cut type to match against. interp Way in which the cut cuttype
is interpreted:-
-1
: match all cut types; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - delete if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - delete if all bits match those set incuttype
.
ncuts The number of cuts to delete. A value of -1
indicates delete all cuts.cutind Array containing pointers to the cuts which are to be deleted. This array may be null
ifncuts
is-1
, otherwise it has lengthncuts
. -
delCPCuts() [4/4]
|
inline |
During the branch and bound search, cuts are stored in the cut pool to be applied at descendant nodes.
These cuts may be removed from a given node using XPRSdelcuts
, but if this is to be applied in a large number of cases, it may be preferable to remove the cut completely from the cut pool. This is achieved using XPRSdelcpcuts
.
- Parameters
-
ncuts The number of cuts to delete. A value of -1
indicates delete all cuts.cutind Array containing pointers to the cuts which are to be deleted. This array may be null
ifncuts
is-1
, otherwise it has lengthncuts
.
delCuts() [1/5]
|
inline |
Deletes cuts from the matrix at the current node.
Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using XPRSaddcuts
or XPRSloadcuts
. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
- Parameters
-
basis Ensures the basis will be valid if set to 1
. If set to0
, cuts with non-basic slacks may be deleted.
delCuts() [2/5]
|
inline |
Deletes cuts from the matrix at the current node.
Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using XPRSaddcuts
or XPRSloadcuts
. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
- Parameters
-
basis Ensures the basis will be valid if set to 1
. If set to0
, cuts with non-basic slacks may be deleted.cuttype User defined type of the cut to be deleted. interp Way in which the cut cuttype
is interpreted:-
-1
: match all cut types; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - delete if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - delete if all bits match those set incuttype
.
-
delCuts() [3/5]
|
inline |
Deletes cuts from the matrix at the current node.
Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using XPRSaddcuts
or XPRSloadcuts
. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
- Parameters
-
basis Ensures the basis will be valid if set to 1
. If set to0
, cuts with non-basic slacks may be deleted.cuttype User defined type of the cut to be deleted. interp Way in which the cut cuttype
is interpreted:-
-1
: match all cut types; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - delete if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - delete if all bits match those set incuttype
.
delta Only delete cuts with an absolute slack value greater than delta
. To delete all the cuts, this argument should be set toXPRS_MINUSINFINITY
. -
delCuts() [4/5]
|
inline |
Deletes cuts from the matrix at the current node.
Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using XPRSaddcuts
or XPRSloadcuts
. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
- Parameters
-
basis Ensures the basis will be valid if set to 1
. If set to0
, cuts with non-basic slacks may be deleted.cuttype User defined type of the cut to be deleted. interp Way in which the cut cuttype
is interpreted:-
-1
: match all cut types; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - delete if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - delete if all bits match those set incuttype
.
delta Only delete cuts with an absolute slack value greater than delta
. To delete all the cuts, this argument should be set toXPRS_MINUSINFINITY
.ncuts Number of cuts to drop if a list of cuts is provided. A value of -1
indicates all cuts.cutind Array containing pointers to the cuts which are to be deleted. This array may be null
ifncuts
is set to-1
otherwise it has lengthncuts
. -
delCuts() [5/5]
|
inline |
Deletes cuts from the matrix at the current node.
Cuts from the parent node which have been automatically restored may be deleted as well as cuts added to the current node using XPRSaddcuts
or XPRSloadcuts
. The cuts to be deleted can be specified in a number of ways. If a cut is ruled out by any one of the criteria it will not be deleted.
- Parameters
-
basis Ensures the basis will be valid if set to 1
. If set to0
, cuts with non-basic slacks may be deleted.ncuts Number of cuts to drop if a list of cuts is provided. A value of -1
indicates all cuts.cutind Array containing pointers to the cuts which are to be deleted. This array may be null
ifncuts
is set to-1
otherwise it has lengthncuts
.
delGenCons()
|
inlinevirtual |
Delete general constraints from a problem.
- Parameters
-
ncons Number of general constraints to delete. conind An integer array of length ncons
containing the general constraints to delete.
Reimplemented in xpress::objects::XpressProblem.
delIndicator()
|
inline |
Delete a single indicator constraint.
This only deletes the "indicator property from the specified row. Neither the associated variable nor the row are deleted.
- Parameters
-
row Row from which to delete the indicator constraint.
- Since
- 44.00
delIndicators()
|
inline |
Delete indicator constraints.
This turns the specified rows into normal rows (not controlled by indicator variables).
- Parameters
-
first First row in the range. last Last row in the range (inclusive).
delObj()
|
inline |
Removes an objective function from a multi-objective problem.
Any objectives with index > objidx
will be shifted down. Deleting the last objective function in the problem causes all the objective coefficients to be zeroed, but OBJECTIVES
remains set to 1
.
- Parameters
-
objidx Index of the objective to remove.
delPwlCons()
|
inlinevirtual |
Delete piecewise linear constraints from a problem.
- Parameters
-
npwls Number of piecewise linear constraints to delete. pwlind An integer array of length npwls
containing the piecewise linear constraints to delete.
Reimplemented in xpress::objects::XpressProblem.
delQMatrix()
|
inline |
Deletes the quadratic part of a row or of the objective function.
- Parameters
-
row Index of row from which the quadratic part is to be deleted.
delRows()
|
inlinevirtual |
Delete rows from a matrix.
- Parameters
-
nrows Number of rows to delete. rowind An integer array of length nrows
containing the rows to delete.
Reimplemented in xpress::objects::XpressProblem.
delSets()
|
inlinevirtual |
Delete sets from a problem.
- Parameters
-
nsets Number of sets to delete. setind An integer array of length nsets
containing the sets to delete.
Reimplemented in xpress::objects::XpressProblem.
estimateRowDualRanges()
|
inline |
Performs a dual side range sensitivity analysis, i.e.
calculates estimates for the possible ranges for dual values.
- Parameters
-
nrows The number of rows to analyze. rowind Row indices to analyze. iterlim Effort limit expressed as simplex iterations per row. mindual Estimated lower bounds on the possible dual ranges. maxdual Estimated upper bounds on the possible dual ranges.
firstIIS()
|
inline |
Initiates a search for an Irreducible Infeasible Set (IIS) in an infeasible problem.
- Parameters
-
mode The IIS search mode: -
0
: stops after finding the initial infeasible subproblem; -
1
: find an IIS, emphasizing simplicity of the IIS; -
2
: find an IIS, emphasizing a quick result.
-
fixMipEntities()
|
inline |
Fixes all the MIP entities to the values of the last found MIP solution.
This is useful for finding the reduced costs for the continuous variables after the integer variables have been fixed to their optimal values.
- Parameters
-
options Options how to fix the MIP entities. -
0
: If all MIP entities should be rounded to the nearest discrete value in the solution before being fixed. -
1
: If piecewise linear and general constraints should be kept in the problem with only the non-convex decisions (i.e. which part of a non-convex piecewise linear function or which variable attains a maximum) fixed. Otherwise all variables appearing in piecewise linear or general constraints will be fixed.
-
fTran()
|
inline |
Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix.
- Parameters
-
vec Double array of length ROWS
containing the values which are to be multiplied by the basis inverse. The transformed values appear in the array.
getAttribInfo()
|
inline |
Accesses the id number and the type information of an attribute given its name.
An attribute name may be for example XPRS_ROWS
. Names are case-insensitive and may or may not have the XPRS_
prefix. The id number is the constant used to identify the attribute for calls to functions such as XPRSgetintattrib
. The type information returned will be one of the below integer constants defined in the xprs.h
header file.
The function will return an id number of 0 and a type value of XPRS_TYPE_NOTDEFINED
if the name is not recognized as an attribute name. Note that this will occur if the name is a control name and not an attribute name.
- Parameters
-
name The name of the attribute to be queried. Names are case-insensitive and may or may not have the XPRS_
prefix. A full list of all attributes may be found in Chapter , or from the list in thexprs.h
header file.p_id Pointer to an integer where the id number will be returned. p_type Pointer to an integer where the type id will be returned. The value will be one of the following constants from xprs.h
:XPRS_TYPE_NOTDEFINED The name was not recognized. XPRS_TYPE_INT 32 bit integer. XPRS_TYPE_INT64 64 bit integer. XPRS_TYPE_DOUBLE Double precision floating point. XPRS_TYPE_STRING String.
getBasis()
|
inline |
Returns the current basis into the user's data arrays.
- Parameters
-
rowstat Integer array of length ORIGINALROWS
to the basis status of the slack, surplus or artificial variable associated with each row. The status will be one of:-
0
: slack, surplus or artificial is non-basic at lower bound; -
1
: slack, surplus or artificial is basic; -
2
: slack or surplus is non-basic at upper bound. -
3
: slack or surplus is super-basic.
null
if not required.colstat Integer array of length ORIGINALCOLS
to hold the basis status of the columns in the constraint matrix. The status will be one of:-
0
: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound; -
1
: variable is basic; -
2
: variable is non-basic at upper bound; -
3
: variable is super-basic.
null
if not required. -
getBasisVal()
|
inline |
Returns the current basis status for a specific column or row.
- Parameters
-
row Row index to get the row basis status for. col Column index to get the column basis status for. p_rowstat Integer pointer where the value of the row basis status will be returned. May be null
if not required.p_colstat Integer pointer where the value of the column basis status will be returned. May be null
if not required.
getCallbackDual()
|
inline |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackDuals() [1/3]
|
inline |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackDuals() [2/3]
|
inline |
Returns the dual values from the solution associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a dual solution is available. May be null
if not required.duals Double array of length last-first+1
where the values of the dual variables will be returned. May benull
if not required.first First row whose dual value to return. last Last row whose dual value to return.
getCallbackDuals() [3/3]
|
inline |
Convenience wrapper for getCallbackDuals(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveDual()
|
inline |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveDuals() [1/3]
|
inline |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveDuals() [2/3]
|
inline |
Returns the dual values from the solution to the presolved problem associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a dual solution is available. May be null
if not required.duals Double array of length last-first+1
where the values of the dual variables will be returned. May benull
if not required.first First row whose dual value to return. last Last row whose dual value to return.
getCallbackPresolveDuals() [3/3]
|
inline |
Convenience wrapper for getCallbackPresolveDuals(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveRedCost()
|
inline |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveRedCosts() [1/3]
|
inline |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveRedCosts() [2/3]
|
inline |
Returns the reduced costs from the solution to the presolved problem associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a dual solution is available. May be null
if not required.djs Double array of length last-first+1
where the reduced costs of the variables will be returned. May benull
if not required.first First column whose reduced cost to return. last Last column whose reduced cost to return.
getCallbackPresolveRedCosts() [3/3]
|
inline |
Convenience wrapper for getCallbackPresolveRedCosts(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSlack()
|
inline |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSlacks() [1/3]
|
inline |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSlacks() [2/3]
|
inline |
Returns the slack values from the solution to the presolved problem associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a solution is available. May be null
if not required.slacks Double array of length last-first+1
where the values of the slack variables will be returned. May benull
if not required.first First row whose slack value to return. last Last row whose slack value to return.
getCallbackPresolveSlacks() [3/3]
|
inline |
Convenience wrapper for getCallbackPresolveSlacks(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSolution() [1/4]
|
inline |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSolution() [2/4]
|
inline |
Returns the solution to the presolved problem associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a solution is available. May be null
if not required.x Double array of length last-first+1
where the values of the primal variables will be returned. May benull
if not required.first First column in the solution to return. last Last column in the solution to return.
getCallbackPresolveSolution() [3/4]
|
inline |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackPresolveSolution() [4/4]
|
inline |
Convenience wrapper for getCallbackPresolveSolution(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackRedCost()
|
inline |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackRedCosts() [1/3]
|
inline |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackRedCosts() [2/3]
|
inline |
Returns the reduced costs from the solution associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a dual solution is available. May be null
if not required.djs Double array of length last-first+1
where the reduced costs of the variables will be returned. May benull
if not required.first First column whose reduced cost to return. last Last column whose reduced cost to return.
getCallbackRedCosts() [3/3]
|
inline |
Convenience wrapper for getCallbackRedCosts(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSlack()
|
inline |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSlacks() [1/3]
|
inline |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSlacks() [2/3]
|
inline |
Returns the slack values from the solution associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a solution is available. May be null
if not required.slacks Double array of length last-first+1
where the values of the slack variables will be returned. May benull
if not required.first First row whose slack value to return. last Last row whose slack value to return.
getCallbackSlacks() [3/3]
|
inline |
Convenience wrapper for getCallbackSlacks(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSolution() [1/4]
|
inline |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSolution() [2/4]
|
inline |
Returns the solution associated with the current callback.
- Parameters
-
p_available This variable will be set to 1 if a solution is available. May be null
if not required.x Double array of length last-first+1
where the values of the primal variables will be returned. May benull
if not required.first First column in the solution to return. last Last column in the solution to return.
getCallbackSolution() [3/4]
|
inline |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCallbackSolution() [4/4]
|
inline |
Convenience wrapper for getCallbackSolution(bool*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getCoef()
|
inline |
Returns a single coefficient in the constraint matrix.
- Parameters
-
row Row of the constraint matrix. col Column of the constraint matrix.
getCols() [1/5]
|
inline |
Returns the nonzeros in the constraint matrix for the columns in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the rowind
androwcoef
arrays for each requested column. It must be of length at leastlast-first+2
. Columni
starts at positionstart[i]
in therowind
androwcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.rowind Integer array of length maxcoefs
which will be filled with the row indices of the nonzero coefficents for each column. May benull
if not required.rowcoef Double array of length maxcoefs
which will be filled with the nonzero coefficient values. May benull
if not required.maxcoefs The size of the rowind
androwcoef
arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.p_ncoefs Pointer to an integer where the number of nonzero coefficients in the selected columns will be returned. If p_ncoefs
exceedsmaxcoefs
, only themaxcoefs
first nonzero coefficients will be returned. May benull
if not required.first First column in the range. last Last column in the range.
getCols() [2/5]
|
inline |
Returns the nonzeros in the constraint matrix for the columns in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the rowind
androwcoef
arrays for each requested column. It must be of length at leastlast-first+2
. Columni
starts at positionstart[i]
in therowind
androwcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.rowind Integer array of length maxcoefs
which will be filled with the row indices of the nonzero coefficents for each column. May benull
if not required.rowcoef Double array of length maxcoefs
which will be filled with the nonzero coefficient values. May benull
if not required.maxcoefs The size of the rowind
androwcoef
arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.first First column in the range. last Last column in the range.
getCols() [3/5]
|
inline |
Returns the nonzeros in the constraint matrix for the columns in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the rowind
androwcoef
arrays for each requested column. It must be of length at leastlast-first+2
. Columni
starts at positionstart[i]
in therowind
androwcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.rowind Integer array of length maxcoefs
which will be filled with the row indices of the nonzero coefficents for each column. May benull
if not required.rowcoef Double array of length maxcoefs
which will be filled with the nonzero coefficient values. May benull
if not required.maxcoefs The size of the rowind
androwcoef
arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.first First column in the range. last Last column in the range.
getCols() [4/5]
|
inline |
Returns the nonzeros in the constraint matrix for the columns in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the rowind
androwcoef
arrays for each requested column. It must be of length at leastlast-first+2
. Columni
starts at positionstart[i]
in therowind
androwcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.rowind Integer array of length maxcoefs
which will be filled with the row indices of the nonzero coefficents for each column. May benull
if not required.rowcoef Double array of length maxcoefs
which will be filled with the nonzero coefficient values. May benull
if not required.maxcoefs The size of the rowind
androwcoef
arrays. This is the maximum number of nonzero coefficients that the Optimizer is allowed to return.p_ncoefs Pointer to an integer where the number of nonzero coefficients in the selected columns will be returned. If p_ncoefs
exceedsmaxcoefs
, only themaxcoefs
first nonzero coefficients will be returned. May benull
if not required.first First column in the range. last Last column in the range.
getCols() [5/5]
|
inline |
Get range of columns.
- Parameters
-
first First column index (inclusive). last Last column index (inclusive).
- Returns
- Data for the queried columns
- Since
- 44.00
getColType()
|
inline |
Returns the column types for the columns in a given range.
- Parameters
-
first First column in the range. last Last column in the range.
getColumnName()
|
inline |
Get a column name.
- Parameters
-
index objects.Index of the column.
- Returns
- The requested column's name.
- Since
- 44.00
getColumnNames()
|
inline |
Get names of columns.
- Parameters
-
first First column index (inclusive). last Last column index (inclusive).
- Returns
- The names for the specified columns.
- Since
- 44.00
getControlInfo()
|
inline |
Accesses the id number and the type information of a control given its name.
A control name may be for example XPRS_PRESOLVE
. Names are case-insensitive and may or may not have the XPRS_
prefix. The id number is the constant used to identify the control for calls to functions such as XPRSgetintcontrol
.
The function will return an id number of 0
and a type value of XPRS_TYPE_NOTDEFINED
if the name is not recognized as a control name. Note that this will occur if the name is an attribute name and not a control name.
- Parameters
-
name The name of the control to be queried. Names are case-insensitive and may or may not have the XPRS_
prefix. A full list of all controls may be found in , or from the list in thexprs.h
header file.p_id Pointer to an integer where the id number will be returned. p_type Pointer to an integer where the type information will be returned. The returned value will be one of the following constants from xprs.h
:XPRS_TYPE_NOTDEFINED The name was not recognized. XPRS_TYPE_INT 32 bit integer. XPRS_TYPE_INT64 64 bit integer. XPRS_TYPE_DOUBLE Double precision floating point. XPRS_TYPE_STRING String.
getCPCutList() [1/3]
|
inline |
Returns a list of cut indices from the cut pool.
- Parameters
-
cuttype The user defined type of the cuts to be returned. interp Way in which the cut type is interpreted: -
-1
: get all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - get cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - get cut if all bits match those set incuttype
.
delta Only those cuts with a signed violation greater than delta will be returned. p_ncuts Pointer to the integer where the number of cuts of type cuttype
in the cut pool will be returned.maxcuts Maximum number of cuts to be returned. cutind Array of length maxcuts
where the pointers to the cuts will be returned.viol Double array of length maxcuts
where the values of the signed violations of the cuts will be returned. -
getCPCutList() [2/3]
|
inline |
Returns a list of cut indices from the cut pool.
- Parameters
-
cuttype The user defined type of the cuts to be returned. interp Way in which the cut type is interpreted: -
-1
: get all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - get cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - get cut if all bits match those set incuttype
.
delta Only those cuts with a signed violation greater than delta will be returned. maxcuts Maximum number of cuts to be returned. cutind Array of length maxcuts
where the pointers to the cuts will be returned.viol Double array of length maxcuts
where the values of the signed violations of the cuts will be returned. -
getCPCutList() [3/3]
|
inline |
Returns a list of cut indices from the cut pool.
- Parameters
-
maxcuts Maximum number of cuts to be returned. cutind Array of length maxcuts
where the pointers to the cuts will be returned.viol Double array of length maxcuts
where the values of the signed violations of the cuts will be returned.
getCPCuts() [1/2]
|
inline |
Returns cuts from the cut pool.
A list of cut pointers in the array rowind
must be passed to the routine. The columns and elements of the cut will be returned in the regions pointed to by the colind
and cutcoef
parameters. The columns and elements will be stored contiguously and the starting point of each cut will be returned in the region pointed to by the start
parameter.
- Parameters
-
rowind Array of length ncuts
containing the pointers to the cuts.ncuts Number of cuts to be returned. maxcoefs Maximum number of column indices of the cuts to be returned. cuttype Integer array of length at least ncuts
where the cut types will be returned. May be null if not required.rowtype Character array of length at least ncuts
where the sense of the cuts (L
,G
, orE
) will be returned. May be null if not required.start Integer array of length at least ncuts+1
containing the offsets into thecolind
andcutcoef
arrays. The last element indicates where cutncuts+1
would start. May be null if not required.colind Integer array of length maxcoefs
where the column indices of the cuts will be returned. May be null if not required.cutcoef Double array of length maxcoefs
where the matrix values will be returned. May be null if not required.rhs Double array of length at least ncuts
where the right hand side elements for the cuts will be returned. May be null if not required.
getCPCuts() [2/2]
|
inline |
Returns cuts from the cut pool.
A list of cut pointers in the array rowind
must be passed to the routine. The columns and elements of the cut will be returned in the regions pointed to by the colind
and cutcoef
parameters. The columns and elements will be stored contiguously and the starting point of each cut will be returned in the region pointed to by the start
parameter.
- Parameters
-
rowind Array of length ncuts
containing the pointers to the cuts.ncuts Number of cuts to be returned. maxcoefs Maximum number of column indices of the cuts to be returned. cuttype Integer array of length at least ncuts
where the cut types will be returned. May be null if not required.rowtype Character array of length at least ncuts
where the sense of the cuts (L
,G
, orE
) will be returned. May be null if not required.start Integer array of length at least ncuts+1
containing the offsets into thecolind
andcutcoef
arrays. The last element indicates where cutncuts+1
would start. May be null if not required.colind Integer array of length maxcoefs
where the column indices of the cuts will be returned. May be null if not required.cutcoef Double array of length maxcoefs
where the matrix values will be returned. May be null if not required.rhs Double array of length at least ncuts
where the right hand side elements for the cuts will be returned. May be null if not required.
getCutList() [1/3]
|
inline |
Retrieves a list of cut pointers for the cuts active at the current node.
- Parameters
-
cuttype User defined type of the cuts to be returned. A value of -1
indicates return all active cuts.interp Way in which the cut type is interpreted: -
-1
: get all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - get cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - get cut if all bits match those set incuttype
.
p_ncuts Pointer to the integer where the number of active cuts of type cuttype
will be returned.maxcuts Maximum number of cuts to be retrieved. cutind Array of length maxcuts
where the pointers to the cuts will be returned. -
getCutList() [2/3]
|
inline |
Retrieves a list of cut pointers for the cuts active at the current node.
- Parameters
-
cuttype User defined type of the cuts to be returned. A value of -1
indicates return all active cuts.interp Way in which the cut type is interpreted: -
-1
: get all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - get cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps - get cut if all bits match those set incuttype
.
maxcuts Maximum number of cuts to be retrieved. cutind Array of length maxcuts
where the pointers to the cuts will be returned. -
getCutList() [3/3]
|
inline |
Retrieves a list of cut pointers for the cuts active at the current node.
- Parameters
-
maxcuts Maximum number of cuts to be retrieved. cutind Array of length maxcuts
where the pointers to the cuts will be returned.
getCutMap()
|
inline |
Used to return in which rows a list of cuts are currently loaded into the Optimizer.
This is useful for example to retrieve the duals associated with active cuts.
- Parameters
-
ncuts Number of cuts in the cutind array. cutind Pointer array to the cuts for which the row index is requested.
getCutSlack()
|
inline |
Used to calculate the slack value of a cut with respect to the current LP relaxation solution.
The slack is calculated from the cut itself, and might be requested for any cut (even if it is not currently loaded into the problem).
- Parameters
-
cutind Pointer of the cut for which the slack is to be calculated.
getDblAttrib()
|
inline |
Enables users to retrieve the values of various double problem attributes.
Problem attributes are set during loading and optimization of a problem.
- Parameters
-
attrib Problem attribute whose value is to be returned. A full list of all available problem attributes may be found in Chapter , or from the list in the xprs.h
header file.
getDblControl()
|
inline |
Retrieves the value of a given double control parameter.
- Parameters
-
control Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h
header file.
getDirs() [1/3]
|
inline |
Used to return the directives that have been loaded into a matrix.
Priorities, forced branching directions and pseudo costs can be returned. If called after presolve, XPRSgetdirs
will get the directives for the presolved problem.
getDirs() [2/3]
|
inline |
Used to return the directives that have been loaded into a matrix.
Priorities, forced branching directions and pseudo costs can be returned. If called after presolve, XPRSgetdirs
will get the directives for the presolved problem.
- Parameters
-
indices Integer array of length p_ndir
containing the column numbers (0
,1
,2
,...) or negative values corresponding to special ordered sets (the first set numbered-1
, the second numbered-2
,...). May be null if not required.prios Integer array of length p_ndir
containing the priorities for the columns and sets, where columns/sets with smallest priority will be branched on first. May be null if not required.branchdirs Character array of length p_ndir
specifying the branching direction for each column or set:-
U
: the entity is to be forced up; -
D
: the entity is to be forced down; -
N
: not specified.
uppseudo Double array of length p_ndir
containing the up pseudo costs for the columns and sets. May be null if not required.downpseudo Double array of length p_ndir
containing the down pseudo costs for the columns and sets. May be null if not required. -
getDirs() [3/3]
|
inline |
Used to return the directives that have been loaded into a matrix.
Priorities, forced branching directions and pseudo costs can be returned. If called after presolve, XPRSgetdirs
will get the directives for the presolved problem.
- Parameters
-
p_ndir Pointer to an integer where the number of directives will be returned. indices Integer array of length p_ndir
containing the column numbers (0
,1
,2
,...) or negative values corresponding to special ordered sets (the first set numbered-1
, the second numbered-2
,...). May be null if not required.prios Integer array of length p_ndir
containing the priorities for the columns and sets, where columns/sets with smallest priority will be branched on first. May be null if not required.branchdirs Character array of length p_ndir
specifying the branching direction for each column or set:-
U
: the entity is to be forced up; -
D
: the entity is to be forced down; -
N
: not specified.
uppseudo Double array of length p_ndir
containing the up pseudo costs for the columns and sets. May be null if not required.downpseudo Double array of length p_ndir
containing the down pseudo costs for the columns and sets. May be null if not required. -
getDiscreteCols()
|
inline |
Get information about MIP entities.
- Returns
- The requested information.
- Since
- 44.00
getDual()
|
inline |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getDualRay()
|
inline |
Retrieves a dual ray (dual unbounded direction) for the current problem, if the problem is found to be infeasible.
- Parameters
-
ray Double array of length ROWS
to hold the ray. May be null if not required.p_hasray This variable will be set to 1 if the Optimizer is able to return a dual ray, 0 otherwise.
getDuals() [1/3]
|
inline |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getDuals() [2/3]
|
inline |
Used to obtain the dual values associated with the incumbent solution during or after optimization of a continuous problem with XPRSoptimize
, XPRSlpoptimize
or XPRSnlpoptimize
.
- Parameters
-
status Information about the dual solution returned. duals Double pointer where the value of the dual variables will be returned. May be null
if not required.first First row in the dual solution. last Last row in the dual solution.
getDuals() [3/3]
|
inline |
Convenience wrapper for getDuals(int*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getGenCons() [1/3]
|
inline |
Returns the general constraints y = f(x1, ..., xn, c1, ..., cm)
in a given range.
- Parameters
-
contype null
if not required or an integer array of length at leastlast-first+1
which will be filled with the types of the general constraints:-
XPRS_GENCONS_MAX (0)
: indicates amaximum
constraint; -
XPRS_GENCONS_MIN (1)
: indicates aminimum
constraint; -
XPRS_GENCONS_AND (2)
: indicates anand
constraint. -
XPRS_GENCONS_OR (3)
: indicates anor
constraint; -
XPRS_GENCONS_ABS (4)
: indicates anabsolute value
constraint.
resultant Integer array which will be filled with the indices of the output variables y
. It must be of length at leastlast-first+1
. May benull
if not required.colstart Integer array of length at least last-first+2
which will be filled with the start index of each general constraint in thecolind
array. May benull
if not required.colind Integer array which will be filled with the indices of the input variables xi
. May benull
if not required.maxcols Maximum number of input columns to be retrieved. p_ncols Pointer to return the number of input columns in the colind
array. If the number of input columns is greater thanmaxcols
, then onlymaxcols
elements will be returned. May benull
if not required.valstart Integer array of length at least last-first+2
which will be filled with the start index of each general constraint in theval
array. May benull
if not required.val Integer array which will be filled with the constant values ci
. May benull
if not required.maxvals Maximum number of constant values to be retrieved. p_nvals Pointer to return the number of constant values in the val
array. If the number of constant values is greater thanmaxvals
, then onlymaxvals
elements will be returned.May benull
if not required.first First general constraint in the range. last Last general constraint in the range. -
getGenCons() [2/3]
|
inline |
Returns the general constraints y = f(x1, ..., xn, c1, ..., cm)
in a given range.
- Parameters
-
contype null
if not required or an integer array of length at leastlast-first+1
which will be filled with the types of the general constraints:-
XPRS_GENCONS_MAX (0)
: indicates amaximum
constraint; -
XPRS_GENCONS_MIN (1)
: indicates aminimum
constraint; -
XPRS_GENCONS_AND (2)
: indicates anand
constraint. -
XPRS_GENCONS_OR (3)
: indicates anor
constraint; -
XPRS_GENCONS_ABS (4)
: indicates anabsolute value
constraint.
resultant Integer array which will be filled with the indices of the output variables y
. It must be of length at leastlast-first+1
. May benull
if not required.colstart Integer array of length at least last-first+2
which will be filled with the start index of each general constraint in thecolind
array. May benull
if not required.colind Integer array which will be filled with the indices of the input variables xi
. May benull
if not required.maxcols Maximum number of input columns to be retrieved. p_ncols Pointer to return the number of input columns in the colind
array. If the number of input columns is greater thanmaxcols
, then onlymaxcols
elements will be returned. May benull
if not required.valstart Integer array of length at least last-first+2
which will be filled with the start index of each general constraint in theval
array. May benull
if not required.val Integer array which will be filled with the constant values ci
. May benull
if not required.maxvals Maximum number of constant values to be retrieved. p_nvals Pointer to return the number of constant values in the val
array. If the number of constant values is greater thanmaxvals
, then onlymaxvals
elements will be returned.May benull
if not required.first First general constraint in the range. last Last general constraint in the range. -
getGenCons() [3/3]
|
inline |
Query a range of general constraints.
- Parameters
-
first First constraint index to query (inclusive). last Last constraint index to query (inclusive).
- Returns
- The queried constraints.
- Since
- 44.00
getGenConsName()
|
inline |
Get a general constraint name.
- Parameters
-
index objects.Index of the general constraint.
- Returns
- The requested general constraint's name.
- Since
- 44.00
getGenConsNames()
|
inline |
Get names of general constraints.
- Parameters
-
first First general constraint index (inclusive). last Last general constraint index (inclusive).
- Returns
- The names for the specified general constraints.
- Since
- 44.00
getIISData() [1/2]
|
inline |
Returns information for an Irreducible Infeasible Set: size, variables and constraints (row and column vectors), and conflicting sides of the variables.
For pure linear problems there is also information on duals, reduced costs and isolations.
- Parameters
-
iis The ordinal number of the IIS to get data for. p_nrows Pointer to an integer where the number of rows in the IIS will be returned. p_ncols Pointer to an integer where the number of bounds in the IIS will be returned. rowind Indices of rows in the IIS. Can be null if not required. colind Indices of bounds (columns) in the IIS. Can be null if not required. contype Sense of rows in the IIS: -
L
: for less or equal row; -
G
: for greater or equal row. -
E
: for an equality row (for a non LP IIS); -
1
: for a SOS1 row; -
2
: for a SOS2 row; -
W
: for a piecewise linear constraint; -
X
: for a general constraint; -
I
: for an indicator row.
bndtype Sense of bound in the IIS: -
U
: for upper bound; -
L
: for lower bound. -
F
: for fixed columns (for a non LP IIS); -
B
: for a binary column; -
I
: for an integer column; -
P
: for a partial integer columns; -
S
: for a semi-continuous column; -
R
: for a semi-continuous integer column.
duals The dual multipliers associated with the rows. Can be null if not required. djs The dual multipliers (reduced costs) associated with the bounds. Can be null if not required. isolationrows The isolation status of the rows: -
-1
: if isolation information is not available for row (run iis isolations); -
0
: if row is not in isolation; -
1
: if row is in isolation.
isolationcols The isolation status of the bounds: -
-1
: if isolation information is not available for column (run iis isolations); -
0
: if column is not in isolation; -
1
: if column is in isolation.
-
getIISData() [2/2]
|
inline |
Get information about an IIS.
- Parameters
-
number The index of the IIS to query.
- Returns
- Information about the queried IIS.
- Since
- 44.00
getIndex()
|
inline |
Returns the index for a specified row or column name.
- Parameters
-
type -
XPRS_NAMES_ROW
:(=1)
if row index is required; -
XPRS_NAMES_COLUMN
:(=2)
if column index is required; -
XPRS_NAMES_SET
:(=3)
if set index is required; -
XPRS_NAMES_PWLCONS
:(=4)
if piecewise linear constraint index is required; -
XPRS_NAMES_GENCONS
:(=5)
if general constraint index is required; -
XPRS_NAMES_OBJECTIVE
:(=6)
if objective index is required; -
XPRS_NAMES_USERFUNC
:(=7)
if user function index is required; -
XPRS_NAMES_INTERNALFUNC
:(=8)
if an internal function index is required.
name Null terminated string. -
getIndicator()
|
inline |
Get indicator information for a single row.
- Parameters
-
row The row to query.
- Returns
-
Indicator information for
row
. This will bestd::nullopt
ifrow
is not an indicator row.
- Since
- 44.00
getIndicators() [1/2]
|
inline |
Returns the indicator constraint condition (indicator variable and complement flag) associated to the rows in a given range.
- Parameters
-
colind Integer array of length last-first+1
where the column indices of the indicator variables are to be placed. May benull
.complement Integer array of length last-first+1
where the indicator complement flags will be returned:-
0
: not an indicator constraint (in this case the corresponding entry in thecolind
array is ignored); -
1
: for indicator constraints with condition "<code>bin = 1</code>"; -
-1
: for indicator constraints with condition "<code>bin = 0</code>".
null
.first First row in the range. last Last row in the range (inclusive). -
getIndicators() [2/2]
|
inline |
Get indicator information for a range of rows.
Returns indicator information for the rows in [first
, last
] that actually are indicator rows. No data is returned for rows in this range that are not indicator rows.
- Parameters
-
first First (inclusive) row index. last Last (inclusive) row index.
- Returns
- Indicator data for the specified range of rows.
- Since
- 44.00
getInfeas()
|
inline |
Returns a list of infeasible primal and dual variables.
- Parameters
-
p_nprimalcols Pointer to an integer where the number of primal infeasible variables is returned. p_nprimalrows Pointer to an integer where the number of primal infeasible rows is returned. p_ndualrows Pointer to an integer where the number of dual infeasible rows is returned. p_ndualcols Pointer to an integer where the number of dual infeasible variables is returned. x Integer array of length p_nprimalcols
where the primal infeasible variables will be returned. May benull
if not required.slack Integer array of length p_nprimalrows
where the primal infeasible rows will be returned. May benull
if not required.duals Integer array of length p_ndualrows
where the dual infeasible rows will be returned. May benull
if not required.djs Integer array of length p_ndualcols
where the dual infeasible variables will be returned. May benull
if not required.
getIntAttrib()
|
inline |
Enables users to recover the values of various integer problem attributes.
Problem attributes are set during loading and optimization of a problem.
- Parameters
-
attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in Chapter , or from the list in the xprs.h
header file.
getIntControl()
|
inline |
Enables users to recover the values of various integer control parameters.
- Parameters
-
control Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h
header file.
getLastBarSol()
|
inline |
Used to obtain the last barrier solution values following optimization that used the barrier solver.
- Parameters
-
x Double array of length ORIGINALCOLS
where the values of the primal variables will be returned. May benull
if not required.slack Double array of length ORIGINALROWS
where the values of the slack variables will be returned. May benull
if not required.duals Double array of length ORIGINALROWS
where the values of the dual variables (cBTB-1
) will be returned. May benull
if not required.djs Double array of length ORIGINALCOLS
where the reduced cost for each variable (cT-cBTB-1A
) will be returned. May benull
if not required.p_status Status of the last barrier solve. Value matches that of XPRS_LPSTATUS should the solve have been stopped immediately after the barrier.
getLB()
|
inline |
Returns the lower bounds for the columns in a given range.
- Parameters
-
first First column in the range. last Last column in the range.
getLongAttrib()
|
inline |
Enables users to recover the values of various integer problem attributes.
Problem attributes are set during loading and optimization of a problem.
- Parameters
-
attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in Chapter , or from the list in the xprs.h
header file.
getLongControl()
|
inline |
Enables users to recover the values of various integer control parameters.
- Parameters
-
control Control parameter whose value is to be returned. A full list of all controls may be found in Chapter , or from the list in the xprs.h
header file.
getLpSol() [1/2]
|
inline |
Used to obtain the LP solution values following optimization.
- Parameters
-
x Double array of length ORIGINALCOLS
where the values of the primal variables will be returned. May benull
if not required.
getLpSol() [2/2]
|
inline |
Used to obtain the LP solution values following optimization.
- Parameters
-
x Double array of length ORIGINALCOLS
where the values of the primal variables will be returned. May benull
if not required.slack Double array of length ORIGINALROWS
where the values of the slack variables will be returned. May benull
if not required.duals Double array of length ORIGINALROWS
where the values of the dual variables (cBTB-1
) will be returned. May benull
if not required.djs Double array of length ORIGINALCOLS
where the reduced cost for each variable (cT-cBTB-1A
) will be returned. May benull
if not required.
getLpSolVal()
|
inline |
Used to obtain a single LP solution value following optimization.
- Parameters
-
col Column index of the variable for which to return the solution value. row Row index of the constraint for which to return the solution value. p_x Double pointer where the value of the primal variable will be returned. May be null
if not required.p_slack Double pointer where the value of the slack variable will be returned. May be null
if not required.p_dual Double pointer where the value of the dual variable ( cBTB-1
) will be returned. May benull
if not required.p_dj Double pointer where the reduced costs for the variable ( cT-cBTB-1A
) will be returned. May benull
if not required.
getMessageStatus()
|
inline |
Retrieves the current suppression status of a message.
- Parameters
-
msgcode The id number of the message. Refer to Chapter for a list of possible message numbers.
getMipEntities() [1/5]
|
inline |
Get information about MIP entities and SOS.
- Returns
- The requested information.
- Since
- 44.00
getMipEntities() [2/5]
|
inline |
Retrieves integr and entity information about a problem.
It must be called before XPRSmipoptimize
if the presolve option is used.
- Parameters
-
coltype Character array of length p_nentities
where the entity types will be returned. The types will be one of:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
colind Integer array of length p_nentities
where the column indices of the MIP entities will be returned.limit Double array of length p_nentities
where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless). -
getMipEntities() [3/5]
|
inline |
Retrieves integr and entity information about a problem.
It must be called before XPRSmipoptimize
if the presolve option is used.
- Parameters
-
p_nentities Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute MIPENTS
. May benull
.coltype Character array of length p_nentities
where the entity types will be returned. The types will be one of:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
colind Integer array of length p_nentities
where the column indices of the MIP entities will be returned.limit Double array of length p_nentities
where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless). -
getMipEntities() [4/5]
|
inline |
Retrieves integr and entity information about a problem.
It must be called before XPRSmipoptimize
if the presolve option is used.
- Parameters
-
p_nentities Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute MIPENTS
. May benull
.p_nsets Pointer to the integer where the number of SOS1 and SOS2 sets will be returned. It can be retrieved from the problem attribute SETS
. May benull
.coltype Character array of length p_nentities
where the entity types will be returned. The types will be one of:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
colind Integer array of length p_nentities
where the column indices of the MIP entities will be returned.limit Double array of length p_nentities
where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless).settype Character array of length p_nsets
where the set types will be returned. The set types will be one of:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
start Integer array where the offsets into the setcols
andrefval
arrays indicating the start of the sets will be returned. This array must be of lengthp_nsets+1
, the final element will contain the offset where setp_nsets+1
would start and equals the length of thesetcols
andrefval
arrays,SETMEMBERS
.setcols Integer array of length SETMEMBERS
where the columns in each set will be returned.refval Double array of length SETMEMBERS
where the reference row entries for each member of the sets will be returned. These define the order for SOS2 constraints and may be used in branching for both types. -
getMipEntities() [5/5]
|
inline |
Retrieves integr and entity information about a problem.
It must be called before XPRSmipoptimize
if the presolve option is used.
- Parameters
-
p_nentities Pointer to the integer where the number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities will be returned. This is equal to the problem attribute MIPENTS
. May benull
.p_nsets Pointer to the integer where the number of SOS1 and SOS2 sets will be returned. It can be retrieved from the problem attribute SETS
. May benull
.coltype Character array of length p_nentities
where the entity types will be returned. The types will be one of:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
colind Integer array of length p_nentities
where the column indices of the MIP entities will be returned.limit Double array of length p_nentities
where the limits for the partial integer variables and lower bounds for the semi-continuous and semi-continuous integer variables will be returned (any entries in the positions corresponding to binary and integer variables will be meaningless).settype Character array of length p_nsets
where the set types will be returned. The set types will be one of:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
start Integer array where the offsets into the setcols
andrefval
arrays indicating the start of the sets will be returned. This array must be of lengthp_nsets+1
, the final element will contain the offset where setp_nsets+1
would start and equals the length of thesetcols
andrefval
arrays,SETMEMBERS
.setcols Integer array of length SETMEMBERS
where the columns in each set will be returned.refval Double array of length SETMEMBERS
where the reference row entries for each member of the sets will be returned. These define the order for SOS2 constraints and may be used in branching for both types. -
getMipSol() [1/2]
|
inline |
Used to obtain the solution values of the last MIP solution that was found.
- Parameters
-
x Double array of length ORIGINALCOLS
where the values of the primal variables will be returned. May benull
if not required.
getMipSol() [2/2]
|
inline |
Used to obtain the solution values of the last MIP solution that was found.
- Parameters
-
x Double array of length ORIGINALCOLS
where the values of the primal variables will be returned. May benull
if not required.slack Double array of length ORIGINALROWS
where the values of the slack variables will be returned. May benull
if not required.
getMipSolVal()
|
inline |
Used to obtain a single solution value of the last MIP solution that was found.
- Parameters
-
col Column index of the variable for which to return the solution value. row Row index of the constraint for which to return the solution value. p_x Double pointer where the value of the primal variable will be returned. May be null
if not required.p_slack Double pointer where the value of the slack variable will be returned. May be null
if not required.
getMQObj() [1/5]
|
inline |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetmqobj
returns the lower triangular part of this matrix only.
- Parameters
-
start Integer array which will be filled with indices indicating the starting offsets in the colind
andobjqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
andobjqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May be null ifmaxcoefs
is0
.colind Integer array of length maxcoefs
which will be filled with the column indices of the nonzero elements in the lower triangular part ofQ
. May benull
ifmaxcoefs
is0
.objqcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
ifmaxcoefs
is0
.maxcoefs The maximum number of elements to be returned (size of the arrays). p_ncoefs Pointer to an integer where the number of nonzero quadratic objective coefficients will be returned. If the number of nonzero coefficients is greater than maxcoefs
, then onlymaxcoefs
elements will be returned. Ifp_ncoefs
is smaller thanmaxcoefs
, then onlyp_ncoefs
will be returned. May benull
.first First column in the range. last Last column in the range.
getMQObj() [2/5]
|
inline |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetmqobj
returns the lower triangular part of this matrix only.
- Parameters
-
start Integer array which will be filled with indices indicating the starting offsets in the colind
andobjqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
andobjqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May be null ifmaxcoefs
is0
.colind Integer array of length maxcoefs
which will be filled with the column indices of the nonzero elements in the lower triangular part ofQ
. May benull
ifmaxcoefs
is0
.objqcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
ifmaxcoefs
is0
.maxcoefs The maximum number of elements to be returned (size of the arrays). first First column in the range. last Last column in the range.
getMQObj() [3/5]
|
inline |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetmqobj
returns the lower triangular part of this matrix only.
- Parameters
-
start Integer array which will be filled with indices indicating the starting offsets in the colind
andobjqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
andobjqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May be null ifmaxcoefs
is0
.colind Integer array of length maxcoefs
which will be filled with the column indices of the nonzero elements in the lower triangular part ofQ
. May benull
ifmaxcoefs
is0
.objqcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
ifmaxcoefs
is0
.maxcoefs The maximum number of elements to be returned (size of the arrays). first First column in the range. last Last column in the range.
getMQObj() [4/5]
|
inline |
Returns the nonzeros in the quadratic objective coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetmqobj
returns the lower triangular part of this matrix only.
- Parameters
-
start Integer array which will be filled with indices indicating the starting offsets in the colind
andobjqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
andobjqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May be null ifmaxcoefs
is0
.colind Integer array of length maxcoefs
which will be filled with the column indices of the nonzero elements in the lower triangular part ofQ
. May benull
ifmaxcoefs
is0
.objqcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
ifmaxcoefs
is0
.maxcoefs The maximum number of elements to be returned (size of the arrays). p_ncoefs Pointer to an integer where the number of nonzero quadratic objective coefficients will be returned. If the number of nonzero coefficients is greater than maxcoefs
, then onlymaxcoefs
elements will be returned. Ifp_ncoefs
is smaller thanmaxcoefs
, then onlyp_ncoefs
will be returned. May benull
.first First column in the range. last Last column in the range.
getMQObj() [5/5]
|
inline |
Get quadratic objective matrix for range of columns.
- Parameters
-
first First column index (inclusive). last Last column index (inclusive).
- Returns
- Data for the queried columns.
- Since
- 44.00
getName() [1/2]
|
inline |
Get the name of a single element.
- Parameters
-
type The type of the element. elt The index of the element.
- Returns
- the element's name.
- See also
- getNames(int, std::vector<std::optional<std::string>>, int, int)
- Since
- 44.00
getName() [2/2]
|
inline |
Get the name of a single element.
- Parameters
-
type The type of the element. elt The index of the element.
- Returns
- the element's name.
- See also
- getNames(int, std::vector<std::optional<std::string>>, int, int)
- Since
- 44.00
getNameList()
|
inline |
Returns the names for the rows, columns, sets, piecewise linear constraints, general constraints or objectives in a given range.
The names will be returned in a character buffer, with no trailing whitespace and with each name being separated by a null character.
- Parameters
-
type -
XPRS_NAMES_ROW
:(=1)
if row names are required; -
XPRS_NAMES_COLUMN
:(=2)
if column names are required; -
XPRS_NAMES_SET
:(=3)
if set names are required; -
XPRS_NAMES_PWLCONS
:(=4)
if piecewise linear constraint names are required; -
XPRS_NAMES_GENCONS
:(=5)
if general constraint names are required; -
XPRS_NAMES_OBJECTIVE
:(=6)
if objective function names are required.
first First row, column, set, piecewise linear or general constraint in the range. last Last row, column, set, piecewise linear or general constraint in the range. -
getNames() [1/2]
|
inline |
Get names.
Retrieves names for a certain type of objects.
- Parameters
-
type The type of object for which names should be retrieved. first objects.Index of first name to be retrieved. last objects.Index of last name to be retrieved.
- Returns
- The requested names
- See also
- getNames(int, std::vector<std::optional<std::string>>, int, int)
- Since
- 44.00
getNames() [2/2]
|
inline |
Get names.
Retrieves names for a certain type of objects.
- Parameters
-
type The type of object for which names should be retrieved. first objects.Index of first name to be retrieved. last objects.Index of last name to be retrieved.
- Returns
- The requested names
- See also
- getNames(int, std::vector<std::optional<std::string>>, int, int)
- Since
- 44.00
getNlpsol()
|
inline |
Obtain the current SLP solution values.
- Parameters
-
x Double array of length XSLP_ORIGINALCOLS
to hold the values of the primal variables. May benull
if not required.slack Double array of length XSLP_ORIGINALROWS
to hold the values of the slack variables. May benull
if not required.duals Double array of length XSLP_ORIGINALROWS
to hold the values of the dual variables. May benull
if not required.djs Double array of length XSLP_ORIGINALCOLS
to hold the reduced costs of the primal variables. May benull
if not required.
getObj()
|
inline |
Returns the objective function coefficients for the columns in a given range.
- Parameters
-
first First column in the range. last Last column in the range.
getObjDblAttrib()
|
inline |
Retrieves the value of a given double attribute associated with a multi-objective solve.
When solving a multi-objective problem, several objectives might be optimized in sequence. After each solve, the problem attributes are captured so that they can be queried afterwards.
- Parameters
-
solveidx Index of the solve to query. Must be between 0
andSOLVEDOBJS-1
.attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in , or from the list in the xprs.h
header file.
getObjDblControl()
|
inline |
Retrieves the value of a given double control parameter associated with an objective function.
These parameters control how the objective is treated during multi-objective optimization.
- Parameters
-
objidx Index of the objective to query. control Control parameter whose value is to be returned. Must be one of: -
XPRS_OBJECTIVE_WEIGHT
: get the weight of the given objective; -
XPRS_OBJECTIVE_ABSTOL
: get the absolute tolerance of the given objective; -
XPRS_OBJECTIVE_RELTOL
: get the relative tolerance of the given objective; -
XPRS_OBJECTIVE_RHS
: get the constant term of the given objective.
-
getObjIntAttrib()
|
inline |
Retrieves the value of a given integer attribute associated with a multi-objective solve.
When solving a multi-objective problem, several objectives might be optimized in sequence. After each solve, the problem attributes are captured so that they can be queried afterwards.
- Parameters
-
solveidx Index of the solve to query. Must be between 0
andSOLVEDOBJS-1
.attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in , or from the list in the xprs.h
header file.
getObjIntControl()
|
inline |
Retrieves the value of a given integer control parameter associated with an objective.
These parameters control how the objective is treated during multi-objective optimization.
- Parameters
-
objidx Index of the objective to query. control Control parameter whose value is to be returned. Must be one of: -
XPRS_OBJECTIVE_PRIORITY
: get the priority of the given objective.
-
getObjLongAttrib()
|
inline |
Retrieves the value of a given integer attribute associated with a multi-objective solve.
When solving a multi-objective problem, several objectives might be optimized in sequence. After each solve, the problem attributes are captured so that they can be queried afterwards.
- Parameters
-
solveidx Index of the solve to query. Must be between 0
andSOLVEDOBJS-1
.attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in , or from the list in the xprs.h
header file.
getObjN()
|
inline |
For a given objective function, returns the objective coefficients for the columns in a given range.
- Parameters
-
objidx Index of the objective function whose coefficients to return. first First column in the range. last Last column in the range.
getPivots()
|
inline |
Returns a list of potential leaving variables if a specified variable enters the basis.
- Parameters
-
enter Index of the specified row or column to enter basis. outlist Integer array of length at least maxpivots
to hold list of potential leaving variables. May benull
if not required.x Double array of length ROWS
+
SPAREROWS
+
COLS
to hold the values of all the variables that would result ifenter
entered the basis. May benull
if not required.p_objval Pointer to a double where the objective function value that would result if enter
entered the basis will be returned.p_npivots Pointer to an integer where the actual number of potential leaving variables will be returned. maxpivots Maximum number of potential leaving variables to return.
getPresolveBasis()
|
inline |
Returns the current basis from memory into the user's data areas.
If the problem is presolved, the presolved basis will be returned. Otherwise the original basis will be returned.
- Parameters
-
rowstat Integer array of length ROWS
to the basis status of the stack, surplus or artificial variable associated with each row. The status will be one of:-
0
: slack, surplus or artificial is non-basic at lower bound; -
1
: slack, surplus or artificial is basic; -
2
: slack or surplus is non-basic at upper bound.
null
if not required.colstat Integer array of length COLS
to hold the basis status of the columns in the constraint matrix. The status will be one of:-
0
: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound; -
1
: variable is basic; -
2
: variable is at upper bound; -
3
: variable is super-basic.
null
if not required. -
getPresolveMap()
|
inline |
Returns the mapping of the row and column numbers from the presolve problem back to the original problem.
- Parameters
-
rowmap Integer array of length ROWS
where the row maps will be returned.colmap Integer array of length COLS
where the column maps will be returned.
getPresolveSol() [1/2]
|
inline |
Returns the solution for the presolved problem from memory.
- Parameters
-
x Double array of length COLS
where the values of the primal variables will be returned. May benull
if not required.
getPresolveSol() [2/2]
|
inline |
Returns the solution for the presolved problem from memory.
- Parameters
-
x Double array of length COLS
where the values of the primal variables will be returned. May benull
if not required.slack Double array of length ROWS
where the values of the slack variables will be returned. May benull
if not required.duals Double array of length ROWS
where the values of the dual variables will be returned. May benull
if not required.djs Double array of length COLS
where the reduced cost for each variable will be returned. May benull
if not required.
getPrimalRay()
|
inline |
Retrieves a primal ray (primal unbounded direction) for the current problem, if the problem is found to be unbounded.
- Parameters
-
ray Double array of length COLS
to hold the ray. May be null if not required.p_hasray This variable will be set to 1 if the Optimizer is able to return a primal ray, 0 otherwise.
getPwlCons() [1/2]
|
inline |
Returns the piecewise linear constraints y = f(x)
in a given range.
- Parameters
-
colind Integer array which will be filled with the indices of the input variables x
. It must be of length at leastlast-first+1
. May benull
if not required.resultant Integer array which will be filled with the indices of the output variables y
. It must be of length at leastlast-first+1
. May benull
if not required.start Integer array which will be filled with the start indices of the different constraints in the breakpoint arrays. It must be of length at least last-first+2
. Thex
-values of the breakpoints of piecewise linear constrainti < last
will be given inxval[start[i]]
toxval[start[i+1]]
. May benull
if not required.xval Double array of length maxpoints
which will be filled with thex
-values of the breakpoints. May benull
if not required.yval Double array of length maxpoints
which will be filled with they
-values of the breakpoints. May benull
if not required.maxpoints Maximum number of breakpoints to be retrieved. p_npoints Pointer to return the number of breakpoints in the selected constraints. If the number of breakpoints is greater than maxpoints
, then onlymaxpoints
elements will be returned in thexval
andyval
arrays. May benull
if not required.first First piecewise linear constraint in the range. last Last piecewise linear constraint in the range.
getPwlCons() [2/2]
|
inline |
Returns the piecewise linear constraints y = f(x)
in a given range.
- Parameters
-
colind Integer array which will be filled with the indices of the input variables x
. It must be of length at leastlast-first+1
. May benull
if not required.resultant Integer array which will be filled with the indices of the output variables y
. It must be of length at leastlast-first+1
. May benull
if not required.start Integer array which will be filled with the start indices of the different constraints in the breakpoint arrays. It must be of length at least last-first+2
. Thex
-values of the breakpoints of piecewise linear constrainti < last
will be given inxval[start[i]]
toxval[start[i+1]]
. May benull
if not required.xval Double array of length maxpoints
which will be filled with thex
-values of the breakpoints. May benull
if not required.yval Double array of length maxpoints
which will be filled with they
-values of the breakpoints. May benull
if not required.maxpoints Maximum number of breakpoints to be retrieved. p_npoints Pointer to return the number of breakpoints in the selected constraints. If the number of breakpoints is greater than maxpoints
, then onlymaxpoints
elements will be returned in thexval
andyval
arrays. May benull
if not required.first First piecewise linear constraint in the range. last Last piecewise linear constraint in the range.
getPWLName()
|
inline |
Get a PWL constraint name.
- Parameters
-
index objects.Index of the PWL constraint.
- Returns
- The requested PWL constraint's name.
- Since
- 44.00
getPWLNames()
|
inline |
Get names of PWL constraints.
- Parameters
-
first First PWL index (inclusive). last Last PWL index (inclusive).
- Returns
- The names for the specified PWL constraints.
- Since
- 44.00
getQObj()
|
inline |
Returns a single quadratic objective function coefficient corresponding to the variable pair (objqcol1, objqcol2)
of the Hessian matrix.
- Parameters
-
objqcol1 Column index for the first variable in the quadratic term. objqcol2 Column index for the second variable in the quadratic term.
getQRowCoeff()
|
inline |
Returns a single quadratic constraint coefficient corresponding to the variable pair (rowqcol1
, rowqcol2
) of the Hessian of a given constraint.
- Parameters
-
row The quadratic row where the coefficient is to be looked up. rowqcol1 Column index for the first variable in the quadratic term. rowqcol2 Column index for the second variable in the quadratic term.
getQRowQMatrix() [1/2]
|
inline |
Returns the nonzeros in a quadratic constraint coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetqrowqmatrix
returns the lower triangular part of this matrix only.
- Parameters
-
row Index of the row for which the quadratic coefficients are to be returned. start Integer array which will be filled with indices indicating the starting offsets in the colind
androwqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
androwqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if maxcoefs is 0.colind Integer array of length maxcoefs which will be filled with the column indices of the nonzero elements in the lower triangular part of Q. May be null
if maxcoefs is 0.rowqcoef Double array of length maxcoefs which will be filled with the nonzero element values. May be null
if maxcoefs is 0.maxcoefs Number of elements to be saved in colind and rowqcoef. If maxcoefs < *p_ncoefs
, onlymaxcoefs
elements are written.p_ncoefs Pointer to the integer where the number of nonzero elements in the queried columns will be returned. If the number of nonzero elements is greater than maxcoefs, then only maxcoefs elements will be returned. If p_ncoefs
is smaller than maxcoefs, then onlyp_ncoefs
will be returned. May benull
.first First column in the range. last Last column in the range.
getQRowQMatrix() [2/2]
|
inline |
Returns the nonzeros in a quadratic constraint coefficients matrix for the columns in a given range.
To achieve maximum efficiency, XPRSgetqrowqmatrix
returns the lower triangular part of this matrix only.
- Parameters
-
row Index of the row for which the quadratic coefficients are to be returned. start Integer array which will be filled with indices indicating the starting offsets in the colind
androwqcoef
arrays for each requested column. It must be length of at leastlast-first+2
. Columni
starts at positionstart[i]
in thecolind
androwqcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if maxcoefs is 0.colind Integer array of length maxcoefs which will be filled with the column indices of the nonzero elements in the lower triangular part of Q. May be null
if maxcoefs is 0.rowqcoef Double array of length maxcoefs which will be filled with the nonzero element values. May be null
if maxcoefs is 0.maxcoefs Number of elements to be saved in colind and rowqcoef. If maxcoefs < *p_ncoefs
, onlymaxcoefs
elements are written.first First column in the range. last Last column in the range.
getQRowQMatrixTriplets() [1/2]
|
inline |
Returns the nonzeros in a quadratic constraint coefficients matrix as triplets (index pairs with coefficients).
To achieve maximum efficiency, XPRSgetqrowqmatrixtriplets
returns the lower triangular part of this matrix only.
- Parameters
-
row Index of the row for which the quadratic coefficients are to be returned. rowqcol1 First index in the triplets. May be null
if not required.rowqcol2 Second index in the triplets. May be null
if not required.rowqcoef Coefficients in the triplets. May be null
if not required.
getQRowQMatrixTriplets() [2/2]
|
inline |
Returns the nonzeros in a quadratic constraint coefficients matrix as triplets (index pairs with coefficients).
To achieve maximum efficiency, XPRSgetqrowqmatrixtriplets
returns the lower triangular part of this matrix only.
- Parameters
-
row Index of the row for which the quadratic coefficients are to be returned. p_ncoefs Argument used to return the number of quadratic coefficients in the row. May be null
if not required.rowqcol1 First index in the triplets. May be null
if not required.rowqcol2 Second index in the triplets. May be null
if not required.rowqcoef Coefficients in the triplets. May be null
if not required.
getQRows() [1/2]
|
inline |
Returns the list indices of the rows that have quadratic coefficients.
- Parameters
-
rowind Array of length *p_nrows
used to return the indices of rows with quadratic coefficients in them. May be null if not required.
getQRows() [2/2]
|
inline |
Returns the list indices of the rows that have quadratic coefficients.
- Parameters
-
p_nrows Used to return the number of quadratic constraints in the matrix. rowind Array of length *p_nrows
used to return the indices of rows with quadratic coefficients in them. May be null if not required.
getRedCost()
|
inline |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getRedCosts() [1/3]
|
inline |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getRedCosts() [2/3]
|
inline |
Used to obtain the reduced costs associated with the incumbent solution during or after optimization of a continuous problem with XPRSoptimize
, XPRSlpoptimize
or XPRSnlpoptimize
.
- Parameters
-
status Information about the reduced costs returned. djs Double pointer where the reduced costs for the variables will be returned. May be null
if not required.first First column in the reduced costs. last Last column in the reduced costs.
getRedCosts() [3/3]
|
inline |
Convenience wrapper for getRedCosts(int*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getRhs()
|
inline |
Returns the right hand side elements for the rows in a given range.
- Parameters
-
first First row in the range. last Last row in the range.
getRhsRange()
|
inline |
Returns the right hand side range values for the rows in a given range.
- Parameters
-
first First row in the range. last Last row in the range.
getRowFlags()
|
inline |
Retrieve if a range of rows have been set up as special rows.
- Parameters
-
first First row index to be checked last Last row index to be checked
getRowName()
|
inline |
Get a row name.
- Parameters
-
index objects.Index of the row.
- Returns
- The requested row's name.
- Since
- 44.00
getRowNames()
|
inline |
Get names of rows.
- Parameters
-
first First row index (inclusive). last Last row index (inclusive).
- Returns
- The names for the specified rows.
- Since
- 44.00
getRows() [1/5]
|
inline |
Returns the nonzeros in the constraint matrix for the rows in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the colind
andcolcoef
arrays for each requested row. It must be of length at leastlast-first+2
. Rowi
starts at positionstart[i]
in thecolind
andcolcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.colind Integer arrays of length maxcoefs
which will be filled with the column indices of the nonzero elements for each row. May benull
if not required.colcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
if not required.maxcoefs Maximum number of elements to be retrieved. p_ncoefs Pointer to the integer where the number of nonzero elements in the selected rows will be returned. If the number of nonzero elements is greater than maxcoefs
, then onlymaxcoefs
elements will be returned. Ifp_ncoefs
is smaller thanmaxcoefs
, then onlyp_ncoefs
will be returned. May benull
if not required.first First row in the range. last Last row in the range.
getRows() [2/5]
|
inline |
Returns the nonzeros in the constraint matrix for the rows in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the colind
andcolcoef
arrays for each requested row. It must be of length at leastlast-first+2
. Rowi
starts at positionstart[i]
in thecolind
andcolcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.colind Integer arrays of length maxcoefs
which will be filled with the column indices of the nonzero elements for each row. May benull
if not required.colcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
if not required.maxcoefs Maximum number of elements to be retrieved. first First row in the range. last Last row in the range.
getRows() [3/5]
|
inline |
Returns the nonzeros in the constraint matrix for the rows in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the colind
andcolcoef
arrays for each requested row. It must be of length at leastlast-first+2
. Rowi
starts at positionstart[i]
in thecolind
andcolcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.colind Integer arrays of length maxcoefs
which will be filled with the column indices of the nonzero elements for each row. May benull
if not required.colcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
if not required.maxcoefs Maximum number of elements to be retrieved. first First row in the range. last Last row in the range.
getRows() [4/5]
|
inline |
Returns the nonzeros in the constraint matrix for the rows in a given range.
- Parameters
-
start Integer array which will be filled with the indices indicating the starting offsets in the colind
andcolcoef
arrays for each requested row. It must be of length at leastlast-first+2
. Rowi
starts at positionstart[i]
in thecolind
andcolcoef
arrays, and hasstart[i+1]-start[i]
elements in it. May benull
if not required.colind Integer arrays of length maxcoefs
which will be filled with the column indices of the nonzero elements for each row. May benull
if not required.colcoef Double array of length maxcoefs
which will be filled with the nonzero element values. May benull
if not required.maxcoefs Maximum number of elements to be retrieved. p_ncoefs Pointer to the integer where the number of nonzero elements in the selected rows will be returned. If the number of nonzero elements is greater than maxcoefs
, then onlymaxcoefs
elements will be returned. Ifp_ncoefs
is smaller thanmaxcoefs
, then onlyp_ncoefs
will be returned. May benull
if not required.first First row in the range. last Last row in the range.
getRows() [5/5]
|
inline |
Get range of rows.
- Parameters
-
first First row index (inclusive) last Last row index (inclusive)
- Returns
- Data for the queried rows.
- Since
- 44.00
getRowType()
|
inline |
Returns the row types for the rows in a given range.
- Parameters
-
first First row in the range. last Last row in the range.
getScale()
|
inline |
Returns the the current scaling of the matrix.
- Parameters
-
rowscale Integer array of size ROWS
that will contain the powers of2
with which the rows are currently scaled.colscale Integer array of size COLS
that will contain the powers of2
with which the columns are currently scaled.
getScaledInfeas()
|
inline |
Returns a list of scaled infeasible primal and dual variables for the original problem.
If the problem is currently presolved, it is postsolved before the function returns.
- Parameters
-
p_nprimalcols Number of primal infeasible variables. p_nprimalrows Number of primal infeasible rows. p_ndualrows Number of dual infeasible rows. p_ndualcols Number of dual infeasible variables. x Integer array of length p_nprimalcols
where the primal infeasible variables will be returned. May benull
if not required.slack Integer array of length p_nprimalrows
where the primal infeasible rows will be returned. May benull
if not required.duals Integer array of length p_ndualrows
where the dual infeasible rows will be returned. May benull
if not required.djs Integer array of length p_ndualcols
where the dual infeasible variables will be returned. May benull
if not required.
getSetDefinitions()
|
inline |
Get information about SOS.
- Returns
- The requested information.
- Since
- 44.00
getSetName()
|
inline |
Get a set (SOS) name.
- Parameters
-
index objects.Index of the set.
- Returns
- The requested sets's name.
- Since
- 44.00
getSetNames()
|
inline |
Get names of sets (SOS).
- Parameters
-
first First set index (inclusive). last Last set index (inclusive).
- Returns
- The names for the specified sets.
- Since
- 44.00
getSlack()
|
inline |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getSlacks() [1/3]
|
inline |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getSlacks() [2/3]
|
inline |
Used to obtain the slack values associated with the incumbent solution during or after optimization with XPRSoptimize
, XPRSmipoptimize
, XPRSlpoptimize
or XPRSnlpoptimize
.
- Parameters
-
status Information about the slacks returned. slacks Double pointer where the value of the slack variables will be returned. May be null
if not required.first First row in the slacks. last Last row in the slacks.
getSlacks() [3/3]
|
inline |
Convenience wrapper for getSlacks(int*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getSolution() [1/4]
|
inline |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const
that allocates the output array and queries all elements.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getSolution() [2/4]
|
inline |
Used to obtain the incumbent solution during or after optimization with XPRSoptimize
, XPRSmipoptimize
, XPRSlpoptimize
or XPRSnlpoptimize
.
- Parameters
-
status Information about the solution returned. x Double pointer where the value of the primal variables will be returned. May be null
if not required.first First column in the solution. last Last column in the solution.
getSolution() [3/4]
|
inline |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const
that allocates the output array.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getSolution() [4/4]
|
inline |
Convenience wrapper for getSolution(int*, Array<double> const &, int, int) const
that queries only a single value.
Before calling this function you should make sure that a solution is available and satisfies desired requiresments like feasible, optimal, ...
getStrAttrib()
|
inline |
Enables users to recover the values of various string problem attributes.
Problem attributes are set during loading and optimization of a problem.
- Parameters
-
attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in , or from the list in the xprs.h
header file.
getStrControl()
|
inline |
Returns the value of a given string control parameters.
- Parameters
-
control Control parameter whose value is to be returned. A full list of all controls may be found in , or from the list in the xprs.h
header file.
getStringControl()
|
inline |
Returns the value of a given string control parameters.
- Parameters
-
control Control parameter whose value is to be returned. A full list of all controls may be found in , or from the list in the xprs.h
header file.value Pointer to a string where the value of the control (plus null terminator) will be returned. maxbytes Maximum number of bytes to be written into the value argument. p_nbytes Returns the length of the string control including the null terminator.
getStrStringAttrib()
|
inline |
Enables users to recover the values of various string problem attributes.
Problem attributes are set during loading and optimization of a problem.
- Parameters
-
attrib Problem attribute whose value is to be returned. A full list of all problem attributes may be found in , or from the list in the xprs.h
header file.value Pointer to a string where the value of the attribute (plus null terminator) will be returned. maxbytes Maximum number of bytes to be written into the cgval argument. p_nbytes Returns the length of the string control including the null terminator.
getUB()
|
inline |
Returns the upper bounds for the columns in a given range.
- Parameters
-
first First column in the range. last Last column in the range.
IISIsolations()
|
inline |
Performs the isolation identification procedure for an Irreducible Infeasible Set (IIS).
This function applies only to linear problems.
- Parameters
-
iis The number of the IIS identified by either XPRSiisfirst
(IIS
),XPRSiisnext
(IIS
-n
) orXPRSiisall
(IIS
-a
) in which the isolations should be identified.
IISStatus() [1/2]
|
inline |
Get the IIS status.
- Returns
- IIS status information. If there are no IISs then the returned object will have all empty arrays.
- Since
- 44.00
IISStatus() [2/2]
|
inline |
Returns statistics on the Irreducible Infeasible Sets (IIS) found so far by XPRSiisfirst
(IIS
), XPRSiisnext
(IIS
-n
) or XPRSiisall
(IIS
-a
).
- Parameters
-
p_niis The number of IISs found so far. nrows Number of rows in the IISs. ncols Number of bounds in the IISs. suminfeas The sum of infeasibilities in the IISs after the first phase simplex. numinfeas The number of infeasible variables in the IISs after the first phase simplex.
interrupt()
|
inline |
Interrupts the Optimizer algorithms.
- Parameters
-
reason The reason for stopping. Possible reasons are: -
XPRS_STOP_NONE
: do not stop; -
XPRS_STOP_TIMELIMIT
: time limit hit; -
XPRS_STOP_CTRLC
: control C hit; -
XPRS_STOP_NODELIMIT
: node limit hit; -
XPRS_STOP_ITERLIMIT
: iteration limit hit; -
XPRS_STOP_MIPGAP
: MIP gap is sufficiently small; -
XPRS_STOP_SOLLIMIT
: solution limit hit; -
XPRS_STOP_USER
: user interrupt; -
>= 1000
: user defined value.
-
loadBasis()
|
inline |
Loads a basis from the user's areas.
- Parameters
-
rowstat Integer array of length ROWS
containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:-
0
: slack, surplus or artificial is non-basic at lower bound; -
1
: slack, surplus or artificial is basic; -
2
: slack or surplus is non-basic at upper bound. -
3
: slack or surplus is super-basic.
colstat Integer array of length COLS
containing the basis status of each of the columns in the constraint matrix. The status must be one of:-
0
: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound; -
1
: variable is basic; -
2
: variable is at upper bound; -
3
: variable is super-basic.
-
loadBranchDirs()
|
inline |
Loads directives into the current problem to specify which MIP entities the Optimizer should continue to branch on when a node solution is integer feasible.
- Parameters
-
ncols Number of directives. colind Integer array of length ncols
containing the column numbers. A negative value indicates a set number (the first set being -1, the second -2, and so on).dir Integer array of length ncols
containing either 0 or 1 for the entities given incolind
. Entities for which dir is set to 1 will be branched on until fixed before an integer feasible solution is returned. Ifdir
is null, the branching directive will be set for all entities incolind
.
loadCuts() [1/3]
|
inline |
Loads cuts from the cut pool into the matrix.
Without calling XPRSloadcuts
the cuts will remain in the cut pool but will not be active at the node. Cuts loaded at a node remain active at all descendant nodes unless they are deleted using XPRSdelcuts
.
- Parameters
-
cuttype Cut type. interp The way in which the cut type is interpreted: -
-1
: load all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - load cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps -0
load cut if all bits match those set incuttype
.
-
loadCuts() [2/3]
|
inline |
Loads cuts from the cut pool into the matrix.
Without calling XPRSloadcuts
the cuts will remain in the cut pool but will not be active at the node. Cuts loaded at a node remain active at all descendant nodes unless they are deleted using XPRSdelcuts
.
- Parameters
-
cuttype Cut type. interp The way in which the cut type is interpreted: -
-1
: load all cuts; -
1
: treat cut types as numbers; -
2
: treat cut types as bit maps - load cut if any bit matches any bit set incuttype
; -
3
: treat cut types as bit maps -0
load cut if all bits match those set incuttype
.
ncuts Number of cuts to load. cutind Array of length ncuts
containing pointers to the cuts to be loaded into the matrix. These are pointers returned by eitherXPRSstorecuts
orXPRSgetcpcutlist
. -
loadCuts() [3/3]
|
inline |
Loads cuts from the cut pool into the matrix.
Without calling XPRSloadcuts
the cuts will remain in the cut pool but will not be active at the node. Cuts loaded at a node remain active at all descendant nodes unless they are deleted using XPRSdelcuts
.
- Parameters
-
ncuts Number of cuts to load. cutind Array of length ncuts
containing pointers to the cuts to be loaded into the matrix. These are pointers returned by eitherXPRSstorecuts
orXPRSgetcpcutlist
.
loadDelayedRows()
|
inline |
Specifies that a set of rows in the matrix will be treated as delayed rows during a tree search.
These are rows that must be satisfied for any integer solution, but will not be loaded into the active set of constraints until required.
- Parameters
-
nrows The number of delayed rows. rowind An array of row indices to treat as delayed rows.
loadDirs()
|
inline |
Loads directives into the matrix.
- Parameters
-
ndirs Number of directives. colind Integer array of length ndirs
containing the column numbers. A negative value indicates a set number (the first set being-1
, the second-2
, and so on).priority Integer array of length ndirs
containing the priorities for the columns or sets. Priorities must be between 0 and 1000, where columns/sets with smallest priority will be branched on first. May benull
if not required.dir Character array of length ndirs
specifying the branching direction for each column or set:-
U
: the entity is to be forced up; -
D
: the entity is to be forced down; -
N
: not specified.
null
if not required.uppseudo Double array of length ndirs
containing the up pseudo costs for the columns or sets. May benull
if not required.downpseudo Double array of length ndirs
containing the down pseudo costs for the columns or sets. May benull
if not required. -
loadLp() [1/2]
|
inline |
Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a names for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
, the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite. -
loadLp() [2/2]
|
inline |
Enables the user to pass a matrix directly to the Optimizer, rather than reading the matrix from a file.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a names for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
, the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite. -
loadLpSol()
|
inline |
Loads an LP solution for the problem into the Optimizer.
- Parameters
-
x Optional: Double array of length COLS
(for the original problem and not the presolve problem) containing the values of the variables.slack Optional: double array of length ROWS
containing the values of slack variables.duals Optional: double array of length ROWS
containing the values of dual variables.djs Optional: double array of length COLS
containing the values of reduced costs.
loadMip() [1/2]
|
inline |
Used to load a MIP problem into the Optimizer data structures.
Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix not (including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
, the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing the set types:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadMip() [2/2]
|
inline |
Used to load a MIP problem into the Optimizer data structures.
Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix not (including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
, the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing the set types:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadMipSol()
|
inline |
Loads a starting MIP solution for the problem into the Optimizer.
- Parameters
-
x Double array of length COLS
(for the original problem and not the presolve problem) containing the values of the variables.
loadMIQCQP() [1/2]
|
inline |
Used to load a mixed integer quadratic problem with quadratic constraints into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function as well as in its constraints. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a<=
constraint (use this one for quadratic constraints as well); -
E
: indicates an=
constraint; -
G
: indicates a>=
constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
is null,length ncols+1
. Ifcollen
is null the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May be null if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may be null if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
is null,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nqrows Number of rows containing quadratic matrices. qrowind Integer array of size nqrows
, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined inrowtype
as typeL
.nrowqcoefs Integer array of size nqrows
, containing the number of nonzeros in each quadratic constraint matrix.rowqcol1 Integer array of size nqcelem
, wherenqcelem
equals the sum of the elements innrowqcoefs
(i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from0
tonrowqcoefs[0]-1
, for the second matrix fromnrowqcoefs[0]
tonrowqcoefs[0]+ nrowqcoefs[1]-1
, etc.rowqcol2 Integer array of size nqcelem
, containing the second index for the quadratic constraint matrices.rowqcoef Integer array of size nqcelem
, containing the coefficients for the quadratic constraint matrices.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing the set types:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadMIQCQP() [2/2]
|
inline |
Used to load a mixed integer quadratic problem with quadratic constraints into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function as well as in its constraints. Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a<=
constraint (use this one for quadratic constraints as well); -
E
: indicates an=
constraint; -
G
: indicates a>=
constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
is null,length ncols+1
. Ifcollen
is null the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May be null if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may be null if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
is null,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nqrows Number of rows containing quadratic matrices. qrowind Integer array of size nqrows
, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined inrowtype
as typeL
.nrowqcoefs Integer array of size nqrows
, containing the number of nonzeros in each quadratic constraint matrix.rowqcol1 Integer array of size nqcelem
, wherenqcelem
equals the sum of the elements innrowqcoefs
(i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from0
tonrowqcoefs[0]-1
, for the second matrix fromnrowqcoefs[0]
tonrowqcoefs[0]+ nrowqcoefs[1]-1
, etc.rowqcol2 Integer array of size nqcelem
, containing the second index for the quadratic constraint matrices.rowqcoef Integer array of size nqcelem
, containing the coefficients for the quadratic constraint matrices.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integer variables.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing the set types:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadMIQP() [1/2]
|
inline |
Used to load a MIQP problem, hence a MIP with quadratic objective coefficients, into the Optimizer data structures.
Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row type:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. The values in the range array will only be read forR
type rows. The entries for other type rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero). This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integers.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadMIQP() [2/2]
|
inline |
Used to load a MIQP problem, hence a MIP with quadratic objective coefficients, into the Optimizer data structures.
Integer, binary, partial integer, semi-continuous and semi-continuous integer variables can be defined, together with sets of type 1 and 2. The reference row values for the set members are passed as an array rather than specifying a reference row.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row type:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. The values in the range array will only be read forR
type rows. The entries for other type rows will be ignored. May benull
if not required. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero). This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if not required. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer arrays containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, then the length of rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nentities Number of binary, integer, semi-continuous, semi-continuous integer and partial integer entities. nsets Number of SOS1 and SOS2 sets. coltype Character array of length nentities
containing the entity types:-
B
: binary variables; -
I
: integer variables; -
P
: partial integer variables; -
S
: semi-continuous variables; -
R
: semi-continuous integers.
entind Integer array of length nentities
containing the column indices of the MIP entities.limit Double array of length nentities
containing the integer limits for the partial integer variables and lower bounds for semi-continuous and semi-continuous integer variables (any entries in the positions corresponding to binary and integer variables will be ignored). May benull
if not required.settype Character array of length nsets
containing:-
1
: SOS1 type sets; -
2
: SOS2 type sets.
null
if not required.setstart Integer array containing the offsets in the setind
andrefval
arrays indicating the start of the sets. This array is of lengthnsets+1
, the last member containing the offset where setnsets+1
would start. May benull
if not required.setind Integer array of length setstart[nsets]-1
containing the columns in each set. May benull
if not required.refval Double array of length setstart[nsets]-1
containing the reference row entries for each member of the sets. These define the order for SOS2 constraints and may be used in branching for both types. May benull
if not required. -
loadModelCuts()
|
inline |
Specifies that a set of rows in the matrix will be treated as model cuts.
- Parameters
-
nrows The number of model cuts. rowind An array of row indices to be treated as cuts.
loadPresolveBasis()
|
inline |
Loads a presolved basis from the user's areas.
- Parameters
-
rowstat Integer array of length ROWS
containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:-
0
: slack, surplus or artificial is non-basic at lower bound; -
1
: slack, surplus or artificial is basic; -
2
: slack or surplus is non-basic at upper bound.
colstat Integer array of length COLS
containing the basis status of each of the columns in the matrix. The status must be one of:-
0
: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound; -
1
: variable is basic; -
2
: variable is at upper bound; -
3
: variable is super-basic.
-
loadPresolveDirs()
|
inline |
Loads directives into the presolved matrix.
- Parameters
-
ndirs Number of directives. colind Integer array of length ndirs
containing the column numbers. A negative value indicates a set number (-1
being the first set,-2
the second, and so on).priority Integer array of length ndirs
containing the priorities for the columns or sets. May benull
if not required.dir Character array of length ndirs
specifying the branching direction for each column or set:-
U
: the entity is to be forced up; -
D
: the entity is to be forced down; -
N
: not specified.
null
if not required.uppseudo Double array of length ndirs
containing the up pseudo costs for the columns or sets. May benull
if not required.downpseudo Double array of length ndirs
containing the down pseudo costs for the columns or sets. May benull
if not required. -
loadQCQP() [1/2]
|
inline |
Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function as well as in its constraints.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a<=
constraint (use this one for quadratic constraints as well); -
E
: indicates an=
constraint; -
G
: indicates a>=
constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
is null,length ncols+1
. Ifcollen
is null the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May be null if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may be null if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
is null,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nqrows Number of rows containing quadratic matrices. qrowind Integer array of size nqrows
, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined inrowtype
as typeL
.nrowqcoef Integer array of size nqrows
, containing the number of nonzeros in each quadratic constraint matrix.rowqcol1 Integer array of size nqcelem
, wherenqcelem
equals the sum of the elements innrowqcoef
(i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from0
tonrowqcoef[0]-1
, for the second matrix fromnrowqcoef[0]
tonrowqcoef[0]+ nrowqcoef[1]-1
, etc.rowqcol2 Integer array of size nqcelem
, containing the second index for the quadratic constraint matrices.rowqcoef Integer array of size nqcelem
, containing the coefficients for the quadratic constraint matrices. -
loadQCQP() [2/2]
|
inline |
Used to load a quadratic problem with quadratic side constraints into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function as well as in its constraints.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a name for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a<=
constraint (use this one for quadratic constraints as well); -
E
: indicates an=
constraint; -
G
: indicates a>=
constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May be null if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
is null,length ncols+1
. Ifcollen
is null the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May be null if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may be null if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
is null,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients.nqrows Number of rows containing quadratic matrices. qrowind Integer array of size nqrows
, containing the indices of rows with quadratic matrices in them. Note that the rows are expected to be defined inrowtype
as typeL
.nrowqcoef Integer array of size nqrows
, containing the number of nonzeros in each quadratic constraint matrix.rowqcol1 Integer array of size nqcelem
, wherenqcelem
equals the sum of the elements innrowqcoef
(i.e. the total number of quadratic matrix elements in all the constraints). It contains the first column indices of the quadratic matrices. Indices for the first matrix are listed from0
tonrowqcoef[0]-1
, for the second matrix fromnrowqcoef[0]
tonrowqcoef[0]+ nrowqcoef[1]-1
, etc.rowqcol2 Integer array of size nqcelem
, containing the second index for the quadratic constraint matrices.rowqcoef Integer array of size nqcelem
, containing the coefficients for the quadratic constraint matrices. -
loadQP() [1/2]
|
inline |
Used to load a quadratic problem into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function, although not in its constraints.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a names for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients. -
loadQP() [2/2]
|
inline |
Used to load a quadratic problem into the Optimizer data structure.
Such a problem may have quadratic terms in its objective function, although not in its constraints.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing a names for the problem.ncols Number of structural columns in the matrix. nrows Number of rows in the matrix (not including the objective row). Objective coefficients must be supplied in the objcoef
array, and the objective function should not be included in any of the other arrays.rowtype Character array of length nrows
containing the row types:-
L
: indicates a <= constraint; -
E
: indicates an = constraint; -
G
: indicates a >= constraint; -
R
: indicates a range constraint; -
N
: indicates a nonbinding constraint.
rhs Double array of length nrows
containing the right hand side coefficients of the rows. The right hand side value for a range row gives the upper bound on the row.rng Double array of length nrows
containing the range values for range rows. Values for all other rows will be ignored. May benull
if there are no ranged constraints. The lower bound on a range row is the right hand side value minus the range value. The sign of the range value is ignored - the absolute value is used in all cases.objcoef Double array of length ncols
containing the objective function coefficients. This can benull
to set all objective coefficients to 0 (zero).start Integer array containing the offsets in the rowind
androwcoef
arrays of the start of the elements for each column. This array is of lengthncols
or, ifcollen
isnull
, lengthncols+1
. Ifcollen
isnull
the extra entry ofstart
,start[ncols]
, contains the position in therowind
androwcoef
arrays at which an extra column would start, if it were present. In C, this value is also the length of therowind
androwcoef
arrays.collen Integer array of length ncols
containing the number of nonzero elements in each column. May benull
if all elements are contiguous andstart[ncols]
contains the offset where the elements for columnncols+1
would start. This array is not required if the non-zero coefficients in therowind
androwcoef
arrays are continuous, and thestart
array hasncols+1
entries as described above. It may benull
if not required.rowind Integer array containing the row indices for the nonzero elements in each column. If the indices are input contiguously, with the columns in ascending order, the length of the rowind
isstart[ncols-1]+collen[ncols-1]
or, ifcollen
isnull
,start[ncols]
.rowcoef Double array containing the nonzero element values; length as for rowind
.lb Double array of length ncols
containing the lower bounds on the columns. UseXPRS_MINUSINFINITY
to represent a lower bound of minus infinity. If this isnull
then all lower bounds are 0 (zero).ub Double array of length ncols
containing the upper bounds on the columns. UseXPRS_PLUSINFINITY
to represent an upper bound of plus infinity. It this isnull
then all upper bounds are infinite.nobjqcoefs Number of quadratic terms. objqcol1 Integer array of size nobjqcoefs
containing the column index of the first variable in each quadratic term.objqcol2 Integer array of size nobjqcoefs
containing the column index of the second variable in each quadratic term.objqcoef Double array of size nobjqcoefs
containing the quadratic coefficients. -
loadSecureVecs()
|
inline |
Allows the user to mark rows and columns in order to prevent the presolve removing these rows and columns from the matrix.
- Parameters
-
nrows Number of rows to be marked. ncols Number of columns to be marked. rowind Integer array of length nrows
containing the rows to be marked. May benull
if not required.colind Integer array of length ncols
containing the columns to be marked. May benull
if not required.
lpOptimize() [1/2]
|
inline |
This function begins a search for the optimal continuous (LP) solution.
The direction of optimization is given by OBJSENSE
. The status of the problem when the function completes can be checked using LPSTATUS
. Any MIP entities in the problem will be ignored.
lpOptimize() [2/2]
|
inline |
This function begins a search for the optimal continuous (LP) solution.
The direction of optimization is given by OBJSENSE
. The status of the problem when the function completes can be checked using LPSTATUS
. Any MIP entities in the problem will be ignored.
- Parameters
-
flags Flags to pass to XPRSlpoptimize
(LPOPTIMIZE
). The default is""
ornull
, in which case the algorithm used is determined by theDEFAULTALG
control. If the argument includes:-
b
: the problem will be solved using the Newton barrier method, or the Hybrid gradient method ifBARALG
is set to 4; -
p
: the problem will be solved using the primal simplex algorithm; -
d
: the problem will be solved using the dual simplex algorithm; -
n
: (lower caseN
), the network part of the problem will be identified and solved using the network simplex algorithm;
-
makeChild()
|
inlinevirtual |
Create a new problem from an existing low-level pointer.
This is used to create worker problems for invoking callbacks.
mipOptimize() [1/2]
|
inline |
This function begins a tree search for the optimal MIP solution.
The direction of optimization is given by OBJSENSE
. The status of the problem when the function completes can be checked using MIPSTATUS
.
mipOptimize() [2/2]
|
inline |
This function begins a tree search for the optimal MIP solution.
The direction of optimization is given by OBJSENSE
. The status of the problem when the function completes can be checked using MIPSTATUS
.
- Parameters
-
flags Flags to pass to XPRSmipoptimize
(MIPOPTIMIZE
), which specifies how to solve the initial continuous problem where the MIP entities are relaxed. If the argument includes:-
b
: the initial continuous relaxation will be solved using the Newton barrier method (or the hybrid gradient method ifBARALG
is set to 4); -
p
: the initial continuous relaxation will be solved using the primal simplex algorithm; -
d
: the initial continuous relaxation will be solved using the dual simplex algorithm; -
n
: the network part of the initial continuous relaxation will be identified and solved using the network simplex algorithm; -
l
: stop after having solved the initial continous relaxation.
-
msAddCustomPreset()
|
inline |
A combined version of XSLPmsaddjob and XSLPmsaddpreset.
The preset described is loaded, topped up with the specific settings supplied
- Parameters
-
description Text description of the job. Used for messaging, may be null if not required. preset Which preset to load. maxjobs Maximum number of jobs to be added to the multistart pool. ninitial Number of initial values to set. colind Indices of the variables for which to set an initial value. May be null if ninitial is zero. initial Initial values for the variables for which to set an initial value. May be null if ninitial is zero. nintcontrols Number of integer controls to set. intcontrolid The indices of the integer controls to be set. May be null if nintcontrols is zero. intcontrolval The values of the integer controls to be set. May be null if nintcontrols is zero. ndblcontrols Number of double controls to set. dblcontrolid The indices of the double controls to be set. May be null if ndblcontrols is zero. dblcontrolval The values of the double controls to be set. May be null if ndblcontrols is zero. data Job specific user context pointer to be passed to the multistart callbacks.
msAddJob()
|
inline |
Adds a multistart job to the multistart pool.
- Parameters
-
description Text description of the job. Used for messaging, may be null if not required. ninitial Number of initial values to set. colind Indices of the variables for which to set an initial value. May be null if ninitial is zero. initial Initial values for the variables for which to set an initial value. May be null if ninitial is zero. nintcontrols Number of integer controls to set. intcontrolid The indices of the integer controls to be set. May be null if nintcontrols is zero. intcontrolval The values of the integer controls to be set. May be null if nintcontrols is zero. ndblcontrols Number of double controls to set. dblcontrolid The indices of the double controls to be set. May be null if ndblcontrols is zero. dblcontrolval The values of the double controls to be set. May be null if ndblcontrols is zero. data Job specific user context pointer to be passed to the multistart callbacks.
msAddPreset()
|
inline |
Loads a preset of jobs into the multistart job pool.
- Parameters
-
description Text description of the preset. Used for messaging, may be null if not required. preset Which preset to load. maxjobs Maximum number of jobs to be added to the multistart pool. data Job specific user context pointer to be passed to the multistart callbacks.
newBranchObject()
|
inline |
Create a new branching object.
The caller receives ownership for the new object and is responsible for deleting it. Note that when returning a branch object from a callback then ownership is transferred back to Xpress, so in this case the branch object must not be deleted by the user.
- Parameters
-
isOriginal Whether bound changes and cuts for this object will be stated in the original space or in the presolved space.
- Returns
- The new branch object.
nlpAddFormulas()
|
inline |
Add non-linear formulas to the SLP problem.
- Parameters
-
ncoefs Number of non-linear coefficients to be added. rowind Integer array holding index of row for the coefficient. formulastart Integer array of length ncoefs+1
holding the start position in the arraystype
andvalue
of the formula for the coefficients.formulastart[ncoefs]
should be set to the next position after the end of the last formula.parsed Integer indicating whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the formula for each coefficient. value Array of values corresponding to the types in type
.
nlpAddUserFunction() [1/6]
|
inline |
Register a user function of type "multi map with partial derivatives".
- Parameters
-
funcname Name of the function. nIn Number of input arguments to functor
.nOut Number of output arguments from functor
options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpAddUserFunction() [2/6]
|
inline |
Register a user function of type "multi map".
- Parameters
-
funcname Name of the function. nIn Number of input arguments to functor
.nOut Number of output arguments from functor
options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpAddUserFunction() [3/6]
|
inline |
Register a user function of type "vector map with partial derivatives".
- Parameters
-
funcname Name of the function. nIn Number of input arguments to functor
.options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpAddUserFunction() [4/6]
|
inline |
Register a user function of type "vector map".
- Parameters
-
funcname Name of the function. nIn Number of input arguments to functor
.options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpAddUserFunction() [5/6]
|
inline |
Register a user function of type "map with derivative".
- Parameters
-
funcname Name of the function. options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpAddUserFunction() [6/6]
|
inline |
Register a user function of type "map".
- Parameters
-
funcname Name of the function. options Options for the user function. functor The function that implements the user function.
- Returns
- The newly created user function. This pointer is owned by the library, so do not delete it. The pointer is valid only as long as the user function is registered. The latest point in time at which the function will be unregistered is when this XPRSProblem instance is deleted.
- Since
- 44.00
nlpCalcSlacks()
|
inline |
Calculate the slack values for the provided solution in the non-linear problem.
- Parameters
-
solution The solution for which the slacks are requested for. slack Vector of length NROWS to return the slack in.
nlpChgFormula()
|
inline |
Add or replace a single matrix formula using a parsed or unparsed formula.
- Parameters
-
row The index of the matrix row for the coefficient. parsed Integer indicating the whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the description and formula for each item. value Array of values corresponding to the types in type
.
nlpChgFormulaStr()
|
inline |
Add or replace a single matrix formula using a character string for the formula.
- Parameters
-
row The index of the matrix row for the coefficient. formula Character string holding the formula with the tokens separated by spaces.
nlpDelFormulas()
|
inline |
Delete nonlinear formulas from the current problem.
- Parameters
-
nformulas Number of SLP nonlinear formulas to delete. rowind Row indices of the SLP nonlinear formulas to delete.
nlpDelUserFunction()
|
inline |
Delete a user function from the current problem.
- Parameters
-
type The identifier of the user function as returned by XSLPadduserfunction
.
nlpEvaluateFormula()
|
inline |
Evaluate a formula using the current values of the variables.
- Parameters
-
parsed integer indicating whether the formula of the item is in internal unparsed format ( parsed
=0) or parsed (reverse Polish) format (parsed
=1).type Integer array of token types for the formula. values Double array of values corresponding to type
.
nlpGetFormula()
|
inline |
Retrieve a single matrix formula as a formula split into tokens.
- Parameters
-
row Integer holding the row index for the formula. parsed Integer indicating whether the formula of the row is to be returned in internal unparsed format ( parsed
=0) or parsed (reverse Polish) format (parsed
=1).maxtypes Maximum number of tokens to return, i.e., the length of the type and value arrays. p_ntypes Will be set to the length of the formula, including the XSLP_EOF
token.type Integer array to hold the token types for the formula. May be null
ifmaxtypes
is zero.value Double array of values corresponding to type
. May benull
ifmaxtypes
is zero.
nlpGetFormulaRows()
|
inline |
Retrieve the list of positions of the nonlinear formulas in the problem.
- Parameters
-
p_nformulas Integer used to return the total number of nonlinear formulas in the problem. rowind Integer array used for returning the row positions of the nonlinear formulas. May be null if not required.
nlpGetFormulaStr()
|
inline |
Retrieve a single matrix formula in a character string.
- Parameters
-
row Integer holding the row index for the formula. formula Character buffer in which the formula will be placed in the same format as used for input from a file. The formula will be null terminated. This argument may be null
ifmaxbytes
is zero.maxbytes Length of the formula
buffer.p_nbytes Will be set to the length of the formula, not including the null terminator.
nlpImportLibFunc()
|
inline |
Imports a function from a library file to be called as a user function.
- Parameters
-
libname Filename of the library. funcname Fucntion name inside the library. p_function Function pointer to return the loaded function. p_status Outcome of the load operation -
0
: success. -
1
: library file not found. -
2
: library function in library file not found.
-
nlpLoadFormulas()
|
inline |
Load non-linear formulas into the SLP problem.
- Parameters
-
nnlpcoefs Number of non-linear coefficients to be loaded. rowind Integer array holding index of row for the coefficient. formulastart Integer array of length nnlpcoefs+1
holding the start position in the arraystype
andvalue
of the formula for the coefficients.formulastart[nnlpcoefs]
should be set to the next position after the end of the last formula.parsed Integer indicating whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the formula for each coefficient. value Array of values corresponding to the types in type
.
nlpOptimize()
|
inline |
Maximize or minimize an SLP problem.
- Parameters
-
flags These have the same meaning as for XPRSmaxim
andXPRSminim
.
nlpSetInitVal()
|
inline |
Set the initial value of a variable.
- Parameters
-
nvars Number of variables for which the initial value is to be set. colind Array of length nvars
with index of the column for which the initial value is provided.initial Array of length nvars
with the initial value.
nlpValidateKKT()
|
inline |
Validates the first order optimality conditions also known as the Karush-Kuhn-Tucker (KKT) conditions versus the currect solution
- Parameters
-
mode The calculation mode can be: -
0
: recalculate the reduced costs at the current solution using the current dual solution. -
1
: minimize the sum of KKT violations by adjusting the dual solution. -
2
: perform both.
respectbasis The following ways are defined to assess if a constraint is active: -
0
: evaluate the recalculated slack activity versusXSLP_ECFTOL_R
. -
1
: use the basis status of the slack in the linearized problem if available. -
2
: use both.
updatemult The calculated values can be: -
0
: only used to calculate theXSLP_VALIDATIONINDEX_K
measure. -
1
: used to update the current dual solution and reduced costs.
violtarget When calculating the best KKT multipliers, it is possible to enforce an even distribution of reduced costs violations by enforcing a bound on them. -
nlpValidateRow()
|
inline |
Prints an extensive analysis on a given constraint of the SLP problem.
- Parameters
-
row The index of the row to be analyzed
nlpValidateVector()
|
inline |
Validate the feasibility of constraints for a given solution.
- Parameters
-
solution A vector of length XPRS_COLS
containing the solution vector to be checked.p_suminf Pointer to double in which the sum of infeasibility will be returned. May be null if not required. p_sumscaledinf Pointer to double in which the sum of scaled (relative) infeasibility will be returned. May be null if not required. p_objval Pointer to double in which the net objective will be returned. May be null if not required.
objSA()
|
inline |
Returns upper and lower sensitivity ranges for specified objective function coefficients.
If the objective coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.
- Parameters
-
ncols Number of objective function coefficients whose sensitivity is sought. colind Integer array of length ncols
containing the indices of the columns whose objective function coefficients sensitivity ranges are required.lower Double array of length ncols
where the objective function lower range values are to be returned.upper Double array of length ncols
where the objective function upper range values are to be returned.
optimize() [1/3]
|
inline |
Convenience wrapper for optimize(std::optional<std::string> const &, int *, int *)
.
This function calls optimize
with default arguments and returns the solve status. The solution status is returned and must be queried explicitly afterwards using the corresponding attribute. See the documentation of the overloaded function for more details.
- Returns
- The solve status
- Since
- 44.00
optimize() [2/3]
|
inline |
This function begins a search for the optimal solution of the problem.
The direction of optimization is given by OBJSENSE
.
- Parameters
-
flags Flags to pass to XPRSoptimize
(OPTIMIZE
). The default is""
ornull
. If the argument includes:-
s
: solve the problem to local optimality; -
x
: solve the problem to global optimality; -
l
: if a branch and bound search is necessary to solve the problem, stop after solving the root node.
solvestatus The solve status after termination. Takes the same values as SOLVESTATUS
solstatus The solution status after termination. Takes the same values as SOLSTATUS
-
optimize() [3/3]
|
inline |
Convenience wrapper for optimize(std::optional<std::string> const &, int *, int *)
.
This function calls optimize
with the specified flags and returns the solve status. The solution status is returned and must be queried explicitly afterwards using the corresponding attribute. See the documentation of the overloaded function for more details.
- Parameters
-
flags Flags to tweak the function behavior.
- Returns
- The solve status.
- Since
- 44.00
pivot()
|
inline |
Performs a simplex pivot by bringing variable enter
into the basis and removing leave
.
- Parameters
-
enter Index of row or column to enter basis. leave Index of row or column to leave basis.
postSolveSol()
|
inline |
Postsolves a primal solution formulated in the presolved space into the corresponding solution formulated in the original space.
The problem itself is unchanged.
- Parameters
-
prex Double array of length COLS
with the values of the primal variables in the presolved space. Cannot benull
.
presolveRow() [1/3]
|
inline |
Presolves a row formulated in terms of the original variables such that it can be added to a presolved matrix.
- Parameters
-
rowtype The type of the row: -
L
: indicates a <= row; -
G
: indicates a >= row.
norigcoefs Number of elements in the origcolind
andorigrowcoef
arrays.origcolind Integer array of length norigcoefs
containing the column indices of the row to presolve.origrowcoef Double array of length norigcoefs
containing the non-zero coefficients of the row to presolve.origrhs The right-hand side constant of the row to presolve. maxcoefs Maximum number of elements to return in the colind
androwcoef
arrays.p_ncoefs Pointer to the integer where the number of elements in the colind
androwcoef
arrays will be returned.colind Integer array which will be filled with the column indices of the presolved row. It must be allocated to hold at least COLS
elements.rowcoef Double array which will be filled with the coefficients of the presolved row. It must be allocated to hold at least COLS
elements.p_rhs Pointer to the double where the presolved right-hand side will be returned. p_status Status of the presolved row: -
-3
: Failed to presolve the row due to presolve dual reductions; -
-2
: Failed to presolve the row due to presolve duplicate column reductions; -
-1
: Failed to presolve the row due to an error. Check the Optimizer error code for the cause; -
0
: The row was successfully presolved; -
1
: The row was presolved, but may be relaxed.
-
presolveRow() [2/3]
|
inline |
Presolve a row.
The function transforms a row that is given in terms of the original model to a row that is given in terms of the presolved model.
- Parameters
-
ind Non-zero column indices. val Non-zero values of the row. type Type of the row rhs Right-hand side of the row.
- Returns
-
std::nullopt
if the row could not be presolved, the presolved row otherwise
- See also
- presolveRow(char, int, std::vector<int>, std::vector<double>, double, int, int *, std::vector<int>, std::vector<double>, double *, int *)
- Since
- 44.00
presolveRow() [3/3]
|
inline |
Presolve a row.
The function transforms a row that is given in terms of the original model to a row that is given in terms of the presolved model.
- Parameters
-
row The row to presolve.
- Returns
-
std::nullopt
if the row could not be presolved, the presolved row otherwise
- See also
- presolveRow(char, int, std::vector<int>, std::vector<double>, double, int, int *, std::vector<int>, std::vector<double>, double *, int *)
- Since
- 44.00
printIIS()
|
inline |
Prints a given Irreducible Infeasible Set (IIS) in the log.
If 0 is passed as the IIS number parameter, the initial infeasible subproblem is printed.
- Parameters
-
iis The ordinal number of the IIS to be printed.
readBasis() [1/2]
|
inline |
Instructs the Optimizer to read in a previously saved basis from a file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the basis is to be read. If omitted, the default problem_name is used with a.bss
extension.
readBasis() [2/2]
|
inline |
Instructs the Optimizer to read in a previously saved basis from a file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the basis is to be read. If omitted, the default problem_name is used with a.bss
extension.flags Flags to pass to XPRSreadbasis
(READBASIS
):
-
n
: input basis file containing basic solution values; -
t
: input a compact advanced form of the basis; -
v
: use the provided filename verbatim, without appending the.bss
extension; -
z
: read a compressed input file.
readBinSol() [1/2]
|
inline |
Reads a solution from a binary solution file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the solution is to be read. If omitted, the default problem_name is used with a.sol
extension.
readBinSol() [2/2]
|
inline |
Reads a solution from a binary solution file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the solution is to be read. If omitted, the default problem_name is used with a.sol
extension.flags Flags to pass to XPRSreadbinsol
(READBINSOL
):-
m
: load the solution as a solution for the MIP; -
x
: load the solution as a solution for the LP; -
v
: use the provided filename verbatim, without appending the.sol
extension; -
z
: read a compressed input file.
-
readDirs()
|
inline |
Reads a directives file to help direct the tree search.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the directives are to be read. If omitted (ornull
), the default problem_name is used with a.dir
extension.
readProb() [1/2]
|
inline |
Reads an (X)MPS or LP format matrix from file.
- Parameters
-
filename The path and file name from which the problem is to be read. Limited to MAXPROBNAMELENGTH
characters. If omitted (console users only), the default problem_name is used with various extensions - see below.
readProb() [2/2]
|
inline |
Reads an (X)MPS or LP format matrix from file.
- Parameters
-
filename The path and file name from which the problem is to be read. Limited to MAXPROBNAMELENGTH
characters. If omitted (console users only), the default problem_name is used with various extensions - see below.flags Flags to be passed: -
l
: onlyfilename.lp
is searched for; -
v
: use the provided filename verbatim, without appending the.mps
,.mat
or.lp
extension; -
z
: read a compressed input file.
-
readSlxSol() [1/2]
|
inline |
Reads an ASCII solution file [.slx
] created by the XPRSwriteslxsol
function.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be read. If omitted, the default problem_name is used with a.slx
extension.
readSlxSol() [2/2]
|
inline |
Reads an ASCII solution file [.slx
] created by the XPRSwriteslxsol
function.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be read. If omitted, the default problem_name is used with a.slx
extension.flags Flags to pass to XPRSreadslxsol
(READSLXSOL
):
-
l
: read the solution as an LP solution in case of a MIP problem; -
m
: read the solution as a solution for the MIP problem; -
a
: read multiple MIP solutions from the.slx
file and add them to the MIP problem; -
v
: use the provided filename verbatim, without appending the.slx
extension; -
z
: read a compressed input file.
removeAfterObjectiveCallback()
|
inline |
Remove an afterobjective
callback.
- Parameters
-
callback The callback to be removed (previously returned by addAfterObjectiveCallback
).
removeBarIterationCallback()
|
inline |
Remove a bariteration
callback.
- Parameters
-
callback The callback to be removed (previously returned by addBarIterationCallback
).
removeBarlogCallback()
|
inline |
Remove a barlog
callback.
- Parameters
-
callback The callback to be removed (previously returned by addBarlogCallback
).
removeBeforeObjectiveCallback()
|
inline |
Remove a beforeobjective
callback.
- Parameters
-
callback The callback to be removed (previously returned by addBeforeObjectiveCallback
).
removeBeforeSolveCallback()
|
inline |
Remove a beforesolve
callback.
- Parameters
-
callback The callback to be removed (previously returned by addBeforeSolveCallback
).
removeChangeBranchObjectCallback()
|
inline |
Remove a changebranchobject
callback.
- Parameters
-
callback The callback to be removed (previously returned by addChangeBranchObjectCallback
).
removeCheckTimeCallback()
|
inline |
Remove a checktime
callback.
- Parameters
-
callback The callback to be removed (previously returned by addCheckTimeCallback
).
removeComputeRestartCallback()
|
inline |
Remove a computerestart
callback.
- Parameters
-
callback The callback to be removed (previously returned by addComputeRestartCallback
).
removeCutlogCallback()
|
inline |
Remove a cutlog
callback.
- Parameters
-
callback The callback to be removed (previously returned by addCutlogCallback
).
removeGapNotifyCallback()
|
inline |
Remove a gapnotify
callback.
- Parameters
-
callback The callback to be removed (previously returned by addGapNotifyCallback
).
removeInfnodeCallback()
|
inline |
Remove an infnode
callback.
- Parameters
-
callback The callback to be removed (previously returned by addInfnodeCallback
).
removeIntsolCallback()
|
inline |
Remove an intsol
callback.
- Parameters
-
callback The callback to be removed (previously returned by addIntsolCallback
).
removeLplogCallback()
|
inline |
Remove a lplog
callback.
- Parameters
-
callback The callback to be removed (previously returned by addLplogCallback
).
removeMessageCallback()
|
inline |
Remove a message
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMessageCallback
).
removeMiplogCallback()
|
inline |
Remove a miplog
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMiplogCallback
).
removeMipThreadCallback()
|
inline |
Remove a mipthread
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMipThreadCallback
).
removeMipThreadDestroyCallback()
|
inline |
Remove a mipthreaddestroy
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMipThreadDestroyCallback
).
removeMsJobEndCallback()
|
inline |
Remove a msjobend
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMsJobEndCallback
).
removeMsJobStartCallback()
|
inline |
Remove a msjobstart
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMsJobStartCallback
).
removeMsWinnerCallback()
|
inline |
Remove a mswinner
callback.
- Parameters
-
callback The callback to be removed (previously returned by addMsWinnerCallback
).
removeNewnodeCallback()
|
inline |
Remove a newnode
callback.
- Parameters
-
callback The callback to be removed (previously returned by addNewnodeCallback
).
removeNlpCoefEvalErrorCallback()
|
inline |
Remove a nlpcoefevalerror
callback.
- Parameters
-
callback The callback to be removed (previously returned by addNlpCoefEvalErrorCallback
).
removeNodecutoffCallback()
|
inline |
Remove a nodecutoff
callback.
- Parameters
-
callback The callback to be removed (previously returned by addNodecutoffCallback
).
removeNodeLPSolvedCallback()
|
inline |
Remove a nodelpsolved
callback.
- Parameters
-
callback The callback to be removed (previously returned by addNodeLPSolvedCallback
).
removeOptnodeCallback()
|
inline |
Remove an optnode
callback.
- Parameters
-
callback The callback to be removed (previously returned by addOptnodeCallback
).
removePreIntsolCallback()
|
inline |
Remove a preintsol
callback.
- Parameters
-
callback The callback to be removed (previously returned by addPreIntsolCallback
).
removePrenodeCallback()
|
inline |
Remove a prenode
callback.
- Parameters
-
callback The callback to be removed (previously returned by addPrenodeCallback
).
removePresolveCallback()
|
inline |
Remove a presolve
callback.
- Parameters
-
callback The callback to be removed (previously returned by addPresolveCallback
).
removeSlpCascadeEndCallback()
|
inline |
Remove a slpcascadeend
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpCascadeEndCallback
).
removeSlpCascadeStartCallback()
|
inline |
Remove a slpcascadestart
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpCascadeStartCallback
).
removeSlpCascadeVarCallback()
|
inline |
Remove a slpcascadevar
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpCascadeVarCallback
).
removeSlpCascadeVarFailCallback()
|
inline |
Remove a slpcascadevarfail
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpCascadeVarFailCallback
).
removeSlpConstructCallback()
|
inline |
Remove a slpconstruct
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpConstructCallback
).
removeSlpDrColCallback()
|
inline |
Remove a slpdrcol
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpDrColCallback
).
removeSlpIntSolCallback()
|
inline |
Remove a slpintsol
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpIntSolCallback
).
removeSlpIterEndCallback()
|
inline |
Remove a slpiterend
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpIterEndCallback
).
removeSlpIterStartCallback()
|
inline |
Remove a slpiterstart
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpIterStartCallback
).
removeSlpIterVarCallback()
|
inline |
Remove a slpitervar
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpIterVarCallback
).
removeSlpPreUpdateLinearizationCallback()
|
inline |
Remove a slppreupdatelinearization
callback.
- Parameters
-
callback The callback to be removed (previously returned by addSlpPreUpdateLinearizationCallback
).
removeUserSolNotifyCallback()
|
inline |
Remove an usersolnotify
callback.
- Parameters
-
callback The callback to be removed (previously returned by addUserSolNotifyCallback
).
repairInfeas()
|
inline |
Provides a simplified interface for XPRSrepairweightedinfeas
.
- Parameters
-
penalty The type of penalties created from the preferences: -
c
: each penalty is the reciprocal of the preference (default); -
s
: the penalties are placed in the scaled problem.
phase2 Controls the second phase of optimization: -
o
: use the objective sense of the original problem (default); -
x
: maximize the relaxed problem using the original objective; -
f
: skip optimization regarding the original objective; -
n
: minimize the relaxed problem using the original objective; -
i
: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem; -
a
: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
flags Specifies flags to be passed to XPRSoptimize. lepref Preference for relaxing the less or equal side of row. gepref Preference for relaxing the greater or equal side of a row. lbpref Preferences for relaxing lower bounds. ubpref Preferences for relaxing upper bounds. delta The relaxation multiplier in the second phase -1. For console use -d
value. A positive value means a relative relaxation by multiplying the first phase objective with (delta-1
), while a negative value means an absolute relaxation, by addingabs(delta)
to the first phase objective. -
repairWeightedInfeas()
|
inline |
By relaxing a set of selected constraints and bounds of an infeasible problem, it attempts to identify a 'solution' that violates the selected set of constraints and bounds minimally, while satisfying all other constraints and bounds.
Among such solution candidates, it selects one that is optimal regarding the original objective function. For the console version, see REPAIRINFEAS
.
- Parameters
-
lepref Array of size ROWS
containing the preferences for relaxing the less or equal side of row.gepref Array of size ROWS
containing the preferences for relaxing the greater or equal side of a row.lbpref Array of size COLS
containing the preferences for relaxing lower bounds.ubpref Array of size COLS
containing preferences for relaxing upper bounds.phase2 Controls the second phase of optimization: -
o
: use the objective sense of the original problem (default); -
x
: maximize the relaxed problem using the original objective; -
f
: skip optimization regarding the original objective; -
n
: minimize the relaxed problem using the original objective; -
i
: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem; -
a
: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
delta The relaxation multiplier in the second phase -1. flags Specifies flags to be passed to XPRSoptimize. -
repairWeightedInfeasBounds()
|
inline |
An extended version of XPRSrepairweightedinfeas
that allows for bounding the level of relaxation allowed.
- Parameters
-
lepref Array of size ROWS
containing the preferences for relaxing the less or equal side of row. For the console use-lrp
value.gepref Array of size ROWS
containing the preferences for relaxing the greater or equal side of a row. For the console use-grp
value.lbpref Array of size COLS
containing the preferences for relaxing lower bounds. For the console use-lbp
value.ubpref Array of size COLS
containing preferences for relaxing upper bounds. For the console use-ubp
value.lerelax Array of size ROWS
containing the upper bounds on the amount the less or equal side of a row can be relaxed. For the console use-lrb
value.gerelax Array of size ROWS
containing the upper bounds on the amount the greater or equal side of a row can be relaxed. For the console use-grb
value.lbrelax Array of size COLS
containing the upper bounds on the amount the lower bounds can be relaxed. For the console use-lbb
value.ubrelax Array of size COLS
containing the upper bounds on the amount the upper bounds can be relaxed. For the console use-ubb
value.phase2 Controls the second phase of optimization: -
o
: use the objective sense of the original problem (default); -
x
: maximize the relaxed problem using the original objective; -
f
: skip optimization regarding the original objective; -
n
: minimize the relaxed problem using the original objective; -
i
: if the relaxation is infeasible, generate an irreducible infeasible subset for the analys of the problem; -
a
: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analys of the problem.
delta The relaxation multiplier in the second phase -1. flags Specifies flags to be passed to XPRSoptimize. -
restore() [1/3]
|
inline |
Restores the Optimizer's data structures from a file created by XPRSsave
(SAVE
).
Optimization may then recommence from the point at which the file was created.
restore() [2/3]
|
inline |
Restores the Optimizer's data structures from a file created by XPRSsave
(SAVE
).
Optimization may then recommence from the point at which the file was created.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing the problem name.
restore() [3/3]
|
inline |
Restores the Optimizer's data structures from a file created by XPRSsave
(SAVE
).
Optimization may then recommence from the point at which the file was created.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing the problem name.flags Additional flags
-
h
: Do not restore hardware information from the file; -
v
: use the provided filename verbatim, without appending the.svf
extension.
rhsSA()
|
inline |
Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients.
If the RHS coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.
- Parameters
-
nrows The number of RHS coefficients for which sensitivity ranges are required. rowind Integer array of length nrows
containing the indices of the rows whose RHS coefficients sensitivity ranges are required.lower Double array of length nrows
where the RHS lower range values are to be returned.upper Double array of length nrows
where the RHS upper range values are to be returned.
save()
|
inline |
Saves the current data structures, i.e.
matrices, control settings and problem attribute settings to file and terminates the run so that optimization can be resumed later.
saveAs()
|
inline |
Saves the current data structures, i.e.
matrices, control settings and problem attribute settings to file and terminates the run so that optimization can be resumed later.
- Parameters
-
sSaveFileName The name of the file (without .svf) to save to.
scale()
|
inline |
Re-scales the current matrix.
- Parameters
-
rowscale Integer array of size ROWS
containing the powers of2
with which to scale the rows, ornull
if not required.colscale Integer array of size COLS
containing the powers of2
with which to scale the columns, ornull
if not required.
setDblControl()
|
inline |
Sets the value of a given double control parameter.
- Parameters
-
control Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h
header file.value Value to which the control parameter is to be set.
setDefaultControl()
|
inline |
Sets a single control to its default value.
- Parameters
-
control Integer, double or string control parameter whose default value is to be set.
setDefaults()
|
inline |
Sets all controls to their default values.
Must be called before the problem is read or loaded by XPRSreadprob
, XPRSloadmip
, XPRSloadlp
, XPRSloadmiqp
, XPRSloadqp
.
setIndicator()
|
inline |
Add a single indicator constraint.
- Parameters
-
rowind Index of the row for the indicator. colind Index of the column for the indicator. complement If 1 then rowind
becomes active ifcolind
is 1. If -1 thenrowind
becomes active ifcolind
is 0.
- Since
- 44.00
setIndicators()
|
inline |
Specifies that a set of rows in the matrix will be treated as indicator constraints during a tree search.
An indicator constraint is made of a condition
and a constraint
. The condition
is of the type "bin = value", where bin
is a binary variable and value
is either 0 or 1. The constraint
is any matrix row (may be linear, quadratic or general nonlinear). During tree search, a row configured as an indicator constraint is enforced only when condition holds, that is only if the indicator variable bin
has the specified value. Note that every row may only get assigned a single indicator variable and term. If a row needs to be activated by multiple different terms, the row needs to be duplicated so that each term can be assigned to a distinct row. If the indicator variable should be changed, the old term needs to be deleted first (by calling XPRSdelindicators
or by calling this function with a comps argument of 0) before assigning a new one.
- Parameters
-
nrows The number of indicator constraints. rowind Integer array of length nrows
containing the indices of the rows that define the constraint part for the indicator constraints.colind Integer array of length nrows
containing the column indices of the indicator variables.complement Integer array of length nrows
with the complement flags:-
0
: not an indicator constraint (in this case the corresponding entry in thecolind
array is ignored); -
1
: for indicator constraints with condition "<code>bin = 1</code>"; -
-1
: for indicator constraints with condition "<code>bin = 0</code>".
-
setIntControl()
|
inline |
Sets the value of a given integer control parameter.
- Parameters
-
control Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h
header file.value Value to which the control parameter is to be set.
setLogFile()
|
inline |
This directs all Optimizer output to a log file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which all logging output should be written. If set tonull
, redirection of the output will stop and all screen output will be turned back on (except for library users where screen output is always turned off).
setLongControl()
|
inline |
Sets the value of a given integer control parameter.
- Parameters
-
control Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h
header file.value Value to which the control parameter is to be set.
setMessageStatus()
|
inline |
Manages suppression of messages.
- Parameters
-
msgcode The id number of the message. Refer to the section for a list of possible message numbers. status Non-zero if the message is not suppressed; 0
otherwise. If a value forstatus
is not supplied in the command-line call then the console Optimizer prints the value of the suppression status to screen i.e., non-zero if the message is not suppressed;0
otherwise.
setObjDblControl()
|
inline |
Sets the value of a given double control parameter associated with an objective.
These parameters control how the objective is treated during multi-objective optimization.
- Parameters
-
objidx Index of the objective to modify. control Control parameter whose value is to be modified. Must be one of: -
XPRS_OBJECTIVE_WEIGHT
: set the weight of the given objective; -
XPRS_OBJECTIVE_ABSTOL
: set the absolute tolerance of the given objective; -
XPRS_OBJECTIVE_RELTOL
: set the relative tolerance of the given objective; -
XPRS_OBJECTIVE_RHS
: set the constant term of the given objective.
value Value to which the control parameter is to be set. -
setObjective() [1/2]
|
inline |
Set objective to a linear function.
Any previously set objective will be cleared.
- Parameters
-
ind Non-zero variable indices. val Non-zero variable values.
- Since
- 44.00
setObjective() [2/2]
|
inline |
Set objective to a linear function.
Any previously set objective will be cleared.
- Parameters
-
ind Non-zero variable indices. val Non-zero variable values. sense Objective sense.
- Since
- 44.00
setObjIntControl()
|
inline |
Sets the value of a given integer control parameter associated with an objective.
These parameters control how the objective is treated during multi-objective optimization.
- Parameters
-
objidx Index of the objective to modify. control Control parameter whose value is to be modified. Must be one of: -
XPRS_OBJECTIVE_PRIORITY
: set the priority of the given objective.
value Value to which the control parameter is to be set. -
setProbName()
|
inline |
Sets the current default problem name.
This command is rarely used.
- Parameters
-
probname A string of up to MAXPROBNAMELENGTH
characters containing the problem name.
setStrControl()
|
inline |
Used to set the value of a given string control parameter.
- Parameters
-
control Control parameter whose value is to be set. A full list of all controls may be found in , or from the list in the xprs.h
header file.value A string containing the value to which the control is to be set (plus a null terminator).
slpAddCoefs()
|
inline |
Add non-linear coefficients to the SLP problem.
For a simpler version of this function see XSLPaddformulas
.
- Parameters
-
ncoefs Number of non-linear coefficients to be added. rowind Integer array holding index of row for the coefficient. colind Integer array holding index of column for the coefficient. factor Double array holding factor by which formula is scaled. If this is null
, then a value of 1.0 will be used.formulastart Integer array of length ncoefs+1
holding the start position in the arraystype
andvalue
of the formula for the coefficients.formulastart[ncoefs]
should be set to the next position after the end of the last formula.parsed Integer indicating whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the formula for each coefficient. value Array of values corresponding to the types in type
.
slpChgCascadeNLimit()
|
inline |
Set a variable specific cascade iteration limit.
- Parameters
-
col The index of the column corresponding to the SLP variable for which the cascading limit is to be imposed. limit The new cascading iteration limit.
slpChgCoef()
|
inline |
Add or change a single matrix coefficient using a parsed or unparsed formula.
For a simpler version of this function see XSLPchgformula
.
- Parameters
-
row The index of the matrix row for the coefficient. col The index of the matrix column for the coefficient. factor Address of a double precision variable holding the constant multiplier for the formula. If factor
isnull
, a value of 1.0 will be used.parsed Integer indicating the whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the description and formula for each item. value Array of values corresponding to the types in type
.
slpChgCoefStr()
|
inline |
Add or change a single matrix coefficient using a character string for the formula.
For a simpler version of this function see XPRSnlpchgformulastr
.
- Parameters
-
row The index of the matrix row for the coefficient. col The index of the matrix column for the coefficient. factor Address of a double precision variable holding the constant multiplier for the formula. If factor
isnull
, a value of 1.0 will be used.formula Character string holding the formula with the tokens separated by spaces.
slpChgDeltaType()
|
inline |
Changes the type of the delta assigned to a nonlinear variable.
- Parameters
-
nvars The number of SLP variables to change the delta type for. varind Indices of the variables to change the deltas for. deltatypes Type if the delta variable: -
0
: Differentiable variable, default. -
1
: Variable defined over the grid size given invalues
. -
2
: Variable where a minimum perturbation size given invalues
may be required before a significant change in the problem is achieved. -
3
: Variable where a meaningful step size should automatically be detected, with an upper limit given invalues
.
values Grid or minimum step sizes for the variables. -
slpChgRowStatus()
|
inline |
Change the status setting of a constraint.
- Parameters
-
row The index of the matrix row to be changed.
slpChgRowWt()
|
inline |
Set or change the initial penalty error weight for a row.
- Parameters
-
row The index of the row whose weight is to be set or changed. weight Address of a double precision variable holding the new value of the weight. May be null
if not required.
slpDelCoefs()
|
inline |
Delete coefficients from the current problem.
For a simpler version of this function see XSLPdelformulas
.
- Parameters
-
ncoefs Number of SLP coefficients to delete. rowind Row indices of the SLP coefficients to delete. colind Column indices of the SLP coefficients to delete.
slpEvaluateCoef()
|
inline |
Evaluate a coefficient using the current values of the variables.
- Parameters
-
row Integer index of the row. col Integer index of the column.
slpFixPenalties()
|
inline |
Fixe the values of the error vectors.
- Parameters
-
p_status Return status after fixing the penalty variables: 0 is successful, nonzero otherwise.
slpGetCoefFormula()
|
inline |
Retrieve a single matrix coefficient as a formula split into tokens.
For a simpler version of this function see XSLPchgformula
.
- Parameters
-
row Integer holding the row index for the coefficient. col Integer holding the column index for the coefficient. p_factor Address of a double precision variable to receive the value of the constant factor multiplying the formula in the coefficient. parsed Integer indicating whether the formula of the item is to be returned in internal unparsed format ( parsed
=0) or parsed (reverse Polish) format (parsed
=1).maxtypes Maximum number of tokens to return, i.e. length of the type
andvalue
arrays.p_ntypes Number of tokens returned in type and value. type Integer array to hold the token types for the formula. value Double array of values corresponding to type
.
slpGetCoefs()
|
inline |
Retrieve the list of positions of the nonlinear coefficients in the problem.
For a simpler version of this function see XSLPgetformularows
.
- Parameters
-
p_ncoefs Integer used to return the total number of nonlinear coefficients in the problem. rowind Integer array used for returning the row positions of the coefficients. May be null if not required. colind Integer array used for returning the column positions of the coefficients. May be null if not required.
slpGetCoefStr()
|
inline |
Retrieve a single matrix coefficient as a formula in a character string.
For a simpler version of this function see XPRSnlpgetformulastr
.
- Parameters
-
row Integer holding the row index for the coefficient. col Integer holding the column index for the coefficient. p_factor Address of a double precision variable to receive the value of the constant factor multiplying the formula in the coefficient. formula Character buffer in which the formula will be placed in the same format as used for input from a file. The formula will be null terminated. This argument may be null
ifmaxbytes
is zero.maxbytes Length of the formula
buffer.p_nbytes Will be set to the length of the formula, not including the null terminator.
slpGetRowStatus()
|
inline |
Retrieve the status setting of a constraint.
- Parameters
-
row The index of the matrix row whose data is to be obtained. p_status Address of an integer holding a bitmap to receive the status settings.
slpGetRowWT()
|
inline |
Get the initial penalty error weight for a row.
- Parameters
-
row The index of the row whose weight is to be retrieved.
slpLoadCoefs()
|
inline |
Load non-linear coefficients into the SLP problem.
For a simpler version of this function see XSLPloadformulas
.
- Parameters
-
ncoefs Number of non-linear coefficients to be loaded. rowind Integer array holding index of row for the coefficient. colind Integer array holding index of column for the coefficient. factor Double array holding factor by which formula is scaled. If this is null
, then a value of 1.0 will be used.formulastart Integer array of length ncoefs+1
holding the start position in the arraystype
andcoef
of the formula for the coefficients.formulastart[ncoefs]
should be set to the next position after the end of the last formula.parsed Integer indicating whether the token arrays are formatted as internal unparsed ( parsed
=0) or internal parsed reverse Polish (parsed
=1).type Array of token types providing the formula for each coefficient. coef Array of values corresponding to the types in type
.
slpSetDetRow()
|
inline |
Set the determining row of a variable.
- Parameters
-
nvars The number of variables for which determining rows are set. colind Array of length nvars
with the index of the column for which the determining row is set.rowind Array of length nvars
with the index of the determining row.
sparseBTran()
|
inline |
Post-multiplies a (row) vector provided by the user by the inverse of the current matrix.
Sparse version of XPRSbtran
.
- Parameters
-
val Double array of length ROWS
containing the values which are to be post-multiplied by the basis inverse. The transformed values are returned in this array.ind Integer array of indices identifying the non-zero entries of val
. The indices of the non-zero entries of the transformed vector inval
will be returned here. This array must be allocated to hold at leastROWS
indices.p_ncoefs Memory location where the number of non-zero entries is given. The number of non-zero entries of the transformed vector will be returned here.
sparseFTran()
|
inline |
Pre-multiplies a (column) vector provided by the user by the inverse of the current matrix.
Sparse version of XPRSftran
.
- Parameters
-
val Double array of length ROWS
containing the values which are to be multiplied by the basis inverse. The transformed values are returned in this array.ind Integer array of indices identifying the non-zero entries of val
. The indices of the non-zero entries of the transformed vector inval
will be returned here. This array must be allocated to hold at leastROWS
indices.p_ncoefs Memory location where the number of non-zero entries is given. The number of non-zero entries of the transformed vector will be returned here.
storeCuts() [1/2]
|
inline |
Stores cuts into the cut pool, but does not apply them to the current node.
These cuts must be explicitly loaded into the matrix using XPRSloadcuts
before they become active.
- Parameters
-
ncuts Number of cuts to add. nodups -
0
: do not exclude duplicates from the cut pool; -
1
: duplicates are to be excluded from the cut pool; -
2
: duplicates are to be excluded from the cut pool, ignoring cut type.
cuttype Integer array of length ncuts
containing the cut types. The cut types can be any integer and are used to identify the cuts.rowtype Character array of length ncuts
containing the row types:-
L
: indicates a <= row; -
E
: indicates an = row; -
G
: indicates a >= row.
rhs Double array of length ncuts
containing the right hand side elements for the cuts.start Integer array containing offsets into the colind
anddmtval
arrays indicating the start of each cut. This array is of lengthncuts+1
with the last elementstart[ncuts]
being where cutncuts+1
would start.colind Integer array of length start[ncuts]
containing the column indices in the cuts.cutcoef Double array of length start[ncuts]
containing the matrix values for the cuts. -
storeCuts() [2/2]
|
inline |
Stores cuts into the cut pool, but does not apply them to the current node.
These cuts must be explicitly loaded into the matrix using XPRSloadcuts
before they become active.
- Parameters
-
ncuts Number of cuts to add. nodups -
0
: do not exclude duplicates from the cut pool; -
1
: duplicates are to be excluded from the cut pool; -
2
: duplicates are to be excluded from the cut pool, ignoring cut type.
cuttype Integer array of length ncuts
containing the cut types. The cut types can be any integer and are used to identify the cuts.rowtype Character array of length ncuts
containing the row types:-
L
: indicates a <= row; -
E
: indicates an = row; -
G
: indicates a >= row.
rhs Double array of length ncuts
containing the right hand side elements for the cuts.start Integer array containing offsets into the colind
anddmtval
arrays indicating the start of each cut. This array is of lengthncuts+1
with the last elementstart[ncuts]
being where cutncuts+1
would start.colind Integer array of length start[ncuts]
containing the column indices in the cuts.cutcoef Double array of length start[ncuts]
containing the matrix values for the cuts. -
strongBranch()
|
inline |
Performs strong branching iterations on all specified bound changes.
For each candidate bound change, XPRSstrongbranch
performs dual simplex iterations starting from the current optimal solution of the base LP, and returns both the status and objective value reached after these iterations.
- Parameters
-
nbounds Number of bound changes to try. colind Integer array of size nbounds
containing the indices of the columns on which the bounds will change.bndtype Character array of length nbounds
indicating the type of bound to change:-
U
: indicates change the upper bound; -
L
: indicates change the lower bound; -
B
: indicates change both bounds, i.e. fix the column.
bndval Double array of length nbounds
giving the new bound values.iterlim Maximum number of LP iterations to perform for each bound change. objval Objective value of each LP after performing the strong branching iterations. status Status of each LP after performing the strong branching iterations, as detailed for the LPSTATUS
attribute. -
strongBranchCB()
|
inline |
Performs strong branching iterations on all specified bound changes.
For each candidate bound change, XPRSstrongbranchcb
performs dual simplex iterations starting from the current optimal solution of the base LP, and returns both the status and objective value reached after these iterations.
- Parameters
-
nbounds Number of bound changes to try. colind Integer array of size nbounds
containing the indices of the columns on which the bounds will change.bndtype Character array of length nbounds
indicating the type of bound to change:-
U
: indicates change the upper bound; -
L
: indicates change the lower bound; -
B
: indicates change both bounds, i.e. fix the column.
bndval Double array of length nbounds
giving the new bound values.iterlim Maximum number of LP iterations to perform for each bound change. objval Objective value of each LP after performing the strong branching iterations. status Status of each LP after performing the strong branching iterations, as detailed for the LPSTATUS
attribute.callback Function to be called after each strong branch has been reoptimized. This function returns an integer. Use 0
to indicate that everything went fine. Use a return value different from0
to signal an error. This will terminate the function. -
tune()
|
inline |
This function begins a tuner session for the current problem.
The tuner will solve the problem multiple times while evaluating a list of control settings and promising combinations of them. When finished, the tuner will select and set the best control setting on the problem. Note that the direction of optimization is given by OBJSENSE
.
- Parameters
-
flags Flags to pass to XPRStune
, which specify whether to tune the current problem as an LP or a MIP problem, and the algorithm for solving the LP problem or the initial LP relaxation of the MIP. The flags are optional. If the argument includes:-
l
: will tune the problem as an LP (mutually exclusive with flagg
); -
g
: will tune the problem as a MIP (mutually exclusive with flagl
); -
x
: will tune the problem as a Global Optimization problem with Xpress Global; -
d
: will use the dual simplex method; -
p
: will use the primal simplex method; -
b
: will use the barrier method; -
n
: will use the network simplex method.
-
tuneProbSetFile()
|
inline |
This function begins a tuner session for a set of problems.
The tuner will solve the problems multiple times while evaluating a list of control settings and promising combinations of them. When finished, the tuner will select and set the best control setting on the problems.
- Parameters
-
setfile A plain text file which contains a list of problem filenames. ifmip -
-1
: to automatically determine whether to solve the problem set as LP or MIP; -
0
: to force the tuner to tune the problem set as LP; -
1
: to force the tuner to tune the problem set as MIP.
sense -
0
: to automatically determine the sense of each problem; -
1
: to force the tuner to minimize each problem; -
-1
: to force the tuner to maximize each problem.
-
tunerReadMethod()
|
inline |
This function loads a user defined tuner method from the given file.
- Parameters
-
methodfile The method file name, from which the tuner can load a user-defined tuner method.
tunerWriteMethod()
|
inline |
This function writes the current tuner method to a given file or prints it to the console.
- Parameters
-
methodfile The method file name, to which the tuner will write the current tuner method. If the input is stdout
orSTDOUT
, then the tuner will print the method to the console instead.
unloadProb()
|
inline |
Unloads and frees all memory associated with the current problem.
It also invalidates the current problem (as opposed to reading in an empty problem).
writeBasis() [1/2]
|
inline |
Writes the current basis to a file for later input into the Optimizer.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the basis is to be written. If omitted, the default problem_name is used with a.bss
extension.
writeBasis() [2/2]
|
inline |
Writes the current basis to a file for later input into the Optimizer.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name from which the basis is to be written. If omitted, the default problem_name is used with a.bss
extension.flags Flags to pass to XPRSwritebasis
(WRITEBASIS
):
-
i
: output the internal presolved basis; -
t
: output a compact advanced form of the basis; -
n
: output basis file containing current solution values; -
h
: output values in single precision; -
p
: output values in full precision (obsolete as this is now default behavior); -
v
: use the provided filename verbatim, without appending the.bss
extension; -
z
: compress the output file.
writeBinSol() [1/2]
|
inline |
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a.sol
extension.
writeBinSol() [2/2]
|
inline |
Writes the current MIP or LP solution to a binary solution file for later input into the Optimizer.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a.sol
extension.flags Flags to pass to XPRSwritebinsol
(WRITEBINSOL
):-
m
: output the MIP solution; -
x
: output the LP solution; -
v
: use the provided filename verbatim, without appending the.sol
extension; -
z
: compress the output file.
-
writeDirs()
|
inline |
Writes the tree search directives from the current problem to a directives file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the directives should be written. If omitted (or null), the default problem_name is used with a.dir
extension.
writeIIS() [1/2]
|
inline |
Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS).
If 0 is passed as the IIS number parameter, the initial infeasible subproblem is written.
- Parameters
-
iis The ordinal number of the IIS to be written. filename The name of the file to be created. filetype Type of file to be created: -
0
: creates an lp/mps file containing the IIS as a linear programming problem; -
1
: creates a comma separated (csv) file containing the description and supplementary information on the given IIS.
-
writeIIS() [2/2]
|
inline |
Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS).
If 0 is passed as the IIS number parameter, the initial infeasible subproblem is written.
- Parameters
-
iis The ordinal number of the IIS to be written. filename The name of the file to be created. filetype Type of file to be created: -
0
: creates an lp/mps file containing the IIS as a linear programming problem; -
1
: creates a comma separated (csv) file containing the description and supplementary information on the given IIS.
flags Flags passed to the XPRSwriteprob
function. -
writeProb() [1/2]
|
inline |
Writes the current problem to an MPS or LP file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters to contain the file name to which the problem is to be written. If omitted, the default problem_name is used with a.mps
extension, unless thel
flag is used in which case the extension is.lp
.
writeProb() [2/2]
|
inline |
Writes the current problem to an MPS or LP file.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters to contain the file name to which the problem is to be written. If omitted, the default problem_name is used with a.mps
extension, unless thel
flag is used in which case the extension is.lp
.flags Flags, which can be one or more of the following:
-
o
: one element per line; -
n
: output the scaled problem; -
s
: scrambled vector names; -
l
: output in LP format; -
p
: output values in full precision (obsolete as this is now default behavior); -
t
: omit the Xpress header in LP format; -
v
: use the provided filename verbatim, without appending the.mps
or.lp
extension; -
z
: compress the output file.
writePrtSol() [1/2]
|
inline |
Writes the current solution to a fixed format ASCII file, problem_name .prt
.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extension.prt
will be appended.
writePrtSol() [2/2]
|
inline |
Writes the current solution to a fixed format ASCII file, problem_name .prt
.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extension.prt
will be appended.flags Flags for XPRSwriteprtsol
(WRITEPRTSOL
) are:
-
x
: write the LP solution instead of the current MIP solution; -
v
: use the provided filename verbatim, without appending the.prt
extension; -
z
: write a compressed output file; -
s
: include classical sensitivity analysis.
writeSlxSol() [1/3]
|
inline |
Creates an ASCII solution file (.slx
) using a similar format to MPS files.
These files can be read back into the Optimizer using the XPRSreadslxsol
function.
writeSlxSol() [2/3]
|
inline |
Creates an ASCII solution file (.slx
) using a similar format to MPS files.
These files can be read back into the Optimizer using the XPRSreadslxsol
function.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a.slx
extension.
writeSlxSol() [3/3]
|
inline |
Creates an ASCII solution file (.slx
) using a similar format to MPS files.
These files can be read back into the Optimizer using the XPRSreadslxsol
function.
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name is used with a.slx
extension.flags Flags to pass to XPRSwriteslxsol
(WRITESLXSOL
):
-
l
: write the LP solution in case of a MIP problem; -
m
: write the MIP solution; -
p
: use full precision for numerical values (obsolete as this is now default behavior); -
s
: including slack variables; -
d
: LP solution only: including dual variables; -
r
: LP solution only: including reduced cost; -
v
: use the provided filename verbatim, without appending the.slx
extension; -
z
: compress the output file.
writeSol() [1/2]
|
inline |
Writes the current solution to a CSV format ASCII file, problem_name.asc
(and .hdr
).
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extensions.hdr
and.asc
will be appended.
writeSol() [2/2]
|
inline |
Writes the current solution to a CSV format ASCII file, problem_name.asc
(and .hdr
).
- Parameters
-
filename A string of up to MAXPROBNAMELENGTH
characters containing the file name to which the solution is to be written. If omitted, the default problem_name will be used. The extensions.hdr
and.asc
will be appended.flags Flags to control which optional fields are output:
-
s
: sequence number; -
n
: name; -
t
: type; -
b
: basis status; -
a
: activity; -
c
: cost (columns), slack (rows); -
l
: lower bound; -
u
: upper bound; -
d
: dj (column; reduced costs), dual value (rows; shadow prices); -
r
: right hand side (rows).
If no flags are specified, all fields are output.
Additional flags:
-
p
: outputs in full precision; -
q
: only outputs vectors with nonzero optimum value; -
x
: output the current LP solution instead of the MIP solution; -
z
: compress the output file.
Member Data Documentation
EQ
|
inlinestaticconstexpr |
Constraint sense for ==
constraints.
- Since
- 44.00
GEQ
|
inlinestaticconstexpr |
Constraint sense for >=
constraints.
- Since
- 44.00
LEQ
|
inlinestaticconstexpr |
Constraint sense for <=
constraints.
- Since
- 44.00
The documentation for this class was generated from the following file:
- xpress.hpp
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.