problem.storecuts
problem.storecuts |
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
problem.loadcuts or
problem.setbranchcuts before they become active.
Synopsis
problem.storecuts (nodupl, mtype, rtype, rhs, mstart, mindex, mcols, dmatval)
Arguments
nodupl
|
|
||||||
mtype
|
Array containing the cut types. The cut types can be any integer and are used to identify the cuts.
|
||||||
rtype
|
Character array containing the row types:
|
||||||
rhs
|
Array containing the right hand side elements for the cuts.
|
||||||
mstart
|
Array containing offsets into the
mcols and
dmtval arrays indicating the start of each cut. This array is of length
ncuts+1 where
ncuts is the length of
drhs, with the last element
mstart[ncuts] being where cut
ncuts+1 would start.
|
||||||
mindex
|
Array where the cuts will be returned.
|
||||||
mcols
|
Array containing the column indices in the cuts.
|
||||||
dmatval
|
Array containing the matrix values for the cuts.
|
Further information
1.
storecuts 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.
storecuts 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 None will be returned. The
mindex array can be passed directly to
problem.loadcuts or
problem.setbranchcuts 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
storecuts. 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
problem.loadcuts
problem.setbranchcuts, Section "Working with the cut manager" of the Xpress Optimizer reference manual.