XVitem


Purpose
Set the values for an xvitem object
Synopsis
function XVitem([Name:mpvar|XV], [sName:string],
 [Value:real|linctr|mpvar|gexp|XV]) :xvitem

Arguments
Name 
an object of type mpvar or XV. An mpvar is used when the item takes the value of the variable. An XV is used to include all the defined elements of the XV at this point in the array. Name must be omitted when the item is a constant or more complex expression
sName 
character string containing the name of the item as known to the function. This is required only when the xvitem is part of an XV which is an argument to a function, and the function receives its arguments by name rather than by position.
Value 
real constant, mpvar, linear expression, general expression or an XV. These can be used when the xvitem is not simply an mpvar. Using an XV or mpvar as the third argument is equivalent to using it as the first argument. Value must be omitted if Name is used.
Return value
xvitem data of the appropriate form.
Example
The following code fragment sets 3 elements of the XV XX and the first element of the XV XY.
declarations
 XX, XY:array(1..3) of xvitem
 C, I: mpvar
end-declarations
XX(1) := XVitem(C, "Capital")
XX(2) := XVitem("Rate", I+2)
XX(3) := XVitem("Term",3.5)
XY(1) := XVitem(XX)
Further information

Name and Value are mutually exclusive. Exactly one of these must appear as an argument.

All elements of an XV must be initialized either by using the function XVitem or by direct assignment of another xvitem.




If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.