Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue #624 (Tutorial related issues) #625

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tutorial/westeros/westeros_baseline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
" df = make_df(\n",
" \"technical_lifetime\",\n",
" node_loc=country,\n",
" year_vtg=model_horizon,\n",
" year_vtg=history + model_horizon,\n",
" unit=\"y\",\n",
" technology=tec,\n",
" value=val,\n",
Expand Down Expand Up @@ -1457,7 +1457,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.9.12"
}
},
"nbformat": 4,
Expand Down
25 changes: 12 additions & 13 deletions tutorial/westeros/westeros_historical_new_capacity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we will modify the demand to remain constant, hence to avoid the requirement in the optimization time-period to build any new capacity"
"Next we will modify the demand to remain constant, hence to avoid the requirement in the optimization time-period to build any new capacity. The demand will be set to 100 GWa."
]
},
{
Expand All @@ -236,7 +236,7 @@
"outputs": [],
"source": [
"df = scenario.par(\"demand\")\n",
"df[\"value\"] = float(df[df[\"year\"] == 700][\"value\"])\n",
"df[\"value\"] = 100\n",
"scenario.add_par(\"demand\", df)\n",
"df"
]
Expand Down Expand Up @@ -358,8 +358,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Adjust technical lifetime\n",
"We need to ensure the parameter is also defined for historical vintages."
"#### Adjust `fix_cost` \n",
"This is required for demonstration purposes only in the seconda part of the tutorial."
]
},
{
Expand All @@ -369,11 +369,10 @@
"outputs": [],
"source": [
"df = scenario.par(\n",
" \"technical_lifetime\",\n",
" filters={\"technology\": \"coal_ppl\", \"year_vtg\": scenario.firstmodelyear},\n",
" \"fix_cost\",\n",
" filters={\"technology\": \"coal_ppl\"},\n",
")\n",
"df[\"year_vtg\"] = history[0]\n",
"scenario.add_par(\"technical_lifetime\", df)"
"scenario.remove_par(\"fix_cost\", df)"
]
},
{
Expand Down Expand Up @@ -504,8 +503,8 @@
"| Capacity factor \\[%\\] | 100 | 100 |\n",
"| Technical lifetime \\[years\\] | 20 | 40 |\n",
"| Investment costs \\[USD/kW\\] | 500 | 300 |\n",
"| Variable costs \\[USD/kWa\\] | 30 | 10 |\n",
"\n",
"| Fix O&M costs | 0 | 0 |\n",
"| Variable O&M costs \\[USD/kWa\\] | 30 | 10 |\n",
" \n",
"- Step 2.2: Explore parameters that can force the use of `\"coal_ppl\"`, despite being uneconomical.\n",
" - `\"bound_capacity_lo\"`"
Expand Down Expand Up @@ -688,7 +687,7 @@
"outputs": [],
"source": [
"costs = {\n",
" \"gas_ppl\": 300,\n",
" \"gas_ppl\": 200,\n",
"}\n",
"\n",
"for tec, val in costs.items():\n",
Expand Down Expand Up @@ -897,7 +896,7 @@
"metadata": {},
"source": [
"### Capacity\n",
"When plotting capacity, we can see that the bound has in fact achieved the desired effect, but only partialy. While the capacity of the `\"coal_ppl\"` is maintained, we can also observe that the capacity for `\"gas_ppl\"` is also built in the `firstmodelyear`. This can be caused for example, because there are no costs associated with maintaining the capacity of `\"coal_ppl\"` i.e. as we haven't defined fixed operating and maintance costs."
"When plotting capacity, we can see that the bound has in fact achieved the desired effect, but only partialy. While the capacity of the `\"coal_ppl\"` is maintained, we can also observe that the capacity for `\"gas_ppl\"` is also built in the `firstmodelyear`. This can is the result of the fact that there are no costs associated with maintaining the capacity of `\"coal_ppl\"` i.e. as we removed the fixed operating and maintance costs."
]
},
{
Expand Down Expand Up @@ -1107,7 +1106,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.12"
}
},
"nbformat": 4,
Expand Down