Initializing help system before first use

# XPRSProblem

Xpress solver problem. More...

Inheritance diagram for xpress::XPRSProblem:

## Classes
class | AbstractUserFunction
| Base class for user functions. More...
class | Attributes
| Attributes API. More...
class | CannotPerformOperationException
| Exception raised when an operation is attempted for which the model cannot be in a presolved state or in a callback. More...
class | CannotReferenceVariablesException
| Exception raised when a constraint references `Variable` instances while it should only reference indices. 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 | InvalidStateException
| Exception that is raised if the problem is not in the correct state. 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 Types
typedef std::function< double(double, double, double *)> | MapDeltaFunctor
| Function that maps a value to a value and also provides derivatives.
typedef std::function< double(double)> | MapFunctor
| Function that maps a value to a value.
typedef std::function< std::vector< double >(double const *, double const *, double *)> | MultiMapDeltaFunctor
| Function that maps an array of values to an array of values and also provides derivatives.
typedef std::function< std::vector< double >(double const *)> | MultiMapFunctor
| Function that maps an array of values to an array of values.
typedef std::function< double(double const *, double const *, double *)> | VecMapDeltaFunctor
| Function that maps an array of values to a single value and also provides derivatives.
typedef std::function< double(double const *)> | VecMapFunctor
| Function that maps an array of values to a single value.

## 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.
| ~XPRSProblem () noexcept
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 | 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 C , is-integral(C) >
auto | addColumns (C dim) -> VariableBuilder::ColumnArrayBuilder< C >
| Create an 1-dimensional array of columns.
template<typename C1 , typename C2 , is-integral(C1) , is-integral(C2) >
auto | addColumns (C1 dim1, C2 dim2) -> VariableBuilder::ColumnArray2Builder< C1, C2 >
| Create an 2-dimensional array of columns.
template<typename C1 , typename C2 , typename C3 , is-integral(C1) , is-integral(C2) , is-integral(C3) >
auto | addColumns (C1 dim1, C2 dim2, C3 dim3) -> VariableBuilder::ColumnArray3Builder< C1, C2, C3 >
| Create an 3-dimensional array of columns.
template<typename C1 , typename C2 , typename C3 , typename C4 , is-integral(C1) , is-integral(C2) , is-integral(C3) , is-integral(C4) >
auto | addColumns (C1 dim1, C2 dim2, C3 dim3, C4 dim4) -> VariableBuilder::ColumnArray4Builder< C1, C2, C3, C4 >
| Create an 4-dimensional array of columns.
template<typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , is-integral(C1) , is-integral(C2) , is-integral(C3) , is-integral(C4) , is-integral(C5) >
auto | addColumns (C1 dim1, C2 dim2, C3 dim3, C4 dim4, C5 dim5) -> VariableBuilder::ColumnArray5Builder< C1, C2, C3, C4, C5 >
| Create an 5-dimensional array of columns.
template<typename Iter_iterable1 , typename K1 = element-type(Iter_iterable1), is-iterable(Iter_iterable1) >
auto | addColumns (Iter_iterable1 const &iterable1) -> VariableBuilder::ColumnMapBuilder< K1 >
| Create an 1-dimensional map of columns.
template<typename Iter_iterable1 , typename Iter_iterable2 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) >
auto | addColumns (Iter_iterable1 const &iterable1, Iter_iterable2 const &iterable2) -> VariableBuilder::ColumnMap2Builder< K1, K2 >
| Create an 2-dimensional map of columns.
template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) >
auto | addColumns (Iter_iterable1 const &iterable1, Iter_iterable2 const &iterable2, Iter_iterable3 const &iterable3) -> VariableBuilder::ColumnMap3Builder< K1, K2, K3 >
| Create an 3-dimensional map of columns.
template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename Iter_iterable4 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), typename K4 = element-type(Iter_iterable4), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) , is-iterable(Iter_iterable4) >
auto | addColumns (Iter_iterable1 const &iterable1, Iter_iterable2 const &iterable2, Iter_iterable3 const &iterable3, Iter_iterable4 const &iterable4) -> VariableBuilder::ColumnMap4Builder< K1, K2, K3, K4 >
| Create an 4-dimensional map of columns.
template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename Iter_iterable4 , typename Iter_iterable5 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), typename K4 = element-type(Iter_iterable4), typename K5 = element-type(Iter_iterable5), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) , is-iterable(Iter_iterable4) , is-iterable(Iter_iterable5) >
auto | addColumns (Iter_iterable1 const &iterable1, Iter_iterable2 const &iterable2, Iter_iterable3 const &iterable3, Iter_iterable4 const &iterable4, Iter_iterable5 const &iterable5) -> VariableBuilder::ColumnMap5Builder< K1, K2, K3, K4, K5 >
| Create an 5-dimensional map 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.
auto | addCutRoundCallback (std::function< void(XPRSProblem &, int, int *)> callback, int prio=0) -> CallbackHandle
| Add a `cutround` 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.
void | addManagedCuts (int globalvalid, int ncuts, 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 to the Optimizer's internal cut pool from within the cutround callback set by `XPRSaddcbcutround`.
void | addManagedCuts (int globalvalid, int ncuts, 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 to the Optimizer's internal cut pool from within the cutround callback set by `XPRSaddcbcutround`.
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 the 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 | getBarNumStability (Array< int > const &colstab, Array< int > const &rowstab)
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.
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.
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.
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 primal values.
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 objects 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 objects for the cuts active at the current node.
auto | getCutList (int maxcuts, Array< XPRScut > const &cutind) -> int
| Retrieves a list of cut objects 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
| Returns the dual values.
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 | getObjLongControl (int objidx, ObjControl control) -> XPRSint64
| Retrieves the value of a given integer control parameter associated with an objective.
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
| Returns the reduced costs.
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 primal and dual variables that are infeasible for the scaled 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
| Returns the slack values.
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
| Returns 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 &nrowqcoefs, 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 &nrowqcoefs, 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".
auto | nlpCalcSlacks (Array< double const > const &solution) -> std::vector< double >
| 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 columns.
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 input 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.
auto | presolveSol (Array< double const > const &origx) -> std::vector< double >
| Presolves a primal solution formulated in the input space into the corresponding solution formulated in the presolved space.
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 | 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 | removeCutRoundCallback (CallbackHandle const &callback)
| Remove a `cutround` callback.
void | removeCutRoundCallbacks ()
| Remove all `cutround` 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 `XPRSsaveas` (`SAVE`).
void | restore (std::optional< std::string > const &probname)
| Restores the Optimizer's data structures from a file created by `XPRSsaveas` (`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 `XPRSsaveas` (`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 &filename)
| 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 an 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 an integer control parameter associated with an objective.
void | setObjLongControl (int objidx, ObjControl control, XPRSint64 value)
| Sets the value of an integer control parameter associated with an objective.
void | setProbName (std::optional< std::string > const &probname)
| Sets the current 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.
void | slpChgRowStatus (int row, int *status)
| 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.
auto | slpGetRowStatus (int row) -> int
| 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 | slpSetInitStepBounds (int ncols, Array< int const > const &colind, Array< double const > const &initial)
| Set the initial step bounds of columns.
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.
auto | triggerRestart () -> int
| Triggers a restart of the MIP search process.
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.

Since
  44.00

## Constructor & Destructor Documentation

## XPRSProblem() [1/3]

xpress::XPRSProblem::XPRSProblem | ( | XPRSprob | p | ) |
| inline protected

Create a new instance from an existing low-level pointer.

Since
  44.00

## XPRSProblem() [2/3]

xpress::XPRSProblem::XPRSProblem | ( | bool |  | ) |
| inline

Create a new instance without allocating a license.

Since
  44.00

## XPRSProblem() [3/3]

xpress::XPRSProblem::XPRSProblem | ( | char const * | name = nullptr,
|  | char const * | licpath = nullptr )
| inline

Create a new instance with name and allocating a license.

Parameters

  name | The problem name.
  licpath | Path to license file.

Since
  44.00

## ~XPRSProblem()

xpress::XPRSProblem::~XPRSProblem | ( |  | ) |
| inline noexcept

Since
  44.00

## Member Function Documentation

## addAfterObjectiveCallback()

auto xpress::XPRSProblem::addAfterObjectiveCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add an `afterobjective` callback.

More details about `afterobjective` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `afterobjective`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbafterobjective()

## addBarIterationCallback()

auto xpress::XPRSProblem::addBarIterationCallback | ( | std::function< void(XPRSProblem &, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `bariteration` callback.

More details about `bariteration` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `bariteration`.
`p_action`
  Defines a return value controlling barrier:
  - `<0`: continue with the next iteration;
  - `=0`: let barrier decide (use default stopping criteria);
  - `1`: barrier stops with status not defined;
  - `2`: barrier stops with optimal status;
  - `3`: barrier stops with dual infeasible status;
  - `4`: barrier stops wih primal infeasible status.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbbariteration()

## addBarlogCallback()

auto xpress::XPRSProblem::addBarlogCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `barlog` callback.

More details about `barlog` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `barlog`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbbarlog()

## addBeforeObjectiveCallback()

auto xpress::XPRSProblem::addBeforeObjectiveCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `beforeobjective` callback.

More details about `beforeobjective` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `beforeobjective`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbbeforeobjective()

## addChangeBranchObjectCallback()

auto xpress::XPRSProblem::addChangeBranchObjectCallback | ( | std::function< void(XPRSProblem &, BranchObject *, BranchObject **)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `changebranchobject` callback.

More details about `changebranchobject` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
`branch`
`p_newbranch`

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbchangebranchobject()

## addCheckTimeCallback()

auto xpress::XPRSProblem::addCheckTimeCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `checktime` callback.

More details about `checktime` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `checktime`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbchecktime()

## addCols() [1/2]

void xpress::XPRSProblem::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 )
| 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 be `null` to indicate that all newly created variables have an objective coefficient of 0 (zero).
  start | Integer array of length `ncols` containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. May be `null` if none of the columns contain nonzero coefficients.
  rowind | Integer array of length `ncoefs` containing the row indices for the elements in each column. May be `null` if none of the columns contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the element values. May be `null` if none of the columns contain nonzero coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the added columns. This can be `null` 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 be `null` in which case all variables will have an infinite upper bound.

## addCols() [2/2]

void xpress::XPRSProblem::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 )
| 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 be `null` to indicate that all newly created variables have an objective coefficient of 0 (zero).
  start | Integer array of length `ncols` containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. May be `null` if none of the columns contain nonzero coefficients.
  rowind | Integer array of length `ncoefs` containing the row indices for the elements in each column. May be `null` if none of the columns contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the element values. May be `null` if none of the columns contain nonzero coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the added columns. This can be `null` 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 be `null` in which case all variables will have an infinite upper bound.

## addColumn()

auto xpress::XPRSProblem::addColumn | ( | double | lb,
|  | double | ub,
|  | ColumnType | type,
|  | std::optional< std::string > | name ) -> int
| 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]

template<typename C , is-integral(C) >

auto xpress::XPRSProblem::addColumns | ( | C | dim | ) | -> VariableBuilder::ColumnArrayBuilder< C >
| 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(xpress::toInt(dim))
                     .withType(xpress::objects::ColumnType.Binary)
                     .toArray();

See `xpress::VariableBuilder::ColumnArrayBuilder<C>` for details of how to modify the specification in the builder.

Parameters

  dim | Dimension.

Template Parameters

  C | Type for dimension.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [2/15]

template<typename C1 , typename C2 , is-integral(C1) , is-integral(C2) >

auto xpress::XPRSProblem::addColumns | ( | C1 | dim1,
|  | C2 | dim2 ) -> VariableBuilder::ColumnArray2Builder< C1, C2 >
| 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(xpress::toInt(dim1) ,xpress::toInt(dim2))
                     .withType(xpress::objects::ColumnType.Binary)
                     .toArray();

See `xpress::VariableBuilder::ColumnArray2Builder<C1 ,C2>` for details of how to modify the specification in the builder.

Parameters

  dim1 | Dimension 1.
  dim2 | Dimension 2.

Template Parameters

  C1 | Type for dimension 1.
  C2 | Type for dimension 2.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [3/15]

template<typename C1 , typename C2 , typename C3 , is-integral(C1) , is-integral(C2) , is-integral(C3) >

auto xpress::XPRSProblem::addColumns | ( | C1 | dim1,
|  | C2 | dim2,
|  | C3 | dim3 ) -> VariableBuilder::ColumnArray3Builder< C1, C2, C3 >
| 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(xpress::toInt(dim1) ,xpress::toInt(dim2) ,xpress::toInt(dim3))
                     .withType(xpress::objects::ColumnType.Binary)
                     .toArray();

See `xpress::VariableBuilder::ColumnArray3Builder<C1 ,C2 ,C3>` for details of how to modify the specification in the builder.

Parameters

  dim1 | Dimension 1.
  dim2 | Dimension 2.
  dim3 | Dimension 3.

Template Parameters

  C1 | Type for dimension 1.
  C2 | Type for dimension 2.
  C3 | Type for dimension 3.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [4/15]

template<typename C1 , typename C2 , typename C3 , typename C4 , is-integral(C1) , is-integral(C2) , is-integral(C3) , is-integral(C4) >

auto xpress::XPRSProblem::addColumns | ( | C1 | dim1,
|  | C2 | dim2,
|  | C3 | dim3,
|  | C4 | dim4 ) -> VariableBuilder::ColumnArray4Builder< C1, C2, C3, C4 >
| 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(xpress::toInt(dim1) ,xpress::toInt(dim2) ,xpress::toInt(dim3) ,xpress::toInt(dim4))
                     .withType(xpress::objects::ColumnType.Binary)
                     .toArray();

See `xpress::VariableBuilder::ColumnArray4Builder<C1 ,C2 ,C3 ,C4>` for details of how to modify the specification in the builder.

Parameters

  dim1 | Dimension 1.
  dim2 | Dimension 2.
  dim3 | Dimension 3.
  dim4 | Dimension 4.

Template Parameters

  C1 | Type for dimension 1.
  C2 | Type for dimension 2.
  C3 | Type for dimension 3.
  C4 | Type for dimension 4.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [5/15]

template<typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , is-integral(C1) , is-integral(C2) , is-integral(C3) , is-integral(C4) , is-integral(C5) >

auto xpress::XPRSProblem::addColumns | ( | C1 | dim1,
|  | C2 | dim2,
|  | C3 | dim3,
|  | C4 | dim4,
|  | C5 | dim5 ) -> VariableBuilder::ColumnArray5Builder< C1, C2, C3, C4, C5 >
| 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(xpress::toInt(dim1) ,xpress::toInt(dim2) ,xpress::toInt(dim3) ,xpress::toInt(dim4) ,xpress::toInt(dim5))
                     .withType(xpress::objects::ColumnType.Binary)
                     .toArray();

See `xpress::VariableBuilder::ColumnArray5Builder<C1 ,C2 ,C3 ,C4 ,C5>` 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.

Template Parameters

  C1 | Type for dimension 1.
  C2 | Type for dimension 2.
  C3 | Type for dimension 3.
  C4 | Type for dimension 4.
  C5 | Type for dimension 5.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [6/15]

template<typename Iter_iterable1 , typename K1 = element-type(Iter_iterable1), is-iterable(Iter_iterable1) >

auto xpress::XPRSProblem::addColumns | ( | Iter_iterable1 const & | iterable1 | ) | -> VariableBuilder::ColumnMapBuilder< K1 >
| 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(iterable1 )
                                         .withType(xpress::objects::ColumnType.Binary)
                                         .toMap();

See `xpress::VariableBuilder::ColumnMapBuilder` for details of how to modify the specification in the builder.

Parameters

  iterable1 | Data for dimension 1.

Template Parameters

  Iter_iterable1 | Something that supports `begin()` and `end()` and contains values of type `K1`.
  K1 | Data type for dimension 1.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [7/15]

template<typename Iter_iterable1 , typename Iter_iterable2 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) >

auto xpress::XPRSProblem::addColumns | ( | Iter_iterable1 const & | iterable1,
|  | Iter_iterable2 const & | iterable2 ) -> VariableBuilder::ColumnMap2Builder< K1, K2 >
| 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(iterable1 ,iterable2)
                                         .withType(xpress::objects::ColumnType.Binary)
                                         .toMap();

See `xpress::VariableBuilder::ColumnMap2Builder` for details of how to modify the specification in the builder.

Parameters

  iterable1 | Data for dimension 1.
  iterable2 | Data for dimension 2.

Template Parameters

  Iter_iterable1 | Something that supports `begin()` and `end()` and contains values of type `K1`.
  Iter_iterable2 | Something that supports `begin()` and `end()` and contains values of type `K2`.
  K1 | Data type for dimension 1.
  K2 | Data type for dimension 2.

Returns
  A builder that will create the columns.

Since
  44.00

## addColumns() [8/15]

template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) >

auto xpress::XPRSProblem::addColumns | ( | Iter_iterable1 const & | iterable1,
|  | Iter_iterable2 const & | iterable2,
|  | Iter_iterable3 const & | iterable3 ) -> VariableBuilder::ColumnMap3Builder< K1, K2, K3 >
| 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(iterable1 ,iterable2 ,iterable3)
                                         .withType(xpress::objects::ColumnType.Binary)
                                         .toMap();

See `xpress::VariableBuilder::ColumnMap3Builder` for details of how to modify the specification in the builder.

Parameters

  iterable1 | Data for dimension 1.
  iterable2 | Data for dimension 2.
  iterable3 | Data for dimension 3.

Template Parameters

  Iter_iterable1 | Something that supports `begin()` and `end()` and contains values of type `K1`.
  Iter_iterable2 | Something that supports `begin()` and `end()` and contains values of type `K2`.
  Iter_iterable3 | Something that supports `begin()` and `end()` and contains values of type `K3`.
  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() [9/15]

template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename Iter_iterable4 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), typename K4 = element-type(Iter_iterable4), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) , is-iterable(Iter_iterable4) >

auto xpress::XPRSProblem::addColumns | ( | Iter_iterable1 const & | iterable1,
|  | Iter_iterable2 const & | iterable2,
|  | Iter_iterable3 const & | iterable3,
|  | Iter_iterable4 const & | iterable4 ) -> VariableBuilder::ColumnMap4Builder< K1, K2, K3, K4 >
| 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(iterable1 ,iterable2 ,iterable3 ,iterable4)
                                         .withType(xpress::objects::ColumnType.Binary)
                                         .toMap();

See `xpress::VariableBuilder::ColumnMap4Builder` for details of how to modify the specification in the builder.

Parameters

  iterable1 | Data for dimension 1.
  iterable2 | Data for dimension 2.
  iterable3 | Data for dimension 3.
  iterable4 | Data for dimension 4.

Template Parameters

  Iter_iterable1 | Something that supports `begin()` and `end()` and contains values of type `K1`.
  Iter_iterable2 | Something that supports `begin()` and `end()` and contains values of type `K2`.
  Iter_iterable3 | Something that supports `begin()` and `end()` and contains values of type `K3`.
  Iter_iterable4 | Something that supports `begin()` and `end()` and contains values of type `K4`.
  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() [10/15]

template<typename Iter_iterable1 , typename Iter_iterable2 , typename Iter_iterable3 , typename Iter_iterable4 , typename Iter_iterable5 , typename K1 = element-type(Iter_iterable1), typename K2 = element-type(Iter_iterable2), typename K3 = element-type(Iter_iterable3), typename K4 = element-type(Iter_iterable4), typename K5 = element-type(Iter_iterable5), is-iterable(Iter_iterable1) , is-iterable(Iter_iterable2) , is-iterable(Iter_iterable3) , is-iterable(Iter_iterable4) , is-iterable(Iter_iterable5) >

