{ "cells": [ { "cell_type": "markdown", "source": [ "# Selective flow constraints with [PowerSimulations.jl](https://github.com/NREL/PowerSimulations.jl)" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "**Originally Contributed by**: Clayton Barrows and Sourabh Dalvi" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Introduction" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "The [Operations Problems example]](../../notebook/3_PowerSimulations_examples/sequential_simulations.ipynb)\n", "shows the basic building blocks of building optimization problems with PowerSimulations.jl.\n", "This example shows how to customize the enforcement of branch flow constraints as is common\n", "when trying to build large scale simulations." ], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Dependencies\n", "### Modeling Packages" ], "metadata": {} }, { "outputs": [], "cell_type": "code", "source": [ "using PowerSystems\n", "using PowerSimulations\n", "using PowerSystemCaseBuilder" ], "metadata": {}, "execution_count": 1 }, { "cell_type": "markdown", "source": [ "### Optimization packages\n", "For this simple example, we can use the Cbc solver with a relatively relaxed tolerance." ], "metadata": {} }, { "outputs": [ { "output_type": "execute_result", "data": { "text/plain": "MathOptInterface.OptimizerWithAttributes(Cbc.Optimizer, Pair{MathOptInterface.AbstractOptimizerAttribute,Any}[MathOptInterface.RawParameter(\"logLevel\") => 1, MathOptInterface.RawParameter(\"ratioGap\") => 0.5])" }, "metadata": {}, "execution_count": 2 } ], "cell_type": "code", "source": [ "using Cbc #solver\n", "solver = optimizer_with_attributes(Cbc.Optimizer, \"logLevel\" => 1, \"ratioGap\" => 0.5)" ], "metadata": {}, "execution_count": 2 }, { "cell_type": "markdown", "source": [ "### Create a `System` from RTS-GMLC data" ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "┌ Info: Building new system test_RTS_GMLC_sys from raw data\n", "└ sys_descriptor.raw_data = \"/Users/cbarrows/.julia/packages/PowerSystemCaseBuilder/UaGGi/data/RTS_GMLC\"\n", "[ 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", "[ Info: Unit System changed to UnitSystem.DEVICE_BASE = 1\n", "┌ Warning: Missing PowerSystems.InputCategoryModule.InputCategory.LOAD = 5 data.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:212\n", "┌ Warning: Rate 175.0 MW for A1 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A2 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A3 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A4 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A5 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A6 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A8 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A9 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A10 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A11 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for AB1 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A12-1 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for A13-2 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A18 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A19 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A20 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A21 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A22 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for AB2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A23 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A24 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A25-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A25-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A26 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A27 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A28 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A29 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A30 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A31-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A31-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A32-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A32-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A33-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A33-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for A34 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for AB3 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B1 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B2 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B3 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B4 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B5 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B6 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B8 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B9 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B10 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B11 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B12-1 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 175.0 MW for B13-2 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for B18 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 500.0 MW for B19 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: User-defined column name Startup Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: Missing PowerSystems.InputCategoryModule.InputCategory.LOAD = 5 data.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:212\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\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/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Shutdown Ramp Rate MW/min is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Status at Start is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Time at Status is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Cold is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Warm is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Start Cost Hot is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: User-defined column name Must Run is not in dataframe.\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/parsers/power_system_table_data.jl:1364\n", "┌ Warning: There is only one forecast window. Setting interval = 0 seconds\n", "└ @ InfrastructureSystems ~/.julia/packages/InfrastructureSystems/v75Hd/src/component.jl:653\n", "[ Info: Serialized time series data to /Users/cbarrows/.julia/packages/PowerSystemCaseBuilder/UaGGi/data/serialized_system/ForecastOnly/test_RTS_GMLC_sys_time_series_storage.h5.\n", "[ Info: Serialized System to /Users/cbarrows/.julia/packages/PowerSystemCaseBuilder/UaGGi/data/serialized_system/ForecastOnly/test_RTS_GMLC_sys.json\n" ] }, { "output_type": "execute_result", "data": { "text/plain": "System\n======\nSystem Units Base: DEVICE_BASE\nBase Power: 100.0\nBase Frequency: 60.0\n\nComponents\n==========\nNum components: 525\n\n\u001b[1m16×3 DataFrame\u001b[0m\n\u001b[1m Row \u001b[0m│\u001b[1m ConcreteType \u001b[0m\u001b[1m SuperTypes \u001b[0m\u001b[1m Count \u001b[0m\n\u001b[1m \u001b[0m│\u001b[90m String \u001b[0m\u001b[90m String \u001b[0m\u001b[90m Int64 \u001b[0m\n─────┼────────────────────────────────────────────────────────────────────────\n 1 │ Arc Topology <: Component <: Infrast… 109\n 2 │ Area AggregationTopology <: Topology … 3\n 3 │ Bus Topology <: Component <: Infrast… 73\n 4 │ GenericBattery Storage <: StaticInjection <: De… 1\n 5 │ HVDCLine DCBranch <: Branch <: Device <: … 1\n 6 │ HydroDispatch HydroGen <: Generator <: StaticI… 1\n 7 │ HydroEnergyReservoir HydroGen <: Generator <: StaticI… 19\n 8 │ Line ACBranch <: Branch <: Device <: … 105\n 9 │ LoadZone AggregationTopology <: Topology … 3\n 10 │ PowerLoad StaticLoad <: ElectricLoad <: St… 51\n 11 │ RenewableDispatch RenewableGen <: Generator <: Sta… 30\n 12 │ RenewableFix RenewableGen <: Generator <: Sta… 31\n 13 │ TapTransformer ACBranch <: Branch <: Device <: … 15\n 14 │ ThermalStandard ThermalGen <: Generator <: Stati… 76\n 15 │ VariableReserve{ReserveDown} Reserve{ReserveDown} <: Service … 2\n 16 │ VariableReserve{ReserveUp} Reserve{ReserveUp} <: Service <:… 5\n\nTimeSeriesContainer\n===================\nComponents with time series data: 142\nTotal StaticTimeSeries: 182\nTotal Forecasts: 182\nResolution: 60 minutes\nFirst initial time: 2020-01-01T00:00:00\nLast initial time: 2020-01-01T00:00:00\nHorizon: 24\nInterval: 0 minutes\nForecast window count: 1\n", "text/html": [ "
Base Power: 100.0
\n", "Num components: 525
\n", "ConcreteType | SuperTypes | Count | |
---|---|---|---|
String | String | Int64 | |
1 | Arc | Topology <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 109 |
2 | Area | AggregationTopology <: Topology <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 3 |
3 | Bus | Topology <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 73 |
4 | GenericBattery | Storage <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 1 |
5 | HVDCLine | DCBranch <: Branch <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 1 |
6 | HydroDispatch | HydroGen <: Generator <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 1 |
7 | HydroEnergyReservoir | HydroGen <: Generator <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 19 |
8 | Line | ACBranch <: Branch <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 105 |
9 | LoadZone | AggregationTopology <: Topology <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 3 |
10 | PowerLoad | StaticLoad <: ElectricLoad <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 51 |
11 | RenewableDispatch | RenewableGen <: Generator <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 30 |
12 | RenewableFix | RenewableGen <: Generator <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 31 |
13 | TapTransformer | ACBranch <: Branch <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 15 |
14 | ThermalStandard | ThermalGen <: Generator <: StaticInjection <: Device <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 76 |
15 | VariableReserve{ReserveDown} | Reserve{ReserveDown} <: Service <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 2 |
16 | VariableReserve{ReserveUp} | Reserve{ReserveUp} <: Service <: Component <: InfrastructureSystemsComponent <: InfrastructureSystemsType <: Any | 5 |
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" ] }, "metadata": {}, "execution_count": 3 } ], "cell_type": "code", "source": [ "sys = build_system(PSITestSystems, \"test_RTS_GMLC_sys\")" ], "metadata": {}, "execution_count": 3 }, { "cell_type": "markdown", "source": [ "### Selecting flow limited lines\n", "Since PowerSimulations will apply constraints by component type (e.g. Line), we need to\n", "change the component type of the lines on which we want to enforce flow limits. So, let's\n", "change the device type of certain branches from Line to MonitoredLine differentiate\n", "treatment when we build the model. Here, we can select inter-regional lines, or lines\n", "above a voltage threshold." ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ Info: Changing C31-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C31-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B26 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B26 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A32-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A32-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing CA-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for CA-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B34 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B34 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B19 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B19 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B31-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B31-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C30 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C30 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B27 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B27 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A21 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A21 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A32-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A32-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B29 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B29 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A18 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A18 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C24 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C24 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C28 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C28 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A29 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A29 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing AB2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for AB2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C27 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C27 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C35 to MonitoredLine\n", "┌ Warning: Rate 722.0 MW for C35 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A25-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A25-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B31-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B31-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C20 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C20 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B23 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B23 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A28 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A28 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A19 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A19 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B25-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B25-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C19 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C19 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C23 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C23 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C25-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C25-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C32-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C32-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B20 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B20 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C25-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C25-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A27 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A27 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C21 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C21 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A34 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A34 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B32-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B32-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B33-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B33-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C26 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C26 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A22 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A22 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A31-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A31-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A33-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A33-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing AB3 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for AB3 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A31-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A31-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C33-2 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C33-2 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing CB-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for CB-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A26 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for A26 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C33-1 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C33-1 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing B21 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for B21 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C29 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C29 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing C18 to MonitoredLine\n", "┌ Warning: Rate 500.0 MW for C18 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/4kGrw/src/utils/IO/branchdata_checks.jl:148\n", "[ Info: Changing A25-2 to MonitoredLine\n", "[ Info: Changing B22 to MonitoredLine\n", "[ Info: Changing B30 to MonitoredLine\n", "[ Info: Changing A33-1 to MonitoredLine\n", "[ Info: Changing C31-1 to MonitoredLine\n", "[ Info: Changing A20 to MonitoredLine\n", "[ Info: Changing B24 to MonitoredLine\n", "[ Info: Changing B28 to MonitoredLine\n", "[ Info: Changing A23 to MonitoredLine\n", "[ Info: Changing B32-2 to MonitoredLine\n", "[ Info: Changing A24 to MonitoredLine\n", "[ Info: Changing B33-2 to MonitoredLine\n", "[ Info: Changing A30 to MonitoredLine\n", "[ Info: Changing B25-2 to MonitoredLine\n", "[ Info: Changing C22 to MonitoredLine\n", "[ Info: Changing C34 to MonitoredLine\n", "[ Info: Changing C32-1 to MonitoredLine\n", "[ Info: Changing B18 to MonitoredLine\n" ] } ], "cell_type": "code", "source": [ "for line in get_components(Line, sys)\n", " if (get_base_voltage(get_from(get_arc(line))) >= 230.0) &&\n", " (get_base_voltage(get_to(get_arc(line))) >= 230.0)\n", " #if get_area(get_from(get_arc(line))) != get_area(get_to(get_arc(line)))\n", " @info \"Changing $(get_name(line)) to MonitoredLine\"\n", " convert_component!(MonitoredLine, line, sys)\n", " end\n", "end" ], "metadata": {}, "execution_count": 4 }, { "cell_type": "markdown", "source": [ "Let's start with a standard unit commitment template using the `PTDFPowerModel` network\n", "formulation which only constructs the admittance matrix rows corresponding to \"bounded\" lines:" ], "metadata": {} }, { "outputs": [ { "output_type": "execute_result", "data": { "text/plain": "\nOperations Problem Specification\n============================================\nTransmission: CopperPlatePowerModel\n============================================\nDevices Models: \n\n\tType: ThermalStandard\n \tFormulation: ThermalBasicUnitCommitment\n\n\tType: HydroDispatch\n \tFormulation: HydroDispatchRunOfRiver\n\n\tType: PowerLoad\n \tFormulation: StaticPowerLoad\n\n\tType: RenewableFix\n \tFormulation: FixedOutput\n\n\tType: RenewableDispatch\n \tFormulation: RenewableFullDispatch\n\n\tType: HydroEnergyReservoir\n \tFormulation: HydroDispatchRunOfRiver\n\n\tType: InterruptibleLoad\n \tFormulation: InterruptiblePowerLoad\n\n============================================\nBranches Models: \n\n\tType: Line\n \tFormulation: StaticBranch\n\n\tType: TapTransformer\n \tFormulation: StaticBranch\n\n\tType: Transformer2W\n \tFormulation: StaticBranch\n\n\tType: HVDCLine\n \tFormulation: HVDCDispatch\n\n============================================\nServices Models:\n\n\tType: VariableReserve{ReserveDown}\n \tFormulation: RangeReserve\n\n\tType: VariableReserve{ReserveUp}\n \tFormulation: RangeReserve\n\n============================================\n" }, "metadata": {}, "execution_count": 5 } ], "cell_type": "code", "source": [ "template = template_unit_commitment(transmission = PTDFPowerModel)" ], "metadata": {}, "execution_count": 5 }, { "cell_type": "markdown", "source": [ "Notice that there is no entry for `MonitoredLine`, so we can add one:" ], "metadata": {} }, { "outputs": [], "cell_type": "code", "source": [ "set_device_model!(template, MonitoredLine, StaticBranch)" ], "metadata": {}, "execution_count": 6 }, { "cell_type": "markdown", "source": [ "We can also relax the formulation applied to the `Line` components to an unbounded flow formulation.\n", "This formulation still enforces Kirchoff's laws, but does not apply flow constraints." ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ Info: Overwriting Line existing model\n" ] } ], "cell_type": "code", "source": [ "set_device_model!(template, Line, StaticBranchUnbounded)" ], "metadata": {}, "execution_count": 7 }, { "cell_type": "markdown", "source": [ "## Build an `OperationsProblem`" ], "metadata": {} }, { "outputs": [ { "output_type": "execute_result", "data": { "text/plain": "BuildStatus.BUILT = 0" }, "metadata": {}, "execution_count": 8 } ], "cell_type": "code", "source": [ "uc_prob = OperationsProblem(template, sys, horizon = 24, optimizer = solver)\n", "build!(uc_prob, output_dir = mktempdir())" ], "metadata": {}, "execution_count": 8 }, { "cell_type": "markdown", "source": [ "Solve the relaxed problem" ], "metadata": {} }, { "outputs": [ { "output_type": "execute_result", "data": { "text/plain": "RunStatus.SUCCESSFUL = 0" }, "metadata": {}, "execution_count": 9 } ], "cell_type": "code", "source": [ "solve!(uc_prob)" ], "metadata": {}, "execution_count": 9 }, { "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.5.2" }, "kernelspec": { "name": "julia-1.5", "display_name": "Julia 1.5.2", "language": "julia" } }, "nbformat": 4 }