Initializing help system before first use

problem.addrows

problem.addrows


Purpose
Adds rows and their coefficient to the problem.
Synopsis
problem.addrows(qrtype, rhs, mstart, mclind, dmatval, range=None, names=None)
Arguments
qrtype 
Character array containing the row types:
indicates a ≤ row;
indicates ≥ row;
indicates an = row.
indicates a range constraint;
indicates a nonbinding constraint.
rhs 
Array containing the right hand side elements.
mstart 
Array containing the offsets in the mclind and dmatval arrays of the start of the elements for each row.
mclind 
Array containing the (contiguous) columns (i.e. xpress.varobjects, indices, or names) for the elements in each row.
dmatval 
Array containing the (contiguous) element coefficients.
range 
(optional) Array containing the row range elements. The values in the range array will only be read for 'R' type rows. The entries for other type rows will be ignored.
names 
(optional) Array of names to be assigned to each new row.
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:
p = xpress.problem()
p.addrows(['L'], [25], [0,3], [0,1,2],
           dmatval=[8, 9, 10], range=None, names=['NewRow'])
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-2019 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.