auto xpress::XPRSProblem::addColumns | ( | Iter_iterable1 const & | iterable1,
|  | Iter_iterable2 const & | iterable2,
|  | Iter_iterable3 const & | iterable3,
|  | Iter_iterable4 const & | iterable4,
|  | Iter_iterable5 const & | iterable5 ) -> VariableBuilder::ColumnMap5Builder< K1, K2, K3, K4, K5 >
| 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(iterable1 ,iterable2 ,iterable3 ,iterable4 ,iterable5)
                                         .withType(xpress::objects::ColumnType.Binary)
                                         .toMap();

See `xpress::VariableBuilder::ColumnMap5Builder` for details of how to modify the specification in the builder.

Parameters

  iterable1 | Data for dimension 1.
  iterable2 | Data for dimension 2.
  iterable3 | Data for dimension 3.
  iterable4 | Data for dimension 4.
  iterable5 | Data for dimension 5.

Template Parameters

  Iter_iterable1 | Something that supports `begin()` and `end()` and contains values of type `K1`.
  Iter_iterable2 | Something that supports `begin()` and `end()` and contains values of type `K2`.
  Iter_iterable3 | Something that supports `begin()` and `end()` and contains values of type `K3`.
  Iter_iterable4 | Something that supports `begin()` and `end()` and contains values of type `K4`.
  Iter_iterable5 | Something that supports `begin()` and `end()` and contains values of type `K5`.
  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() [11/15]

template<typename K1 >

auto xpress::XPRSProblem::addColumns | ( | xpress::SizedArray< K1 const > const & | arr1 | ) | -> VariableBuilder::ColumnMapBuilder< K1 >
| 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(COLL_PASS)
                                         .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]

template<typename K1 , typename K2 >

auto xpress::XPRSProblem::addColumns | ( | xpress::SizedArray< K1 const > const & | arr1,
|  | xpress::SizedArray< K2 const > const & | arr2 ) -> VariableBuilder::ColumnMap2Builder< K1, K2 >
| 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(COLL_PASS)
                                         .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]

template<typename K1 , typename K2 , typename K3 >

auto xpress::XPRSProblem::addColumns | ( | xpress::SizedArray< K1 const > const & | arr1,
|  | xpress::SizedArray< K2 const > const & | arr2,
|  | xpress::SizedArray< K3 const > const & | arr3 ) -> VariableBuilder::ColumnMap3Builder< K1, K2, K3 >
| 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(COLL_PASS)
                                         .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]

template<typename K1 , typename K2 , typename K3 , typename K4 >

auto xpress::XPRSProblem::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 >
| 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(COLL_PASS)
                                         .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]

template<typename K1 , typename K2 , typename K3 , typename K4 , typename K5 >

auto xpress::XPRSProblem::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 >
| 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(COLL_PASS)
                                         .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()

auto xpress::XPRSProblem::addComputeRestartCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `computerestart` callback.

More details about `computerestart` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `computerestart`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbcomputerestart()

## addCut() [1/2]

auto xpress::XPRSProblem::addCut | ( | int | cuttype,
|  | RowInfo | cut ) -> void
| inline

Add a single cut to the problem.

Examples using `addCut`:

- ELSCut.cpp
- TravelingSalesPerson.cpp

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]

auto xpress::XPRSProblem::addCut | ( | int | cuttype,
|  | xpress::SizedArray< int const > const & | colind,
|  | xpress::SizedArray< double const > const & | colval,
|  | char | rowtype,
|  | double | rhs ) -> void
| inline

Add a single cut to the problem.

Examples using `addCut`:

- ELSCut.cpp
- TravelingSalesPerson.cpp

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 not `nullptr` then it must have the same length as `colval` and `colval[k]` must be the non-zero coefficient in the cut for column `colind[k]`.
  colval | Array of column values for the non-zeros for the cut. This can be `nullptr`. If not `nullptr` then it must have the same length as `colind` and `colval[k]` must be the non-zero coefficient in the cut for column `colind[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()

auto xpress::XPRSProblem::addCutlogCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `cutlog` callback.

More details about `cutlog` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `cutlog`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbcutlog()

## addCutRoundCallback()

auto xpress::XPRSProblem::addCutRoundCallback | ( | std::function< void(XPRSProblem &, int, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `cutround` callback.

More details about `cutround` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `cutround`.
`ifxpresscuts`
  An integer set to 1 if the Optimizer will apply a round of cuts after this callback. 0 otherwise.
`p_action`
  An integer return value that specifies the action the Optimizer should take:
  - `-1`: Continue unchanged. The default action.
  - `0`: No further rounds of cuts should be applied on this node.
  - `1`: The Optimizer should apply one more round of cutting, regardless of the value of `ifxpresscuts`
  - `2`: The Optimizer should process any changes applied during this callback and fire the callback again, but skip any Optimizer cutting.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbcutround()

## addCuts() [1/2]

void xpress::XPRSProblem::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 )
| 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` and `cutcoef` arrays indicating the start of each cut. This array has one entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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.

## addCuts() [2/2]

void xpress::XPRSProblem::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 )
| 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` and `cutcoef` arrays indicating the start of each cut. This array has one entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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.

## addGapNotifyCallback()

auto xpress::XPRSProblem::addGapNotifyCallback | ( | std::function< void(XPRSProblem &, double *, double *, double *, double *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `gapnotify` callback.

More details about `gapnotify` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The current problem.
`p_relgapnotifytarget`
  The value the `MIPRELGAPNOTIFY` control will be set to after this callback. May be modified within the callback in order to set a new notification target.
`p_absgapnotifytarget`
  The value the `MIPABSGAPNOTIFY` control will be set to after this callback. May be modified within the callback in order to set a new notification target.
`p_absgapnotifyobjtarget`
  The value the `MIPABSGAPNOTIFYOBJ` control will be set to after this callback. May be modified within the callback in order to set a new notification target.
`p_absgapnotifyboundtarget`
  The value the `MIPABSGAPNOTIFYBOUND` control will be set to after this callback. May be modified within the callback in order to set a new notification target.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbgapnotify()

## addGenCons() [1/2]

void xpress::XPRSProblem::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 )
| 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 a `maximum` constraint; `XPRS_GENCONS_MIN (1)`: indicates a `minimum` constraint; `XPRS_GENCONS_AND (2)`: indicates an `and` constraint. `XPRS_GENCONS_OR (3)`: indicates an `or` constraint; `XPRS_GENCONS_ABS (4)`: indicates an `absolute 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 the `colind` 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 the `val` array (may be `null`if `nvals = 0`).
  val | Double array of length `nvals` containing the constant values in all general constraints (may be `null`if `nvals = 0`).

## addGenCons() [2/2]

void xpress::XPRSProblem::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 )
| 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 a `maximum` constraint; `XPRS_GENCONS_MIN (1)`: indicates a `minimum` constraint; `XPRS_GENCONS_AND (2)`: indicates an `and` constraint. `XPRS_GENCONS_OR (3)`: indicates an `or` constraint; `XPRS_GENCONS_ABS (4)`: indicates an `absolute 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 the `colind` 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 the `val` array (may be `null`if `nvals = 0`).
  val | Double array of length `nvals` containing the constant values in all general constraints (may be `null`if `nvals = 0`).

## addInfnodeCallback()

auto xpress::XPRSProblem::addInfnodeCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add an `infnode` callback.

More details about `infnode` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `infnode`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbinfnode()

## addIntsolCallback()

auto xpress::XPRSProblem::addIntsolCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add an `intsol` callback.

More details about `intsol` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `intsol`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbintsol()

## addLplogCallback()

auto xpress::XPRSProblem::addLplogCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `lplog` callback.

More details about `lplog` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `lplog`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcblplog()

## addManagedCuts() [1/2]

void xpress::XPRSProblem::addManagedCuts | ( | int | globalvalid,
|  | int | ncuts,
|  | 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 )
| inline

Adds cuts to the Optimizer's internal cut pool from within the cutround callback set by `XPRSaddcbcutround`.

The cuts will be added to an internal pool of cuts managed by the Optimizer. The Optimizer will use internal priorities to dynamically load violated cuts from this pool into branch-and-bound node problems and remove inactive cuts. Cuts can be either local or global. Cuts flagged as local are assumed to be valid only for the the current node of the branch-and-bound search or any of its descendants. Global cuts are assumed to be valid for the whole problem and might be used on any node of the branch-and-bound search tree. The cuts should be formulated in the original space of variables and will automatically be presolved.

Parameters

  globalvalid | Nonzero if the cuts should be assumed to be valid for the whole problem. If zero, cuts will be assumed to be valid only for the current node and its descendants.
  ncuts | Number of cuts to add.
  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` and `cutcoef` arrays indicating the start of each cut. This array has one entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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.

## addManagedCuts() [2/2]

void xpress::XPRSProblem::addManagedCuts | ( | int | globalvalid,
|  | int | ncuts,
|  | 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 )
| inline

Adds cuts to the Optimizer's internal cut pool from within the cutround callback set by `XPRSaddcbcutround`.

The cuts will be added to an internal pool of cuts managed by the Optimizer. The Optimizer will use internal priorities to dynamically load violated cuts from this pool into branch-and-bound node problems and remove inactive cuts. Cuts can be either local or global. Cuts flagged as local are assumed to be valid only for the the current node of the branch-and-bound search or any of its descendants. Global cuts are assumed to be valid for the whole problem and might be used on any node of the branch-and-bound search tree. The cuts should be formulated in the original space of variables and will automatically be presolved.

Parameters

  globalvalid | Nonzero if the cuts should be assumed to be valid for the whole problem. If zero, cuts will be assumed to be valid only for the current node and its descendants.
  ncuts | Number of cuts to add.
  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` and `cutcoef` arrays indicating the start of each cut. This array has one entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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.

## addMessageCallback()

auto xpress::XPRSProblem::addMessageCallback | ( | std::function< void(XPRSProblem &, char const *, int, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `message` callback.

More details about `message` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`msg`
  A null terminated character array (string) containing the message, which may simply be a new line. The total number of bytes (including `NUL` terminator) will not exceed `XPRS_MAXMESSAGELENGTH`. If a message needs to be truncated to meet this limit, the last four bytes in `msg` are set to "...\0".
`msglen`
  The length of the message string, excluding the null terminator.
`msgtype`
  Indicates the type of output message:
  - `1`: information messages;
  - `2`: (not used);
  - `3`: warning messages;
  - `4`: error messages.
  A negative value indicates that the Optimizer is about to finish and the buffers should be flushed at this time if the output is being redirected to a file.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmessage()

## addMiplogCallback()

auto xpress::XPRSProblem::addMiplogCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `miplog` callback.

More details about `miplog` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `miplog`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmiplog()

## addMipSol() [1/3]

void xpress::XPRSProblem::addMipSol | ( | int | length,
|  | Array< double const > const & | solval,
|  | Array< int const > const & | colind,
|  | std::optional< std::string > const & | name )
| 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 column indices from `0` to `INPUTCOLS``-1`, for the solution values provided in `solval`. Duplicate entries are not allowed. May be `null` when `solval` provides a complete solution vector, in which case `solval` should have `INPUTCOLS` elements.
  name | An optional name to associate with the solution. Can be `null`.

## addMipSol() [2/3]

auto xpress::XPRSProblem::addMipSol | ( | xpress::SizedArray< double const > const & | val,
|  | xpress::SizedArray< int const > const & | ind ) -> void
| 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 &)`.

Examples using `addMipSol`:

- TravelingSalesPerson.cpp
- Wagon.cpp
- tsp.cpp

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]

auto xpress::XPRSProblem::addMipSol | ( | xpress::SizedArray< double const > const & | val,
|  | xpress::SizedArray< int const > const & | ind,
|  | std::optional< std::string > | name ) -> void
| 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 &)`.

Examples using `addMipSol`:

- TravelingSalesPerson.cpp
- Wagon.cpp
- tsp.cpp

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()

auto xpress::XPRSProblem::addMipThreadCallback | ( | std::function< void(XPRSProblem &, XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `mipthread` callback.

More details about `mipthread` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`threadprob`
  The new problem for the MIP thread

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmipthread()

## addMipThreadDestroyCallback()

auto xpress::XPRSProblem::addMipThreadDestroyCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `mipthreaddestroy` callback.

More details about `mipthreaddestroy` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmipthreaddestroy()

## addMsJobEndCallback()

auto xpress::XPRSProblem::addMsJobEndCallback | ( | std::function< int(XPRSProblem &, void *, char const *, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `msjobend` callback.

More details about `msjobend` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`jobdata`
  Job specific user-defined object, as specified by the multistart job creating API functions.
`jobdesc`
  The description of the problem as specified by the multistart job creating API functions.
`p_status`

  User return status variable:

  0 - use the default evaluation of the finished job

  1 - disregard the result and continue

  2 - stop the multistart search

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmsjobend()

## addMsJobStartCallback()

auto xpress::XPRSProblem::addMsJobStartCallback | ( | std::function< int(XPRSProblem &, void *, char const *, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `msjobstart` callback.

More details about `msjobstart` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`jobdata`
  Job specific user-defined object, as specified by the multistart job creating API functions.
`jobdesc`
  The description of the problem as specified by the multistart job creating API functions.
`p_status`

  User return status variable:

  0 - normal return, solve the job,

  1 - disregard this job and continue,

  2 - Stop multistart.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmsjobstart()

## addMsWinnerCallback()

auto xpress::XPRSProblem::addMsWinnerCallback | ( | std::function< int(XPRSProblem &, void *, char const *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `mswinner` callback.

More details about `mswinner` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`jobdata`
  Job specific user-defined object, as specified by the multistart job creating API functions.
`jobdesc`
  The description of the problem as specified by the multistart job creating API functions.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbmswinner()

## addNames() [1/2]

void xpress::XPRSProblem::addNames | ( | int | type,
|  | Array< std::string const > const & | names,
|  | int | first,
|  | int | last )
| 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]

auto xpress::XPRSProblem::addNames | ( | xpress::Namespaces | type,
|  | xpress::SizedArray< std::optional< std::string > const > const & | names,
|  | int | first,
|  | int | last ) -> void
| 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 least `1 + 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()

