| The OPTMODEL Procedure |
The DROP statement causes the solver to ignore the specified constraint, constraint array, or constraint array location. The identifier-expression specifies the dropped constraint. An entire constraint array is dropped if the identifier-expression omits the index for an array name.
The following example code uses the DROP statement:
proc optmodel;
var x{1..10};
con c1: x[1] + x[2] <= 3;
con disp{i in 1..9}: x[i+1] >= x[i] + 0.1;
. . .
drop c1; /* drops the c1 constraint */
drop disp[5]; /* drops just disp[5] */
drop disp; /* drops all disp constraints */
The constraint can be added back to the model with the RESTORE statement.
Multiple names can be specified in a single DROP statement. For example, the following line drops both the c1 and disp[5] constraints:
drop c1 disp[5];
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.