XPRBnewarrvar
Purpose
Synopsis
XPRBarrvar XPRBnewarrvar(XPRBprob prob, int nbvar, int type, const char *name, double bdl, double bdu);
Arguments
|
prob
|
Reference to a problem.
|
||||||||||||
|
nbvar
|
Size of the array of variables.
|
||||||||||||
|
type
|
Type of the variables, which may be one of:
|
||||||||||||
|
name
|
The array name. May be
NULL if not required.
|
||||||||||||
|
bdl
|
Variable lower bound.
|
||||||||||||
|
bdu
|
Variable upper bound.
|
Return value
Reference to the new array of variables if function executed successfully,
NULL otherwise.
Example
The following defines an array of ten continuous variables between
0 and
500, with names beginning
arry1 followed by a counter.
XPRBprob prob; XPRBarrvar ty1; ... ty1 = XPRBnewarrvar(prob, 10, XPRB_PL, "arry1", 0, 500);
Further information
1. This function creates a single-indexed array of variables. Individual bounds on variables may be changed afterwards using XPRBsetlb and
XPRBsetub, and variable types by using
XPRBsetvartype. The function returns the BCL reference to the array of variables. If name is defined, BCL generates names for the variables in the array by adding an index to the string. If no array name is given, BCL generates a default name starting with AV. (The generation of unique names will only take place if the names dictionary is enabled, see
XPRBsetdictionarysize.)
2. Either of the bounds
XPRB_INFINITY or
-XPRB_INFINITY for plus or minus infinity may be used for the arguments
bdu and
bdl.
Related topics
© 2001-2021 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.