auto xpress::XPRSProblem::addNewnodeCallback | ( | std::function< void(XPRSProblem &, int, int, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `newnode` callback.

More details about `newnode` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `newnode`.
`parentnode`
  Unique identifier for the parent of the new node.
`node`
  Unique identifier assigned to the new node.
`branch`
  The sequence number of the new node amongst the child nodes of `parentnode`. For regular branches on a MIP entity this will be either `0` or `1`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbnewnode()

## addNlpCoefEvalErrorCallback()

auto xpress::XPRSProblem::addNlpCoefEvalErrorCallback | ( | std::function< int(XPRSProblem &, int, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `nlpcoefevalerror` callback.

More details about `nlpcoefevalerror` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`col`
  The column position of the coefficient.
`row`
  The row position of the coefficient.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbnlpcoefevalerror()

## addNodecutoffCallback()

auto xpress::XPRSProblem::addNodecutoffCallback | ( | std::function< void(XPRSProblem &, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `nodecutoff` callback.

More details about `nodecutoff` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `nodecutoff`.
`node`
  The node id of the node that is cut off. This id cannot be queried from the `CURRENTNODE` attribute as for other callbacks since this callback is not invoked in the context of the node being cutoff.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbnodecutoff()

## addNodeLPSolvedCallback()

auto xpress::XPRSProblem::addNodeLPSolvedCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `nodelpsolved` callback.

More details about `nodelpsolved` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `nodelpsolved`.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbnodelpsolved()

## addObj()

void xpress::XPRSProblem::addObj | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | objcoef,
|  | int | priority,
|  | double | weight )
| 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 | An integer defining the relative priority for the new objective (only relevant for multi-objective problems). Higher values mean higher priority. During optimization, objectives with the same priority are combined together in a weighted sum.
  weight | A double defining the weight for the new objective (only relevant for multi-objective problems). If the weight is negative, the sense of this objective is reversed.

## addOptnodeCallback()

auto xpress::XPRSProblem::addOptnodeCallback | ( | std::function< void(XPRSProblem &, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add an `optnode` callback.

More details about `optnode` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `optnode`.
`p_infeasible`
  The feasibility status. If set to a nonzero value by the user, the current node will be declared infeasible.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcboptnode()

## addPreIntsolCallback()

auto xpress::XPRSProblem::addPreIntsolCallback | ( | std::function< void(XPRSProblem &, int, int *, double *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `preintsol` callback.

More details about `preintsol` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `preintsol`.
`soltype`
  The type of MIP solution that has been found:
  - `0`: The continuous relaxation solution to the current node of the tree search, which has been found to be integer feasible.
  - `1`: A MIP solution found by a heuristic.
  - `2`: A MIP solution provided by the user.
`p_reject`
  Set this to 1 if the solution should be rejected. When `soltype` is zero, this will also drop the node problem.
`p_cutoff`

  The new cutoff value that the Optimizer will use if the solution is accepted.

  If `p_cutoff` is assigned a value, the new value will be used instead. The cutoff value will not be updated if the solution is rejected.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbpreintsol()

## addPrenodeCallback()

auto xpress::XPRSProblem::addPrenodeCallback | ( | std::function< void(XPRSProblem &, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `prenode` callback.

More details about `prenode` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `prenode`.
`p_infeasible`
  The feasibility status. If set to a nonzero value by the user, the current node will be declared infeasible by the Optimizer.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbprenode()

## addPresolveCallback()

auto xpress::XPRSProblem::addPresolveCallback | ( | std::function< void(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `presolve` callback.

More details about `presolve` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbpresolve()

## addPwlCons() [1/2]

void xpress::XPRSProblem::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 )
| 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 the `xval` and `yval` 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]

void xpress::XPRSProblem::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 )
| 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 the `xval` and `yval` 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]

void xpress::XPRSProblem::addQMatrix | ( | int | row,
|  | int | ncoefs,
|  | Array< int const > const & | rowqcol1,
|  | Array< int const > const & | rowqcol2,
|  | Array< double const > const & | rowqcoef )
| 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]

void xpress::XPRSProblem::addQMatrix | ( | int | row,
|  | XPRSint64 | ncoefs,
|  | Array< int const > const & | rowqcol1,
|  | Array< int const > const & | rowqcol2,
|  | Array< double const > const & | rowqcoef )
| 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]

auto xpress::XPRSProblem::addRow | ( | RowInfo | row | ) | -> int
| 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]

auto xpress::XPRSProblem::addRow | ( | RowInfo | row,
|  | std::optional< std::string > | name ) -> int
| 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]

auto xpress::XPRSProblem::addRow | ( | xpress::SizedArray< int const > const & | colind,
|  | xpress::SizedArray< double const > const & | colval,
|  | char | rowtype,
|  | double | rhs ) -> int
| 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 not `nullptr` then it must have the same length as `colval` and `colval[k]` must be the non-zero coefficient in the row for column `colind[k]`.
  colval | Array of column values for the non-zeros for the row. This can be `nullptr`. If not `nullptr` then it must have the same length as `colind` and `colval[k]` must be the non-zero coefficient in the row for column `colind[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]

auto xpress::XPRSProblem::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
| 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 not `nullptr` then it must have the same length as `colval` and `colval[k]` must be the non-zero coefficient in the row for column `colind[k]`.
  colval | Array of column values for the non-zeros for the row. This can be `nullptr`. If not `nullptr` then it must have the same length as `colind` and `colval[k]` must be the non-zero coefficient in the row for column `colind[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]

auto xpress::XPRSProblem::addRow | ( | xpress::SizedArray< int const > const & | colind,
|  | xpress::SizedArray< double const > const & | colval,
|  | char | rowtype,
|  | double | rhs,
|  | std::optional< std::string > | name ) -> int
| 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 not `nullptr` then it must have the same length as `colval` and `colval[k]` must be the non-zero coefficient in the row for column `colind[k]`.
  colval | Array of column values for the non-zeros for the row. This can be `nullptr`. If not `nullptr` then it must have the same length as `colind` and `colval[k]` must be the non-zero coefficient in the row for column `colind[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]

void xpress::XPRSProblem::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 )
| 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 be `null` if there are no ranged constraints. The values in the `rng` array will only be read for `R` 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 the `colind` and `rowcoef` arrays of the start of the elements for each row. May be `null` if none of the rows contain nonzero coefficients.
  colind | Integer array of length `ncoefs` containing the (contiguous) column indices for the elements in each row. May be `null` if none of the rows contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the (contiguous) element values. May be `null` if none of the rows contain nonzero coefficients.

## addRows() [2/4]

void xpress::XPRSProblem::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 )
| 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 the `colind` and `rowcoef` arrays of the start of the elements for each row. May be `null` if none of the rows contain nonzero coefficients.
  colind | Integer array of length `ncoefs` containing the (contiguous) column indices for the elements in each row. May be `null` if none of the rows contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the (contiguous) element values. May be `null` if none of the rows contain nonzero coefficients.

## addRows() [3/4]

void xpress::XPRSProblem::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 )
| 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 be `null` if there are no ranged constraints. The values in the `rng` array will only be read for `R` 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 the `colind` and `rowcoef` arrays of the start of the elements for each row. May be `null` if none of the rows contain nonzero coefficients.
  colind | Integer array of length `ncoefs` containing the (contiguous) column indices for the elements in each row. May be `null` if none of the rows contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the (contiguous) element values. May be `null` if none of the rows contain nonzero coefficients.

## addRows() [4/4]

void xpress::XPRSProblem::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 )
| 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 the `colind` and `rowcoef` arrays of the start of the elements for each row. May be `null` if none of the rows contain nonzero coefficients.
  colind | Integer array of length `ncoefs` containing the (contiguous) column indices for the elements in each row. May be `null` if none of the rows contain nonzero coefficients.
  rowcoef | Double array of length `ncoefs` containing the (contiguous) element values. May be `null` if none of the rows contain nonzero coefficients.

## addSet()

auto xpress::XPRSProblem::addSet | ( | xpress::SetType | type,
|  | xpress::SizedArray< int const > const & | elements,
|  | xpress::SizedArray< double const > const & | weights,
|  | std::optional< std::string > | name ) -> int
| 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()

void xpress::XPRSProblem::addSetNames | ( | Array< std::string const > const & | names,
|  | int | first,
|  | int | last )
| 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.

Deprecated
  Deprecated since 45.00

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]

auto xpress::XPRSProblem::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 >
| inline

Create multiple set constraints.

Parameters

  count | Number of sets to add.
  start | Array of length at least `count` that indicates where in `setind` and `setref` 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]

void xpress::XPRSProblem::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 )
| 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 the `colind` and `refval` 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. Within a set, no two elements can have the same reference values and reference values must differ by at least `SOSREFTOL` (relative difference).

## addSets() [3/4]

void xpress::XPRSProblem::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 )
| 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 the `colind` and `refval` 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. Within a set, no two elements can have the same reference values and reference values must differ by at least `SOSREFTOL` (relative difference).

## addSets() [4/4]

auto xpress::XPRSProblem::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 >
| 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()

auto xpress::XPRSProblem::addSlpCascadeEndCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpcascadeend` callback.

More details about `slpcascadeend` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpcascadeend()

## addSlpCascadeStartCallback()

auto xpress::XPRSProblem::addSlpCascadeStartCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpcascadestart` callback.

More details about `slpcascadestart` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpcascadestart()

## addSlpCascadeVarCallback()

auto xpress::XPRSProblem::addSlpCascadeVarCallback | ( | std::function< int(XPRSProblem &, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpcascadevar` callback.

More details about `slpcascadevar` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`col`
  The number of the column which has been cascaded.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpcascadevar()

## addSlpCascadeVarFailCallback()

auto xpress::XPRSProblem::addSlpCascadeVarFailCallback | ( | std::function< int(XPRSProblem &, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpcascadevarfail` callback.

More details about `slpcascadevarfail` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`col`
  The number of the column which has been cascaded.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpcascadevarfail()

## addSlpConstructCallback()

auto xpress::XPRSProblem::addSlpConstructCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpconstruct` callback.

More details about `slpconstruct` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpconstruct()

## addSlpDrColCallback()

auto xpress::XPRSProblem::addSlpDrColCallback | ( | std::function< int(XPRSProblem &, int, int, double, double *, double, double)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpdrcol` callback.

More details about `slpdrcol` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`col`
  The index of the column for which the determining columns is checked.
`detcol`
  The index of the determining column for the column that is being updated.
`detval`
  The value of the determining column in the current SLP iteration.
`p_value`
  Used to return the new value for column `col`, should it need to be updated, in which case the callback must return a positive result to indicate that this value should be used.
`lb`
  The original lower bound of column `col`. The callback provides this value as a reference, should the bound be updated or changed during the solution process.
`ub`
  The original upper bound of column `col`. The callback provides this value as a reference, should the bound be updated or changed during the solution process.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpdrcol()

## addSlpIntSolCallback()

auto xpress::XPRSProblem::addSlpIntSolCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpintsol` callback.

More details about `slpintsol` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpintsol()

## addSlpIterEndCallback()

auto xpress::XPRSProblem::addSlpIterEndCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpiterend` callback.

More details about `slpiterend` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpiterend()

## addSlpIterStartCallback()

auto xpress::XPRSProblem::addSlpIterStartCallback | ( | std::function< int(XPRSProblem &)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpiterstart` callback.

More details about `slpiterstart` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpiterstart()

## addSlpIterVarCallback()

auto xpress::XPRSProblem::addSlpIterVarCallback | ( | std::function< int(XPRSProblem &, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slpitervar` callback.

More details about `slpitervar` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`col`
  The number of the column which has been tested for convergence.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslpitervar()

## addSlpPreUpdateLinearizationCallback()

auto xpress::XPRSProblem::addSlpPreUpdateLinearizationCallback | ( | std::function< int(XPRSProblem &, int *)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add a `slppreupdatelinearization` callback.

More details about `slppreupdatelinearization` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function.
`ifrepeat`

  Indicates the call number, starting at 1.

  If returned nonzero, another call to the callback will be scheduled. If returned zero, a final call with `ifrepeat` set to `-1` will be made.

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbslppreupdatelinearization()

## addUserSolNotifyCallback()

auto xpress::XPRSProblem::addUserSolNotifyCallback | ( | std::function< void(XPRSProblem &, char const *, int)> | callback,
|  | int | prio = 0 ) -> CallbackHandle
| inline

Add an `usersolnotify` callback.

More details about `usersolnotify` callbacks can be found in the documentation of the corresponding C callback. The callback function takes the following arguments:

`cbprob`
  The problem passed to the callback function, `usersolnotify`.
`solname`
  The string name assigned to the solution when it was loaded into the Optimizer using `XPRSaddmipsol`.
`status`
  One of the following status values:
  - `1`: Solution is feasible. (`XPRS_USERSOLSTATUS_ACCEPTED_FEASIBLE`)
  - `2`: Solution is feasible after reoptimizing with fixed MIP entities. (`XPRS_USERSOLSTATUS_ACCEPTED_OPTIMIZED`)
  - `3`: A local search heuristic was applied and a feasible solution discovered. (`XPRS_USERSOLSTATUS_SEARCHED_SOL`)
  - `4`: A local search heuristic was applied but a feasible solution was not found. (`XPRS_USERSOLSTATUS_SEARCHED_NOSOL`)
  - `5`: Solution is infeasible and a local search could not be applied. (`XPRS_USERSOLSTATUS_REJECTED_INFEAS_NOSEARCH`)
  - `6`: Solution is partial and a local search could not be applied. (`XPRS_USERSOLSTATUS_REJECTED_PARTIAL_NOSEARCH`)
  - `7`: Failed to reoptimize the problem with MIP entities fixed to the provided solution. Likely because a time or iteration limit was reached. (`XPRS_USERSOLSTATUS_REJECTED_FAILED_OPTIMIZE`)
  - `8`: Solution is dropped. This can happen if the MIP problem is changed or solved to completion before the solution could be processed. (`XPRS_USERSOLSTATUS_DROPPED`)
  - `9`: The solution is worse than the current MIP cutoff value. (`XPRS_USERSOLSTATUS_REJECTED_CUTOFF`)

Parameters

  callback | Callback function.
  prio | Callback priority.

Returns
  A handle that can be used to remove the callback later.

See also
  C documentation of XPRSaddcbusersolnotify()

## alter()

void xpress::XPRSProblem::alter | ( | std::optional< std::string > const & | filename | ) |
| inline

Alters or changes matrix elements, right hand sides and constraint senses in the current problem.

Deprecated
  Deprecated since 45.00, use functions to directly manipulate matrix data

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()

auto xpress::XPRSProblem::basisStability | ( | int | type,
|  | int | norm,
|  | int | scaled ) -> double
| 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()

void xpress::XPRSProblem::bndSA | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double > const & | lblower,
|  | Array< double > const & | lbupper,
|  | Array< double > const & | ublower,
|  | Array< double > const & | ubupper )
| 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()

void xpress::XPRSProblem::bTran | ( | Array< double > const & | vec | ) |
| 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()

auto xpress::XPRSProblem::calcObjective | ( | Array< double const > const & | solution | ) | -> double
| inline

Calculates the objective value of a given solution.

Parameters

  solution | Double array of length COLS that holds the solution.

## calcObjN()

auto xpress::XPRSProblem::calcObjN | ( | int | objidx,
|  | Array< double const > const & | solution ) -> double
| 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. May be `null` to use the current solution.

## calcReducedCosts()

auto xpress::XPRSProblem::calcReducedCosts | ( | Array< double const > const & | duals,
|  | Array< double const > const & | solution ) -> std::vector< double >
| inline

Calculates the reduced cost values for a given (row) dual solution.

Parameters

  duals | Double array of length `ORIGINALROWS` that holds the dual solution to calculate the reduced costs for.
  solution | Double array of length `ORIGINALCOLS` that holds the primal solution. This is necessary for quadratic problems, otherwise may be `null`.

## calcSlacks()

auto xpress::XPRSProblem::calcSlacks | ( | Array< double const > const & | solution | ) | -> std::vector< double >
| inline

Calculates the row slack values for a given solution.

Parameters

  solution | Double array of length `ORIGINALCOLS` that holds the solution to calculate the slacks for.

## calcSolInfo()

auto xpress::XPRSProblem::calcSolInfo | ( | Array< double const > const & | solution,
|  | Array< double const > const & | duals,
|  | int | property ) -> double
| inline

Calculates the required property of a solution, like maximum infeasibility of a given primal and dual solution.

Parameters

  solution | Double array of length `ORIGINALCOLS` that holds the solution. May be `null` when asking for dual infeasibility.
  duals | Double array of length `ORIGINALROWS` 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]

auto xpress::XPRSProblem::chgBounds | ( | int | j,
|  | double | lb,
|  | double | ub ) -> void
| 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]

void xpress::XPRSProblem::chgBounds | ( | int | nbounds,
|  | Array< int const > const & | colind,
|  | Array< char const > const & | bndtype,
|  | Array< double const > const & | bndval )
| 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()

void xpress::XPRSProblem::chgCoef | ( | int | row,
|  | int | col,
|  | double | coef )
| 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()

void xpress::XPRSProblem::chgColType | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< char const > const & | coltype )
| 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 to `1.0`. `R`: indicates a semi—integer column. The semi—integer lower bound will be set to `1.0`. `P`: indicates a partial integer column. The partial integer limit will be set to `1.0`.

## chgGlbLimit()

void xpress::XPRSProblem::chgGlbLimit | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | limit )
| 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()

auto xpress::XPRSProblem::chgLB | ( | int | j,
|  | double | lb ) -> void
| 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]

void xpress::XPRSProblem::chgMCoef | ( | int | ncoefs,
|  | Array< int const > const & | rowind,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | rowcoef )
| 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 of `rowcoef` is zero, the coefficient will be deleted.

## chgMCoef() [2/2]

void xpress::XPRSProblem::chgMCoef | ( | XPRSint64 | ncoefs,
|  | Array< int const > const & | rowind,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | rowcoef )
| 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 of `rowcoef` is zero, the coefficient will be deleted.

## chgMQObj() [1/2]

void xpress::XPRSProblem::chgMQObj | ( | int | ncoefs,
|  | Array< int const > const & | objqcol1,
|  | Array< int const > const & | objqcol2,
|  | Array< double const > const & | objqcoef )
| 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 `ncoefs` containing the column index of the first variable in each quadratic term.
  objqcol2 | Integer array of size `ncoefs` containing the column index of the second variable in each quadratic term.
  objqcoef | New values for the coefficients. If an entry in `objqcoef` is `0`, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.

## chgMQObj() [2/2]

void xpress::XPRSProblem::chgMQObj | ( | XPRSint64 | ncoefs,
|  | Array< int const > const & | objqcol1,
|  | Array< int const > const & | objqcol2,
|  | Array< double const > const & | objqcoef )
| 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 `ncoefs` containing the column index of the first variable in each quadratic term.
  objqcol2 | Integer array of size `ncoefs` containing the column index of the second variable in each quadratic term.
  objqcoef | New values for the coefficients. If an entry in `objqcoef` is `0`, the corresponding entry will be deleted. These are the coefficients of the quadratic Hessian matrix.

## chgObj()

void xpress::XPRSProblem::chgObj | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | objcoef )
| 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()

void xpress::XPRSProblem::chgObjN | ( | int | objidx,
|  | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | objcoef )
| 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()

void xpress::XPRSProblem::chgObjSense | ( | ObjSense | objsense | ) |
| inline

Changes the problem's objective function sense to minimize or maximize.

Parameters

  objsense | `XPRS_OBJ_MINIMIZE` to change into a minimization, or `XPRS_OBJ_MAXIMIZE` to change into a maximization problem.

## chgQObj()

void xpress::XPRSProblem::chgQObj | ( | int | objqcol1,
|  | int | objqcol2,
|  | double | objqcoef )
| 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` is `0`, the corresponding entry will be deleted.

## chgQRowCoeff()

void xpress::XPRSProblem::chgQRowCoeff | ( | int | row,
|  | int | rowqcol1,
|  | int | rowqcol2,
|  | double | rowqcoef )
| 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()

void xpress::XPRSProblem::chgRhs | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | Array< double const > const & | rhs )
| 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()

void xpress::XPRSProblem::chgRhsRange | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | Array< double const > const & | rng )
| 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()

void xpress::XPRSProblem::chgRowType | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | Array< char const > const & | rowtype )
| 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()

auto xpress::XPRSProblem::chgUB | ( | int | j,
|  | double | ub ) -> void
| 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()

auto xpress::XPRSProblem::clearObjective | ( |  | ) | -> void
| inline

Clear the objective function.

Since
  44.00

## clearRowFlags()

void xpress::XPRSProblem::clearRowFlags | ( | Array< int const > const & | flags,
|  | int | first,
|  | int | last )
| inline

Clears extra information attached to a range of rows.

Parameters

  flags | Integer 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()

static void xpress::XPRSProblem::console | ( | XPRSProblem & | prob,
|  | char const * | msg,
|  | int | msglen,
|  | int | msgtype )
| inline static

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` (if `msglen` is zero). If not `nullptr` then it is terminated by a `NUL` character.
  msglen | The length of `msg`.
  msgtype | Type of message. See the reference documentation for `XPRSaddcbmessage` for details about this.

Since
  44.00

## copyControls()

void xpress::XPRSProblem::copyControls | ( | XPRSProblem const & | src | ) |
| inline

Copies controls defined for one problem to another.

Parameters

  src | The problem from which the controls are copied.

## copyProb()

void xpress::XPRSProblem::copyProb | ( | XPRSProblem const & | src,
|  | std::optional< std::string > const & | name )
| 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()

auto xpress::XPRSProblem::crossoverLpSol | ( |  | ) | -> int
| 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()

virtual void xpress::XPRSProblem::delCols | ( | int | ncols,
|  | Array< int const > const & | colind )
| inline virtual

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]

void xpress::XPRSProblem::delCPCuts | ( |  | ) |
| 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]

void xpress::XPRSProblem::delCPCuts | ( | int | cuttype,
|  | int | interp )
| 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-vectors (compare Section ) - delete if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - delete if all bits match those set in `cuttype`.

## delCPCuts() [3/4]

void xpress::XPRSProblem::delCPCuts | ( | int | cuttype,
|  | int | interp,
|  | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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-vectors (compare Section ) - delete if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - delete if all bits match those set in `cuttype`.
  ncuts | The number of cuts to delete. A value of `-1` indicates delete all cuts.
  cutind | Array of length `ncuts` containing the cuts which are to be deleted. This array may be `null` to delete all cuts, when `ncuts` should be `-1`.

## delCPCuts() [4/4]

void xpress::XPRSProblem::delCPCuts | ( | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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 of length `ncuts` containing the cuts which are to be deleted. This array may be `null` to delete all cuts, when `ncuts` should be `-1`.

## delCuts() [1/5]

void xpress::XPRSProblem::delCuts | ( | int | basis | ) |
| 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 to `0`, cuts with non-basic slacks may be deleted.

## delCuts() [2/5]

void xpress::XPRSProblem::delCuts | ( | int | basis,
|  | int | cuttype,
|  | int | interp )
| 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 to `0`, 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-vectors (compare Section ) - delete if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - delete if all bits match those set in `cuttype`.

## delCuts() [3/5]

void xpress::XPRSProblem::delCuts | ( | int | basis,
|  | int | cuttype,
|  | int | interp,
|  | double | delta )
| 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 to `0`, 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-vectors (compare Section ) - delete if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - delete if all bits match those set in `cuttype`.
  delta | Only delete cuts with an absolute slack value greater than `delta`. To delete all the cuts, this argument should be set to `XPRS_MINUSINFINITY`.

## delCuts() [4/5]

void xpress::XPRSProblem::delCuts | ( | int | basis,
|  | int | cuttype,
|  | int | interp,
|  | double | delta,
|  | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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 to `0`, 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-vectors (compare Section ) - delete if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - delete if all bits match those set in `cuttype`.
  delta | Only delete cuts with an absolute slack value greater than `delta`. To delete all the cuts, this argument should be set to `XPRS_MINUSINFINITY`.
  ncuts | Number of cuts to drop if a list of cuts is provided. A value of `-1` indicates all cuts.
  cutind | Array of length `ncuts` containing the cuts which are to be deleted. This array may be `null` to delete all cuts, when `ncuts` should be `-1`.

## delCuts() [5/5]

void xpress::XPRSProblem::delCuts | ( | int | basis,
|  | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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 to `0`, 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 of length `ncuts` containing the cuts which are to be deleted. This array may be `null` to delete all cuts, when `ncuts` should be `-1`.

## delGenCons()

virtual void xpress::XPRSProblem::delGenCons | ( | int | ncons,
|  | Array< int const > const & | conind )
| inline virtual

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()

auto xpress::XPRSProblem::delIndicator | ( | int | row | ) | -> void
| 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()

void xpress::XPRSProblem::delIndicators | ( | int | first,
|  | int | last )
| 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()

void xpress::XPRSProblem::delObj | ( | int | objidx | ) |
| inline

Removes an objective function from the problem.

Any objectives with `index > objidx` will be shifted down.

Parameters

  objidx | Index of the objective to remove.

## delPwlCons()

virtual void xpress::XPRSProblem::delPwlCons | ( | int | npwls,
|  | Array< int const > const & | pwlind )
| inline virtual

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()

void xpress::XPRSProblem::delQMatrix | ( | int | row | ) |
| 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()

virtual void xpress::XPRSProblem::delRows | ( | int | nrows,
|  | Array< int const > const & | rowind )
| inline virtual

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()

virtual void xpress::XPRSProblem::delSets | ( | int | nsets,
|  | Array< int const > const & | setind )
| inline virtual

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()

void xpress::XPRSProblem::estimateRowDualRanges | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | int | iterlim,
|  | Array< double > const & | mindual,
|  | Array< double > const & | maxdual )
| 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()

auto xpress::XPRSProblem::firstIIS | ( | int | mode | ) | -> int
| 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()

void xpress::XPRSProblem::fixMipEntities | ( | int | options | ) |
| 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 as well as partial integers should be kept in the problem with only the non-convex decisions (i.e. which part of a non-convex piecewise linear function, which variable attains a maximum or the integer part of the partial integer) fixed. Otherwise all variables appearing in piecewise linear or general constraints and all partial integers will be fixed.

## fTran()

void xpress::XPRSProblem::fTran | ( | Array< double > const & | vec | ) |
| 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()

void xpress::XPRSProblem::getAttribInfo | ( | std::optional< std::string > const & | name,
|  | int * | p_id,
|  | ParameterType * | p_type )
| 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 in the C API. The type information returned will be one of the below integer constants.

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 the `xprs.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.

## getBarNumStability()

void xpress::XPRSProblem::getBarNumStability | ( | Array< int > const & | colstab,
|  | Array< int > const & | rowstab )
| inline

Deprecated
  Deprecated since 45.00

## getBasis()

void xpress::XPRSProblem::getBasis | ( | Array< int > const & | rowstat,
|  | Array< int > const & | colstat )
| inline

Returns the current basis into the user's data arrays.

Parameters

  rowstat | Integer array of length `ORIGINALROWS` to hold the basis status of the slack, surplus or artificial variable associated with each row. The status will be one of: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: slack, surplus or artificial is non-basic at lower bound; `XPRS_BASISSTATUS_BASIC (1)`: slack, surplus or artificial is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: slack or surplus is non-basic at upper bound. `XPRS_BASISSTATUS_SUPERBASIC (3)`: slack or surplus is super-basic. May be `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: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound; `XPRS_BASISSTATUS_BASIC (1)`: variable is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: variable is non-basic at upper bound; `XPRS_BASISSTATUS_SUPERBASIC (3)`: variable is super-basic. May be `null` if not required.

## getBasisVal()

void xpress::XPRSProblem::getBasisVal | ( | int | row,
|  | int | col,
|  | int * | p_rowstat,
|  | int * | p_colstat )
| 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()

auto xpress::XPRSProblem::getCallbackDual | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackDuals | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackDuals | ( | bool * | p_available,
|  | Array< double > const & | duals,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First row whose dual value to return.
  last | Last row whose dual value to return.

## getCallbackDuals() [3/3]

auto xpress::XPRSProblem::getCallbackDuals | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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()

auto xpress::XPRSProblem::getCallbackPresolveDual | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackPresolveDuals | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackPresolveDuals | ( | bool * | p_available,
|  | Array< double > const & | duals,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First row whose dual value to return.
  last | Last row whose dual value to return.

## getCallbackPresolveDuals() [3/3]

auto xpress::XPRSProblem::getCallbackPresolveDuals | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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()

auto xpress::XPRSProblem::getCallbackPresolveRedCost | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackPresolveRedCosts | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackPresolveRedCosts | ( | bool * | p_available,
|  | Array< double > const & | djs,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First column whose reduced cost to return.
  last | Last column whose reduced cost to return.

## getCallbackPresolveRedCosts() [3/3]

auto xpress::XPRSProblem::getCallbackPresolveRedCosts | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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()

auto xpress::XPRSProblem::getCallbackPresolveSlack | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackPresolveSlacks | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackPresolveSlacks | ( | bool * | p_available,
|  | Array< double > const & | slacks,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First row whose slack value to return.
  last | Last row whose slack value to return.

## getCallbackPresolveSlacks() [3/3]

auto xpress::XPRSProblem::getCallbackPresolveSlacks | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getCallbackPresolveSolution | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackPresolveSolution | ( | bool * | p_available,
|  | Array< double > const & | x,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First column in the solution to return.
  last | Last column in the solution to return.

## getCallbackPresolveSolution() [3/4]

auto xpress::XPRSProblem::getCallbackPresolveSolution | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getCallbackPresolveSolution | ( | int | index | ) | const -> double
| 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()

auto xpress::XPRSProblem::getCallbackRedCost | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackRedCosts | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackRedCosts | ( | bool * | p_available,
|  | Array< double > const & | djs,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First column whose reduced cost to return.
  last | Last column whose reduced cost to return.

## getCallbackRedCosts() [3/3]

auto xpress::XPRSProblem::getCallbackRedCosts | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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()

auto xpress::XPRSProblem::getCallbackSlack | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getCallbackSlacks | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackSlacks | ( | bool * | p_available,
|  | Array< double > const & | slacks,
|  | int | first,
|  | int | last ) const
| 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 be `null` if not required.
  first | First row whose slack value to return.
  last | Last row whose slack value to return.

## getCallbackSlacks() [3/3]

auto xpress::XPRSProblem::getCallbackSlacks | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getCallbackSolution | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getCallbackSolution | ( | bool * | p_available,
|  | Array< double > const & | x,
|  | int | first,
|  | int | last ) const
| inline

Returns the primal 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.
  x | Double array of length `last-first+1` where the values of the primal variables will be returned. May be `null` if not required.
  first | First column in the solution to return.
  last | Last column in the solution to return.

## getCallbackSolution() [3/4]

auto xpress::XPRSProblem::getCallbackSolution | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getCallbackSolution | ( | int | index | ) | const -> double
| 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()

auto xpress::XPRSProblem::getCoef | ( | int | row,
|  | int | col ) -> double
| 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]

void xpress::XPRSProblem::getCols | ( | Array< int > const & | start,
|  | Array< int > const & | rowind,
|  | Array< double > const & | rowcoef,
|  | int | maxcoefs,
|  | int * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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` and `rowcoef` arrays for each requested column. It must be of length `last-first+2`. Column `i` starts at position `start[i]` in the `rowind` and `rowcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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 be `null` if not required.
  rowcoef | Double array of length `maxcoefs` which will be filled with the nonzero coefficient values. May be `null` if not required.
  maxcoefs | The size of the `rowind` and `rowcoef` 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` exceeds `maxcoefs`, only the `maxcoefs` first nonzero coefficients will be returned. May be `null` if not required.
  first | First column in the range.
  last | Last column in the range.

## getCols() [2/5]

auto xpress::XPRSProblem::getCols | ( | Array< int > const & | start,
|  | Array< int > const & | rowind,
|  | Array< double > const & | rowcoef,
|  | int | maxcoefs,
|  | int | first,
|  | int | last ) -> int
| 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` and `rowcoef` arrays for each requested column. It must be of length `last-first+2`. Column `i` starts at position `start[i]` in the `rowind` and `rowcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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 be `null` if not required.
  rowcoef | Double array of length `maxcoefs` which will be filled with the nonzero coefficient values. May be `null` if not required.
  maxcoefs | The size of the `rowind` and `rowcoef` 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]

auto xpress::XPRSProblem::getCols | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | rowind,
|  | Array< double > const & | rowcoef,
|  | XPRSint64 | maxcoefs,
|  | int | first,
|  | int | last ) -> XPRSint64
| 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` and `rowcoef` arrays for each requested column. It must be of length `last-first+2`. Column `i` starts at position `start[i]` in the `rowind` and `rowcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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 be `null` if not required.
  rowcoef | Double array of length `maxcoefs` which will be filled with the nonzero coefficient values. May be `null` if not required.
  maxcoefs | The size of the `rowind` and `rowcoef` 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]

void xpress::XPRSProblem::getCols | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | rowind,
|  | Array< double > const & | rowcoef,
|  | XPRSint64 | maxcoefs,
|  | XPRSint64 * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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` and `rowcoef` arrays for each requested column. It must be of length `last-first+2`. Column `i` starts at position `start[i]` in the `rowind` and `rowcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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 be `null` if not required.
  rowcoef | Double array of length `maxcoefs` which will be filled with the nonzero coefficient values. May be `null` if not required.
  maxcoefs | The size of the `rowind` and `rowcoef` 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` exceeds `maxcoefs`, only the `maxcoefs` first nonzero coefficients will be returned. May be `null` if not required.
  first | First column in the range.
  last | Last column in the range.

## getCols() [5/5]

auto xpress::XPRSProblem::getCols | ( | int | first,
|  | int | last ) -> xpress::XPRSProblem::MatrixInfo
| inline

Get range of columns.

Examples using `getCols`:

- CuttingStock.cpp
- FolioHeuristic.cpp
- tsp.cpp

Parameters

  first | First column index (inclusive).
  last | Last column index (inclusive).

Returns
  Data for the queried columns

Since
  44.00

## getColType()

auto xpress::XPRSProblem::getColType | ( | int | first,
|  | int | last ) -> std::vector< char >
| 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()

auto xpress::XPRSProblem::getColumnName | ( | int | index | ) | -> std::string
| inline

Get a column name.

Parameters

  index | objects.Index of the column.

Returns
  The requested column's name.

Since
  44.00

## getColumnNames()

auto xpress::XPRSProblem::getColumnNames | ( | int | first,
|  | int | last ) -> std::vector< std::string >
| 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()

void xpress::XPRSProblem::getControlInfo | ( | std::optional< std::string > const & | name,
|  | int * | p_id,
|  | ParameterType * | p_type )
| 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 in the C API. The type information returned will be one of the below integer constants.

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 the `xprs.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]

void xpress::XPRSProblem::getCPCutList | ( | int | cuttype,
|  | int | interp,
|  | double | delta,
|  | int * | p_ncuts,
|  | int | maxcuts,
|  | Array< XPRScut > const & | cutind,
|  | Array< double > const & | viol )
| 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-vectors (compare Section ) - get cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - get cut if all bits match those set in `cuttype`.
  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 cut objects will be returned. May be `null` if not required.
  viol | Double array of length `maxcuts` where the values of the signed violations of the cuts will be returned. May be `null` if not required.

## getCPCutList() [2/3]

auto xpress::XPRSProblem::getCPCutList | ( | int | cuttype,
|  | int | interp,
|  | double | delta,
|  | int | maxcuts,
|  | Array< XPRScut > const & | cutind,
|  | Array< double > const & | viol ) -> int
| 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-vectors (compare Section ) - get cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - get cut if all bits match those set in `cuttype`.
  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 cut objects will be returned. May be `null` if not required.
  viol | Double array of length `maxcuts` where the values of the signed violations of the cuts will be returned. May be `null` if not required.

## getCPCutList() [3/3]

auto xpress::XPRSProblem::getCPCutList | ( | int | maxcuts,
|  | Array< XPRScut > const & | cutind,
|  | Array< double > const & | viol ) -> int
| 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 cut objects will be returned. May be `null` if not required.
  viol | Double array of length `maxcuts` where the values of the signed violations of the cuts will be returned. May be `null` if not required.

## getCPCuts() [1/2]

void xpress::XPRSProblem::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 )
| inline

Returns cuts from the cut pool.

Parameters

  rowind | Array of length `ncuts` containing the cut objects.
  ncuts | Number of cuts to be returned.
  maxcoefs | Maximum number of column indices of the cuts to be returned.
  cuttype | Integer array of length `ncuts` where the cut types will be returned. May be `null` if not required.
  rowtype | Character array of length `ncuts` where the sense of the cuts (`L`, `G`, or `E`) will be returned. May be `null` if not required.
  start | Integer array of length `ncuts+1` containing the offsets into the `colind` and `cutcoef` arrays. The last element indicates where an additional cut would start, if it were present. 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 `ncuts` where the right hand side elements for the cuts will be returned. May be `null` if not required.

## getCPCuts() [2/2]

void xpress::XPRSProblem::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 )
| inline

Returns cuts from the cut pool.

Parameters

  rowind | Array of length `ncuts` containing the cut objects.
  ncuts | Number of cuts to be returned.
  maxcoefs | Maximum number of column indices of the cuts to be returned.
  cuttype | Integer array of length `ncuts` where the cut types will be returned. May be `null` if not required.
  rowtype | Character array of length `ncuts` where the sense of the cuts (`L`, `G`, or `E`) will be returned. May be `null` if not required.
  start | Integer array of length `ncuts+1` containing the offsets into the `colind` and `cutcoef` arrays. The last element indicates where an additional cut would start, if it were present. 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 `ncuts` where the right hand side elements for the cuts will be returned. May be `null` if not required.

## getCutList() [1/3]

void xpress::XPRSProblem::getCutList | ( | int | cuttype,
|  | int | interp,
|  | int * | p_ncuts,
|  | int | maxcuts,
|  | Array< XPRScut > const & | cutind )
| inline

Retrieves a list of cut objects 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-vectors (compare Section ) - get cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - get cut if all bits match those set in `cuttype`.
  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 cut objects will be returned. May be `null` if not required.

## getCutList() [2/3]

auto xpress::XPRSProblem::getCutList | ( | int | cuttype,
|  | int | interp,
|  | int | maxcuts,
|  | Array< XPRScut > const & | cutind ) -> int
| inline

Retrieves a list of cut objects 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-vectors (compare Section ) - get cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - get cut if all bits match those set in `cuttype`.
  maxcuts | Maximum number of cuts to be retrieved.
  cutind | Array of length `maxcuts` where the cut objects will be returned. May be `null` if not required.

## getCutList() [3/3]

auto xpress::XPRSProblem::getCutList | ( | int | maxcuts,
|  | Array< XPRScut > const & | cutind ) -> int
| inline

Retrieves a list of cut objects for the cuts active at the current node.

Parameters

  maxcuts | Maximum number of cuts to be retrieved.
  cutind | Array of length `maxcuts` where the cut objects will be returned. May be `null` if not required.

## getCutMap()

auto xpress::XPRSProblem::getCutMap | ( | int | ncuts,
|  | Array< XPRScut const > const & | cutind ) -> std::vector< int >
| 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 | Array of length `ncuts` containing the cut objects for which the row index is requested.

## getCutSlack()

auto xpress::XPRSProblem::getCutSlack | ( | XPRScut | cutind | ) | -> double
| 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 | Cut object for which the slack is to be calculated.

## getDblAttrib()

auto xpress::XPRSProblem::getDblAttrib | ( | int | attrib | ) | const -> double
| 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()

auto xpress::XPRSProblem::getDblControl | ( | int | control | ) | const -> double
| 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]

