The OPTMODEL Procedure

AND Aggregation Expression

AND{ index-set } logic-expression

The AND aggregation operator evaluates the logical expression logic-expression jointly for each member of the index set index-set. The index set enumeration finishes early if the logic-expression evaluation produces a false value (zero or missing). The expression returns 0 if a false value is found or returns 1 otherwise. The following code demonstrates both a true and a false result:

  
    proc optmodel; 
       put (and{i in 1..5} i < 10); /* returns 1 */ 
       put (and{i in 1..5} i NE 3); /* returns 0 */
 


Previous Page | Next Page | Top of Page