ModelSolutions

(class from pyomo.core.base.PyomoModel)

class pyomo.core.base.PyomoModel.ModelSolutions(instance)[source]

Bases: object

__init__(instance)[source]

Methods

__init__(instance)

add_solution(solution, smap_id[, ...])

add_symbol_map(symbol_map)

clear([clear_symbol_maps])

delete_symbol_map(smap_id)

load_from(results[, ...])

Load solver results

select([index, ...])

Select a solution from the model's solutions.

store_to(results[, cuid, skip_stale_vars])

Return a Solution() object that is populated with the values in the model.

Member Documentation

load_from(results, allow_consistent_values_for_fixed_vars=False, comparison_tolerance_for_fixed_vars=1e-05, ignore_invalid_labels=False, id=None, delete_symbol_map=True, clear=True, default_variable_value=None, select=0, ignore_fixed_vars=True)[source]

Load solver results

select(index=0, allow_consistent_values_for_fixed_vars=False, comparison_tolerance_for_fixed_vars=1e-05, ignore_invalid_labels=False, ignore_fixed_vars=True)[source]

Select a solution from the model’s solutions.

allow_consistent_values_for_fixed_vars: a flag that indicates whether a solution can specify consistent values for variables in the model that are fixed.

ignore_invalid_labels: a flag that indicates whether labels in the solution that don’t appear in the model yield an error. This allows for loading a results object generated from one model into another related, but not identical, model.

store_to(results, cuid=False, skip_stale_vars=False)[source]

Return a Solution() object that is populated with the values in the model.