Skip to content

Commit

Permalink
refactor: move solver choices to central place, enable hybrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter committed Nov 19, 2023
1 parent 5b7dd5e commit 792eb41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/memote/suite/cli/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@


LOGGER = logging.getLogger(__name__)
DEFAULT_SOLVERS = ("glpk", "cplex", "gurobi", "glpk_exact", "hybrid")


def validate_collect(context, param, value):
Expand Down
4 changes: 2 additions & 2 deletions src/memote/suite/cli/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def report():
)
@click.option(
"--solver",
type=click.Choice(["cplex", "glpk", "gurobi", "glpk_exact"]),
type=click.Choice(callbacks.DEFAULT_SOLVERS),
default="glpk",
show_default=True,
help="Set the solver to be used.",
Expand Down Expand Up @@ -306,7 +306,7 @@ def _test_diff(
)
@click.option(
"--solver",
type=click.Choice(["cplex", "glpk", "gurobi"]),
type=click.Choice(callbacks.DEFAULT_SOLVERS),
default="glpk",
show_default=True,
help="Set the solver to be used.",
Expand Down
4 changes: 2 additions & 2 deletions src/memote/suite/cli/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def cli():
)
@click.option(
"--solver",
type=click.Choice(["cplex", "glpk", "gurobi", "glpk_exact"]),
type=click.Choice(callbacks.DEFAULT_SOLVERS),
default="glpk",
show_default=True,
help="Set the solver to be used.",
Expand Down Expand Up @@ -393,7 +393,7 @@ def _test_history(
)
@click.option(
"--solver",
type=click.Choice(["cplex", "glpk", "gurobi"]),
type=click.Choice(callbacks.DEFAULT_SOLVERS),
default="glpk",
show_default=True,
help="Set the solver to be used.",
Expand Down

0 comments on commit 792eb41

Please sign in to comment.