The OPTMODEL Procedure |
A tuple expression represents the value of a member in a set of tuples. Each scalar subexpression inside the angle brackets represents the value of a tuple element. This form is used only with IN, SETOF, and set constructor expressions.
The following code demonstrates the tuple expression:
proc optmodel; put (<1,2,3> in setof{i in 1..2}<i,i+1,i+2>); put ({<1,'a'>, <2,'b'>} cross {<3,'c'>, <4,'d'>});
The first PUT statement checks whether the tuple <1, 2, 3> is a member of a set of tuples. The second PUT statement outputs the cross product of two sets of tuples constructed by the set constructor.
This code produces the output in Output 6.34.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.