(function from pyomo.contrib.alternative_solutions.solnpool)
pyomo.contrib.alternative_solutions.solnpool
Finds alternative optimal solutions for discrete variables using Gurobi’s built-in Solution Pool capability.
This method defaults to the optimality-enforced discovery method with PoolSearchMode = 2. There are two other options, standard single optimal solution (PoolSearchMode = 0) and best-effort discovery with no guarantees (PoolSearchMode = 1). Please consult the Gurobi documentation on PoolSearchMode for details on impact on Gurobi results. Changes to this mode can be made by included PoolSearchMode set to the intended value in solver_options.
model (ConcreteModel) – A concrete Pyomo model.
num_solutions (int) – The maximum number of solutions to generate. This parameter maps to the PoolSolutions parameter in Gurobi.
rel_opt_gap (non-negative float or None) – The relative optimality gap for allowable alternative solutions. None implies that there is no limit on the relative optimality gap (i.e. that any feasible solution can be considered by Gurobi). This parameter maps to the PoolGap parameter in Gurobi.
abs_opt_gap (non-negative float or None) – The absolute optimality gap for allowable alternative solutions. None implies that there is no limit on the absolute optimality gap (i.e. that any feasible solution can be considered by Gurobi). This parameter maps to the PoolGapAbs parameter in Gurobi.
solver_options (dict) – Solver option-value pairs to be passed to the Gurobi solver.
tee (boolean) – Boolean indicating that the solver output should be displayed.
A list of Solution objects. [Solution]
solutions