{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Parsing Tabular Data"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"**Originally Contributed by**: Clayton Barrows"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"## Introduction"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"An example of how to parse tabular files (CSV) files similar to the format established in\n",
"the [RTS-GMLC](github.com/gridmod/rts-gmlc/RTS_Data/SourceData) and create a `System` using\n",
"[PowerSystems.jl](github.com/NREL-SIIP/PowerSystems.jl)"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"### Dependencies"
],
"metadata": {}
},
{
"outputs": [],
"cell_type": "code",
"source": [
"using PowerSystems\n",
"using TimeSeries\n",
"using Dates"
],
"metadata": {},
"execution_count": 1
},
{
"cell_type": "markdown",
"source": [
"### Fetch Data\n",
"PowerSystems.jl links to some test data that is suitable for this example.\n",
"Let's download the test data"
],
"metadata": {}
},
{
"outputs": [],
"cell_type": "code",
"source": [
"PowerSystems.download(PowerSystems.TestData; branch = \"master\") # *note* add `force=true` to get a fresh copy\n",
"base_dir = dirname(dirname(pathof(PowerSystems)));"
],
"metadata": {},
"execution_count": 2
},
{
"cell_type": "markdown",
"source": [
"### The tabular data format relies on a folder containing `*.csv` files and a `user_descriptors.yaml` file\n",
"First, we'll read the tabular data"
],
"metadata": {}
},
{
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ Info: Parsing csv files in Reserves ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Flex_Down.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Flex_Up.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Reg_Down.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Reg_Up.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Spin_Up_R1.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Spin_Up_R2.csv ...\n",
"[ Info: Parsing csv data in DAY_AHEAD_regional_Spin_Up_R3.csv ...\n",
"[ Info: Parsing csv data in REAL_TIME_regional_Reg_Down.csv ...\n",
"[ Info: Parsing csv data in REAL_TIME_regional_Reg_Up.csv ...\n",
"[ Info: Parsing csv data in REAL_TIME_regional_Spin_Up_R1.csv ...\n",
"[ Info: Parsing csv data in REAL_TIME_regional_Spin_Up_R2.csv ...\n",
"[ Info: Parsing csv data in REAL_TIME_regional_Spin_Up_R3.csv ...\n",
"[ Info: Successfully parsed Reserves\n",
"[ Info: Parsing csv data in branch.csv ...\n",
"[ Info: Successfully parsed branch.csv\n",
"[ Info: Parsing csv data in bus.csv ...\n",
"[ Info: Successfully parsed bus.csv\n",
"[ Info: Parsing csv data in dc_branch.csv ...\n",
"[ Info: Successfully parsed dc_branch.csv\n",
"[ Info: Parsing csv data in gen.csv ...\n",
"[ Info: Successfully parsed gen.csv\n",
"[ Info: Parsing csv data in reserves.csv ...\n",
"[ Info: Successfully parsed reserves.csv\n",
"[ Info: Parsing csv data in simulation_objects.csv ...\n",
"[ Info: Successfully parsed simulation_objects.csv\n",
"[ Info: Parsing csv data in storage.csv ...\n",
"[ Info: Successfully parsed storage.csv\n",
"[ Info: Parsing csv data in timeseries_pointers.csv ...\n",
"[ Info: Successfully parsed timeseries_pointers.csv\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": "PowerSystems.PowerSystemTableData:\n directory: /home/runner/.julia/packages/PowerSystems/gGFFl/data/RTS_GMLC\n timeseries_metadata_file: /home/runner/.julia/packages/PowerSystems/gGFFl/data/RTS_GMLC/timeseries_pointers.json\n base_power: 100.0\n PowerSystems.InputCategoryModule.InputCategory.RESERVE = 6: 7×7 DataFrame\n PowerSystems.InputCategoryModule.InputCategory.STORAGE = 8: 22×8 DataFrame\n PowerSystems.InputCategoryModule.InputCategory.BRANCH = 1: 120×14 DataFrame\n PowerSystems.InputCategoryModule.InputCategory.GENERATOR = 4: 158×58 DataFrame\n PowerSystems.InputCategoryModule.InputCategory.BUS = 2: 73×15 DataFrame\n PowerSystems.InputCategoryModule.InputCategory.DC_BRANCH = 3: 1×60 DataFrame\n"
},
"metadata": {},
"execution_count": 3
}
],
"cell_type": "code",
"source": [
"RTS_GMLC_DIR = joinpath(base_dir, \"data\", \"RTS_GMLC\");\n",
"rawsys = PowerSystems.PowerSystemTableData(\n",
" RTS_GMLC_DIR,\n",
" 100.0,\n",
" joinpath(RTS_GMLC_DIR, \"user_descriptors.yaml\"),\n",
" timeseries_metadata_file = joinpath(RTS_GMLC_DIR, \"timeseries_pointers.json\"),\n",
" generator_mapping_file = joinpath(RTS_GMLC_DIR, \"generator_mapping_multi_start.yaml\"),\n",
")"
],
"metadata": {},
"execution_count": 3
},
{
"cell_type": "markdown",
"source": [
"### Create a `System`\n",
"Next, we'll create a `System` from the `rawsys` data. Since a `System` is predicated on a\n",
"time series resolution and the `rawsys` data includes both 5-minute and 1-hour resolution\n",
"time series, we also need to specify which time series we want to include in the `System`.\n",
"The `time_series_resolution` kwarg filters to only include time series with a matching resolution."
],
"metadata": {}
},
{
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ Info: Unit System changed to InfrastructureSystems.UnitSystemModule.UnitSystem.DEVICE_BASE = 1\n",
"┌ Warning: Missing PowerSystems.InputCategoryModule.InputCategory.LOAD = 5 data.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:213\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: Missing PowerSystems.InputCategoryModule.InputCategory.LOAD = 5 data.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:213\n",
"[ Info: Adding contributing generators for Spin_Up_R1 by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Spin_Up_R2 by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Spin_Up_R3 by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Flex_Up by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Flex_Down by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Reg_Up by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"[ Info: Adding contributing generators for Reg_Down by category\n",
"┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Status at Start is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Time at Status is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: User-defined column name Must Run is not in dataframe.\n",
"└ @ PowerSystems ~/.julia/packages/PowerSystems/gGFFl/src/parsers/power_system_table_data.jl:1376\n",
"┌ Warning: There is only one forecast window. Setting interval = 0 seconds\n",
"└ @ InfrastructureSystems ~/.julia/packages/InfrastructureSystems/Z74ym/src/component.jl:712\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": "System\n┌───────────────────┬─────────────┐\n│ Property │ Value │\n├───────────────────┼─────────────┤\n│ System Units Base │ DEVICE_BASE │\n│ Base Power │ 100.0 │\n│ Base Frequency │ 60.0 │\n│ Num Components │ 525 │\n└───────────────────┴─────────────┘\n\nStatic Components\n┌───────────────────────────────────────────┬───────┬────────────────────────┬──\n│ Type │ Count │ Has Static Time Series │ ⋯\n├───────────────────────────────────────────┼───────┼────────────────────────┼──\n│ Arc │ 109 │ false │ ⋯\n│ Area │ 3 │ false │ ⋯\n│ Bus │ 73 │ false │ ⋯\n│ GenericBattery │ 1 │ false │ ⋯\n│ HVDCLine │ 1 │ false │ ⋯\n│ HydroDispatch │ 20 │ true │ ⋯\n│ Line │ 105 │ false │ ⋯\n│ LoadZone │ 3 │ true │ ⋯\n│ PowerLoad │ 51 │ true │ ⋯\n│ RenewableDispatch │ 30 │ true │ ⋯\n│ RenewableFix │ 31 │ true │ ⋯\n│ TapTransformer │ 15 │ false │ ⋯\n│ ThermalMultiStart │ 76 │ false │ ⋯\n│ VariableReserve{PowerSystems.ReserveDown} │ 2 │ true │ ⋯\n│ VariableReserve{PowerSystems.ReserveUp} │ 5 │ true │ ⋯\n└───────────────────────────────────────────┴───────┴────────────────────────┴──\n 1 column omitted\n\nTime Series Summary\n┌──────────────────────────────────┬─────────────────────┐\n│ Property │ Value │\n├──────────────────────────────────┼─────────────────────┤\n│ Components with time series data │ 142 │\n│ Total StaticTimeSeries │ 182 │\n│ Total Forecasts │ 182 │\n│ Resolution │ 60 minutes │\n│ First initial time │ 2020-01-01T00:00:00 │\n│ Last initial time │ 2020-01-01T00:00:00 │\n│ Horizon │ 24 │\n│ Interval │ 0 minutes │\n│ Forecast window count │ 1 │\n└──────────────────────────────────┴─────────────────────┘\n",
"text/html": [
"\n",
"\n",
"\n",
"\n",
"
\n",
"\n",
" System\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" System Units Base | \n",
" DEVICE_BASE | \n",
"
\n",
" \n",
" Base Power | \n",
" 100.0 | \n",
"
\n",
" \n",
" Base Frequency | \n",
" 60.0 | \n",
"
\n",
" \n",
" Num Components | \n",
" 525 | \n",
"
\n",
" \n",
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" Static Components\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Arc | \n",
" 109 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" Area | \n",
" 3 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" Bus | \n",
" 73 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" GenericBattery | \n",
" 1 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" HVDCLine | \n",
" 1 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" HydroDispatch | \n",
" 20 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" Line | \n",
" 105 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" LoadZone | \n",
" 3 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" PowerLoad | \n",
" 51 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" RenewableDispatch | \n",
" 30 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" RenewableFix | \n",
" 31 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" TapTransformer | \n",
" 15 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" ThermalMultiStart | \n",
" 76 | \n",
" false | \n",
" false | \n",
"
\n",
" \n",
" VariableReserve{PowerSystems.ReserveDown} | \n",
" 2 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
" VariableReserve{PowerSystems.ReserveUp} | \n",
" 5 | \n",
" true | \n",
" true | \n",
"
\n",
" \n",
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
" Time Series Summary\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" Components with time series data | \n",
" 142 | \n",
"
\n",
" \n",
" Total StaticTimeSeries | \n",
" 182 | \n",
"
\n",
" \n",
" Total Forecasts | \n",
" 182 | \n",
"
\n",
" \n",
" Resolution | \n",
" 60 minutes | \n",
"
\n",
" \n",
" First initial time | \n",
" 2020-01-01T00:00:00 | \n",
"
\n",
" \n",
" Last initial time | \n",
" 2020-01-01T00:00:00 | \n",
"
\n",
" \n",
" Horizon | \n",
" 24 | \n",
"
\n",
" \n",
" Interval | \n",
" 0 minutes | \n",
"
\n",
" \n",
" Forecast window count | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"\n",
"\n"
]
},
"metadata": {},
"execution_count": 4
}
],
"cell_type": "code",
"source": [
"sys = System(rawsys; time_series_resolution = Dates.Hour(1));\n",
"horizon = 24;\n",
"interval = Dates.Hour(24);\n",
"transform_single_time_series!(sys, horizon, interval);\n",
"sys"
],
"metadata": {},
"execution_count": 4
},
{
"cell_type": "markdown",
"source": [
"---\n",
"\n",
"*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*"
],
"metadata": {}
}
],
"nbformat_minor": 3,
"metadata": {
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.7.2"
},
"kernelspec": {
"name": "julia-1.7",
"display_name": "Julia 1.7.2",
"language": "julia"
}
},
"nbformat": 4
}