"where $c_0$ is cost at start, $c_1$ is material cost and $x_t$ is cumulative\n",
"capacity in the investment interval $t$. Thus, $x_0$ is the initial cumulative CSP capacity.\n",
"\n",
"Additionally, there are **nuclear** and **coal** generators for which there is no potential for reducing their LCOE.\n",
"\n",
"We build an optimisation to minimise the cost of supplying a flat demand $d=100$ with the given technologies between 2020 and 2050, where a CO$_2$ budget cap is applied.\n",
"\n",
"> **Hint:** Problem formulation is to be found further along this notebook.\n",
"\n",
"**Task:** Explore different discount rates, learning rates, CO$_2$ budgets. For instance\n",
"* No learning for CSP and no CO$_2$ budget would result in a coal-reliant system.\n",
"* A CO$_2$ budget and no learning prefers a system built on nuclear.\n",
"* A CO$_2$ budget and learning results in a system with CSP."
"> **Note:** We use [`pyomo`](https://pyomo.readthedocs.io/en/stable/) for building optimisation problems in python. This is also what `pypsa` uses under the hood."
]
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"model = ConcreteModel(\"discounted total costs\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$G_{t,a}$$"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"model.generators = Var(techs, years, within=NonNegativeReals)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$LCOE_{t,a}$$"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"model.costs = Var(techs, years, within=NonNegativeReals)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The objective is to minimise the system costs:\n",
" return 0.2*30*demand >= sum(model.generators[tech,year]*parameters.at[\"emissions\",tech] for tech in techs for year in years)\n",
" return co2_budget*len(years)*demand >= sum(model.generators[tech,year]*parameters.at[\"specific emissions\",tech] for tech in techs for year in years)\n",
" # + (parameters.at[\"LCOE\",tech] - parameters.at[\"base LCOE\",tech])*exp(-sum(model.generators[tech,yeart] for yeart in years if yeart < year)/parameters.at[\"volume\",tech])\n",
" return model.costs[tech,year] == parameters.at[\"LCOE\",tech]*(1+sum(model.generators[tech,yeart] for yeart in years if yeart < year))**(-0.4)\n",
"model.cost_constraint = Constraint(techs, years, rule=cost_constraint)"
" return model.costs[tech,year] == parameters.at[\"current LCOE\",tech]*(1+sum(model.generators[tech,yeart] for yeart in years if yeart < year))**(-gamma_csp)\n",
"model.lcoe_constraint = Constraint(techs, years, rule=lcoe_constraint)"
where $c_0$ is cost at start, $c_1$ is material cost and $x_t$ is cumulative
capacity in the investment interval $t$. Thus, $x_0$ is the initial cumulative CSP capacity.
Additionally, there are **nuclear** and **coal** generators for which there is no potential for reducing their LCOE.
We build an optimisation to minimise the cost of supplying a flat demand $d=100$ with the given technologies between 2020 and 2050, where a CO$_2$ budget cap is applied.
> **Hint:** Problem formulation is to be found further along this notebook.
**Task:** Explore different discount rates, learning rates, CO$_2$ budgets. For instance
* No learning for CSP and no CO$_2$ budget would result in a coal-reliant system.
* A CO$_2$ budget and no learning prefers a system built on nuclear.
* A CO$_2$ budget and learning results in a system with CSP.
> **Note:** We use [`pyomo`](https://pyomo.readthedocs.io/en/stable/) for building optimisation problems in python. This is also what `pypsa` uses under the hood.