{ "cells": [ { "cell_type": "markdown", "source": [ "# Simulations with TAMU data and [PowerSimulations.jl](https://github.com/NREL/PowerSimulations.jl)" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "**Originally Contributed by**: Clayton Barrows" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Introduction" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "This is a basic simulation example using the [TAMU Cases](https://electricgrids.engr.tamu.edu/)." ], "metadata": {} }, { "cell_type": "markdown", "source": [ "## Dependencies" ], "metadata": {} }, { "outputs": [], "cell_type": "code", "source": [ "using SIIPExamples\n", "pkgpath = dirname(dirname(pathof(SIIPExamples)))\n", "using Dates" ], "metadata": {}, "execution_count": 1 }, { "cell_type": "markdown", "source": [ "### Modeling Packages" ], "metadata": {} }, { "outputs": [], "cell_type": "code", "source": [ "using PowerSystems\n", "using PowerSimulations\n", "using PowerSystemCaseBuilder" ], "metadata": {}, "execution_count": 2 }, { "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": 3 } ], "cell_type": "code", "source": [ "using Cbc #solver\n", "solver = optimizer_with_attributes(Cbc.Optimizer, \"logLevel\" => 1, \"ratioGap\" => 0.5)" ], "metadata": {}, "execution_count": 3 }, { "cell_type": "markdown", "source": [ "### Create a `System` from TAMU data\n", "We have included some of the TAMU cases (with truncated time series info)\n", "in the PowerSystemCaseBuilder testing, so we can just use that." ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ Info: Loaded time series from storage file existing=tamu_ACTIVSg2000_sys_time_series_storage.h5 new=/var/folders/27/2jr8c7gn4j72fvrg4qt81zrw8w_711/T/jl_MwJA7D\n", "┌ Warning: Rate 221.0 MW for PASADENA 2 2-7004-DEER PARK 2 -7106-i_1641 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for PRAIRIE VI~1-7010-PATTISON 0 -7182-i_1647 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 251.0 MW for GORDON 0 -5190-DE LEON 0 -5264-i_989 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for AUSTIN 3 2 -6040-AUSTIN 25 0 -6019-i_1268 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 187.0 MW for DESOTO 0 -5157-DUNCANVILL~1-5194-i_928 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 250.0 MW for ABILENE 6 0 -3077-TUSOCOLA 0 -3131-i_313 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for AUSTIN 6 0 -6018-AUSTIN 2 2 -6256-i_1265 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for SANTA FE 1 0-7213-TEXAS CITY~3-7273-i_2026 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 187.0 MW for GRAPEVINE 0 -5245-SOUTHLAKE 0 -5339-i_1057 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for EDEN 0 -3132-MASON 0 -3075-i_310 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for MISSOURI C~1-7052-RICHMOND 1 0-7053-i_1742 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 300.0 MW for MISSION 3 0 -4079-MISSION 4 1 -4040-i_436 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 2020.0 MW for KATY 3 0 -7341-WHARTON 1 0 -7304-i_2154 is larger than the max expected in the range of (min = 850.0, max = 1075.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 250.0 MW for SUGAR LAND~1-7087-SUGAR LAND~4-7127-i_1816 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 300.0 MW for HOUSTON 4 2 -7188-HOUSTON 39 0-7255-i_2012 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for SAN ANTON~14-6220-SAN ANTON~37-6121-i_1437 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 548.0 MW for CONROE 5 0 -7035-WILLIS 1 1 -7390-i_1702 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 149.0 MW for RICHMOND 2 0-7088-WALLIS 0 -7116-i_1825 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 187.0 MW for FARMERSVIL~1-5408-JOSEPHINE 0 -5421-i_1206 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for HOUSTON 2 0 -7145-CROSBY 0 -7243-i_1921 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for CUERO 2 1 -6173-YOAKUM 1 -6031-i_1305 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 187.0 MW for KOPPERL 0 -5247-WALNUT SPR~1-5209-i_1009 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for JACKSONVIL~7-8121-RUSK 0 -8055-i_2281 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for SAN ANGELO~3-3130-BIG LAKE 0 -1044-i_64 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for SIMONTON 0 -7012-WALLIS 0 -7116-i_1652 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 548.0 MW for ROCKDALE 1 1-6108-PFLUGERVIL~2-6034-i_1310 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for GOODFELLOW~1-3142-MILES 0 -3072-i_306 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 750.0 MW for ALBANY 1 1 -5395-ABILENE 1 0 -3088-i_319 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 310.0 MW for LEWISVILLE~4-5370-FLOWER MOU~1-5253-i_1072 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 750.0 MW for SARITA 1 0 -4140-CORPUS CH~18-4080-i_498 is larger than the max expected in the range of (min = 134.0, max = 145.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 149.0 MW for DEL RIO 1 -3051-SANDERSON 0 -1012-i_20 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 149.0 MW for LOS FRESNO~1-4110-SAN BENITO 0-4171-i_523 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for ETOILE 0 -8022-GARRISON 0 -8021-i_2247 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for HOUSTON 18 0-7100-HOUSTON 24 0-7222-i_1857 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for GREGORY 1 -4057-PORTLAND 0 -4145-i_466 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 409.0 MW for FORT WORT~16-5027-FORT WORT~17-5098-i_652 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for HOUSTON 91 0-7396-KATY 2 1 -7410-i_2189 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 310.0 MW for GRAND PRAI~1-5145-DALLAS 2 1 -5323-i_899 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 187.0 MW for HUBBARD 0 -5211-DAWSON 0 -5275-i_1012 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for SAN ANTON~67-6043-SAN ANTON~72-6236-i_1334 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 251.0 MW for LANCASTER ~1-5109-RED OAK 0 -5333-i_828 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for LAPORTE 2 -7132-BAYTOWN 3 1 -7283-i_1904 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for SAN ANTON~68-6026-SAN ANTON~54-6182-i_1291 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 310.0 MW for PLANO 2 0 -5010-PLANO 1 0 -5096-i_606 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 149.0 MW for JOURDANTON 0-4117-CHARLOTTE 0 -4016-i_379 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 2768.0 MW for LAPORTE 0 -7130-DEER PARK 0 -7104-i_1866 is larger than the max expected in the range of (min = 850.0, max = 1075.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for BIG SPRIN~13-1067-BIG SPRING~8-1005-i_12 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 98.0 MW for HOLLAND 1 -5459-ROGERS 1 -5391-i_1204 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 251.0 MW for TELEPHONE 0 -2122-BONHAM 0 -2030-i_134 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n", "┌ Warning: Rate 221.0 MW for HOUSTON 83 0-7221-HOUSTON 84 0-7220-i_2045 is larger than the max expected in the range of (min = 47.0, max = 52.0).\n", "└ @ PowerSystems ~/.julia/packages/PowerSystems/N2l8o/src/utils/IO/branchdata_checks.jl:148\n" ] } ], "cell_type": "code", "source": [ "sys = build_system(PSYTestSystems, \"tamu_ACTIVSg2000_sys\")\n", "\n", "horizon = 24;\n", "interval = Dates.Hour(24);\n", "transform_single_time_series!(sys, horizon, interval);" ], "metadata": {}, "execution_count": 4 }, { "cell_type": "markdown", "source": [ "## Run a PCM\n", "note that the TAMU data doesn't contain startup and shutdown costs, or minimum up/down\n", "time limits, so a UC problem merely respects minmum generation levels." ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "┌ Warning: No Feedforward Chronologies have been defined. This configuration assummes that there is no information passing between problems\n", "└ @ PowerSimulations ~/.julia/packages/PowerSimulations/DWqCz/src/core/simulation_sequence.jl:103\n" ] }, { "output_type": "execute_result", "data": { "text/plain": "Feed Forward Chronology\n-----------------------\n\nInitial Condition Chronology\n----------------------------\n\n1\n\n" }, "metadata": {}, "execution_count": 5 } ], "cell_type": "code", "source": [ "sim_folder = mkpath(joinpath(pkgpath, \"TAMU-sim\"))\n", "problems = SimulationProblems(\n", " UC = OperationsProblem(\n", " template_unit_commitment(transmission = CopperPlatePowerModel),\n", " sys,\n", " optimizer = solver,\n", " ),\n", ")\n", "intervals = Dict(\"UC\" => (Hour(24), Consecutive()))\n", "DA_sequence = SimulationSequence(\n", " problems = problems,\n", " intervals = intervals,\n", " ini_cond_chronology = IntraProblemChronology(),\n", ")" ], "metadata": {}, "execution_count": 5 }, { "cell_type": "markdown", "source": [ "### Define and build a simulation" ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "┌ Info: \n", "│ ──────────────────────────────────────────────────────────────────────────────\n", "│ Time Allocations \n", "│ ────────────────────── ───────────────────────\n", "│ Tot / % measured: 5.74s / 100% 1.68GiB / 100% \n", "│ \n", "│ Section ncalls time %tot avg alloc %tot avg\n", "│ ──────────────────────────────────────────────────────────────────────────────\n", "│ Build Simulation 1 5.74s 100% 5.74s 1.68GiB 100% 1.68GiB\n", "│ Build Problems 1 5.64s 98.3% 5.64s 1.66GiB 98.8% 1.66GiB\n", "│ Problem UC 1 5.64s 98.3% 5.64s 1.66GiB 98.8% 1.66GiB\n", "│ PowerLoad 1 1.13s 19.6% 1.13s 110MiB 6.38% 110MiB\n", "│ ThermalStandard 1 524ms 9.14% 524ms 283MiB 16.4% 283MiB\n", "│ CopperPlateP... 1 48.9ms 0.85% 48.9ms 27.1MiB 1.58% 27.1MiB\n", "│ Build pre-step 1 2.68ms 0.05% 2.68ms 1.13MiB 0.07% 1.13MiB\n", "│ Objective 1 1.20ms 0.02% 1.20ms 971KiB 0.06% 971KiB\n", "│ Services 1 130μs 0.00% 130μs 10.4KiB 0.00% 10.4KiB\n", "│ RenewableFix 1 72.4μs 0.00% 72.4μs 4.58KiB 0.00% 4.58KiB\n", "│ HydroDispatch 1 59.1μs 0.00% 59.1μs 4.58KiB 0.00% 4.58KiB\n", "│ RenewableDis... 1 28.7μs 0.00% 28.7μs 4.63KiB 0.00% 4.63KiB\n", "│ HydroEnergyR... 1 20.3μs 0.00% 20.3μs 4.70KiB 0.00% 4.70KiB\n", "│ Interruptibl... 1 18.8μs 0.00% 18.8μs 4.63KiB 0.00% 4.63KiB\n", "│ Line 1 5.04μs 0.00% 5.04μs 64.0B 0.00% 64.0B\n", "│ TapTransformer 1 1.71μs 0.00% 1.71μs 64.0B 0.00% 64.0B\n", "│ HVDCLine 1 1.58μs 0.00% 1.58μs 64.0B 0.00% 64.0B\n", "│ Transformer2W 1 1.44μs 0.00% 1.44μs 64.0B 0.00% 64.0B\n", "│ Serializing Simu... 1 93.8ms 1.63% 93.8ms 20.5MiB 1.19% 20.5MiB\n", "│ Initialize Simul... 1 2.54ms 0.04% 2.54ms 22.3KiB 0.00% 22.3KiB\n", "│ Check Steps 1 22.5μs 0.00% 22.5μs 1.61KiB 0.00% 1.61KiB\n", "│ Assign FeedForward 1 7.71μs 0.00% 7.71μs 1.11KiB 0.00% 1.11KiB\n", "└ ──────────────────────────────────────────────────────────────────────────────\n" ] }, { "output_type": "execute_result", "data": { "text/plain": "BuildStatus.BUILT = 0" }, "metadata": {}, "execution_count": 6 } ], "cell_type": "code", "source": [ "sim = Simulation(\n", " name = \"TAMU-test\",\n", " steps = 3,\n", " problems = problems,\n", " sequence = DA_sequence,\n", " simulation_folder = sim_folder,\n", ")\n", "\n", "build!(sim)" ], "metadata": {}, "execution_count": 6 }, { "cell_type": "markdown", "source": [ "### Execute the simulation" ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\rProgress: 33%|█████████████▋ | ETA: 0:00:58\u001b[K\r\n", " Step: 1\u001b[K\r\n", " problem: UC\u001b[K\r\n", " Simulation Timestamp: 2016-01-01T00:00:00\u001b[K\r\u001b[A\r\u001b[A\r\u001b[A\n", "\n", "\n", "\r\u001b[K\u001b[A\r\u001b[K\u001b[A\r\u001b[K\u001b[A\rProgress: 67%|███████████████████████████▍ | ETA: 0:00:29\u001b[K\r\n", " Step: 2\u001b[K\r\n", " problem: UC\u001b[K\r\n", " Simulation Timestamp: 2016-01-02T00:00:00\u001b[K\r\u001b[A\r\u001b[A\r\u001b[A\n", "\n", "\n", "\r\u001b[K\u001b[A\r\u001b[K\u001b[A\r\u001b[K\u001b[A\rProgress: 100%|█████████████████████████████████████████| Time: 0:01:28\u001b[K\r\n", " Step: 3\u001b[K\r\n", " problem: UC\u001b[K\r\n", " Simulation Timestamp: 2016-01-03T00:00:00\u001b[K\n" ] }, { "output_type": "execute_result", "data": { "text/plain": "RunStatus.SUCCESSFUL = 0" }, "metadata": {}, "execution_count": 7 } ], "cell_type": "code", "source": [ "execute!(sim)" ], "metadata": {}, "execution_count": 7 }, { "cell_type": "markdown", "source": [ "### Load and analyze results" ], "metadata": {} }, { "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ Info: checking integrity of /Users/cbarrows/Documents/repos/SIIPExamples.jl/TAMU-sim/TAMU-test/21/data_store/simulation_store.h5\n", "[ Info: reading variables from data store\n" ] }, { "output_type": "execute_result", "data": { "text/plain": "\u001b[1m72×545 DataFrame\u001b[0m\n\u001b[1m Row \u001b[0m│\u001b[1m DateTime \u001b[0m\u001b[1m generator-1004-1 \u001b[0m\u001b[1m generator-1006-1 \u001b[0m\u001b[1m generator-1009\u001b[0m ⋯\n\u001b[1m \u001b[0m│\u001b[90m DateTime \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m Float64 \u001b[0m\u001b[90m Float64 \u001b[0m ⋯\n─────┼──────────────────────────────────────────────────────────────────────────\n 1 │ 2016-01-01T00:00:00 1.0 1.0 1 ⋯\n 2 │ 2016-01-01T01:00:00 1.0 1.0 1\n 3 │ 2016-01-01T02:00:00 1.0 1.0 1\n 4 │ 2016-01-01T03:00:00 1.0 1.0 1\n 5 │ 2016-01-01T04:00:00 1.0 1.0 1 ⋯\n 6 │ 2016-01-01T05:00:00 1.0 1.0 1\n 7 │ 2016-01-01T06:00:00 1.0 1.0 1\n 8 │ 2016-01-01T07:00:00 1.0 1.0 1\n ⋮ │ ⋮ ⋮ ⋮ ⋮ ⋱\n 66 │ 2016-01-03T17:00:00 1.0 1.0 1 ⋯\n 67 │ 2016-01-03T18:00:00 1.0 1.0 1\n 68 │ 2016-01-03T19:00:00 1.0 1.0 1\n 69 │ 2016-01-03T20:00:00 1.0 1.0 1\n 70 │ 2016-01-03T21:00:00 1.0 1.0 1 ⋯\n 71 │ 2016-01-03T22:00:00 1.0 1.0 1\n 72 │ 2016-01-03T23:00:00 1.0 1.0 1\n\u001b[36m 542 columns and 57 rows omitted\u001b[0m", "text/html": [ "

72 rows × 545 columns (omitted printing of 540 columns)

DateTimegenerator-1004-1generator-1006-1generator-1009-1generator-1011-1
DateTimeFloat64Float64Float64Float64
12016-01-01T00:00:001.01.01.01.0
22016-01-01T01:00:001.01.01.01.0
32016-01-01T02:00:001.01.01.01.0
42016-01-01T03:00:001.01.01.01.0
52016-01-01T04:00:001.01.01.01.0
62016-01-01T05:00:001.01.01.01.0
72016-01-01T06:00:001.01.01.01.0
82016-01-01T07:00:001.01.01.01.0
92016-01-01T08:00:001.01.01.01.0
102016-01-01T09:00:001.01.01.01.0
112016-01-01T10:00:001.01.01.01.0
122016-01-01T11:00:001.01.01.01.0
132016-01-01T12:00:001.01.01.01.0
142016-01-01T13:00:001.01.01.01.0
152016-01-01T14:00:001.01.01.01.0
162016-01-01T15:00:001.01.01.01.0
172016-01-01T16:00:001.01.01.01.0
182016-01-01T17:00:001.01.01.01.0
192016-01-01T18:00:001.01.01.01.0
202016-01-01T19:00:001.01.01.01.0
212016-01-01T20:00:001.01.01.01.0
222016-01-01T21:00:001.01.01.01.0
232016-01-01T22:00:001.01.01.01.0
242016-01-01T23:00:001.01.01.01.0
" ] }, "metadata": {}, "execution_count": 8 } ], "cell_type": "code", "source": [ "sim_results = SimulationResults(sim);\n", "uc_results = get_problem_results(sim_results, \"UC\")\n", "read_realized_variables(uc_results, names = [:On__ThermalStandard])[:On__ThermalStandard]" ], "metadata": {}, "execution_count": 8 }, { "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.4" }, "kernelspec": { "name": "julia-1.5", "display_name": "Julia 1.5.4", "language": "julia" } }, "nbformat": 4 }