XPRSstorecuts, XPRSstorecuts64
XPRSstorecuts, XPRSstorecuts64 |
Purpose
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 or
XPRSsetbranchcuts before they become active.
Synopsis
int XPRS_CC XPRSstorecuts(XPRSprob prob, int ncuts, int nodupl, const int mtype[], const char qrtype[], const double drhs[], const int mstart[], XPRScut mindex[], const int mcols[], const double dmatval[]);
int XPRS_CC XPRSstorecuts64(XPRSprob prob, int ncuts, int nodupl, const int mtype[], const char qrtype[], const double drhs[], const XPRSint64 mstart[], XPRScut mindex[], const int mcols[], const double dmatval[]);
Arguments
prob
|
The current problem.
|
||||||
ncuts
|
Number of cuts to add.
|
||||||
nodupl
|
|
||||||
mtype
|
Integer array of length
ncuts containing the cut types. The cut types can be any integer and are used to identify the cuts.
|
||||||
qrtype
|
Character array of length
ncuts containing the row types:
|
||||||
drhs
|
Double array of length
ncuts containing the right hand side elements for the cuts.
|
||||||
mstart
|
Integer array containing offsets into the
mcols and
dmtval arrays indicating the start of each cut. This array is of length
ncuts+1 with the last element
mstart[ncuts] being where cut
ncuts+1 would start.
|
||||||
mindex
|
Array of length
ncuts where the pointers to the cuts will be returned.
|
||||||
mcols
|
Integer array of length
mstart[ncuts] containing the column indices in the cuts.
|
||||||
dmatval
|
Double array of length
mstart[ncuts] containing the matrix values for the cuts.
|
Related controls
Double
Tolerance on matrix elements.
|
Further information
1.
XPRSstorecuts can be used to eliminate duplicate cuts. If the
nodupl parameter is set to
1, the cut pool will be checked for duplicate cuts with a cut type identical to the cuts being added. If a duplicate cut is found the new cut will only be added if its right hand side value makes the cut stronger. If the cut in the pool is weaker than the added cut it will be removed unless it has been applied to an active node of the tree. If
nodupl is set to
2 the same test is carried out on all cuts, ignoring the cut type.
2.
XPRSstorecuts returns a list of the cuts added to the cut pool in the
mindex array. If the cut is not added to the cut pool because a stronger cut exits a NULL will be returned. The
mindex array can be passed directly to
XPRSloadcuts or
XPRSsetbranchcuts to load the most recently stored cuts into the matrix.
3. The columns and elements of the cuts must be stored contiguously in the
mcols and
dmtval arrays passed to
XPRSstorecuts. The starting point of each cut must be stored in the
mstart array. To determine the length of the final cut the
mstart array must be of length
ncuts+1 with the last element of this array containing where the cut
ncuts+1 would start.
Related topics