auto xpress::XPRSProblem::getDirs | ( |  | ) | -> int
| 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]

auto xpress::XPRSProblem::getDirs | ( | Array< int > const & | indices,
|  | Array< int > const & | prios,
|  | Array< char > const & | branchdirs,
|  | Array< double > const & | uppseudo,
|  | Array< double > const & | downpseudo ) -> int
| 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. May be `null` if not required.
  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]

void xpress::XPRSProblem::getDirs | ( | int * | p_ndir,
|  | Array< int > const & | indices,
|  | Array< int > const & | prios,
|  | Array< char > const & | branchdirs,
|  | Array< double > const & | uppseudo,
|  | Array< double > const & | downpseudo )
| 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. May be `null` if not required.
  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()

auto xpress::XPRSProblem::getDiscreteCols | ( |  | ) | -> xpress::XPRSProblem::MIPEntityInfo
| inline

Get information about MIP entities.

Returns
  The requested information.

Since
  44.00

## getDual()

auto xpress::XPRSProblem::getDual | ( | int | index | ) | const -> double
| 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()

void xpress::XPRSProblem::getDualRay | ( | Array< double > const & | ray,
|  | int * | p_hasray )
| 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]

auto xpress::XPRSProblem::getDuals | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getDuals | ( | int * | status,
|  | Array< double > const & | duals,
|  | int | first,
|  | int | last ) const
| inline

Returns the dual values.

from 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 array of length `last-first+1` where the values 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]

auto xpress::XPRSProblem::getDuals | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

void xpress::XPRSProblem::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 )
| inline

Returns the general constraints `y = f(x1, ..., xn, c1, ..., cm)` in a given range.

Parameters

  contype | An integer array of length `last-first+1` which will be filled with the types of the general constraints: `XPRS_GENCONS_MAX (0)`: indicates a `maximum` constraint; `XPRS_GENCONS_MIN (1)`: indicates a `minimum` constraint; `XPRS_GENCONS_AND (2)`: indicates an `and` constraint. `XPRS_GENCONS_OR (3)`: indicates an `or` constraint; `XPRS_GENCONS_ABS (4)`: indicates an `absolute value` constraint. May be `null` if not required.
  resultant | Integer array which will be filled with the indices of the output variables `y`. It must be of length `last-first+1`. May be `null` if not required.
  colstart | Integer array of length `last-first+2` which will be filled with the start index of each general constraint in the `colind` array. May be `null` if not required.
  colind | Integer array which will be filled with the indices of the input variables `xi`. May be `null` 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 than `maxcols`, then only `maxcols` elements will be returned. May be `null` if not required.
  valstart | Integer array of length `last-first+2` which will be filled with the start index of each general constraint in the `val` array. May be `null` if not required.
  val | Integer array which will be filled with the constant values `ci`. May be `null` 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 than `maxvals`, then only `maxvals` elements will be returned.May be `null` if not required.
  first | First general constraint in the range.
  last | Last general constraint in the range.

## getGenCons() [2/3]

void xpress::XPRSProblem::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 )
| inline

Returns the general constraints `y = f(x1, ..., xn, c1, ..., cm)` in a given range.

Parameters

  contype | An integer array of length `last-first+1` which will be filled with the types of the general constraints: `XPRS_GENCONS_MAX (0)`: indicates a `maximum` constraint; `XPRS_GENCONS_MIN (1)`: indicates a `minimum` constraint; `XPRS_GENCONS_AND (2)`: indicates an `and` constraint. `XPRS_GENCONS_OR (3)`: indicates an `or` constraint; `XPRS_GENCONS_ABS (4)`: indicates an `absolute value` constraint. May be `null` if not required.
  resultant | Integer array which will be filled with the indices of the output variables `y`. It must be of length `last-first+1`. May be `null` if not required.
  colstart | Integer array of length `last-first+2` which will be filled with the start index of each general constraint in the `colind` array. May be `null` if not required.
  colind | Integer array which will be filled with the indices of the input variables `xi`. May be `null` 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 than `maxcols`, then only `maxcols` elements will be returned. May be `null` if not required.
  valstart | Integer array of length `last-first+2` which will be filled with the start index of each general constraint in the `val` array. May be `null` if not required.
  val | Integer array which will be filled with the constant values `ci`. May be `null` 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 than `maxvals`, then only `maxvals` elements will be returned.May be `null` if not required.
  first | First general constraint in the range.
  last | Last general constraint in the range.

## getGenCons() [3/3]

auto xpress::XPRSProblem::getGenCons | ( | int | first,
|  | int | last ) -> xpress::XPRSProblem::GeneralConstraintInfo
| 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()

auto xpress::XPRSProblem::getGenConsName | ( | int | index | ) | -> std::string
| 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()

