Skip to content

Commit

Permalink
Documentation of Unit example (#262)
Browse files Browse the repository at this point in the history
This commit adds new tutorial on adding custom unit and custom bidding strategy.

---------
Co-authored-by: Nick Harder <[email protected]>
  • Loading branch information
Manish-Khanra authored Jan 23, 2024
1 parent f5471f5 commit 3328c38
Show file tree
Hide file tree
Showing 18 changed files with 801 additions and 725 deletions.
5 changes: 5 additions & 0 deletions assume/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from importlib.metadata import version

from assume.common import MarketConfig, MarketProduct
from assume.scenario.loader_csv import (
load_custom_units,
load_scenario_folder,
run_learning,
)
from assume.world import World

__version__ = version("assume-framework")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sphinx.ext.napoleon",
"nbsphinx",
"nbsphinx_link",
"sphinx.ext.imgconverter", # for SVG conversion
# "sphinx.ext.imgconverter", # for SVG conversion
]

intersphinx_mapping = {
Expand Down
1 change: 1 addition & 0 deletions docs/source/examples/03_custom_unit_example.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path": "../../../examples/notebooks/03_custom_unit_example.ipynb"}
1 change: 1 addition & 0 deletions docs/source/examples/05_market_comparison.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"path": "../../../examples/notebooks/05_market_comparison.ipynb"}
1 change: 0 additions & 1 deletion docs/source/examples/06_market_comparison.nblink

This file was deleted.

3 changes: 2 additions & 1 deletion docs/source/examples_basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ Here you can find several tutorials on how to use ASSUME framework to get you st

examples/01_minimal_manual_example.nblink
examples/02_automated_run_example.nblink
examples/03_custom_unit_example.nblink
examples/04_reinforcement_learning_example.nblink
examples/06_market_comparison.nblink
examples/05_market_comparison.nblink
Binary file added docs/source/img/Electrolyzer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/source/img/Electrolyzer.png.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: ASSUME Developers

SPDX-License-Identifier: AGPL-3.0-or-later
2 changes: 1 addition & 1 deletion examples/inputs/example_03a/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

base:
start_date: 2019-01-01 00:00
end_date: 2019-01-31 00:00
end_date: 2019-01-30 00:00
time_step: 1h
save_frequency_hours: 24

Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/01_minimal_manual_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.3"
},
"nbsphinx": {
"execute": "never"
Expand Down
4 changes: 2 additions & 2 deletions examples/notebooks/02_automated_run_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"config_data = {\n",
" \"hourly_market\": {\n",
" \"start_date\": \"2021-03-01 00:00\",\n",
" \"end_date\": \"2021-03-08 00:00\",\n",
" \"end_date\": \"2021-03-07 00:00\",\n",
" \"time_step\": \"1h\",\n",
" \"save_frequency_hours\": 24,\n",
" \"markets_config\": {\n",
Expand Down Expand Up @@ -409,7 +409,7 @@
"new_market_config = {\n",
" \"daily_market\": {\n",
" \"start_date\": \"2021-03-01 00:00\",\n",
" \"end_date\": \"2021-03-08 00:00\",\n",
" \"end_date\": \"2021-03-07 00:00\",\n",
" \"time_step\": \"1h\",\n",
" \"save_frequency_hours\": 24,\n",
" \"markets_config\": {\n",
Expand Down
760 changes: 760 additions & 0 deletions examples/notebooks/03_custom_unit_example.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/notebooks/03_custom_unit_example.ipynb.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: ASSUME Developers

SPDX-License-Identifier: AGPL-3.0-or-later
16 changes: 12 additions & 4 deletions examples/notebooks/04_reinforcement_learning_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"id": "xUsbeZdPJ_2Q"
},
Expand All @@ -264,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"id": "UXYSesx4Ifp5"
},
Expand Down Expand Up @@ -355,11 +355,19 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {
"id": "iApbQsg5x_u2"
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"UsageError: Line magic function `%%add_to` not found.\n"
]
}
],
"source": [
"# magic to enable class definitions across colab cells\n",
"%%add_to RLStrategy\n",
Expand Down
Loading

0 comments on commit 3328c38

Please sign in to comment.