Initializing help system before first use

XPRSdelcols

XPRSdelcols


Purpose
Delete columns from a matrix.
Synopsis
int XPRS_CC XPRSdelcols(XPRSprob prob, int ncols, const int mindex[]);
Arguments
prob 
The current problem.
ncols 
Number of columns to delete.
mindex 
Integer array of length ncols containing the columns to delete.
Example
In this example, column 3 is deleted from the matrix:
mindex[0] = 3;
XPRSdelcols(prob,1,mindex);
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).
Related topics