{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/samgdotson/osier/env-instructions?labpath=docs%2Fsource%2Fexamples%2Ftech_tutorial.ipynb)\n", "\n", "# `Osier` Technology Tutorial\n", "\n", "An `osier.Technology` is the fundamental object in `osier`, representing power producing technologies such as power plants or energy storage. Other modules use and modify `osier.Technology` objects. This object contains all of the information one needs to run an energy system model.\n", "\n", "\n", "Objectives:\n", "\n", "* Learn how to import a pre-defined technology from the ``osier`` technology library.\n", "\n", "* Modify the attributes of a technology object in the current instance.\n", "\n", "* Create your own ``osier`` technology! " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# recommended imports\n", "from unyt import MW, GW, hr, year\n", "from unyt import unyt_array\n", "import numpy as np" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Importing from the Technology Library\n", "\n", "``Osier`` comes with some generic, pre-defined technology classes that you can use immediately in your simulations.\n", "The cost data comes from the National Renewable Energy Laboratory's (NREL) Annual Technology Baseline (ATB)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Import NameTechnology Name
0batteryBattery
1biomassBiomass
2coalCoal_Conv
3coal_advCoal_Adv
4natural_gasNaturalGas_Conv
5natural_gas_advNaturalGas_Adv
6nuclearNuclear
7nuclear_advNuclear_Adv
8solarSolarPanel
9windWindTurbine
\n", "
" ], "text/plain": [ " Import Name Technology Name\n", "0 battery Battery\n", "1 biomass Biomass\n", "2 coal Coal_Conv\n", "3 coal_adv Coal_Adv\n", "4 natural_gas NaturalGas_Conv\n", "5 natural_gas_adv NaturalGas_Adv\n", "6 nuclear Nuclear\n", "7 nuclear_adv Nuclear_Adv\n", "8 solar SolarPanel\n", "9 wind WindTurbine" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# import the catalog to see what technologies are available\n", "from osier.tech_library import catalog\n", "\n", "display(catalog())" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Nuclear: 18609.404000000002 MW\n" ] } ], "source": [ "# import some specific technologies\n", "from osier.tech_library import battery, nuclear, solar\n", "\n", "# printing the technology will show the currently specified capacity.\n", "print(nuclear)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "All of the associated technology data can be viewed in a dataframe format using ``osier.Technology.to_dataframe()``." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
technology_categorytechnology_typedispatchablerenewablefuel_typeramp_up_rate (1/hr)ramp_down_rate (1/hr)lifetimecapacity (MW)capacity_factorcapacity_creditefficiencycapital_cost (1/kW)om_cost_fixed (1/kW)om_cost_variable (1/(MW*hr))fuel_cost (1/(MW*hr))co2_rate (megatonnes/(MW*hr))lifecycle_co2_rate (megatonnes/(GW*hr))land_intensity (km/MW**2)heat_rate
technology_name
NuclearthermalproductionTrueFalseNone00251.86e+041115e-050.00017805.81e-0605.1e-060None
\n", "
" ], "text/plain": [ " technology_category technology_type dispatchable renewable \\\n", "technology_name \n", "Nuclear thermal production True False \n", "\n", " fuel_type ramp_up_rate (1/hr) ramp_down_rate (1/hr) lifetime \\\n", "technology_name \n", "Nuclear None 0 0 25 \n", "\n", " capacity (MW) capacity_factor capacity_credit efficiency \\\n", "technology_name \n", "Nuclear 1.86e+04 1 1 1 \n", "\n", " capital_cost (1/kW) om_cost_fixed (1/kW) \\\n", "technology_name \n", "Nuclear 5e-05 0.000178 \n", "\n", " om_cost_variable (1/(MW*hr)) fuel_cost (1/(MW*hr)) \\\n", "technology_name \n", "Nuclear 0 5.81e-06 \n", "\n", " co2_rate (megatonnes/(MW*hr)) \\\n", "technology_name \n", "Nuclear 0 \n", "\n", " lifecycle_co2_rate (megatonnes/(GW*hr)) \\\n", "technology_name \n", "Nuclear 5.1e-06 \n", "\n", " land_intensity (km/MW**2) heat_rate \n", "technology_name \n", "Nuclear 0 None " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nuclear.to_dataframe()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[Battery: 815.3412599999999 MW,\n", " Biomass: 0.0 MW,\n", " Coal_Conv: 0.0 MW,\n", " Coal_Adv: 0.0 MW,\n", " NaturalGas_Conv: 8375.1331 MW,\n", " NaturalGas_Adv: 0.0 MW,\n", " Nuclear: 18609.404000000002 MW,\n", " Nuclear_Adv: 0.0 MW,\n", " SolarPanel: 2810.3015 MW,\n", " WindTurbine: 0.0 MW]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# one can also import a list of all technologies\n", "from osier.tech_library import all_technologies\n", "\n", "display(all_technologies())" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Lastly, if you want to view all of the technology data in a single dataframe, you can simply import `technology_dataframe` from `osier.utils`." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
technology_categorytechnology_typedispatchablerenewablefuel_typelifetimecapacity (MW)capacity_factorcapacity_creditefficiency...fuel_cost (1/(MW*hr))co2_rate (megatonnes/(MW*hr))lifecycle_co2_rate (megatonnes/(GW*hr))land_intensity (km/MW**2)storage_duration (hr)initial_storage (MW*hr)ramp_up_rate (1/hr)ramp_down_rate (1/hr)heat_ratelifecycle_co2_rate (megatonnes/(MW*hr))
technology_name
BatterybasestorageTrueFalseNone2581510.50.85...003.3e-05040NaNNaNNaNNaN
BiomassthermalproductionTrueTrueNone250111...4.7e-0500.000230NaNNaN11NoneNaN
Coal_ConvthermalproductionTrueFalseNone250111...2.14e-0500.0010NaNNaN0.50.5NoneNaN
Coal_AdvthermalproductionTrueFalseNone250111...3.66e-0500.000370NaNNaN0.50.5NoneNaN
NaturalGas_ConvthermalproductionTrueFalseNone258.38e+03111...2.24e-0500.000490NaNNaN11NoneNaN
NaturalGas_AdvthermalproductionTrueFalseNone250111...2.75e-0500.000130NaNNaN11NoneNaN
NuclearthermalproductionTrueFalseNone251.86e+04111...5.81e-0605.1e-060NaNNaN00NoneNaN
Nuclear_AdvthermalproductionTrueFalseNone250111...9.16e-060NaN0NaNNaN0.250.25None5.1e-09
SolarPanelbaseproductionFalseTruesolar252.81e+0310.191...003.7e-050NaNNaNNaNNaNNaNNaN
WindTurbinebaseproductionFalseTruewind25010.351...001.2e-050NaNNaNNaNNaNNaNNaN
\n", "

