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
Copy file name to clipboardExpand all lines: docs/advanced-guide/extending-muse.ipynb
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@
169
169
"cell_type": "markdown",
170
170
"metadata": {},
171
171
"source": [
172
-
"Next, we first copy the default model provided with muse to a local subfolder called \"model\". Then we read the `settings.toml` file and modify it using python. You may prefer to modify the `settings.toml` file using your favorite text editor. However, modifying the file programmatically allows us to\n",
172
+
"Next, we first copy the `default_retro` model provided with muse to a local subfolder called \"model\". Then we read the `settings.toml` file and modify it using python. You may prefer to modify the `settings.toml` file using your favorite text editor. However, modifying the file programmatically allows us to\n",
173
173
"routinely run this notebook as part of MUSE's test suite and check that the tutorial it is still up\n",
represents the period of the simulation to which the value applies; it needs to
28
28
contain at least the base year of the simulation
29
29
30
-
Level
31
-
characterises either a fixed or a flexible input type
32
-
33
30
cap_par, cap_exp
34
31
are used in the capital cost estimation. Capital costs are calculated as:
35
32
@@ -115,7 +112,10 @@ TechnicalLife
115
112
represents the number of years that a technology operates before it is decommissioned.
116
113
117
114
UtilizationFactor
118
-
represents the maximum actual output of the technology in a year, divided by the theoretical maximum output if the technology were operating at full capacity for the whole year. Must be between 0 and 1.
115
+
represents the *maximum* actual output of the technology in a year, divided by the theoretical maximum output if the technology were operating at full capacity for the whole year. Must be between 0 and 1.
116
+
117
+
MinimumServiceFactor
118
+
Is the *minimum* output of the technology in a year, divided by the theoretical maximum output if the technology were operating at full capacity for the whole year. Must be between 0 and 1 and be smaller or equal than the `UtilizationFactor`. It is used to define the minimum service level that a technology must provide due to, typically, technical or efficiency constraints.
119
119
120
120
ScalingSize
121
121
represents the reference capacity at which capital costs are estimated when used as agents' objective as described in :ref:`inputs-agents`.
Copy file name to clipboardExpand all lines: docs/inputs/toml.rst
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ a whole.
70
70
whether equilibrium of `demand` or `prices` should be sought. Defaults to `demand`.
71
71
72
72
*maximum_iterations*
73
-
Maximum number of iterations when searching for equilibrium. Defaults to 3.
73
+
Maximum number of iterations when searching for equilibrium. Defaults to 100.
74
74
75
75
*tolerance*
76
76
Tolerance criteria when checking for equilibrium. Defaults to 0.1. 0.1 signifies that 10% of a deviation is allowed among the iterative value of either demand or price over a year per region.
@@ -544,6 +544,10 @@ to define the timeslice simply by referring to the slices it will use at each le
544
544
how much the capacity can grow during each investment event.
545
545
- :py:func:`~muse.constraints.search_space`: a binary (on-off) constraint
546
546
specifying which technologies are considered for investment.
547
+
- :py:func:`~muse.constraints.minimum_service`: a lower constraint for
548
+
production for those technologies that need to keep a minimum production.
549
+
- :py:func:`~muse.constraints.demand_limiting_capacity`: limits the combined
550
+
capacity to be installed to the demand of the peak timeslice.
547
551
548
552
549
553
*output*
@@ -668,15 +672,15 @@ The following attributes are accepted:
668
672
The CSV format should follow the following format:
Copy file name to clipboardExpand all lines: docs/installation/pipx-based.rst
+53-24Lines changed: 53 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ In the following sections, we will guide you step by step in configuring your sy
17
17
The next sections will explain in detail the appropriate steps as well as commenting on possible caveats. **We strongly encourage you to read through the sections below** to understand what these steps entitle, but in the end, what we are going to do to install MUSE is the following:
18
18
19
19
- Open a terminal
20
-
- Install `pyenv <https://github.com/pyenv/pyenv>`_ (Linux and MacOS) or `pyenv-win <https://pyenv-win.github.io/pyenv-win/>`_ (Windows) and make sure it works.
20
+
- Install `pyenv <https://github.com/pyenv/pyenv>`_ (Linux and MacOS) or `pyenv-win <https://pyenv-win.github.io/pyenv-win/>`_ (Windows) and make sure it works by invoking `pyenv --version` in the terminal.
21
21
- Run the following commands in the terminal:
22
22
23
23
.. code-block::
@@ -28,14 +28,14 @@ In the following sections, we will guide you step by step in configuring your sy
28
28
python -m pipx ensurepath
29
29
python -m pipx install muse-os
30
30
31
-
- After this, MUSE will be available to use system wide simply by invoking ``muse`` in the terminal, for example ``muse --model default``.
31
+
- After this, MUSE will be available to use system wide simply by invoking muse in the terminal. To illustrate this and to test your installation, run muse --model default. You should then see a a list of outputs printed to the terminal showing the computations going on in the background.
32
32
33
33
.. _launch-terminal:
34
34
35
35
Launching a terminal
36
36
~~~~~~~~~~~~~~~~~~~~
37
37
38
-
All operating systems have a Terminal application that let you run commands. You will need to use it extensively when using MUSE, so we strongly suggest you get familiar with it. For now, let's just figure out how to launch it:
38
+
All operating systems have a Terminal application that let you run commands. You will need to use it extensively when using MUSE, so we strongly suggest you get familiar with it. For now, let's just figure out how to launch one:
39
39
40
40
- **Linux**: Depending on the distribution, you might have a shortcut in your tasks bar already or it should be easily found in the menu. Look for ``Console`` or ``Terminal`` to lunch the application.
41
41
- **MacOS**: Press ``Super key + Space`` to open the search box. There, type ``Terminal`` and press ``Enter``.
@@ -107,13 +107,43 @@ Installing ``pyenv``
107
107
108
108
To install ``pyenv``, follow these steps:
109
109
110
-
- **Linux**: In this case, you will need to clone the GitHub repository using ``git``. Most Linux distributions come with ``git`` installed, so this should work out of the box:
110
+
- **Linux**: In this case, you will need to clone the GitHub repository using ``git``. Most Linux distributions come with ``git`` installed, so this should work out of the box.
111
+
Then, complete the setup by adding ``pyenv`` to your profile, so the executable can be found. You can `check the instructions in the official webpage <https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv>`_,
112
+
or follow the below commands that were tested on `Ubuntu 22.04 LTS` using its popular `bash shell` and `z-shell`. To be specific, we tested them
113
+
on `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)` and `zsh 5.8.1 (x86_64-ubuntu-linux-gnu)`.
111
114
112
-
.. code-block:: bash
115
+
Now, we go through the installation procedure of ``pyenv`` on Linux, step-by-step:
# Step 4: Confirm successful installation of `pyenv` upon invoking the following command in the terminal. You should be returned something similar to `pyenv 2.4.1-10-g2e0bb023`
145
+
pyenv --version
115
146
116
-
Then, complete the setup by adding ``pyenv`` to your profile, so the executable can be found. `Check the instructions in the official webpage <https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv>`_.
117
147
118
148
- **MacOS**: The simplest option is to use Homebrew:
119
149
@@ -124,12 +154,20 @@ To install ``pyenv``, follow these steps:
124
154
125
155
Then, complete the setup by adding ``pyenv`` to your profile, so the executable can be found. `Check the instructions in the official webpage <https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv>`_.
126
156
127
-
- **Windows**: ``pyenv-win`` is a separate project but it has the same functionality and it is also simpler to setup. Just run the following command and you should be ready to go:
157
+
- **Windows**: ``pyenv-win`` is a separate project but it has the same functionality and it is also simpler to setup.
158
+
You can read the detailed installation instructions `from the official pyenv-win website <https://github.com/pyenv-win/pyenv-win/tree/master>`_,
159
+
but the easiest way is to run the following command in the ``powershell`` and, upon closing and launching a new shell, you should be ready to go:
128
160
129
161
.. code-block:: powershell
130
162
163
+
# Step 1: In your powershell, invoke the following command:
# Step 2: close the shell you invoked in the command from Step 1 and re-launch powershell
167
+
168
+
# Step 3: Confirm success; you should be returned something similar to `pyenv 3.1.1`
169
+
pyenv --version
170
+
133
171
.. note::
134
172
135
173
If you are getting any ``UnauthorizedAccess`` error, then start Windows PowerShell with the “Run as administrator” option (see figure above) and run:
@@ -140,19 +178,8 @@ To install ``pyenv``, follow these steps:
140
178
141
179
Finally open a normal PowerShell and re-run the above installation command.
142
180
143
-
After completing the above steps, you will need to close the terminal and re-open it again. After that, to check if things work run:
144
-
145
-
.. code-block:: bash
146
-
147
-
pyenv --version
148
-
149
-
You should get something similar to:
150
-
151
-
.. code-block:: output
152
-
153
-
pyenv 3.1.1
154
181
155
-
Actually installing Python
182
+
Installing your chosen Python version
156
183
^^^^^^^^^^^^^^^^^^^^^^^^^^
157
184
158
185
With ``pyenv`` installed and correctly configured, it is now easy to install any Python version we want. To see the versions available run:
@@ -161,20 +188,20 @@ With ``pyenv`` installed and correctly configured, it is now easy to install any
161
188
162
189
pyenv install -l
163
190
164
-
You should see a very long list of versions to choose from. Let's install the latest version of the 3.9 family:
191
+
You should see a long list of versions to choose from. Let's install one of the later versions of the 3.9 family:
165
192
166
193
.. code-block:: bash
167
194
168
195
pyenv install 3.9.13
169
196
170
-
The command will take a minute or two to complete, depending on your internet connection, and show an output similar to the following (this is just an example for Windows):
197
+
The command will take a minute or two to complete, depending on your internet connection, and show an output similar to the following (this is an example from Windows):
:: [Downloading] :: From https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe
177
-
:: [Downloading] :: To C:\Users\your_username\.pyenv\pyenv-win\install_cache\python-3.9.13-amd64.exe
204
+
:: [Downloading] :: To C:\Users\your_username\.pyenv\pyenv-win\install_cache\python-3.9.13-amd64.exe
178
205
:: [Installing] :: 3.9.13 ...
179
206
:: [Info] :: completed! 3.9.13
180
207
@@ -197,7 +224,9 @@ In both cases, if you run ``python --version`` afterwards, you should get ``Pyth
197
224
Installing ``pipx``
198
225
~~~~~~~~~~~~~~~~~~~
199
226
200
-
Next we need to install ``pipx``, a Python application manager that facilitates installing, keeping applications updated and run them in their own isolated environments. We could skip this step and install MUSE directly, but that will risk to have conflicting dependencies in the future if you install any other application, breaking your MUSE installation, and we do not want that to happen.
227
+
Next we need to install ``pipx``, a Python application manager that facilitates installing, keeping applications updated and running them in their own isolated environments.
228
+
More specifically, ``pipx`` will create a virtual environment to run the tools it installs based on the python version that was used to install pipx to start with, unless you specify another version and that other version is system wide available.
229
+
We could skip this step and install MUSE directly, but that will risk to have conflicting dependencies in the future if you install any other application, breaking your MUSE installation, and we do not want that to happen.
201
230
202
231
The installation instructions for ``pipx`` can be found in the `official webpage <https://pypa.github.io/pipx/installation/>`_ specific for the three operating systems. The following instructions, however, should work for the three cases:
0 commit comments