(class from pyomo.contrib.solver.common.solution_loader)
pyomo.contrib.solver.common.solution_loader
Bases: SolutionLoaderBase
SolutionLoaderBase
Loader for persistent solvers
Methods
__init__(solver)
__init__
get_duals([cons_to_load])
get_duals
Returns a dictionary mapping constraint to dual value.
get_primals([vars_to_load])
get_primals
Returns a ComponentMap mapping variable to var value.
get_reduced_costs([vars_to_load])
get_reduced_costs
Returns a ComponentMap mapping variable to reduced cost.
invalidate()
invalidate
load_vars([vars_to_load])
load_vars
Load the solution of the primal variables into the value attribute of the variables.
Member Documentation
cons_to_load (list) – A list of the constraints whose duals should be retrieved. If cons_to_load is None, then the duals for all constraints will be retrieved.
duals – Maps constraints to dual values
dict
vars_to_load (list) – A list of the variables whose solution value should be retrieved. If vars_to_load is None, then the values for all variables will be retrieved.
primals – Maps variables to solution values
ComponentMap
vars_to_load (list) – A list of the variables whose reduced cost should be retrieved. If vars_to_load is None, then the reduced costs for all variables will be loaded.
reduced_costs – Maps variables to reduced costs
vars_to_load (list) – The minimum set of variables whose solution should be loaded. If vars_to_load is None, then the solution to all primal variables will be loaded. Even if vars_to_load is specified, the values of other variables may also be loaded depending on the interface.