sasoptpy.actions.print_item

print_item(*args)[source]

Prints the specified argument list on server

Parameters
argssasoptpy.Variable, sasoptpy.Expression

Arbitrary number of arguments to be printed

These values are printed on the server, but can be retrieved after execution

Returns
pssasoptpy.abstract.statement.PrintStatement

Print statement object.

Contents of the response can be retrieved using get_response function.

Examples

>>> with so.Workspace('w') as w:
>>>     x = so.Variable(name='x', lb=1, ub=10)
>>>     o = so.Objective(2*x, sense=so.maximize, name='obj')
>>>     s = solve()
>>>     p = print_item(x)
>>> print(so.to_optmodel(w))
proc optmodel;
    var x >= 1 <= 10;
    max obj = 2 * x;
    solve;
    print x;
quit;
>>> print(p.get_response())
      x
0  10.0