10 rows × 23 columns

\n", "
" ], "text/plain": [ " technology_category technology_type dispatchable renewable \\\n", "technology_name \n", "Battery base storage True False \n", "Biomass thermal production True True \n", "Coal_Conv thermal production True False \n", "Coal_Adv thermal production True False \n", "NaturalGas_Conv thermal production True False \n", "NaturalGas_Adv thermal production True False \n", "Nuclear thermal production True False \n", "Nuclear_Adv thermal production True False \n", "SolarPanel base production False True \n", "WindTurbine base production False True \n", "\n", " fuel_type lifetime capacity (MW) capacity_factor \\\n", "technology_name \n", "Battery None 25 815 1 \n", "Biomass None 25 0 1 \n", "Coal_Conv None 25 0 1 \n", "Coal_Adv None 25 0 1 \n", "NaturalGas_Conv None 25 8.38e+03 1 \n", "NaturalGas_Adv None 25 0 1 \n", "Nuclear None 25 1.86e+04 1 \n", "Nuclear_Adv None 25 0 1 \n", "SolarPanel solar 25 2.81e+03 1 \n", "WindTurbine wind 25 0 1 \n", "\n", " capacity_credit efficiency ... fuel_cost (1/(MW*hr)) \\\n", "technology_name ... \n", "Battery 0.5 0.85 ... 0 \n", "Biomass 1 1 ... 4.7e-05 \n", "Coal_Conv 1 1 ... 2.14e-05 \n", "Coal_Adv 1 1 ... 3.66e-05 \n", "NaturalGas_Conv 1 1 ... 2.24e-05 \n", "NaturalGas_Adv 1 1 ... 2.75e-05 \n", "Nuclear 1 1 ... 5.81e-06 \n", "Nuclear_Adv 1 1 ... 9.16e-06 \n", "SolarPanel 0.19 1 ... 0 \n", "WindTurbine 0.35 1 ... 0 \n", "\n", " co2_rate (megatonnes/(MW*hr)) \\\n", "technology_name \n", "Battery 0 \n", "Biomass 0 \n", "Coal_Conv 0 \n", "Coal_Adv 0 \n", "NaturalGas_Conv 0 \n", "NaturalGas_Adv 0 \n", "Nuclear 0 \n", "Nuclear_Adv 0 \n", "SolarPanel 0 \n", "WindTurbine 0 \n", "\n", " lifecycle_co2_rate (megatonnes/(GW*hr)) \\\n", "technology_name \n", "Battery 3.3e-05 \n", "Biomass 0.00023 \n", "Coal_Conv 0.001 \n", "Coal_Adv 0.00037 \n", "NaturalGas_Conv 0.00049 \n", "NaturalGas_Adv 0.00013 \n", "Nuclear 5.1e-06 \n", "Nuclear_Adv NaN \n", "SolarPanel 3.7e-05 \n", "WindTurbine 1.2e-05 \n", "\n", " land_intensity (km/MW**2) storage_duration (hr) \\\n", "technology_name \n", "Battery 0 4 \n", "Biomass 0 NaN \n", "Coal_Conv 0 NaN \n", "Coal_Adv 0 NaN \n", "NaturalGas_Conv 0 NaN \n", "NaturalGas_Adv 0 NaN \n", "Nuclear 0 NaN \n", "Nuclear_Adv 0 NaN \n", "SolarPanel 0 NaN \n", "WindTurbine 0 NaN \n", "\n", " initial_storage (MW*hr) ramp_up_rate (1/hr) \\\n", "technology_name \n", "Battery 0 NaN \n", "Biomass NaN 1 \n", "Coal_Conv NaN 0.5 \n", "Coal_Adv NaN 0.5 \n", "NaturalGas_Conv NaN 1 \n", "NaturalGas_Adv NaN 1 \n", "Nuclear NaN 0 \n", "Nuclear_Adv NaN 0.25 \n", "SolarPanel NaN NaN \n", "WindTurbine NaN NaN \n", "\n", " ramp_down_rate (1/hr) heat_rate \\\n", "technology_name \n", "Battery NaN NaN \n", "Biomass 1 None \n", "Coal_Conv 0.5 None \n", "Coal_Adv 0.5 None \n", "NaturalGas_Conv 1 None \n", "NaturalGas_Adv 1 None \n", "Nuclear 0 None \n", "Nuclear_Adv 0.25 None \n", "SolarPanel NaN NaN \n", "WindTurbine NaN NaN \n", "\n", " lifecycle_co2_rate (megatonnes/(MW*hr)) \n", "technology_name \n", "Battery NaN \n", "Biomass NaN \n", "Coal_Conv NaN \n", "Coal_Adv NaN \n", "NaturalGas_Conv NaN \n", "NaturalGas_Adv NaN \n", "Nuclear NaN \n", "Nuclear_Adv 5.1e-09 \n", "SolarPanel NaN \n", "WindTurbine NaN \n", "\n", "[10 rows x 23 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from osier.utils import technology_dataframe\n", "\n", "technology_dataframe(all_technologies())" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Entries with `NaN` values means that technology *does not have that attribute*.\n", "\n", "Entries with `None` values means that technology possesses that attribute, but it has not been assigned a value!" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Modifying Standard Technologies\n", "\n", "If you want to test different cost assumptions or optimize over an attribute that is not currently present in the technology, \n", "you can add or adjust at will. However, unless you modify the source code, these changes will not be saved if you restart the \n", "Python instance.\n", "\n", "When modifying a capacity or cost attribute, specifying the units with the `unyt` library is recommended!" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "WindTurbine: 0.0 MW" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "WindTurbine: 5000.0 MW" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from osier.tech_library import wind\n", "\n", "# modify the capacity\n", "display(wind)\n", "wind.capacity = 5*GW\n", "display(wind)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Is `readiness` present in the `wind` technology dataframe? False\n", "The `wind` technology now has a `readiness` level of 9!\n", "Is `readiness` present in the `wind` technology dataframe? True\n" ] } ], "source": [ "# add a new attribute\n", "\n", "print(f\"Is `readiness` present in the `wind` technology dataframe? {'readiness' in wind.to_dataframe().columns}\")\n", " \n", "wind.readiness = 9\n", "print(f\"The `wind` technology now has a `readiness` level of {wind.readiness}!\")\n", "\n", "print(f\"Is `readiness` present in the `wind` technology dataframe? {'readiness' in wind.to_dataframe().columns}\")" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Creating your own `osier.Technology` object\n", "\n", "Why would you want to create your own technology?\n", "\n", "* The technologies in `osier.tech_library` are too generic or you want to model a specific technology version.\n", "\n", "* There is a technology that is not represented.\n", "\n", "The data in the `osier.tech_library` primarily comes from NREL's Annual Technology Baseline. This representation\n", "is generic, though, and you may be interested in creating a vendor specific technology. Or perhaps an \"idealized\"\n", "technology that doesn't exist, yet (e.g., fusion?).\n", "\n", "\n", "`osier` offers several sub-classes of the `osier.Technology` class as well: \n", "\n", "* `osier.RampingTechnology`: A general class for technologies that typically have ramping constraints (e.g., nuclear, hydroelectric dams)\n", "\n", "* `osier.ThermalTechnology`: A class that inherits from `osier.RampingTechnology` for technologies that have heat rates. `osier`'s \n", "current implementation makes this redundant, but may be useful in the future.\n", "\n", "* `osier.StorageTechnology`: A general class for technologies that primarily store energy rather than produce it.\n", "\n", "\n", "Only the name is a required input." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "# import base class\n", "from osier import Technology" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "alien_technology = Technology(technology_name=\"AlienTechnology\")" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "But that's too simple. So let's add some more values.\n", "\n", "Note: When applying units from `unyt`, $\\frac{\\$}{GW}$ is best expressed as $\\$*GW^{-1}$. `unyt` currently does not handle currencies due to exchange rate issues and unit conversion is one of `unyt`'s primary functionalities." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "alien_technology = Technology(technology_name=\"AlienTechnology\",\n", " technology_type=\"production\",\n", " dispatchable=True,\n", " renewable=True,\n", " capital_cost=5e4*GW**-1,\n", " fuel_cost=1e2*(MW*hr)**-1,\n", " capacity_factor=1.0,\n", " lifecycle_co2_rate=0.0,\n", " lifetime=1000,\n", " om_cost_fixed=90*(GW)**-1)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "If you're ever unsure of what parameters a function or class take, you can always call the Python `help()` function!\n", "\n", "If you're using a jupyter notebook or ipykernel, you can use the magic command `?` after the function or class, as shown below." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1;31mInit signature:\u001b[0m\n", "\u001b[0mTechnology\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mtechnology_name\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mtechnology_type\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'production'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mtechnology_category\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'base'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdispatchable\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mrenewable\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mcapital_cost\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mom_cost_fixed\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mom_cost_variable\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mfuel_cost\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mfuel_type\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mcapacity\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mcapacity_factor\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mcapacity_credit\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mco2_rate\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mlifecycle_co2_rate\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mland_intensity\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mefficiency\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mlifetime\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m25.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_power_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mMW\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_time_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mhr\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_energy_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_length_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mkm\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_volume_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mm\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mdefault_mass_units\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmegatonnes\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mDocstring:\u001b[0m \n", "The :class:`Technology` base class contains the minimum required\n", "data to solve an energy systems problem. Many optional data are\n", "included here as well. All other technologies in\n", ":mod:`osier` inherit from this class.\n", "\n", "Parameters\n", "----------\n", "technology_name : str\n", " The name identifier of the technology.\n", "technology_type : str\n", " The string identifier for the type of technology.\n", " Two common types are: [\"production\", \"storage\"].\n", "technology_category : str\n", " The string identifier the the technology category.\n", " For example: \"renewable,\" \"fossil,\" or \"nuclear.\"\n", "dispatchable : bool\n", " Indicates whether the technology can be dispatched by a\n", " grid operator, or if it produces variable electricity\n", " that must be used or stored the moment it is produced.\n", " For example, solar panels and wind turbines are not\n", " dispatchable, but nuclear and biopower are dispatchable.\n", " Default value is true.\n", "renewable : bool\n", " Indicates whether the technology is considered \"renewable.\"\n", " Useful for determining if a technology will contribute to\n", " a renewable portfolio standard (RPS).\n", "capital_cost : float or :class:`unyt.array.unyt_quantity`\n", " Specifies the capital cost. If float,\n", " the default unit is $/MW.\n", "om_cost_fixed : float or :class:`unyt.array.unyt_quantity`\n", " Specifies the fixed operating costs.\n", " If float, the default unit is $/MW.\n", "om_cost_variable : float, :class:`unyt.array.unyt_quantity`, or array-like\n", " Specifies the variable operating costs. Users may pass timeseries data.\n", " However, :class:`pandas.DataFrame` is not supported by this feature.\n", " If float, the default unit is $/MWh.\n", "fuel_cost : float, :class:`unyt.array.unyt_quantity`, or array-like\n", " Specifies the fuel costs. Users may pass timeseries data.\n", " However, :class:`pandas.DataFrame` is not supported by this feature.\n", " If float, the default unit is $/MWh.\n", "fuel_type : str\n", " Specifies the type of fuel consumed by the technology.\n", "capacity : float or :class:`unyt.array.unyt_quantity`\n", " Specifies the technology capacity.\n", " If float, the default unit is MW\n", "capacity_factor : Optional, float\n", " Specifies the 'usable' fraction of a technology's capacity.\n", " Default is 1.0, i.e. all of the technology's capacity is\n", " usable all of the time.\n", "capacity_credit : Optional, float\n", " Specifies the fraction of a technology's capacity that counts\n", " towards reliability requirements. Most frequently used for \n", " renewable technologies. For example, a solar farm might have \n", " a capacity credit of 0.2. This means that in order to meet a \n", " capacity requirement of 1 GW, 1.25 GW of solar would need to \n", " be installed.\n", " Default is 1.0, i.e. all of the technology's capacity contributes\n", " to capacity requirements.\n", "co2_rate : float or :class:`unyt.array.unyt_quantity`\n", " Specifies the rate at which carbon dioxide is emitted during operation.\n", " Generally only applicable for fossil fueled plants.\n", " If float, the default units are megatonnes per MWh\n", "lifecycle_co2_rate : float or :class:`unyt.array.unyt_quantity`\n", " Specifies the rate at which of CO2eq emissions over a typical lifetime. \n", " Unless you are reading this in a future where the economy is fully\n", " decarbonized, all technologies should have a non-zero value for this \n", " attribute.\n", " If float, the default units are megatonnes per MWh\n", "land_intensity : float or :class:`unyt.array.unyt_quantity`\n", " The amount of land required per unit capacity. May be either lifecycle\n", " land use or from direct use. However, consistency between\n", " technologies is incumbent on the user.\n", "efficiency : float\n", " The technology's energy conversion efficiency expressed as\n", " a fraction. Default is 1.0.\n", "lifetime : float\n", " The technology's operational lifetime in years. Default is 25 years.\n", "default_power_units : str or :class:`unyt.unit_object.Unit`\n", " An optional parameter, specifies the units\n", " for power. Default is megawatts [MW].\n", "default_time_units : str or :class:`unyt.unit_object.Unit`\n", " An optional parameter, specifies the units\n", " for time. Default is hours [hr].\n", "default_mass_units : str or :class:`unyt.unit_object.Unit`\n", " An optional parameter, specifies the units\n", " for mass. Default is hours [kg].\n", "default_energy_units : str or :class:`unyt.unit_object.Unit`\n", " An optional parameter, specifies the units\n", " for energy. Default is megawatt-hours [MWh]\n", " Currently, `default_energy_units` is derived from the\n", " time and power units.\n", "\n", "Notes\n", "-----\n", "Cost values are listed in the docs as [$ / physical unit]. However,\n", ":class:`osier` does not currently have a currency handler, therefore the\n", "units are technically [1 / physical unit].\n", "\n", "The :class:`unyt` library may not be able to interpret strings for\n", "inverse units. For example:\n", "\n", ">>> my_unit = \"10 / MW\"\n", ">>> my_unit = unyt_quantity.from_string(my_unit)\n", "ValueError: Received invalid quantity expression '10/MW'.\n", "\n", "Instead, try the more explicit approach:\n", "\n", ">>> my_unit = \"10 MW**-1\"\n", ">>> my_unit = unyt_quantity.from_string(my_unit)\n", "unyt_quantity(10., '1/MW')\n", "\n", "However, inverse MWh cannot be converted from a string.\n", "\u001b[1;31mFile:\u001b[0m c:\\users\\sdotson\\research\\osier\\osier\\technology.py\n", "\u001b[1;31mType:\u001b[0m type\n", "\u001b[1;31mSubclasses:\u001b[0m RampingTechnology, StorageTechnology" ] } ], "source": [ "# help(Technology)\n", "\n", "Technology?" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.13" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }