BranchObject
Xpress branching object. More...
Public Member Functions |
|
| void | addBounds (int branch, int nbounds, Array< char const > const &bndtype, Array< int const > const &colind, Array< double const > const &bndval) |
| Adds new bounds to a branch of a user branching object. |
|
| void | addBranches (int nbranches) |
| Adds new, empty branches to a user defined branching object. |
|
| void | addCuts (int branch, int ncuts, Array< XPRScut const > const &cutind) |
| Adds stored user cuts as new constraints to a branch of a user branching object. |
|
| void | addRows (int branch, 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 new constraints to a branch of a user branching object. |
|
| void | destroy () |
| Frees all memory for a user branching object, when the object was not stored with the Optimizer. |
|
| auto | getBounds (int branch) -> int |
| Returns the bounds for a branch of a user branching object. |
|
| void | getBounds (int branch, int *p_nbounds, int maxbounds, Array< char > const &bndtype, Array< int > const &colind, Array< double > const &bndval) |
| Returns the bounds for a branch of a user branching object. |
|
| auto | getBounds (int branch, int maxbounds, Array< char > const &bndtype, Array< int > const &colind, Array< double > const &bndval) -> int |
| Returns the bounds for a branch of a user branching object. |
|
| auto | getBranches () -> int |
| Returns the number of branches of a branching object. |
|
| auto | getID () -> int |
| Returns the unique identifier assigned to a branching object. |
|
| auto | getRows (int branch) -> int |
| Returns the constraints for a branch of a user branching object. |
|
| void | getRows (int branch, int *p_nrows, int maxrows, int *p_ncoefs, int maxcoefs, Array< char > const &rowtype, Array< double > const &rhs, Array< int > const &start, Array< int > const &colind, Array< double > const &rowcoef) |
| Returns the constraints for a branch of a user branching object. |
|
| auto | getRows (int branch, int maxrows, int *p_ncoefs, int maxcoefs, Array< char > const &rowtype, Array< double > const &rhs, Array< int > const &start, Array< int > const &colind, Array< double > const &rowcoef) -> int |
| Returns the constraints for a branch of a user branching object. |
|
| void | setPreferredBranch (int branch) |
| Specifies which of the child nodes corresponding to the branches of the object should be explored first. |
|
| void | setPriority (int priority) |
| Sets the priority value of a user branching object. |
|
| auto | store () -> int |
| Adds a new user branching object to the Optimizer's list of candidates for branching. |
|
| auto | validate () -> int |
| Verifies that a given branching object is valid for branching on the current branch-and-bound node of a MIP solve. |
|
Protected Member Functions |
|
| BranchObject (XPRSprob prob, bool isOriginal) | |
| Create a new instance. |
|
Detailed Description
Xpress branching object.
This is used in the branching callback to customize branching.
- Since
- 44.00
Constructor & Destructor Documentation
BranchObject()
|
inlineprotected |
Create a new instance.
Branch objects can only be created from XPRSProblem::newBranchObject().
- Since
- 44.00
Member Function Documentation
addBounds()
|
inline |
Adds new bounds to a branch of a user branching object.
- Parameters
-
branch The number of the branch to add the new bounds for. This branch must already have been created using XPRS_bo_addbranches. Branches are indexed starting from zero.nbounds Number of new bounds to add. bndtype Character array of length nboundsindicating the type of bounds to add:-
L: Lower bound. -
U: Upper bound.
colind Integer array of length nboundscontaining the column indices for the new bounds.bndval Double array of length nboundsgiving the bound values. -
addBranches()
|
inline |
Adds new, empty branches to a user defined branching object.
- Parameters
-
nbranches Number of new branches to create.
addCuts()
|
inline |
Adds stored user cuts as new constraints to a branch of a user branching object.
- Parameters
-
branch The number of the branch to add the cuts for. This branch must already have been created using XPRS_bo_addbranches. Branches are indexed starting from zero.ncuts Number of cuts to add. cutind Array of length ncutscontaining the pointers to user cuts that should be added to the branch.
addRows()
|
inline |
Adds new constraints to a branch of a user branching object.
- Parameters
-
branch The number of the branch to add the new constraints for. This branch must already have been created using XPRS_bo_addbranches. Branches are indexed starting from zero.nrows Number of new constraints to add. ncoefs Number of non-zero coefficients in all new constraints. rowtype Character array of length nrowsindicating the type of constraints to add:-
L: Less than type. -
G: Greater than type. -
E: Equality type.
rhs Double array of length nrowscontaining the right hand side values.start Integer array of length nrowscontaining the offsets of thecolindandrowcoefarrays of the start of the non zero coefficients in the new constraints.colind Integer array of length ncoefscontaining the column indices for the non zero coefficients.rowcoef Double array of length ncoefscontaining the non zero coefficient values. -
getBounds() [1/3]
|
inline |
Returns the bounds for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the bounds for.
getBounds() [2/3]
|
inline |
Returns the bounds for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the bounds for. p_nbounds Location where the number of bounds for the given branch should be returned. maxbounds Maximum number of bounds to return. bndtype Character array of length maxboundswhere the types of bounds will be returned:-
L: Lower bound. -
U: Upper bound.
nullif not required.colind Integer array of length maxboundswhere the column indices will be returned. May benullif not required.bndval Double array of length maxboundswhere the bound values will be returned. May benullif not required. -
getBounds() [3/3]
|
inline |
Returns the bounds for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the bounds for. maxbounds Maximum number of bounds to return. bndtype Character array of length maxboundswhere the types of bounds will be returned:-
L: Lower bound. -
U: Upper bound.
nullif not required.colind Integer array of length maxboundswhere the column indices will be returned. May benullif not required.bndval Double array of length maxboundswhere the bound values will be returned. May benullif not required. -
getRows() [1/3]
|
inline |
Returns the constraints for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the constraints from.
getRows() [2/3]
|
inline |
Returns the constraints for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the constraints from. p_nrows Memory location where the number of rows should be returned. maxrows Maximum number of rows to return. p_ncoefs Memory location where the number of non zero coefficients in the constraints should be returned. maxcoefs Maximum number of non zero coefficients to return. rowtype Character array of length maxrowswhere the types of the rows will be returned (may benull):-
L: Less than type. -
G: Greater than type. -
E: Equality type.
rhs Double array of length maxrowswhere the right hand side values will be returned. May benullif not required.start Integer array of length maxrowswhich will be filled with the offsets of thecolindandrowcoefarrays of the start of the non zero coefficients in the returned constraints. May benullif not required.colind Integer array of length maxcoefswhich will be filled with the column indices for the non zero coefficients. May benullif not required.rowcoef Double array of length maxcoefswhich will be filled with the non zero coefficient values. May benullif not required. -
getRows() [3/3]
|
inline |
Returns the constraints for a branch of a user branching object.
- Parameters
-
branch The number of the branch to get the constraints from. maxrows Maximum number of rows to return. p_ncoefs Memory location where the number of non zero coefficients in the constraints should be returned. maxcoefs Maximum number of non zero coefficients to return. rowtype Character array of length maxrowswhere the types of the rows will be returned (may benull):-
L: Less than type. -
G: Greater than type. -
E: Equality type.
rhs Double array of length maxrowswhere the right hand side values will be returned. May benullif not required.start Integer array of length maxrowswhich will be filled with the offsets of thecolindandrowcoefarrays of the start of the non zero coefficients in the returned constraints. May benullif not required.colind Integer array of length maxcoefswhich will be filled with the column indices for the non zero coefficients. May benullif not required.rowcoef Double array of length maxcoefswhich will be filled with the non zero coefficient values. May benullif not required. -
setPreferredBranch()
|
inline |
Specifies which of the child nodes corresponding to the branches of the object should be explored first.
- Parameters
-
branch The number of the branch to mark as preferred.
setPriority()
|
inline |
Sets the priority value of a user branching object.
- Parameters
-
priority The new priority value to assign to the branching object, which must be a number from 0 to 1000. User branching objects are created with a default priority value of 500.
store()
|
inline |
Adds a new user branching object to the Optimizer's list of candidates for branching.
This function is available only through the callback functions set by XPRSaddcboptnode or XPRSaddcbpreintsol (if the soltype is 0).
validate()
|
inline |
Verifies that a given branching object is valid for branching on the current branch-and-bound node of a MIP solve.
The function will check that all branches are non-empty, and if required, verify that the branching object can be presolved.
The documentation for this class was generated from the following file:
- xpress.hpp
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
