From b05b508099bad991960ea6a7a18977340d4df1b2 Mon Sep 17 00:00:00 2001 From: FRICKO Oliver Date: Wed, 8 Jun 2022 13:24:21 +0200 Subject: [PATCH 1/2] Address issue of missing capacity_factor for historical periods --- tutorial/westeros/westeros_baseline.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/westeros/westeros_baseline.ipynb b/tutorial/westeros/westeros_baseline.ipynb index 933479337..fe430a3e3 100644 --- a/tutorial/westeros/westeros_baseline.ipynb +++ b/tutorial/westeros/westeros_baseline.ipynb @@ -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", @@ -1457,7 +1457,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.9.12" } }, "nbformat": 4, From f994b594aeb79a45d3791692b186f0939cd2598d Mon Sep 17 00:00:00 2001 From: FRICKO Oliver Date: Wed, 8 Jun 2022 14:07:14 +0200 Subject: [PATCH 2/2] Address issues in westeros tutorial to match revised baseline --- .../westeros_historical_new_capacity.ipynb | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tutorial/westeros/westeros_historical_new_capacity.ipynb b/tutorial/westeros/westeros_historical_new_capacity.ipynb index 7420b8cdc..0516b059c 100644 --- a/tutorial/westeros/westeros_historical_new_capacity.ipynb +++ b/tutorial/westeros/westeros_historical_new_capacity.ipynb @@ -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." ] }, { @@ -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" ] @@ -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." ] }, { @@ -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)" ] }, { @@ -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\"`" @@ -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", @@ -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." ] }, { @@ -1107,7 +1106,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.2" + "version": "3.9.12" } }, "nbformat": 4,