enumerate_linear_solutions_soln_pool

(function from pyomo.contrib.alternative_solutions.lp_enum_solnpool)

pyomo.contrib.alternative_solutions.lp_enum_solnpool.enumerate_linear_solutions_soln_pool(model, num_solutions=10, rel_opt_gap=None, abs_opt_gap=None, zero_threshold=1e-05, solver_options={}, tee=False)[source]

Finds alternative optimal solutions for a (mixed-binary) linear program using Gurobi’s solution pool feature.

Parameters:
  • model (ConcreteModel) – A concrete Pyomo model

  • num_solutions (int) – The maximum number of solutions to generate.

  • variables (None or a collection of Pyomo _GeneralVarData variables) – The variables for which bounds will be generated. None indicates that all variables will be included. Alternatively, a collection of _GeneralVarData variables can be provided.

  • rel_opt_gap (float or None) – The relative optimality gap for the original objective for which variable bounds will be found. None indicates that a relative gap constraint will not be added to the model.

  • abs_opt_gap (float or None) – The absolute optimality gap for the original objective for which variable bounds will be found. None indicates that an absolute gap constraint will not be added to the model.

  • zero_threshold (float) – The threshold for which a continuous variables’ value is considered to be equal to zero.

  • solver_options (dict) – Solver option-value pairs to be passed to the solver.

  • tee (boolean) – Boolean indicating that the solver output should be displayed.

Returns:

A list of Solution objects. [Solution]

Return type:

solutions