auto xpress::XPRSProblem::getGenConsNames | ( | int | first,
|  | int | last ) -> std::vector< std::string >
| 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]

void xpress::XPRSProblem::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 )
| 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/sets/piecewise linear constraints/general constraints 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. Can be `null` if not required.
  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. Can be `null` if not required.
  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. Can be `null` if not required.
  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. Can be `null` if not required.

## getIISData() [2/2]

auto xpress::XPRSProblem::getIISData | ( | int | number | ) | -> xpress::XPRSProblem::IISData
| 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()

auto xpress::XPRSProblem::getIndex | ( | int | type,
|  | std::optional< std::string > const & | name ) -> int
| 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()

auto xpress::XPRSProblem::getIndicator | ( | int | row | ) | -> std::optional< xpress::IndicatorInfo >
| inline

Get indicator information for a single row.

Parameters

  row | The row to query.

Returns
  Indicator information for `row`. This will be `std::nullopt` if `row` is not an indicator row.

Since
  44.00

## getIndicators() [1/2]

void xpress::XPRSProblem::getIndicators | ( | Array< int > const & | colind,
|  | Array< int > const & | complement,
|  | int | first,
|  | int | last )
| 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 be `null`.
  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 the `colind` array is ignored); `1`: for indicator constraints with condition "<code>bin = 1</code>"; `-1`: for indicator constraints with condition "<code>bin = 0</code>". May be `null`.
  first | First row in the range.
  last | Last row in the range (inclusive).

## getIndicators() [2/2]

auto xpress::XPRSProblem::getIndicators | ( | int | first,
|  | int | last ) -> std::vector< xpress::IndicatorInfo >
| 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()

void xpress::XPRSProblem::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 )
| 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 indices of the primal infeasible variables will be returned. May be `null` if not required.
  slack | Integer array of length `p_nprimalrows` where the indices of the primal infeasible rows will be returned. May be `null` if not required.
  duals | Integer array of length `p_ndualrows` where the indices of the dual infeasible rows will be returned. May be `null` if not required.
  djs | Integer array of length `p_ndualcols` where the indices of the dual infeasible variables will be returned. May be `null` if not required.

## getIntAttrib()

auto xpress::XPRSProblem::getIntAttrib | ( | int | attrib | ) | const -> int
| 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()

auto xpress::XPRSProblem::getIntControl | ( | int | control | ) | const -> int
| 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()

void xpress::XPRSProblem::getLastBarSol | ( | Array< double > const & | x,
|  | Array< double > const & | slack,
|  | Array< double > const & | duals,
|  | Array< double > const & | djs,
|  | int * | p_status )
| 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 be `null` if not required.
  slack | Double array of length `ORIGINALROWS` where the values of the slack variables will be returned. May be `null` if not required.
  duals | Double array of length `ORIGINALROWS` where the values of the dual variables (`cBTB-1`) will be returned. May be `null` if not required.
  djs | Double array of length `ORIGINALCOLS` where the reduced cost for each variable (`cT-cBTB-1A`) will be returned. May be `null` if not required.
  p_status | Status of the last barrier solve. Value matches that of `LPSTATUS` should the solve have been stopped immediately after the barrier.

## getLB()

auto xpress::XPRSProblem::getLB | ( | int | first,
|  | int | last ) -> std::vector< double >
| 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()

auto xpress::XPRSProblem::getLongAttrib | ( | int | attrib | ) | const -> XPRSint64
| 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()

auto xpress::XPRSProblem::getLongControl | ( | int | control | ) | const -> XPRSint64
| 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]

void xpress::XPRSProblem::getLpSol | ( | Array< double > const & | x | ) |
| 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 be `null` if not required.

## getLpSol() [2/2]

void xpress::XPRSProblem::getLpSol | ( | Array< double > const & | x,
|  | Array< double > const & | slack,
|  | Array< double > const & | duals,
|  | Array< double > const & | djs )
| 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 be `null` if not required.
  slack | Double array of length `ORIGINALROWS` where the values of the slack variables will be returned. May be `null` if not required.
  duals | Double array of length `ORIGINALROWS` where the values of the dual variables (`cBTB-1`) will be returned. May be `null` if not required.
  djs | Double array of length `ORIGINALCOLS` where the reduced cost for each variable (`cT-cBTB-1A`) will be returned. May be `null` if not required.

## getLpSolVal()

void xpress::XPRSProblem::getLpSolVal | ( | int | col,
|  | int | row,
|  | double * | p_x,
|  | double * | p_slack,
|  | double * | p_dual,
|  | double * | p_dj )
| inline

Used to obtain a single LP solution value following optimization.

Deprecated
  Deprecated since 44.00, use getSolution(), getCallbackSolution(), getSlacks(), or getCallbackSlacks(), getRedCosts(), getCallbackRedCosts(), getDuals(), or getCallbackDuals()

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 be `null` if not required.
  p_dj | Double pointer where the reduced costs for the variable (`cT-cBTB-1A`) will be returned. May be `null` if not required.

## getMessageStatus()

auto xpress::XPRSProblem::getMessageStatus | ( | int | msgcode | ) | -> int
| 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]

auto xpress::XPRSProblem::getMipEntities | ( |  | ) | -> xpress::XPRSProblem::MIPEntityInfo
| inline

Get information about MIP entities and SOS.

Returns
  The requested information.

Since
  44.00

## getMipEntities() [2/5]

auto xpress::XPRSProblem::getMipEntities | ( | Array< char > const & | coltype,
|  | Array< int > const & | colind,
|  | Array< double > const & | limit ) -> int
| 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 `MIPENTS` 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. May be `null` if not required.
  colind | Integer array of length `MIPENTS` where the column indices of the MIP entities will be returned. May be `null` if not required.
  limit | Double array of length `MIPENTS` 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). May be `null` if not required.

## getMipEntities() [3/5]

void xpress::XPRSProblem::getMipEntities | ( | int * | p_nentities,
|  | Array< char > const & | coltype,
|  | Array< int > const & | colind,
|  | Array< double > const & | limit )
| 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 be `null`.
  coltype | Character array of length `MIPENTS` 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. May be `null` if not required.
  colind | Integer array of length `MIPENTS` where the column indices of the MIP entities will be returned. May be `null` if not required.
  limit | Double array of length `MIPENTS` 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). May be `null` if not required.

## getMipEntities() [4/5]

void xpress::XPRSProblem::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 )
| 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 be `null`.
  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 be `null`.
  coltype | Character array of length `MIPENTS` 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. May be `null` if not required.
  colind | Integer array of length `MIPENTS` where the column indices of the MIP entities will be returned. May be `null` if not required.
  limit | Double array of length `MIPENTS` 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). May be `null` if not required.
  settype | Character array of length `SETS` where the set types will be returned. The set types will be one of: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  start | Integer array where the offsets into the `setcols` and `refval` arrays indicating the start of each set will be returned. This array must be of length `SETS+1`, the last element will contain the offset where set `SETS+1` would start, and equals the length of the `setcols` and `refval` 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]

void xpress::XPRSProblem::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 )
| 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 be `null`.
  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 be `null`.
  coltype | Character array of length `MIPENTS` 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. May be `null` if not required.
  colind | Integer array of length `MIPENTS` where the column indices of the MIP entities will be returned. May be `null` if not required.
  limit | Double array of length `MIPENTS` 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). May be `null` if not required.
  settype | Character array of length `SETS` where the set types will be returned. The set types will be one of: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  start | Integer array where the offsets into the `setcols` and `refval` arrays indicating the start of each set will be returned. This array must be of length `SETS+1`, the last element will contain the offset where set `SETS+1` would start, and equals the length of the `setcols` and `refval` 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]

void xpress::XPRSProblem::getMipSol | ( | Array< double > const & | x | ) |
| inline

Used to obtain the solution values of the last MIP solution that was found.

Deprecated
  Deprecated since 44.00, use getSolution(), getCallbackSolution(), getSlacks(), or getCallbackSlacks()

Parameters

  x | Double array of length `ORIGINALCOLS` where the values of the primal variables will be returned. May be `null` if not required.

## getMipSol() [2/2]

void xpress::XPRSProblem::getMipSol | ( | Array< double > const & | x,
|  | Array< double > const & | slack )
| inline

Used to obtain the solution values of the last MIP solution that was found.

Deprecated
  Deprecated since 44.00, use getSolution(), getCallbackSolution(), getSlacks(), or getCallbackSlacks()

Parameters

  x | Double array of length `ORIGINALCOLS` where the values of the primal variables will be returned. May be `null` if not required.
  slack | Double array of length `ORIGINALROWS` where the values of the slack variables will be returned. May be `null` if not required.

## getMipSolVal()

void xpress::XPRSProblem::getMipSolVal | ( | int | col,
|  | int | row,
|  | double * | p_x,
|  | double * | p_slack )
| inline

Used to obtain a single solution value of the last MIP solution that was found.

Deprecated
  Deprecated since 44.00, use getSolution(), getCallbackSolution(), getSlacks(), or getCallbackSlacks()

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]

void xpress::XPRSProblem::getMQObj | ( | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | objqcoef,
|  | int | maxcoefs,
|  | int * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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 of length `last-first+2` which will be filled with indices indicating the starting offsets in the `colind` and `objqcoef` arrays for each requested column. Column `i` starts at position `start[i]` in the `colind` and `objqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`.
  objqcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` if `maxcoefs` is `0`.
  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 only `maxcoefs` elements will be returned. If `p_ncoefs` is smaller than `maxcoefs`, then only `p_ncoefs` will be returned. May be `null`.
  first | First column in the range.
  last | Last column in the range.

## getMQObj() [2/5]

auto xpress::XPRSProblem::getMQObj | ( | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | objqcoef,
|  | int | maxcoefs,
|  | int | first,
|  | int | last ) -> int
| 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 of length `last-first+2` which will be filled with indices indicating the starting offsets in the `colind` and `objqcoef` arrays for each requested column. Column `i` starts at position `start[i]` in the `colind` and `objqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`.
  objqcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` if `maxcoefs` is `0`.
  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]

auto xpress::XPRSProblem::getMQObj | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | objqcoef,
|  | XPRSint64 | maxcoefs,
|  | int | first,
|  | int | last ) -> XPRSint64
| 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 of length `last-first+2` which will be filled with indices indicating the starting offsets in the `colind` and `objqcoef` arrays for each requested column. Column `i` starts at position `start[i]` in the `colind` and `objqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`.
  objqcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` if `maxcoefs` is `0`.
  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]

void xpress::XPRSProblem::getMQObj | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | objqcoef,
|  | XPRSint64 | maxcoefs,
|  | XPRSint64 * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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 of length `last-first+2` which will be filled with indices indicating the starting offsets in the `colind` and `objqcoef` arrays for each requested column. Column `i` starts at position `start[i]` in the `colind` and `objqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`.
  objqcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` if `maxcoefs` is `0`.
  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 only `maxcoefs` elements will be returned. If `p_ncoefs` is smaller than `maxcoefs`, then only `p_ncoefs` will be returned. May be `null`.
  first | First column in the range.
  last | Last column in the range.

## getMQObj() [5/5]

auto xpress::XPRSProblem::getMQObj | ( | int | first,
|  | int | last ) -> xpress::XPRSProblem::MatrixInfo
| 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]

auto xpress::XPRSProblem::getName | ( | int | type,
|  | int | elt ) -> std::string
| inline

Get the name of a single element.

Examples using `getName`:

- BinBurglar.cpp
- BoolVars.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- PolygonObjects.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp

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]

auto xpress::XPRSProblem::getName | ( | xpress::Namespaces | type,
|  | int | elt ) -> std::string
| inline

Get the name of a single element.

Examples using `getName`:

- BinBurglar.cpp
- BoolVars.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- PolygonObjects.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp

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()

auto xpress::XPRSProblem::getNameList | ( | int | type,
|  | int | first,
|  | int | last ) -> std::vector< std::string >
| inline

Returns the names for the rows, columns, sets, piecewise linear constraints, general constraints or objectives in a given range.

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]

auto xpress::XPRSProblem::getNames | ( | int | type,
|  | int | first,
|  | int | last ) -> std::vector< std::string >
| 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]

auto xpress::XPRSProblem::getNames | ( | xpress::Namespaces | type,
|  | int | first,
|  | int | last ) -> std::vector< std::string >
| 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()

void xpress::XPRSProblem::getNlpsol | ( | Array< double > const & | x,
|  | Array< double > const & | slack,
|  | Array< double > const & | duals,
|  | Array< double > const & | djs )
| inline

Obtain the current SLP solution values.

Deprecated
  Deprecated since 44.00, use getSolution(), getCallbackSolution(), getSlacks(), or getCallbackSlacks(), getRedCosts(), getCallbackRedCosts(), getDuals(), or getCallbackDuals()

Parameters

  x | Double array of length `XSLP_ORIGINALCOLS` to hold the values of the primal variables. May be `null` if not required.
  slack | Double array of length `XSLP_ORIGINALROWS` to hold the values of the slack variables. May be `null` if not required.
  duals | Double array of length `XSLP_ORIGINALROWS` to hold the values of the dual variables. May be `null` if not required.
  djs | Double array of length `XSLP_ORIGINALCOLS` to hold the reduced costs of the primal variables. May be `null` if not required.

## getObj()

auto xpress::XPRSProblem::getObj | ( | int | first,
|  | int | last ) -> std::vector< double >
| 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()

auto xpress::XPRSProblem::getObjDblAttrib | ( | int | solveidx,
|  | int | attrib ) -> double
| 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` and `SOLVEDOBJS-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()

auto xpress::XPRSProblem::getObjDblControl | ( | int | objidx,
|  | ObjControl | control ) -> double
| 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. Can be any solver control, or 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()

auto xpress::XPRSProblem::getObjIntAttrib | ( | int | solveidx,
|  | int | attrib ) -> int
| 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` and `SOLVEDOBJS-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()

auto xpress::XPRSProblem::getObjIntControl | ( | int | objidx,
|  | ObjControl | control ) -> int
| 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. Can be any solver control, or one of: `XPRS_OBJECTIVE_PRIORITY`: get the priority of the given objective.

## getObjLongAttrib()

auto xpress::XPRSProblem::getObjLongAttrib | ( | int | solveidx,
|  | int | attrib ) -> XPRSint64
| 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` and `SOLVEDOBJS-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.

## getObjLongControl()

auto xpress::XPRSProblem::getObjLongControl | ( | int | objidx,
|  | ObjControl | control ) -> XPRSint64
| 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. Can be any solver control, or one of: `XPRS_OBJECTIVE_PRIORITY`: get the priority of the given objective.

## getObjN()

auto xpress::XPRSProblem::getObjN | ( | int | objidx,
|  | int | first,
|  | int | last ) -> std::vector< double >
| 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()

void xpress::XPRSProblem::getPivots | ( | int | enter,
|  | Array< int > const & | outlist,
|  | Array< double > const & | x,
|  | double * | p_objval,
|  | int * | p_npivots,
|  | int | maxpivots )
| 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 `maxpivots` to hold list of potential leaving variables. May be `null` if not required.
  x | Double array of length `ROWS``+``SPAREROWS``+``COLS` to hold the values of all the variables that would result if `enter` entered the basis. May be `null` 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()

void xpress::XPRSProblem::getPresolveBasis | ( | Array< int > const & | rowstat,
|  | Array< int > const & | colstat )
| 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 hold the basis status of the stack, surplus or artificial variable associated with each row. The status will be one of: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: slack, surplus or artificial is non-basic at lower bound; `XPRS_BASISSTATUS_BASIC (1)`: slack, surplus or artificial is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: slack or surplus is non-basic at upper bound. May be `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: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound; `XPRS_BASISSTATUS_BASIC (1)`: variable is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: variable is at upper bound; `XPRS_BASISSTATUS_SUPERBASIC (3)`: variable is super-basic. May be `null` if not required.

## getPresolveMap()

void xpress::XPRSProblem::getPresolveMap | ( | Array< int > const & | rowmap,
|  | Array< int > const & | colmap )
| 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]

void xpress::XPRSProblem::getPresolveSol | ( | Array< double > const & | x | ) |
| 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 be `null` if not required.

## getPresolveSol() [2/2]

void xpress::XPRSProblem::getPresolveSol | ( | Array< double > const & | x,
|  | Array< double > const & | slack,
|  | Array< double > const & | duals,
|  | Array< double > const & | djs )
| 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 be `null` if not required.
  slack | Double array of length `ROWS` where the values of the slack variables will be returned. May be `null` if not required.
  duals | Double array of length `ROWS` where the values of the dual variables will be returned. May be `null` if not required.
  djs | Double array of length `COLS` where the reduced cost for each variable will be returned. May be `null` if not required.

## getPrimalRay()

void xpress::XPRSProblem::getPrimalRay | ( | Array< double > const & | ray,
|  | int * | p_hasray )
| 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]

void xpress::XPRSProblem::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 )
| 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 `last-first+1`. May be `null` if not required.
  resultant | Integer array which will be filled with the indices of the output variables `y`. It must be of length `last-first+1`. May be `null` 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 `last-first+2`. The `x`-values of the breakpoints of piecewise linear constraint `i < last` will be given in `xval[start[i]]` to `xval[start[i+1]]`. May be `null` if not required.
  xval | Double array of length `maxpoints` which will be filled with the `x`-values of the breakpoints. May be `null` if not required.
  yval | Double array of length `maxpoints` which will be filled with the `y`-values of the breakpoints. May be `null` 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 only `maxpoints` elements will be returned in the `xval` and `yval` arrays. May be `null` if not required.
  first | First piecewise linear constraint in the range.
  last | Last piecewise linear constraint in the range.

## getPwlCons() [2/2]

void xpress::XPRSProblem::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 )
| 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 `last-first+1`. May be `null` if not required.
  resultant | Integer array which will be filled with the indices of the output variables `y`. It must be of length `last-first+1`. May be `null` 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 `last-first+2`. The `x`-values of the breakpoints of piecewise linear constraint `i < last` will be given in `xval[start[i]]` to `xval[start[i+1]]`. May be `null` if not required.
  xval | Double array of length `maxpoints` which will be filled with the `x`-values of the breakpoints. May be `null` if not required.
  yval | Double array of length `maxpoints` which will be filled with the `y`-values of the breakpoints. May be `null` 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 only `maxpoints` elements will be returned in the `xval` and `yval` arrays. May be `null` if not required.
  first | First piecewise linear constraint in the range.
  last | Last piecewise linear constraint in the range.

## getPWLName()

auto xpress::XPRSProblem::getPWLName | ( | int | index | ) | -> std::string
| 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()

auto xpress::XPRSProblem::getPWLNames | ( | int | first,
|  | int | last ) -> std::vector< std::string >
| 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()

auto xpress::XPRSProblem::getQObj | ( | int | objqcol1,
|  | int | objqcol2 ) -> double
| 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()

auto xpress::XPRSProblem::getQRowCoeff | ( | int | row,
|  | int | rowqcol1,
|  | int | rowqcol2 ) -> double
| 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]

void xpress::XPRSProblem::getQRowQMatrix | ( | int | row,
|  | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | rowqcoef,
|  | int | maxcoefs,
|  | int * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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` and `rowqcoef` arrays for each requested column. It must be length of at least `last-first+2`. Column `i` starts at position `start[i]` in the `colind` and `rowqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`, only `maxcoefs` 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 only `p_ncoefs` will be returned. May be `null`.
  first | First column in the range.
  last | Last column in the range.

## getQRowQMatrix() [2/2]

