problem.addrows
problem.addrows(rowtype, rhs, start, colind, rowcoef, range=None, names=None, unlinked=False)
rowtype
|
Character array containing the row types:
|
||||||||||
rhs
|
Array containing the right hand side elements.
|
||||||||||
start
|
Array containing the offsets in the
colind and
rowcoef arrays of the start of the elements for each row. The array must contain one more element than the number of rows to add, with the last element being the total number of coefficients across all rows.
|
||||||||||
colind
|
Array containing the (contiguous) columns (i.e.
xpress.varobjects, indices, or names) for the elements in each row.
|
||||||||||
rowcoef
|
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.
|
||||||||||
unlinked
|
(optional) If
True, unlinked constraints will be created (deprecated).
|
maximize: | 2x + y + 3z | ||
subject to: | x + 4y + 2z | ≤ | 24 |
y + z | ≤ | 5 | |
3x + y | ≤ | 20 | |
x + y + 3z | ≤ | 9 |
p = xpress.problem() p.addrows(['L'], [25], [0,3], [0,1,2], rowcoef=[8, 9, 10], range=None, names=['NewRow'])
© 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.