sasoptpy.actions.diff

diff(left, right)[source]

Gets the difference between set and set expressions

Parameters
leftsasoptpy.abstract.Set

Left operand

rightsasoptpy.abstract.Set

Right operand

Examples

>>> from sasoptpy.actions import diff, put_item
>>> with so.Workspace('w') as w:
>>>     S = so.Set(name='S', value=so.exp_range(1, 20))
>>>     T = so.Set(name='T', value=so.exp_range(1, 15))
>>>     U = so.Set(name='U', value=diff(S, T))
>>>     put_item(U, names=True)
>>> print(so.to_optmodel(w))
proc optmodel;
    set S = 1..19;
    set T = 1..14;
    set U = S diff T;
    put U=;
quit;