auto xpress::XPRSProblem::getQRowQMatrix | ( | int | row,
|  | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | rowqcoef,
|  | int | maxcoefs,
|  | int | first,
|  | int | last ) -> int
| 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` and `rowqcoef` arrays for each requested column. It must be length of at least `last-first+2`. Column `i` starts at position `start[i]` in the `colind` and `rowqcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` 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`, only `maxcoefs` elements are written.
  first | First column in the range.
  last | Last column in the range.

## getQRowQMatrixTriplets() [1/2]

auto xpress::XPRSProblem::getQRowQMatrixTriplets | ( | int | row,
|  | Array< int > const & | rowqcol1,
|  | Array< int > const & | rowqcol2,
|  | Array< double > const & | rowqcoef ) -> int
| 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]

void xpress::XPRSProblem::getQRowQMatrixTriplets | ( | int | row,
|  | int * | p_ncoefs,
|  | Array< int > const & | rowqcol1,
|  | Array< int > const & | rowqcol2,
|  | Array< double > const & | rowqcoef )
| 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]

auto xpress::XPRSProblem::getQRows | ( | Array< int > const & | rowind | ) | -> int
| inline

Returns the list indices of the rows that have quadratic coefficients.

Parameters

  rowind | Array of length `QCONSTRAINTS` used to return the indices of rows with quadratic coefficients in them. May be `null` if not required.

## getQRows() [2/2]

void xpress::XPRSProblem::getQRows | ( | int * | p_nrows,
|  | Array< int > const & | rowind )
| 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. It can be retrieved from the problem attribute `QCONSTRAINTS`. May be `null` if not required.
  rowind | Array of length `QCONSTRAINTS` used to return the indices of rows with quadratic coefficients in them. May be `null` if not required.

## getRedCost()

auto xpress::XPRSProblem::getRedCost | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getRedCosts | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getRedCosts | ( | int * | status,
|  | Array< double > const & | djs,
|  | int | first,
|  | int | last ) const
| inline

Returns the reduced costs.

from 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 array of length `last-first+1` 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]

auto xpress::XPRSProblem::getRedCosts | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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()

auto xpress::XPRSProblem::getRhs | ( | int | first,
|  | int | last ) -> std::vector< double >
| 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()

auto xpress::XPRSProblem::getRhsRange | ( | int | first,
|  | int | last ) -> std::vector< double >
| 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()

auto xpress::XPRSProblem::getRowFlags | ( | int | first,
|  | int | last ) -> std::vector< int >
| 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()

auto xpress::XPRSProblem::getRowName | ( | int | index | ) | -> std::string
| inline

Get a row name.

Parameters

  index | objects.Index of the row.

Returns
  The requested row's name.

Since
  44.00

## getRowNames()

auto xpress::XPRSProblem::getRowNames | ( | int | first,
|  | int | last ) -> std::vector< std::string >
| 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]

void xpress::XPRSProblem::getRows | ( | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | colcoef,
|  | int | maxcoefs,
|  | int * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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` and `colcoef` arrays for each requested row. It must be of length `last-first+2`. Row `i` starts at position `start[i]` in the `colind` and `colcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` if not required.
  colind | Integer array of length `maxcoefs` which will be filled with the column indices of the nonzero elements for each row. May be `null` if not required.
  colcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` 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 only `maxcoefs` elements will be returned. If `p_ncoefs` is smaller than `maxcoefs`, then only `p_ncoefs` will be returned. May be `null` if not required.
  first | First row in the range.
  last | Last row in the range.

## getRows() [2/5]

auto xpress::XPRSProblem::getRows | ( | Array< int > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | colcoef,
|  | int | maxcoefs,
|  | int | first,
|  | int | last ) -> int
| 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` and `colcoef` arrays for each requested row. It must be of length `last-first+2`. Row `i` starts at position `start[i]` in the `colind` and `colcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` if not required.
  colind | Integer array of length `maxcoefs` which will be filled with the column indices of the nonzero elements for each row. May be `null` if not required.
  colcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` 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]

auto xpress::XPRSProblem::getRows | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | colcoef,
|  | XPRSint64 | maxcoefs,
|  | int | first,
|  | int | last ) -> XPRSint64
| 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` and `colcoef` arrays for each requested row. It must be of length `last-first+2`. Row `i` starts at position `start[i]` in the `colind` and `colcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` if not required.
  colind | Integer array of length `maxcoefs` which will be filled with the column indices of the nonzero elements for each row. May be `null` if not required.
  colcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` 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]

void xpress::XPRSProblem::getRows | ( | Array< XPRSint64 > const & | start,
|  | Array< int > const & | colind,
|  | Array< double > const & | colcoef,
|  | XPRSint64 | maxcoefs,
|  | XPRSint64 * | p_ncoefs,
|  | int | first,
|  | int | last )
| 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` and `colcoef` arrays for each requested row. It must be of length `last-first+2`. Row `i` starts at position `start[i]` in the `colind` and `colcoef` arrays, and has `start[i+1]-start[i]` elements in it. May be `null` if not required.
  colind | Integer array of length `maxcoefs` which will be filled with the column indices of the nonzero elements for each row. May be `null` if not required.
  colcoef | Double array of length `maxcoefs` which will be filled with the nonzero element values. May be `null` 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 only `maxcoefs` elements will be returned. If `p_ncoefs` is smaller than `maxcoefs`, then only `p_ncoefs` will be returned. May be `null` if not required.
  first | First row in the range.
  last | Last row in the range.

## getRows() [5/5]

auto xpress::XPRSProblem::getRows | ( | int | first,
|  | int | last ) -> xpress::XPRSProblem::MatrixInfo
| inline

Get range of rows.

Examples using `getRows`:

- CuttingStock.cpp
- FolioHeuristic.cpp

Parameters

  first | First row index (inclusive)
  last | Last row index (inclusive)

Returns
  Data for the queried rows.

Since
  44.00

## getRowType()

auto xpress::XPRSProblem::getRowType | ( | int | first,
|  | int | last ) -> std::vector< char >
| 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()

void xpress::XPRSProblem::getScale | ( | Array< int > const & | rowscale,
|  | Array< int > const & | colscale )
| inline

Returns the the current scaling of the matrix.

Parameters

  rowscale | Integer array of size `ROWS` that will contain the powers of `2` with which the rows are currently scaled.
  colscale | Integer array of size `COLS` that will contain the powers of `2` with which the columns are currently scaled.

## getScaledInfeas()

void xpress::XPRSProblem::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 )
| inline

Returns a list primal and dual variables that are infeasible for the scaled 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 indices of the primal infeasible variables will be returned. May be `null` if not required.
  slack | Integer array of length `p_nprimalrows` where the indices of the primal infeasible rows will be returned. May be `null` if not required.
  duals | Integer array of length `p_ndualrows` where the indices of the dual infeasible rows will be returned. May be `null` if not required.
  djs | Integer array of length `p_ndualcols` where the indices of the dual infeasible variables will be returned. May be `null` if not required.

## getSetDefinitions()

auto xpress::XPRSProblem::getSetDefinitions | ( |  | ) | -> xpress::XPRSProblem::MIPEntityInfo
| inline

Get information about SOS.

Returns
  The requested information.

Since
  44.00

## getSetName()

auto xpress::XPRSProblem::getSetName | ( | int | index | ) | -> std::string
| inline

Get a set (SOS) name.

Parameters

  index | objects.Index of the set.

Returns
  The requested sets's name.

Since
  44.00

## getSetNames()

auto xpress::XPRSProblem::getSetNames | ( | int | first,
|  | int | last ) -> std::vector< std::string >
| 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()

auto xpress::XPRSProblem::getSlack | ( | int | index | ) | const -> double
| 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]

auto xpress::XPRSProblem::getSlacks | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getSlacks | ( | int * | status,
|  | Array< double > const & | slacks,
|  | int | first,
|  | int | last ) const
| inline

Returns the slack values.

from the incumbent solution during or after optimization with `XPRSoptimize`, `XPRSmipoptimize`, `XPRSlpoptimize` or `XPRSnlpoptimize`.

Parameters

  status | Information about the slacks returned.
  slacks | Double array of length `last-first+1` 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]

auto xpress::XPRSProblem::getSlacks | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getSolution | ( |  | ) | const -> std::vector<double>
| 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]

void xpress::XPRSProblem::getSolution | ( | int * | status,
|  | Array< double > const & | x,
|  | int | first,
|  | int | last ) const
| inline

Returns the incumbent solution during or after optimization with `XPRSoptimize`, `XPRSmipoptimize`, `XPRSlpoptimize` or `XPRSnlpoptimize`.

Parameters

  status | Information about the solution returned.
  x | Double array of length `last-first+1` 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]

auto xpress::XPRSProblem::getSolution | ( | int | first,
|  | int | last ) const -> std::vector<double>
| 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]

auto xpress::XPRSProblem::getSolution | ( | int | index | ) | const -> double
| 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()

auto xpress::XPRSProblem::getStrAttrib | ( | int | attrib | ) | const -> std::string
| 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()

auto xpress::XPRSProblem::getStrControl | ( | int | control | ) | const -> std::string
| 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()

void xpress::XPRSProblem::getStringControl | ( | int | control,
|  | char * | value,
|  | int | maxbytes,
|  | int * | p_nbytes ) const
| 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. May be `null` when `maxbytes` is zero, in order to retrieve the length of the control.
  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()

void xpress::XPRSProblem::getStrStringAttrib | ( | int | attrib,
|  | char * | value,
|  | int | maxbytes,
|  | int * | p_nbytes ) const
| 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. May be `null` when `maxbytes` is zero, in order to retrieve the length of the attribute.
  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()

auto xpress::XPRSProblem::getUB | ( | int | first,
|  | int | last ) -> std::vector< double >
| 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()

void xpress::XPRSProblem::IISIsolations | ( | int | iis | ) |
| 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`) or `XPRSiisall` (`IIS` `-a`) in which the isolations should be identified.

## IISStatus() [1/2]

auto xpress::XPRSProblem::IISStatus | ( |  | ) | -> xpress::XPRSProblem::IISStatusInfo
| inline

Get the IIS status.

Examples using `IISStatus`:

- FolioIIS.cpp
- FolioMipIIS.cpp

Returns
  IIS status information. If there are no IISs then the returned object will have all empty arrays.

Since
  44.00

## IISStatus() [2/2]

void xpress::XPRSProblem::IISStatus | ( | int * | p_niis,
|  | Array< int > const & | nrows,
|  | Array< int > const & | ncols,
|  | Array< double > const & | suminfeas,
|  | Array< int > const & | numinfeas )
| 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 | Array containing the number of rows in each IIS. May be `null` if not required.
  ncols | Array containing the number of bounds in each IIS. May be `null` if not required.
  suminfeas | Array containing the sum of infeasibilities in each IIS after the first phase simplex. May be `null` if not required.
  numinfeas | Array containing the number of infeasible variables in each IIS after the first phase simplex. May be `null` if not required.

## interrupt()

void xpress::XPRSProblem::interrupt | ( | StopType | reason | ) |
| 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_WORKLIMIT`: work 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; `XPRS_STOP_NEXTOBJECTIVE`: stop the current solve, but continue with solving the next objective (see below); `>= 1000`: user defined value.

## loadBasis()

void xpress::XPRSProblem::loadBasis | ( | Array< int const > const & | rowstat,
|  | Array< int const > const & | colstat )
| inline

Loads a basis from the user's areas.

Parameters

  rowstat | Integer array of length `ORIGINALROWS` containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: slack, surplus or artificial is non-basic at lower bound; `XPRS_BASISSTATUS_BASIC (1)`: slack, surplus or artificial is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: slack or surplus is non-basic at upper bound. `XPRS_BASISSTATUS_SUPERBASIC (3)`: slack or surplus is super-basic.
  colstat | Integer array of length `ORIGINALCOLS` containing the basis status of each of the columns in the constraint matrix. The status must be one of: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound; `XPRS_BASISSTATUS_BASIC (1)`: variable is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: variable is at upper bound; `XPRS_BASISSTATUS_SUPERBASIC (3)`: variable is super-basic.

## loadBranchDirs()

void xpress::XPRSProblem::loadBranchDirs | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< int const > const & | dir )
| 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 in `colind`. Entities for which dir is set to 1 will be branched on until fixed before an integer feasible solution is returned. If `dir` is `null`, the branching directive will be set for all entities in `colind`.

## loadCuts() [1/3]

void xpress::XPRSProblem::loadCuts | ( | int | cuttype,
|  | int | interp )
| 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-vectors (compare Section ) - load cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - `0` load cut if all bits match those set in `cuttype`.

## loadCuts() [2/3]

void xpress::XPRSProblem::loadCuts | ( | int | cuttype,
|  | int | interp,
|  | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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-vectors (compare Section ) - load cut if any bit matches any bit set in `cuttype`; `3`: treat cut types as bit-vectors (compare Section ) - `0` load cut if all bits match those set in `cuttype`.
  ncuts | Number of cuts to load.
  cutind | Array of length `ncuts` containing the cuts to be loaded into the matrix. These are objects returned by either `XPRSstorecuts` or `XPRSgetcpcutlist`.

## loadCuts() [3/3]

void xpress::XPRSProblem::loadCuts | ( | int | ncuts,
|  | Array< XPRScut const > const & | cutind )
| 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 the cuts to be loaded into the matrix. These are objects returned by either `XPRSstorecuts` or `XPRSgetcpcutlist`.

## loadDelayedRows()

void xpress::XPRSProblem::loadDelayedRows | ( | int | nrows,
|  | Array< int const > const & | rowind )
| 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()

void xpress::XPRSProblem::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 )
| 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 be `null` 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. May be `null` if not required.
  uppseudo | Double array of length `ndirs` containing the up pseudo costs for the columns or sets. May be `null` if not required.
  downpseudo | Double array of length `ndirs` containing the down pseudo costs for the columns or sets. May be `null` if not required.

## loadLp() [1/2]

void xpress::XPRSProblem::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 )
| 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 name for the problem. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` then all upper bounds are infinite.

## loadLp() [2/2]

void xpress::XPRSProblem::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 )
| 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 name for the problem. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` then all upper bounds are infinite.

## loadLpSol()

auto xpress::XPRSProblem::loadLpSol | ( | Array< double const > const & | x,
|  | Array< double const > const & | slack,
|  | Array< double const > const & | duals,
|  | Array< double const > const & | djs ) -> int
| 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. May be `null`, see further information.
  slack | Optional: double array of length `ROWS` containing the values of slack variables. May be `null`, see further information.
  duals | Optional: double array of length `ROWS` containing the values of dual variables. May be `null`, see further information.
  djs | Optional: double array of length `COLS` containing the values of reduced costs. May be `null`, see further information.

## loadMip() [1/2]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing the set types: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadMip() [2/2]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing the set types: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadMipSol()

auto xpress::XPRSProblem::loadMipSol | ( | Array< double const > const & | x | ) | -> int
| 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]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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 in `rowtype` as type `L`. May be `null` if the problem contains no quadratic constraints.
  nrowqcoefs | Integer array of size `nqrows`, containing the number of nonzeros in each quadratic constraint matrix. May be `null` if the problem contains no quadratic constraints.
  rowqcol1 | Integer array of size `nqcelem`, where `nqcelem` equals the sum of the elements in `nrowqcoefs` (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 from `0` to `nrowqcoefs[0]-1`, for the second matrix from `nrowqcoefs[0]` to `nrowqcoefs[0]+ nrowqcoefs[1]-1`, etc. May be `null` if the problem contains no quadratic constraints.
  rowqcol2 | Integer array of size `nqcelem`, containing the second index for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  rowqcoef | Integer array of size `nqcelem`, containing the coefficients for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing the set types: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadMIQCQP() [2/2]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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 in `rowtype` as type `L`. May be `null` if the problem contains no quadratic constraints.
  nrowqcoefs | Integer array of size `nqrows`, containing the number of nonzeros in each quadratic constraint matrix. May be `null` if the problem contains no quadratic constraints.
  rowqcol1 | Integer array of size `nqcelem`, where `nqcelem` equals the sum of the elements in `nrowqcoefs` (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 from `0` to `nrowqcoefs[0]-1`, for the second matrix from `nrowqcoefs[0]` to `nrowqcoefs[0]+ nrowqcoefs[1]-1`, etc. May be `null` if the problem contains no quadratic constraints.
  rowqcol2 | Integer array of size `nqcelem`, containing the second index for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  rowqcoef | Integer array of size `nqcelem`, containing the coefficients for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing the set types: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadMIQP() [1/2]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  rng | Double array of length `nrows` containing the range values for range rows. The values in the range array will only be read for `R` type rows. The entries for other type rows will be ignored. May be `null` 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadMIQP() [2/2]

void xpress::XPRSProblem::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 )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  rng | Double array of length `nrows` containing the range values for range rows. The values in the range array will only be read for `R` type rows. The entries for other type rows will be ignored. May be `null` 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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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. May be `null` if all variables are continuous.
  entind | Integer array of length `nentities` containing the column indices of the MIP entities. May be `null` if the problem contains no 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 be `null` if not required.
  settype | Character array of length `nsets` containing: `1`: SOS1 type sets; `2`: SOS2 type sets. May be `null` if not required.
  setstart | Integer array containing the offsets in the `setind` and `refval` arrays indicating the start of each set. This array has one entry for each set plus one extra entry containing the offset where an additional set would start, if it were present. May be `null` if not required.
  setind | Integer array of length `setstart[nsets]-1` containing the columns in each set. May be `null` 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 be `null` if not required.

## loadModelCuts()

void xpress::XPRSProblem::loadModelCuts | ( | int | nrows,
|  | Array< int const > const & | rowind )
| 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()

void xpress::XPRSProblem::loadPresolveBasis | ( | Array< int const > const & | rowstat,
|  | Array< int const > const & | colstat )
| 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: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: slack, surplus or artificial is non-basic at lower bound; `XPRS_BASISSTATUS_BASIC (1)`: slack, surplus or artificial is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (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: `XPRS_BASISSTATUS_NONBASIC_LOWER (0)`: variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound; `XPRS_BASISSTATUS_BASIC (1)`: variable is basic; `XPRS_BASISSTATUS_NONBASIC_UPPER (2)`: variable is at upper bound; `XPRS_BASISSTATUS_SUPERBASIC (3)`: variable is super-basic.

## loadPresolveDirs()

void xpress::XPRSProblem::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 )
| 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 be `null` 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. May be `null` if not required.
  uppseudo | Double array of length `ndirs` containing the up pseudo costs for the columns or sets. May be `null` if not required.
  downpseudo | Double array of length `ndirs` containing the down pseudo costs for the columns or sets. May be `null` if not required.

## loadQCQP() [1/2]

void xpress::XPRSProblem::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 & | nrowqcoefs,
|  | Array< int const > const & | rowqcol1,
|  | Array< int const > const & | rowqcol2,
|  | Array< double const > const & | rowqcoef )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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 in `rowtype` as type `L`. May be `null` if the problem contains no quadratic constraints.
  nrowqcoefs | Integer array of size `nqrows`, containing the number of nonzeros in each quadratic constraint matrix. May be `null` if the problem contains no quadratic constraints.
  rowqcol1 | Integer array of size `nqcelem`, where `nqcelem` equals the sum of the elements in `nrowqcoefs` (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 from `0` to `nrowqcoefs[0]-1`, for the second matrix from `nrowqcoefs[0]` to `nrowqcoefs[0]+ nrowqcoefs[1]-1`, etc. May be `null` if the problem contains no quadratic constraints.
  rowqcol2 | Integer array of size `nqcelem`, containing the second index for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  rowqcoef | Integer array of size `nqcelem`, containing the coefficients for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.

## loadQCQP() [2/2]

void xpress::XPRSProblem::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 & | nrowqcoefs,
|  | Array< int const > const & | rowqcol1,
|  | Array< int const > const & | rowqcol2,
|  | Array< double const > const & | rowqcoef )
| 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. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.
  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 in `rowtype` as type `L`. May be `null` if the problem contains no quadratic constraints.
  nrowqcoefs | Integer array of size `nqrows`, containing the number of nonzeros in each quadratic constraint matrix. May be `null` if the problem contains no quadratic constraints.
  rowqcol1 | Integer array of size `nqcelem`, where `nqcelem` equals the sum of the elements in `nrowqcoefs` (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 from `0` to `nrowqcoefs[0]-1`, for the second matrix from `nrowqcoefs[0]` to `nrowqcoefs[0]+ nrowqcoefs[1]-1`, etc. May be `null` if the problem contains no quadratic constraints.
  rowqcol2 | Integer array of size `nqcelem`, containing the second index for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.
  rowqcoef | Integer array of size `nqcelem`, containing the coefficients for the quadratic constraint matrices. May be `null` if the problem contains no quadratic constraints.

## loadQP() [1/2]

void xpress::XPRSProblem::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 )
| 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 name for the problem. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.

## loadQP() [2/2]

void xpress::XPRSProblem::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 )
| 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 name for the problem. If `probname` is `null`, the problem name will be an empty string.
  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. May be `null` if the problem contains no rows.
  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. May be `null` if the problem contains no rows.
  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 be `null` to set all objective coefficients to 0 (zero).
  start | Integer array containing the offsets in the `rowind` and `rowcoef` arrays of the start of the elements for each column. This array contains one entry for each column, plus one more if `collen` is `null`. If `collen` is `null`, the last entry of `start` contains the position in the `rowind` and `rowcoef` arrays at which an extra column would start, if it were present. This value is also the length of the `rowind` and `rowcoef` arrays. May be `null` if the problem contains no coefficients.
  collen | Integer array of length `ncols` containing the number of nonzero elements in each column. May be `null` if not required. This array is not required if the non-zero coefficients in the `rowind` and `rowcoef` arrays are contiguous, and the `start` array has an additional entry as described above.
  rowind | Integer array containing the row indices for the nonzero elements in each column. May be `null` if the problem contains no coefficients. If the indices are input contiguously, with the columns in ascending order, the length of the `rowind` array is found by adding the `start` entry for the last column to the `collen` entry for the last column, or if `collen` is `null`, by the additional entry at the end of `start`.
  rowcoef | Double array containing the nonzero element values; length as for `rowind`. May be `null` if the problem contains no coefficients.
  lb | Double array of length `ncols` containing the lower bounds on the columns. Use `XPRS_MINUSINFINITY` to represent a lower bound of minus infinity. If this is `null` then all lower bounds are 0 (zero).
  ub | Double array of length `ncols` containing the upper bounds on the columns. Use `XPRS_PLUSINFINITY` to represent an upper bound of plus infinity. If this is `null` 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. May be `null` if all objective coefficients are zero.
  objqcol2 | Integer array of size `nobjqcoefs` containing the column index of the second variable in each quadratic term. May be `null` if all objective coefficients are zero.
  objqcoef | Double array of size `nobjqcoefs` containing the quadratic coefficients. May be `null` if all objective coefficients are zero.

## loadSecureVecs()

void xpress::XPRSProblem::loadSecureVecs | ( | int | nrows,
|  | int | ncols,
|  | Array< int const > const & | rowind,
|  | Array< int const > const & | colind )
| 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 be `null` if not required.
  colind | Integer array of length `ncols` containing the columns to be marked. May be `null` if not required.

## lpOptimize() [1/2]

void xpress::XPRSProblem::lpOptimize | ( |  | ) |
| 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]

void xpress::XPRSProblem::lpOptimize | ( | std::optional< std::string > const & | flags | ) |
| 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 `""` or `null`, in which case the algorithm used is determined by the `DEFAULTALG` control. If the argument includes: `b`: the problem will be solved using the Newton barrier method, or the Hybrid gradient method if `BARALG` 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`: the network part of the problem will be identified and solved using the network simplex algorithm;

