Skip to content

Commit

Permalink
Merge branch '463-general-tutorial-notebook-fixes' of https://github.…
Browse files Browse the repository at this point in the history
…com/assume-framework/assume into 463-general-tutorial-notebook-fixes
  • Loading branch information
AndreasEppler committed Nov 20, 2024
2 parents 2bd2ca7 + b07da00 commit 9623660
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4,558 deletions.
124 changes: 15 additions & 109 deletions examples/notebooks/04_reinforcement_learning_algorithm_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,7 @@
"id": "m0DaRwFA7VgW",
"outputId": "5655adad-5b7a-4fe3-9067-6b502a06136b"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: assume-framework[learning] in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (0.4.3)\n",
"Requirement already satisfied: argcomplete>=3.1.4 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (3.5.1)\n",
"Requirement already satisfied: nest-asyncio>=1.5.6 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (1.6.0)\n",
"Requirement already satisfied: mango-agents>=2.1.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.1.1)\n",
"Requirement already satisfied: numpy>=1.26.4 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (1.26.4)\n",
"Requirement already satisfied: tqdm>=4.64.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (4.66.6)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.9.0)\n",
"Requirement already satisfied: sqlalchemy>=2.0.9 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.0.36)\n",
"Requirement already satisfied: pandas>=2.0.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.2.3)\n",
"Requirement already satisfied: psycopg2-binary>=2.9.5 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.9.10)\n",
"Requirement already satisfied: pyyaml>=6.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (6.0.2)\n",
"Requirement already satisfied: pyyaml-include>=2.2a in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.2a1)\n",
"Requirement already satisfied: pyomo>=6.8.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (6.8.0)\n",
"Requirement already satisfied: highspy in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (1.8.0)\n",
"Requirement already satisfied: torch>=2.0.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from assume-framework[learning]) (2.5.1)\n",
"Requirement already satisfied: paho-mqtt>=2.1.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from mango-agents>=2.1.1->assume-framework[learning]) (2.1.0)\n",
"Requirement already satisfied: dill>=0.3.8 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from mango-agents>=2.1.1->assume-framework[learning]) (0.3.9)\n",
"Requirement already satisfied: protobuf==5.27.2 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from mango-agents>=2.1.1->assume-framework[learning]) (5.27.2)\n",
"Requirement already satisfied: networkx>=3.4.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from mango-agents>=2.1.1->assume-framework[learning]) (3.4.2)\n",
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from pandas>=2.0.0->assume-framework[learning]) (2024.2)\n",
"Requirement already satisfied: tzdata>=2022.7 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from pandas>=2.0.0->assume-framework[learning]) (2024.2)\n",
"Requirement already satisfied: ply in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from pyomo>=6.8.0->assume-framework[learning]) (3.11)\n",
"Requirement already satisfied: six>=1.5 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from python-dateutil>=2.8.2->assume-framework[learning]) (1.16.0)\n",
"Requirement already satisfied: fsspec>=2021.04.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from pyyaml-include>=2.2a->assume-framework[learning]) (2024.10.0)\n",
"Requirement already satisfied: typing-extensions>=4.6.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from sqlalchemy>=2.0.9->assume-framework[learning]) (4.12.2)\n",
"Requirement already satisfied: greenlet!=0.4.17 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from sqlalchemy>=2.0.9->assume-framework[learning]) (3.1.1)\n",
"Requirement already satisfied: filelock in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from torch>=2.0.1->assume-framework[learning]) (3.16.1)\n",
"Requirement already satisfied: jinja2 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from torch>=2.0.1->assume-framework[learning]) (3.1.4)\n",
"Requirement already satisfied: setuptools in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from torch>=2.0.1->assume-framework[learning]) (75.1.0)\n",
"Requirement already satisfied: sympy==1.13.1 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from torch>=2.0.1->assume-framework[learning]) (1.13.1)\n",
"Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from sympy==1.13.1->torch>=2.0.1->assume-framework[learning]) (1.3.0)\n",
"Requirement already satisfied: colorama in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from tqdm>=4.64.1->assume-framework[learning]) (0.4.6)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\aeppl\\.conda\\envs\\assume\\lib\\site-packages (from jinja2->torch>=2.0.1->assume-framework[learning]) (3.0.2)\n"
]
}
],
"outputs": [],
"source": [
"import importlib.util\n",
"\n",
Expand Down Expand Up @@ -105,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "d5e77f71",
"metadata": {
"colab": {
Expand Down Expand Up @@ -134,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "de097384",
"metadata": {
"colab": {
Expand All @@ -161,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "7d9899ff",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -198,7 +158,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "ade14744",
"metadata": {
"id": "xUsbeZdPJ_2Q"
Expand Down Expand Up @@ -255,7 +215,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "94517a3e",
"metadata": {
"id": "UXYSesx4Ifp5"
Expand Down Expand Up @@ -458,7 +418,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "daed035c",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -550,7 +510,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "632844c2",
"metadata": {
"id": "0ww-L9fABnw3"
Expand Down Expand Up @@ -609,7 +569,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "c715f90e",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -677,7 +637,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "753dbab1",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -871,7 +831,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "6bb09b5b",
"metadata": {
"id": "moZ_UD7FfkOh"
Expand Down Expand Up @@ -900,7 +860,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "5cff2f6a",
"metadata": {
"id": "iPz8v4N5hpfr"
Expand Down Expand Up @@ -943,61 +903,7 @@
"lines_to_next_cell": 0,
"outputId": "e30f4279-7a4e-4efc-9cfb-61416e4fe2f1"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO:assume.world:connected to db\n",
"INFO:assume.scenario.loader_csv:Starting Scenario example_02a/base from ../inputs\n",
"INFO:assume.scenario.loader_csv:storage_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:industrial_dsm_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:residential_dsm_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:forecasts_df not found. Returning None\n",
"INFO:assume.scenario.loader_csv:Downsampling demand_df successful.\n",
"INFO:assume.scenario.loader_csv:cross_border_flows not found. Returning None\n",
"INFO:assume.scenario.loader_csv:availability_df not found. Returning None\n",
"INFO:assume.scenario.loader_csv:electricity_prices not found. Returning None\n",
"INFO:assume.scenario.loader_csv:price_forecasts not found. Returning None\n",
"INFO:assume.scenario.loader_csv:temperature not found. Returning None\n",
"INFO:assume.scenario.loader_csv:Adding markets\n",
"INFO:assume.scenario.loader_csv:Read units from file\n",
"INFO:assume.scenario.loader_csv:Adding power_plant units\n",
"INFO:assume.scenario.loader_csv:Adding demand units\n",
"INFO:assume.scenario.loader_csv:Adding unit operators and units\n",
"INFO:assume.scenario.loader_csv:storage_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:industrial_dsm_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:residential_dsm_units not found. Returning None\n",
"INFO:assume.scenario.loader_csv:forecasts_df not found. Returning None\n",
"INFO:assume.scenario.loader_csv:Downsampling demand_df successful.\n",
"INFO:assume.scenario.loader_csv:cross_border_flows not found. Returning None\n",
"INFO:assume.scenario.loader_csv:availability_df not found. Returning None\n",
"INFO:assume.scenario.loader_csv:electricity_prices not found. Returning None\n",
"INFO:assume.scenario.loader_csv:price_forecasts not found. Returning None\n",
"INFO:assume.scenario.loader_csv:temperature not found. Returning None\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Training Episodes: 0%| | 0/100 [00:00<?, ?it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"INFO:assume.world:activating container\n",
"INFO:assume.world:all agents up - starting simulation\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": []
}
],
"outputs": [],
"source": [
"import os\n",
"\n",
Expand Down Expand Up @@ -1069,7 +975,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "assume",
"display_name": "assume-framework",
"language": "python",
"name": "python3"
},
Expand All @@ -1083,7 +989,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/notebooks/04_reinforcement_learning_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "assume",
"display_name": "assume-framework",
"language": "python",
"name": "python3"
},
Expand All @@ -2562,7 +2562,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 9623660

Please sign in to comment.