xpress.vars
xpress.vars |
x = xpress.vars(*indices, name="x", lb=0, ub=xpress.infinity, threshold=0, vartype=xpress.continuous)
indices
|
One or more lists, sets, ranges, or iterable objects to be combined; in alternative, one can specify one or more numbers
k to signify the range
0..k-1. Using only numbers as argument will yield a NumPy multiarray with the dimensions as specified by the arguments themselves.
|
name
|
Prefix name for each variable, to be amended with the tuple of indices.
|
lb
|
Lower bound for all variables in the map.
|
ub
|
Upper bound for all variables in the map.
|
threshold
|
Threshold for all variables in the map; only used if the variables are partially integer.
|
vartype
|
Type of all variables in the map, similar to the definition of single variables.
|
x = xpress.vars([0,1],['a','b','c'])
x = xpress.vars(2,3)
x = xpress.vars(['a','b','c','d','e'], name='y', vartype=xpress.integer) con1 = xpress.Sum(x) <= 4
x = xpress.vars(range(5), name='y', vartype=xpress.integer) con1 = xpress.Sum(x) <= 4
x = xpress.vars(3,7,4, name="", lb=-1, ub=1)
S = set() S.add('john') S.add('cleese') x = xpress.vars(S, name='y', vartype=xpress.integer)
© 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.