## makeChild()

virtual auto xpress::XPRSProblem::makeChild | ( | XPRSprob | pointer | ) | -> XPRSProblem *
| inline virtual

Create a new problem from an existing low-level pointer.

This is used to create worker problems for invoking callbacks.

Since
  44.00

## mipOptimize() [1/2]

void xpress::XPRSProblem::mipOptimize | ( |  | ) |
| 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]

void xpress::XPRSProblem::mipOptimize | ( | std::optional< std::string > const & | flags | ) |
| 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. The default is `""` or `null`, in which case the choice of the LP algorithm is left to the solver. If the argument includes: `b`: the initial continuous relaxation will be solved using the Newton barrier method (or the hybrid gradient method if `BARALG` 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`: (deprecated) stop after having solved the initial continous relaxation. This flag is deprecated, use the `MIPSTOPSTAGE` control instead.

## msAddCustomPreset()

void xpress::XPRSProblem::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 )
| 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 no initial values are provided.
  initial | Initial values for the variables for which to set an initial value. May be null if no initial values are provided.
  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 object to be passed to the multistart callbacks.

## msAddJob()

void xpress::XPRSProblem::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 )
| 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 no initial values are provided.
  initial | Initial values for the variables for which to set an initial value. May be null if no initial values are provided.
  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 object to be passed to the multistart callbacks.

## msAddPreset()

void xpress::XPRSProblem::msAddPreset | ( | std::optional< std::string > const & | description,
|  | int | preset,
|  | int | maxjobs,
|  | void * | data )
| 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 object to be passed to the multistart callbacks.

## newBranchObject()

auto xpress::XPRSProblem::newBranchObject | ( | bool | isOriginal | ) | -> BranchObject *
| 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.

Since
  44.00

## nlpAddFormulas()

void xpress::XPRSProblem::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 )
| 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 arrays `type` and `value` of the formula for the coefficients. The last element 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | nIn,
|  | int | nOut,
|  | int | options,
|  | MultiMapDeltaFunctor | functor ) -> xpress::XPRSProblem::MultiMapDeltaFunction *
| 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | nIn,
|  | int | nOut,
|  | int | options,
|  | MultiMapFunctor | functor ) -> xpress::XPRSProblem::MultiMapFunction *
| 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | nIn,
|  | int | options,
|  | VecMapDeltaFunctor | functor ) -> xpress::XPRSProblem::VecMapDeltaFunction *
| 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | nIn,
|  | int | options,
|  | VecMapFunctor | functor ) -> xpress::XPRSProblem::VecMapFunction *
| 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | options,
|  | MapDeltaFunctor | functor ) -> xpress::XPRSProblem::MapDeltaFunction *
| 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]

auto xpress::XPRSProblem::nlpAddUserFunction | ( | std::optional< std::string > | funcname,
|  | int | options,
|  | MapFunctor | functor ) -> xpress::XPRSProblem::MapFunction *
| 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()

auto xpress::XPRSProblem::nlpCalcSlacks | ( | Array< double const > const & | solution | ) | -> std::vector< double >
| inline

Calculate the slack values for the provided solution in the non-linear problem.

Parameters

  solution | The solution for which the slacks are requested.

## nlpChgFormula()

void xpress::XPRSProblem::nlpChgFormula | ( | int | row,
|  | int | parsed,
|  | Array< int const > const & | type,
|  | Array< double const > const & | value )
| 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()

void xpress::XPRSProblem::nlpChgFormulaStr | ( | int | row,
|  | std::optional< std::string > const & | formula )
| 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()

void xpress::XPRSProblem::nlpDelFormulas | ( | int | nformulas,
|  | Array< int const > const & | rowind )
| 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()

void xpress::XPRSProblem::nlpDelUserFunction | ( | int | type | ) |
| inline

Delete a user function from the current problem.

Parameters

  type | The identifier of the user function as returned by `XSLPadduserfunction`.

## nlpEvaluateFormula()

auto xpress::XPRSProblem::nlpEvaluateFormula | ( | int | parsed,
|  | Array< int const > const & | type,
|  | Array< double const > const & | values ) -> double
| 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()

void xpress::XPRSProblem::nlpGetFormula | ( | int | row,
|  | int | parsed,
|  | int | maxtypes,
|  | int * | p_ntypes,
|  | Array< int > const & | type,
|  | Array< double > const & | value )
| 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` if `maxtypes` is zero.
  value | Double array of values corresponding to `type`. May be `null` if `maxtypes` is zero.

## nlpGetFormulaRows()

void xpress::XPRSProblem::nlpGetFormulaRows | ( | int * | p_nformulas,
|  | Array< int > const & | rowind )
| 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()

void xpress::XPRSProblem::nlpGetFormulaStr | ( | int | row,
|  | char * | formula,
|  | int | maxbytes,
|  | int * | p_nbytes )
| 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` if `maxbytes` 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()

void xpress::XPRSProblem::nlpImportLibFunc | ( | std::optional< std::string > const & | libname,
|  | std::optional< std::string > const & | funcname,
|  | XPRSfunctionptr * | p_function,
|  | int * | p_status )
| 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()

void xpress::XPRSProblem::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 )
| 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 arrays `type` and `value` of the formula for the coefficients. The last element 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()

void xpress::XPRSProblem::nlpOptimize | ( | std::optional< std::string > const & | flags | ) |
| inline

Maximize or minimize an SLP problem.

Parameters

  flags | Flags to pass to `XSLPnlpoptimize`. The default is `""` or `null`, in which case the solve stops after solving the root relaxation (or a continuous problem to completion) and it restarts the solve without continuing. `g`: Perform a branch and bound search if necessary to solve the problem; `c`: continue a previously interrupted solve. All other flags are passed to the Optimizer: see `XPRSlpoptimize`.

## nlpSetInitVal()

void xpress::XPRSProblem::nlpSetInitVal | ( | int | nvars,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | initial )
| inline

Set the initial value of columns.

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()

void xpress::XPRSProblem::nlpValidateKKT | ( | int | mode,
|  | int | respectbasis,
|  | int | updatemult,
|  | double | violtarget )
| 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 versus `XSLP_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 the `XSLP_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()

void xpress::XPRSProblem::nlpValidateRow | ( | int | row | ) |
| inline

Prints an extensive analysis on a given constraint of the SLP problem.

Parameters

  row | The index of the row to be analyzed

## nlpValidateVector()

void xpress::XPRSProblem::nlpValidateVector | ( | Array< double const > const & | solution,
|  | double * | p_suminf,
|  | double * | p_sumscaledinf,
|  | double * | p_objval )
| 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()

void xpress::XPRSProblem::objSA | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double > const & | lower,
|  | Array< double > const & | upper )
| 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]

auto xpress::XPRSProblem::optimize | ( |  | ) | -> int
| 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 not returned and must be queried explicitly afterwards using the corresponding attribute. See the documentation of the overloaded function for more details.

Examples using `optimize`:

- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- tsp.cpp

Returns
  The solve status

Since
  44.00

## optimize() [2/3]

void xpress::XPRSProblem::optimize | ( | std::optional< std::string > const & | flags,
|  | int * | solvestatus,
|  | int * | solstatus )
| 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 `""` or `null`. If the argument includes: `s`: solve the problem to local optimality; `x`: solve the problem to global optimality; `l`: (deprecated) if a branch and bound search is necessary to solve the problem, stop after solving the root node. This flag is deprecated, use the `MIPSTOPSTAGE` control instead.
  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]

auto xpress::XPRSProblem::optimize | ( | std::optional< std::string > | flags | ) | -> int
| 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 not returned and must be queried explicitly afterwards using the corresponding attribute. See the documentation of the overloaded function for more details.

Examples using `optimize`:

- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- tsp.cpp

Parameters

  flags | Flags to tweak the function behavior.

Returns
  The solve status.

Since
  44.00

## pivot()

void xpress::XPRSProblem::pivot | ( | int | enter,
|  | int | leave )
| 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()

auto xpress::XPRSProblem::postSolveSol | ( | Array< double const > const & | prex | ) | -> std::vector< double >
| inline

Postsolves a primal solution formulated in the presolved space into the corresponding solution formulated in the input 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 be `null`.

## presolveRow() [1/3]

void xpress::XPRSProblem::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 )
| 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. `E`: indicates a >= row.
  norigcoefs | Number of elements in the `origcolind` and `origrowcoef` 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` and `rowcoef` arrays. The function will not write more elements than this to `colind` or `rowcoef`, even if the presolved row is longer.
  p_ncoefs | Pointer to the integer where the number of non-zero elements in the presolved row will be returned (this may be bigger than `maxcoefs`).
  colind | Integer array of length `maxcoefs` which will be filled with the column indices of the presolved row. May be `null` if not required. Allocate this to `COLS` elements and pass `COLS` as `maxcoef`> to make sure it is large enough to hold the presolved row.
  rowcoef | Double array of length `maxcoefs` which will be filled with the coefficients of the presolved row. May be `null` if not required. Allocate this to `COLS` elements and pass `COLS` as `maxcoef`> to make sure it is large enough to hold the presolved row.
  p_rhs | Pointer to the double where the presolved right-hand side will be returned.
  p_status | Status of the presolved row: `-5`: Failed to presolve the row due to presolve operations making the row nonlinear; `-4`: Failed to presolve the equality row due to presolve operations requiring relaxation of the 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. May be `null` if not required.

## presolveRow() [2/3]

auto xpress::XPRSProblem::presolveRow | ( | xpress::SizedArray< int const > const & | ind,
|  | xpress::SizedArray< double const > const & | val,
|  | char | type,
|  | double | rhs ) -> std::optional< xpress::XPRSProblem::RowInfo >
| 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.

Examples using `presolveRow`:

- tsp.cpp

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]

auto xpress::XPRSProblem::presolveRow | ( | xpress::XPRSProblem::RowInfo | row | ) | -> std::optional< xpress::XPRSProblem::RowInfo >
| 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.

Examples using `presolveRow`:

- tsp.cpp

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

## presolveSol()

auto xpress::XPRSProblem::presolveSol | ( | Array< double const > const & | origx | ) | -> std::vector< double >
| inline

Presolves a primal solution formulated in the input space into the corresponding solution formulated in the presolved space.

The problem itself is unchanged.

Parameters

  origx | Double array of length `INPUTCOLS` with the values of the primal variables in the input space. Cannot be `null`.

## printIIS()

void xpress::XPRSProblem::printIIS | ( | int | iis | ) |
| 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]

void xpress::XPRSProblem::readBasis | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::readBasis | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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]

void xpress::XPRSProblem::readBinSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::readBinSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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()

void xpress::XPRSProblem::readDirs | ( | std::optional< std::string > const & | filename | ) |
| 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 (or `null`), the default problem_name is used with a `.dir` extension.

## readProb() [1/2]

void xpress::XPRSProblem::readProb | ( | std::optional< std::string > const & | filename | ) |
| 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, the default problem_name is used with various extensions - see below.

## readProb() [2/2]

void xpress::XPRSProblem::readProb | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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, the default problem_name is used with various extensions - see below.
  flags | Flags to be passed: `l`: only `filename.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]

void xpress::XPRSProblem::readSlxSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::readSlxSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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()

void xpress::XPRSProblem::removeAfterObjectiveCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove an `afterobjective` callback.

Parameters

  callback | The callback to be removed (previously returned by `addAfterObjectiveCallback`).

## removeBarIterationCallback()

void xpress::XPRSProblem::removeBarIterationCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `bariteration` callback.

Parameters

  callback | The callback to be removed (previously returned by `addBarIterationCallback`).

## removeBarlogCallback()

void xpress::XPRSProblem::removeBarlogCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `barlog` callback.

Parameters

  callback | The callback to be removed (previously returned by `addBarlogCallback`).

## removeBeforeObjectiveCallback()

void xpress::XPRSProblem::removeBeforeObjectiveCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `beforeobjective` callback.

Parameters

  callback | The callback to be removed (previously returned by `addBeforeObjectiveCallback`).

## removeChangeBranchObjectCallback()

void xpress::XPRSProblem::removeChangeBranchObjectCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `changebranchobject` callback.

Parameters

  callback | The callback to be removed (previously returned by `addChangeBranchObjectCallback`).

## removeCheckTimeCallback()

void xpress::XPRSProblem::removeCheckTimeCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `checktime` callback.

Parameters

  callback | The callback to be removed (previously returned by `addCheckTimeCallback`).

## removeComputeRestartCallback()

void xpress::XPRSProblem::removeComputeRestartCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `computerestart` callback.

Parameters

  callback | The callback to be removed (previously returned by `addComputeRestartCallback`).

## removeCutlogCallback()

void xpress::XPRSProblem::removeCutlogCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `cutlog` callback.

Parameters

  callback | The callback to be removed (previously returned by `addCutlogCallback`).

## removeCutRoundCallback()

void xpress::XPRSProblem::removeCutRoundCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `cutround` callback.

Parameters

  callback | The callback to be removed (previously returned by `addCutRoundCallback`).

## removeGapNotifyCallback()

void xpress::XPRSProblem::removeGapNotifyCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `gapnotify` callback.

Parameters

  callback | The callback to be removed (previously returned by `addGapNotifyCallback`).

## removeInfnodeCallback()

void xpress::XPRSProblem::removeInfnodeCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove an `infnode` callback.

Parameters

  callback | The callback to be removed (previously returned by `addInfnodeCallback`).

## removeIntsolCallback()

void xpress::XPRSProblem::removeIntsolCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove an `intsol` callback.

Parameters

  callback | The callback to be removed (previously returned by `addIntsolCallback`).

## removeLplogCallback()

void xpress::XPRSProblem::removeLplogCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `lplog` callback.

Parameters

  callback | The callback to be removed (previously returned by `addLplogCallback`).

## removeMessageCallback()

void xpress::XPRSProblem::removeMessageCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `message` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMessageCallback`).

## removeMiplogCallback()

void xpress::XPRSProblem::removeMiplogCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `miplog` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMiplogCallback`).

## removeMipThreadCallback()

void xpress::XPRSProblem::removeMipThreadCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `mipthread` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMipThreadCallback`).

## removeMipThreadDestroyCallback()

void xpress::XPRSProblem::removeMipThreadDestroyCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `mipthreaddestroy` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMipThreadDestroyCallback`).

## removeMsJobEndCallback()

void xpress::XPRSProblem::removeMsJobEndCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `msjobend` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMsJobEndCallback`).

## removeMsJobStartCallback()

