You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We lack an elegant way to pass configured solvers as config arguments, as is pointed out in #3220.
Rationale
Many transformations rely on the user being able to pass a configured solver as an argument so that that configuration will persist wherever it is used in the transformation (or meta algorithm). Right now we often do that by passing a solver instance, but this is suboptimal since those solver instances will be created on import. (Alternatively, some parts of code take the solver name as the argument and pass an options dictionary separately, but this is rather clunky and difficult to validate.)
CONFIG.declare(
'solver',
ConfigValue(
domain=SolverFactory,
default='gurobi',
description="A solver to use to solve the continuous subproblems for ""calculating the M values",
),
)
and don't process the default value until the first time it is needed.
The text was updated successfully, but these errors were encountered:
Summary
We lack an elegant way to pass configured solvers as config arguments, as is pointed out in #3220.
Rationale
Many transformations rely on the user being able to pass a configured solver as an argument so that that configuration will persist wherever it is used in the transformation (or meta algorithm). Right now we often do that by passing a solver instance, but this is suboptimal since those solver instances will be created on import. (Alternatively, some parts of code take the solver name as the argument and pass an options dictionary separately, but this is rather clunky and difficult to validate.)
Description
As suggested by @jsiirola, allow this syntax:
and don't process the default value until the first time it is needed.
The text was updated successfully, but these errors were encountered: