Initializing help system before first use

XPRSaddrows, XPRSaddrows64

XPRSaddrows, XPRSaddrows64


Purpose
Allows rows to be added to the matrix after passing it to the Optimizer using the input routines.
Synopsis
int XPRS_CC XPRSaddrows(XPRSprob prob, int newrow, int newnz, const char qrtype[], const double rhs[], const double range[], const int mstart[], const int mclind[], const double dmatval[]);

int XPRS_CC XPRSaddrows64(XPRSprob prob, int newrow, XPRSint64 newnz, const char qrtype[], const double rhs[], const double range[], const XPRSint64 mstart[], const int mclind[], const double dmatval[]);
Arguments
prob 
The current problem.
newrow 
Number of new rows.
newnz 
Number of new nonzeros in the added rows.
qrtype 
Character array of length newrow containing the row types:
indicates a ≤ row;
indicates ≥ row;
indicates an = row.
indicates a range constraint;
indicates a nonbinding constraint.
rhs 
Double array of length newrow containing the right hand side elements.
range 
Double array of length newrow containing the row range elements. This may be NULL if there are no ranged constraints. The values in the range array will only be read for R type rows. The entries for other type rows will be ignored.
mstart 
Integer array of length newrow containing the offsets in the mclind and dmatval arrays of the start of the elements for each row.
mclind 
Integer array of length newnz containing the (contiguous) column indices for the elements in each row.
dmatval 
Double array of length newnz containing the (contiguous) element values.
Related controls
Integer
Number of extra matrix elements to be allowed for.
Number of extra rows to be allowed for.

Double
Tolerance on matrix elements.

Example
Suppose the current problem is:

maximize: 2x + y + 3z
subject to: x + 4y + 2z 24
y + z 5
3x + y 20
x + y + 3z 9

Then the following adds the row 8x + 9y + 10z ≤ 25 to the problem and names it NewRow:
qrtype[0] = 'L';
rhs[0] = 25.0;
mstart[] = {0};
mclind[] = {0, 1, 2};
dmatval[] = {8.0, 9.0, 10.0};
...
XPRSaddrows(prob,1,3,qrtype,rhs,NULL,mstart,mclind, dmatval);
XPRSaddnames(prob,1,"NewRow",4,4);
Further information
Range rows are automatically converted to type L, with an upper bound in the slack. This must be taken into consideration, when retrieving row type, right–hand side values or range information for rows.
Related topics

© 2001-2020 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.