Skip to content

Commit 4dc5f52

Browse files
authored
Change default solver to scipy (#587)
* Change default solver to scipy * Add warning if lpsolver is not specified * Fix failing test * Clearer documentation about default solver
1 parent 9c87060 commit 4dc5f52

20 files changed

Lines changed: 31 additions & 21 deletions

File tree

docs/inputs/toml.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,12 @@ Sectors contain a number of subsections:
442442
are registered via :py:func:`~muse.investments.register_investment`. At time of
443443
writing, three are available:
444444

445+
- "scipy" solver (default from v1.3): Formulates investment as a true LP problem and solves it using
446+
the `scipy solver`_.
447+
445448
- an "adhoc" solver: Simple in-house solver that ranks the technologies
446449
according to cost and service the demand incrementally.
447450

448-
- "scipy" solver: Formulates investment as a true LP problem and solves it using
449-
the `scipy solver`_.
450-
451451
- "cvxopt" solver: Formulates investment as a true LP problem and solves it
452452
using the python package `cvxopt`_. `cvxopt`_ is *not* installed by default.
453453
Users can install it with ``pip install cvxopt`` or ``conda install cvxopt``.

docs/tutorial-code/add-agent/1-single-objective/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-agent/2-multiple-objective/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-correlation-demand/1-correlation/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-new-technology/1-introduction/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-new-technology/2-scenario/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-region/1-new-region/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/add-service-demand/1-exogenous-demand/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

docs/tutorial-code/carbon-budget/1-carbon-budget/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
5454
[sectors.residential.subsectors.all]
5555
agents = '{path}/technodata/Agents.csv'
5656
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
57-
lpsolver = "scipy" # Optional, defaults to "adhoc"
57+
lpsolver = "scipy" # Optional, defaults to "scipy"
5858
constraints = [
5959
# Optional, defaults to the constraints below
6060
"max_production",

docs/tutorial-code/min-max-timeslice-constraints/1-min-constraint/settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commodities_out = '{path}/technodata/residential/CommOut.csv'
4141
[sectors.residential.subsectors.all]
4242
agents = '{path}/technodata/Agents.csv'
4343
existing_capacity = '{path}/technodata/residential/ExistingCapacity.csv'
44-
lpsolver = "scipy" # Optional, defaults to "adhoc"
44+
lpsolver = "scipy" # Optional, defaults to "scipy"
4545
constraints = [
4646
# Optional, defaults to the constraints below
4747
"max_production",

0 commit comments

Comments
 (0)