XPRSdelcols
Purpose
Topic area
Synopsis
int XPRS_CC XPRSdelcols(XPRSprob prob, int ncols, const int colind[]);
Arguments
|
prob
|
The current problem.
|
|
ncols
|
Number of columns to delete.
|
|
colind
|
Integer array of length
ncols containing the columns to delete.
|
Example
In this example, column
3 is deleted from the matrix:
colind[0] = 3; XPRSdelcols(prob,1,colind);
Further information
1. After columns have been deleted from a problem, the numbers of the remaining columns are moved down so that the columns are always numbered from
0 to
COLS-1 where
COLS is the problem attribute containing the number of non-deleted columns in the matrix.
2. If the problem has already been optimized, or an advanced basis has been loaded, and you delete a basis column the current basis will no longer be valid - the basis is "lost".
If you go on to re-optimize the problem, a warning message is displayed ( 140) and the Optimizer automatically generates a corrected basis.
You can avoid losing the basis by only deleting non-basic columns (see XPRSgetbasis), taking a basic column out of the basis first if necessary (see XPRSgetpivots and XPRSpivot).
If you go on to re-optimize the problem, a warning message is displayed ( 140) and the Optimizer automatically generates a corrected basis.
You can avoid losing the basis by only deleting non-basic columns (see XPRSgetbasis), taking a basic column out of the basis first if necessary (see XPRSgetpivots and XPRSpivot).
3. This function cannot be called while the current problem is being solved or when it is in an interrupted state. Use XPRSpostsolve to restore the problem to a non-solving state.
4. If a deleted column is referenced by a formula then it will be replaced by the constant 0 in that formula. If the formula is a PWL formula then instead an error is raised because the input column for a PWL must be a variable and cannot be a constant zero.
5. If a deleted column is referenced by a set then it will be removed from the set. Empty sets will not be deleted by this function.
6. If a column is referenced by a piecewise linear constraint then an attempt to delete it will raise an error.
7. If a column is referenced by a general constraint then an attempt to delete it will raise an error.
Related topics
© 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.