void xpress::XPRSProblem::removeMsJobStartCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `msjobstart` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMsJobStartCallback`).

## removeMsWinnerCallback()

void xpress::XPRSProblem::removeMsWinnerCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `mswinner` callback.

Parameters

  callback | The callback to be removed (previously returned by `addMsWinnerCallback`).

## removeNewnodeCallback()

void xpress::XPRSProblem::removeNewnodeCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `newnode` callback.

Parameters

  callback | The callback to be removed (previously returned by `addNewnodeCallback`).

## removeNlpCoefEvalErrorCallback()

void xpress::XPRSProblem::removeNlpCoefEvalErrorCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `nlpcoefevalerror` callback.

Parameters

  callback | The callback to be removed (previously returned by `addNlpCoefEvalErrorCallback`).

## removeNodecutoffCallback()

void xpress::XPRSProblem::removeNodecutoffCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `nodecutoff` callback.

Parameters

  callback | The callback to be removed (previously returned by `addNodecutoffCallback`).

## removeNodeLPSolvedCallback()

void xpress::XPRSProblem::removeNodeLPSolvedCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `nodelpsolved` callback.

Parameters

  callback | The callback to be removed (previously returned by `addNodeLPSolvedCallback`).

## removeOptnodeCallback()

void xpress::XPRSProblem::removeOptnodeCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove an `optnode` callback.

Parameters

  callback | The callback to be removed (previously returned by `addOptnodeCallback`).

## removePreIntsolCallback()

void xpress::XPRSProblem::removePreIntsolCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `preintsol` callback.

Parameters

  callback | The callback to be removed (previously returned by `addPreIntsolCallback`).

## removePrenodeCallback()

void xpress::XPRSProblem::removePrenodeCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `prenode` callback.

Parameters

  callback | The callback to be removed (previously returned by `addPrenodeCallback`).

## removePresolveCallback()

void xpress::XPRSProblem::removePresolveCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `presolve` callback.

Parameters

  callback | The callback to be removed (previously returned by `addPresolveCallback`).

## removeSlpCascadeEndCallback()

void xpress::XPRSProblem::removeSlpCascadeEndCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpcascadeend` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpCascadeEndCallback`).

## removeSlpCascadeStartCallback()

void xpress::XPRSProblem::removeSlpCascadeStartCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpcascadestart` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpCascadeStartCallback`).

## removeSlpCascadeVarCallback()

void xpress::XPRSProblem::removeSlpCascadeVarCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpcascadevar` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpCascadeVarCallback`).

## removeSlpCascadeVarFailCallback()

void xpress::XPRSProblem::removeSlpCascadeVarFailCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpcascadevarfail` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpCascadeVarFailCallback`).

## removeSlpConstructCallback()

void xpress::XPRSProblem::removeSlpConstructCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpconstruct` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpConstructCallback`).

## removeSlpDrColCallback()

void xpress::XPRSProblem::removeSlpDrColCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpdrcol` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpDrColCallback`).

## removeSlpIntSolCallback()

void xpress::XPRSProblem::removeSlpIntSolCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpintsol` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpIntSolCallback`).

## removeSlpIterEndCallback()

void xpress::XPRSProblem::removeSlpIterEndCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpiterend` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpIterEndCallback`).

## removeSlpIterStartCallback()

void xpress::XPRSProblem::removeSlpIterStartCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpiterstart` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpIterStartCallback`).

## removeSlpIterVarCallback()

void xpress::XPRSProblem::removeSlpIterVarCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slpitervar` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpIterVarCallback`).

## removeSlpPreUpdateLinearizationCallback()

void xpress::XPRSProblem::removeSlpPreUpdateLinearizationCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove a `slppreupdatelinearization` callback.

Parameters

  callback | The callback to be removed (previously returned by `addSlpPreUpdateLinearizationCallback`).

## removeUserSolNotifyCallback()

void xpress::XPRSProblem::removeUserSolNotifyCallback | ( | CallbackHandle const & | callback | ) |
| inline

Remove an `usersolnotify` callback.

Parameters

  callback | The callback to be removed (previously returned by `addUserSolNotifyCallback`).

## repairInfeas()

auto xpress::XPRSProblem::repairInfeas | ( | char | penalty,
|  | char | phase2,
|  | char | flags,
|  | double | lepref,
|  | double | gepref,
|  | double | lbpref,
|  | double | ubpref,
|  | double | delta ) -> int
| 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 analysis of the problem; `a`: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analysis 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 adding `abs(delta)` to the first phase objective.

## repairWeightedInfeas()

auto xpress::XPRSProblem::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
| 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.

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 analysis of the problem; `a`: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analysis of the problem.
  delta | The relaxation multiplier in the second phase -1.
  flags | Specifies flags to be passed to XPRSoptimize.

## repairWeightedInfeasBounds()

auto xpress::XPRSProblem::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
| 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 analysis of the problem; `a`: if the relaxation is infeasible, generate all irreducible infeasible subsets for the analysis of the problem.
  delta | The relaxation multiplier in the second phase -1.
  flags | Specifies flags to be passed to XPRSoptimize.

## restore() [1/3]

void xpress::XPRSProblem::restore | ( |  | ) |
| inline

Restores the Optimizer's data structures from a file created by `XPRSsaveas` (`SAVE`).

Optimization may then recommence from the point at which the file was created.

## restore() [2/3]

void xpress::XPRSProblem::restore | ( | std::optional< std::string > const & | probname | ) |
| inline

Restores the Optimizer's data structures from a file created by `XPRSsaveas` (`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]

void xpress::XPRSProblem::restore | ( | std::optional< std::string > const & | probname,
|  | std::optional< std::string > const & | flags )
| inline

Restores the Optimizer's data structures from a file created by `XPRSsaveas` (`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()

void xpress::XPRSProblem::rhsSA | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | Array< double > const & | lower,
|  | Array< double > const & | upper )
| 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()

void xpress::XPRSProblem::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()

void xpress::XPRSProblem::saveAs | ( | std::optional< std::string > const & | filename | ) |
| 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

  filename | The name of the file (without .svf) to save to.

## scale()

void xpress::XPRSProblem::scale | ( | Array< int const > const & | rowscale,
|  | Array< int const > const & | colscale )
| inline

Re-scales the current matrix.

Parameters

  rowscale | Integer array of size `ROWS` containing the powers of `2` with which to scale the rows, or `null` if not required.
  colscale | Integer array of size `COLS` containing the powers of `2` with which to scale the columns, or `null` if not required.

## setDblControl()

void xpress::XPRSProblem::setDblControl | ( | int | control,
|  | double | value )
| 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()

void xpress::XPRSProblem::setDefaultControl | ( | int | control | ) |
| inline

Sets a single control to its default value.

Parameters

  control | Integer, double or string control parameter whose default value is to be set.

## setIndicator()

auto xpress::XPRSProblem::setIndicator | ( | int | rowind,
|  | int | colind,
|  | int | complement ) -> void
| inline

Add a single indicator constraint.

Examples using `setIndicator`:

- BinBurglar.cpp
- Sangraalind.cpp

Parameters

  rowind | Index of the row for the indicator.
  colind | Index of the column for the indicator.
  complement | If 1 then `rowind` becomes active if `colind` is 1. If -1 then `rowind` becomes active if `colind` is 0.

Since
  44.00

## setIndicators()

void xpress::XPRSProblem::setIndicators | ( | int | nrows,
|  | Array< int const > const & | rowind,
|  | Array< int const > const & | colind,
|  | Array< int const > const & | complement )
| 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 the `colind` array is ignored); `1`: for indicator constraints with condition "<code>bin = 1</code>"; `-1`: for indicator constraints with condition "<code>bin = 0</code>".

## setIntControl()

void xpress::XPRSProblem::setIntControl | ( | int | control,
|  | int | value )
| 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()

void xpress::XPRSProblem::setLogFile | ( | std::optional< std::string > const & | filename | ) |
| 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 to `null`, redirection of the output will stop.

## setLongControl()

void xpress::XPRSProblem::setLongControl | ( | int | control,
|  | XPRSint64 | value )
| 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()

void xpress::XPRSProblem::setMessageStatus | ( | int | msgcode,
|  | int | status )
| inline

Manages suppression of messages.

Parameters

  msgcode | The id number of the message. Refer to for a list of possible message numbers.
  status | Non-zero if the message is not suppressed; `0` otherwise.

## setObjDblControl()

void xpress::XPRSProblem::setObjDblControl | ( | int | objidx,
|  | ObjControl | control,
|  | double | value )
| inline

Sets the value of an double control parameter associated with an objective.

These control values will only be applied when solving the given objective during multi-objective optimization.

Parameters

  objidx | Index of the objective to modify.
  control | Control parameter whose value is to be modified. Can be any solver control, or 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]

auto xpress::XPRSProblem::setObjective | ( | xpress::SizedArray< int const > const & | ind,
|  | xpress::SizedArray< double const > const & | val ) -> void
| inline

Set objective to a linear function.

Any previously set objective will be cleared.

Examples using `setObjective`:

- BinBurglar.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp

Parameters

  ind | Non-zero variable indices.
  val | Non-zero variable values.

Since
  44.00

## setObjective() [2/2]

auto xpress::XPRSProblem::setObjective | ( | xpress::SizedArray< int const > const & | ind,
|  | xpress::SizedArray< double const > const & | val,
|  | xpress::ObjSense | sense ) -> void
| inline

Set objective to a linear function.

Any previously set objective will be cleared.

Examples using `setObjective`:

- BinBurglar.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp

Parameters

  ind | Non-zero variable indices.
  val | Non-zero variable values.
  sense | Objective sense.

Since
  44.00

## setObjIntControl()

void xpress::XPRSProblem::setObjIntControl | ( | int | objidx,
|  | ObjControl | control,
|  | int | value )
| inline

Sets the value of an integer control parameter associated with an objective.

These control values will only be applied when solving the given objective during multi-objective optimization.

Parameters

  objidx | Index of the objective to modify.
  control | Control parameter whose value is to be modified. Can be any solver control, or one of: `XPRS_OBJECTIVE_PRIORITY`: set the priority of the given objective.
  value | Value to which the control parameter is to be set.

## setObjLongControl()

void xpress::XPRSProblem::setObjLongControl | ( | int | objidx,
|  | ObjControl | control,
|  | XPRSint64 | value )
| inline

Sets the value of an integer control parameter associated with an objective.

These control values will only be applied when solving the given objective during multi-objective optimization.

Parameters

  objidx | Index of the objective to modify.
  control | Control parameter whose value is to be modified. Can be any solver control, or one of: `XPRS_OBJECTIVE_PRIORITY`: set the priority of the given objective.
  value | Value to which the control parameter is to be set.

## setProbName()

void xpress::XPRSProblem::setProbName | ( | std::optional< std::string > const & | probname | ) |
| inline

Sets the current problem name.

Parameters

  probname | A string of up to `MAXPROBNAMELENGTH` characters containing the problem name.

## setStrControl()

void xpress::XPRSProblem::setStrControl | ( | int | control,
|  | std::optional< std::string > const & | value )
| 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()

void xpress::XPRSProblem::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 )
| 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 the 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 arrays `type` and `value` of the formula for the coefficients. The last element 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()

void xpress::XPRSProblem::slpChgCascadeNLimit | ( | int | col,
|  | int | limit )
| 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()

void xpress::XPRSProblem::slpChgCoef | ( | int | row,
|  | int | col,
|  | double * | factor,
|  | int | parsed,
|  | Array< int const > const & | type,
|  | Array< double const > const & | value )
| 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` is `null`, 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()

void xpress::XPRSProblem::slpChgCoefStr | ( | int | row,
|  | int | col,
|  | double * | factor,
|  | std::optional< std::string > const & | formula )
| 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` is `null`, a value of 1.0 will be used.
  formula | Character string holding the formula with the tokens separated by spaces.

## slpChgDeltaType()

void xpress::XPRSProblem::slpChgDeltaType | ( | int | nvars,
|  | Array< int const > const & | varind,
|  | Array< int const > const & | deltatypes,
|  | Array< double const > const & | values )
| 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 of the delta variable: `0 (XSLP_DELTA_CONT)`: Differentiable variable, default. `1 (XSLP_DELTA_SEMICONT)`: Variable where a minimum perturbation size given in `values` may be required before a significant change in the problem is achieved. `2 (XSLP_DELTA_INTEGER)`: Variable defined over the grid size given in `values`. `3 (XSLP_DELTA_EXPLORE)`: Variable where a meaningful step size should automatically be detected, with an upper limit given in `values`.
  values | Grid or minimum step sizes for the variables.

## slpChgRowStatus()

void xpress::XPRSProblem::slpChgRowStatus | ( | int | row,
|  | int * | status )
| inline

Change the status setting of a constraint.

Parameters

  row | The index of the matrix row to be changed.
  status | Address of an

integer holding a bitmap with the new status settings. If the status is to be changed, always get the current status first (use `XSLPgetrowstatus`) and then change settings as required. The only settings likely to be changed are:

- `Bit 11`: Set if row must not have a penalty error vector. This is the equivalent of an enforced constraint (SLPDATA type EC).

## slpChgRowWt()

void xpress::XPRSProblem::slpChgRowWt | ( | int | row,
|  | double * | weight )
| 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()

void xpress::XPRSProblem::slpDelCoefs | ( | int | ncoefs,
|  | Array< int const > const & | rowind,
|  | Array< int const > const & | colind )
| 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()

auto xpress::XPRSProblem::slpEvaluateCoef | ( | int | row,
|  | int | col ) -> double
| 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()

void xpress::XPRSProblem::slpFixPenalties | ( | int * | p_status | ) |
| inline

Fixe the values of the error vectors.

Parameters

  p_status | Return status after fixing the penalty variables: 0 is successful, nonzero otherwise.

## slpGetCoefFormula()

void xpress::XPRSProblem::slpGetCoefFormula | ( | int | row,
|  | int | col,
|  | double * | p_factor,
|  | int | parsed,
|  | int | maxtypes,
|  | int * | p_ntypes,
|  | Array< int > const & | type,
|  | Array< double > const & | value )
| inline

Retrieve a single matrix coefficient as a formula split into tokens.

For a simpler version of this function see `XSLPgetformula`.

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` and `value` arrays.
  p_ntypes | Number of tokens returned in type and value.
  type | Integer array to hold the token types for the formula. May be `null` if not required.
  value | Double array of values corresponding to `type`. May be `null` if not required.

## slpGetCoefs()

void xpress::XPRSProblem::slpGetCoefs | ( | int * | p_ncoefs,
|  | Array< int > const & | rowind,
|  | Array< int > const & | colind )
| 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()

void xpress::XPRSProblem::slpGetCoefStr | ( | int | row,
|  | int | col,
|  | double * | p_factor,
|  | char * | formula,
|  | int | maxbytes,
|  | int * | p_nbytes )
| 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` if `maxbytes` 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()

auto xpress::XPRSProblem::slpGetRowStatus | ( | int | row | ) | -> int
| inline

Retrieve the status setting of a constraint.

Parameters

  row | The index of the matrix row whose data is to be obtained.

## slpGetRowWT()

auto xpress::XPRSProblem::slpGetRowWT | ( | int | row | ) | -> double
| inline

Get the initial penalty error weight for a row.

Parameters

  row | The index of the row whose weight is to be retrieved.

## slpLoadCoefs()

void xpress::XPRSProblem::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 )
| 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 arrays `type` and `coef` of the formula for the coefficients. The last element 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()

void xpress::XPRSProblem::slpSetDetRow | ( | int | nvars,
|  | Array< int const > const & | colind,
|  | Array< int const > const & | rowind )
| 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.

## slpSetInitStepBounds()

void xpress::XPRSProblem::slpSetInitStepBounds | ( | int | ncols,
|  | Array< int const > const & | colind,
|  | Array< double const > const & | initial )
| inline

Set the initial step bounds of columns.

Parameters

  ncols | Number of columns for which the initial step bound is to be set.
  colind | Array of length `ncols` with index of the column for which the initial step bound is provided.
  initial | Array of length `ncols` with the initial step bounds.

## sparseBTran()

void xpress::XPRSProblem::sparseBTran | ( | Array< double > const & | val,
|  | Array< int > const & | ind,
|  | int * | p_ncoefs )
| 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 in `val` will be returned here. This array must be allocated to hold at least `ROWS` 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()

void xpress::XPRSProblem::sparseFTran | ( | Array< double > const & | val,
|  | Array< int > const & | ind,
|  | int * | p_ncoefs )
| 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 in `val` will be returned here. This array must be allocated to hold at least `ROWS` 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]

auto xpress::XPRSProblem::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 >
| 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` and `dmtval` arrays indicating the start of each cut. This array has an entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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]

auto xpress::XPRSProblem::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 >
| 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` and `dmtval` arrays indicating the start of each cut. This array has an entry for each cut, plus one more entry indicating where an additional cut would start, if it were present.
  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()

void xpress::XPRSProblem::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 )
| 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()

void xpress::XPRSProblem::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 )
| 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 | Array of objective values of each LP after performing the strong branching iterations.
  status | Array of statuses 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 from `0` to signal an error. This will terminate the function.

## tune()

void xpress::XPRSProblem::tune | ( | std::optional< std::string > const & | flags | ) |
| 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 flag `g`); `g`: will tune the problem as a MIP (mutually exclusive with flag `l`); `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()

void xpress::XPRSProblem::tuneProbSetFile | ( | std::optional< std::string > const & | setfile,
|  | int | ifmip,
|  | int | sense )
| 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()

void xpress::XPRSProblem::tunerReadMethod | ( | std::optional< std::string > const & | methodfile | ) |
| 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()

void xpress::XPRSProblem::tunerWriteMethod | ( | std::optional< std::string > const & | methodfile | ) |
| 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"` or `"STDOUT"`, then the tuner will print the method to the console instead.

## unloadProb()

void xpress::XPRSProblem::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).

Deprecated
  Deprecated since 45.00

## writeBasis() [1/2]

void xpress::XPRSProblem::writeBasis | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writeBasis | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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]

void xpress::XPRSProblem::writeBinSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writeBinSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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()

void xpress::XPRSProblem::writeDirs | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writeIIS | ( | int | iis,
|  | std::optional< std::string > const & | filename,
|  | int | filetype )
| 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. If omitted (or `null`), the default problem_name.
  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]

void xpress::XPRSProblem::writeIIS | ( | int | iis,
|  | std::optional< std::string > const & | filename,
|  | int | filetype,
|  | std::optional< std::string > const & | flags )
| 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. If omitted (or `null`), the default problem_name.
  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]

void xpress::XPRSProblem::writeProb | ( | std::optional< std::string > const & | filename | ) |
| 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 the `l` flag is used in which case the extension is `.lp`.

## writeProb() [2/2]

void xpress::XPRSProblem::writeProb | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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 the `l` 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 or MPS format;
- `v`: use the provided filename verbatim, without appending the `.mps` or `.lp` extension;
- `z`: compress the output file.

## writePrtSol() [1/2]

void xpress::XPRSProblem::writePrtSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writePrtSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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]

void xpress::XPRSProblem::writeSlxSol | ( |  | ) |
| 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]

void xpress::XPRSProblem::writeSlxSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writeSlxSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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]

void xpress::XPRSProblem::writeSol | ( | std::optional< std::string > const & | filename | ) |
| 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]

void xpress::XPRSProblem::writeSol | ( | std::optional< std::string > const & | filename,
|  | std::optional< std::string > const & | flags )
| 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

## attributes

Attributes xpress::XPRSProblem::attributes

Attributess for this problem.

Since
  44.00

## controls

Controls xpress::XPRSProblem::controls

Controlss for this problem.

Since
  44.00

## EQ

char const xpress::XPRSProblem::EQ = 'E'
| inline static constexpr

Constraint sense for `==` constraints.

Since
  44.00

## GEQ

char const xpress::XPRSProblem::GEQ = 'G'
| inline static constexpr

Constraint sense for `>=` constraints.

Since
  44.00

## LEQ

char const xpress::XPRSProblem::LEQ = 'L'
| inline static constexpr

Constraint sense for `<=` constraints.

Since
  44.00

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

- xpress.hpp

Covered Topics

- AbstractUserFunction
- Attributes
- CannotPerformOperationException
- CannotReferenceVariablesException
- Controls
- GeneralConstraintInfo
- IISData
- IISStatusInfo
- InvalidStateException
- MapDeltaFunction
- MapFunction
- MatrixInfo
- MIPEntityInfo
- MultiMapDeltaFunction
- MultiMapFunction
- RowInfo
- Solution
- StatusSolution
- VecMapDeltaFunction
- VecMapFunction

Parent Topic xpress

© 2001-2026 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.