SASAbc
(class from pyomo.solvers.plugins.solvers.SAS)
- class pyomo.solvers.plugins.solvers.SAS.SASAbc(**kwds)[source]
-
Abstract base class for the SAS solver interfaces. Simply to avoid code duplication.
Methods
__init__(**kwds)Initialize the SAS solver interfaces.
available([exception_flag])True if the solver is available
config_block([init])default_variable_value()has_capability(cap)Returns a boolean value representing whether a solver supports a specific feature.
True if the solver is present and has a valid license (if applicable)
Returns the current problem format.
reset()Reset the state of the solver
Returns the current results format.
set_callback(name[, callback_fn])Set the callback function for a named callback.
set_options(istr)set_problem_format(format)Set the current problem format (if it's valid) and update the results format to something valid for this problem format.
set_results_format(format)Set the current results format (if it's valid for the current problem format).
solve(*args, **kwds)Solve the problem
version()Returns a 4-tuple describing the solver executable version.
True if the solver interface supports MILP warmstarting.
Attributes
keepfileslog_filesoln_filesuffixessymbolic_solver_labelsteewarm_start_file_namewarm_start_solveMember Documentation
- has_capability(cap)
Returns a boolean value representing whether a solver supports a specific feature. Defaults to ‘False’ if the solver is unaware of an option. Expects a string.
Example: # prints True if solver supports sos1 constraints, and False otherwise print(solver.has_capability(‘sos1’)
# prints True is solver supports ‘feature’, and False otherwise print(solver.has_capability(‘feature’)
- license_is_valid()
True if the solver is present and has a valid license (if applicable)
- problem_format()
Returns the current problem format.
- reset()
Reset the state of the solver
- results_format()
Returns the current results format.
- set_callback(name, callback_fn=None)
Set the callback function for a named callback.
A call-back function has the form:
- def fn(solver, model):
pass
where ‘solver’ is the native solver interface object and ‘model’ is a Pyomo model instance object.
- set_problem_format(format)
Set the current problem format (if it’s valid) and update the results format to something valid for this problem format.
- set_results_format(format)
Set the current results format (if it’s valid for the current problem format).
- solve(*args, **kwds)
Solve the problem
- version()
Returns a 4-tuple describing the solver executable version.