Workspace

Constructor

Workspace(name[, session])

Workspace represents an OPTMODEL block that allows multiple solves

Methods

Workspace.get_elements(self)

Returns a list of elements in the workspace

Workspace.set_active_model(self, model)

Marks the specified model as active; to be used in solve statements

Workspace.append(self, element)

Appends a new element (operation or statement) to the workspace

Workspace.submit(self, \*\*kwargs)

Submits the workspace as an OPTMODEL block and returns solutions

Workspace.parse_solve_responses(self)

Retrieves the solutions to all solve statements

Workspace.parse_print_responses(self)

Retrieves responses to all print statements

Workspace.get_variable(self, name)

Obtains the value of a specified variable name

Workspace.set_variable_value(self, name, value)

Specifies the value of a variable

Workspace.to_optmodel(self)

Returns equivalent OPTMODEL code of the workspace