Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 46 additions & 22 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Statistics", "UUIDs"]
git-tree-sha1 = "01ca3823217f474243cc2c8e6e1d1f45956fe872"
git-tree-sha1 = "ffabdf5297c9038973a0a3724132aa269f38c448"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "1.0.0"
version = "1.1.0"

[[BinDeps]]
deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"]
Expand Down Expand Up @@ -92,6 +92,12 @@ git-tree-sha1 = "be770c08881f7bb928dfd86d1ba83798f76cf62a"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.10.9"

[[CodeTracking]]
deps = ["InteractiveUtils", "UUIDs"]
git-tree-sha1 = "8ad457cfeb0bca98732c97958ef81000a543e73e"
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
version = "1.0.5"

[[CodecBzip2]]
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
git-tree-sha1 = "2e62a725210ce3c3c2e1a3080190e7ca491f18d7"
Expand Down Expand Up @@ -321,9 +327,9 @@ version = "0.57.3+0"

[[GeometryBasics]]
deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"]
git-tree-sha1 = "4136b8a5668341e58398bb472754bff4ba0456ff"
git-tree-sha1 = "15ff9a14b9e1218958d3530cc288cf31465d9ae2"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
version = "0.3.12"
version = "0.3.13"

[[Gettext_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
Expand Down Expand Up @@ -385,9 +391,9 @@ version = "0.6.1"

[[InfrastructureSystems]]
deps = ["CSV", "DataFrames", "DataStructures", "Dates", "DocStringExtensions", "HDF5", "InteractiveUtils", "JSON3", "Logging", "Mustache", "Pkg", "PrettyTables", "Random", "TOML", "Test", "TimeSeries", "UUIDs", "YAML"]
git-tree-sha1 = "ef7e450cda38b05c94309b7798727361d87ba4aa"
git-tree-sha1 = "62b1c1c1a8618a582b856ed6078029219f9e4a32"
uuid = "2cd47ed4-ca9b-11e9-27f2-ab636a7671f1"
version = "1.9.1"
version = "1.10.0"

[[IniFile]]
deps = ["Test"]
Expand Down Expand Up @@ -457,6 +463,12 @@ git-tree-sha1 = "8dfc5df8aad9f2cfebc8371b69700efd02060827"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.21.8"

[[JuliaInterpreter]]
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
git-tree-sha1 = "31c2eee64c1eee6e8e3f30d5a03d4b5b7086ab29"
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
version = "0.8.18"

[[Kaleido_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "2ef87eeaa28713cb010f9fb0be288b6c1a4ecd53"
Expand Down Expand Up @@ -588,6 +600,12 @@ version = "0.2.4"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[LoweredCodeUtils]]
deps = ["JuliaInterpreter"]
git-tree-sha1 = "4bfb8b57df913f3b28a6bd3bdbebe9a50538e689"
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
version = "2.1.0"

[[Lz4_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "5d494bc6e85c4c9b626ee0cab05daa4085486ab1"
Expand Down Expand Up @@ -774,16 +792,16 @@ uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
version = "1.0.10"

[[PlotlyBase]]
deps = ["Base64", "Dates", "DelimitedFiles", "DocStringExtensions", "JSON", "Kaleido_jll", "LaTeXStrings", "Logging", "Pkg", "REPL", "Requires", "Statistics", "UUIDs"]
git-tree-sha1 = "bca220daa9705b891a42c6ce0c20534a3196e73e"
deps = ["Base64", "Dates", "DelimitedFiles", "DocStringExtensions", "JSON", "Kaleido_jll", "LaTeXStrings", "Logging", "Parameters", "Pkg", "REPL", "Requires", "Statistics", "UUIDs"]
git-tree-sha1 = "6c5a286f9a20eb349af1d8eed33db78f02704b46"
uuid = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
version = "0.5.4"
version = "0.6.2"

[[PlotlyJS]]
deps = ["Blink", "DelimitedFiles", "JSExpr", "JSON", "Markdown", "Pkg", "PlotlyBase", "REPL", "Reexport", "Requires", "WebIO"]
git-tree-sha1 = "882ec81d5cf7d32168946397652ead9df99e0346"
git-tree-sha1 = "04b78af3c43646bfcc938058ece9d030abc9d6e3"
uuid = "f0f68f2c-4968-5e81-91da-67840de0976a"
version = "0.15.0"
version = "0.16.1"

[[Plots]]
deps = ["Base64", "Contour", "Dates", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]
Expand All @@ -799,9 +817,9 @@ version = "1.2.1"

[[PowerGraphics]]
deps = ["CSV", "Colors", "DataFrames", "DataStructures", "Dates", "InfrastructureSystems", "InteractiveUtils", "Plots", "PowerSimulations", "PowerSystems", "Reexport", "Requires", "TimeSeries", "YAML"]
git-tree-sha1 = "680f953f657913b61353483b114189cf7b38fbba"
git-tree-sha1 = "538a4230007119f7788418f3430abba67caaf62d"
uuid = "5f7eddb3-86b1-49e8-a95a-ddc0f45eea41"
version = "0.10.0"
version = "0.11.0"

[[PowerModels]]
deps = ["InfrastructureModels", "JSON", "JuMP", "LinearAlgebra", "MathOptInterface", "Memento", "NLsolve", "SparseArrays"]
Expand All @@ -811,15 +829,15 @@ version = "0.18.2"

[[PowerSimulations]]
deps = ["CSV", "DataFrames", "DataStructures", "Dates", "HDF5", "InfrastructureSystems", "JSON", "JSON3", "JuMP", "LinearAlgebra", "Logging", "MathOptInterface", "ParameterJuMP", "Pkg", "PowerModels", "PowerSystems", "ProgressMeter", "SHA", "Serialization", "TimeSeries", "TimerOutputs"]
git-tree-sha1 = "adb743045def838f30d84cce65c704fbdb464990"
git-tree-sha1 = "bb2f654cba86a4fd093c9e218685e713a77b05a2"
uuid = "e690365d-45e2-57bb-ac84-44ba829e73c4"
version = "0.14.4"
version = "0.14.5"

[[PowerSystems]]
deps = ["CSV", "DataFrames", "Dates", "DocStringExtensions", "InfrastructureSystems", "InteractiveUtils", "JSON3", "LinearAlgebra", "Logging", "NLsolve", "SparseArrays", "TimeSeries", "UUIDs", "YAML"]
git-tree-sha1 = "ed1c18b454e005be1dc24e88675be48c547113eb"
git-tree-sha1 = "82379bf474691c87d319fd573ff57c0d379546df"
uuid = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd"
version = "1.8.2"
version = "1.9.0"

[[Preferences]]
deps = ["TOML"]
Expand Down Expand Up @@ -879,6 +897,12 @@ git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.1.3"

[[Revise]]
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"]
git-tree-sha1 = "410bbe13d9a7816e862ed72ac119bda7fb988c08"
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
version = "3.1.17"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

Expand Down Expand Up @@ -960,10 +984,10 @@ uuid = "69024149-9ee7-55f6-a4c4-859efe599b68"
version = "0.3.5"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "Tables"]
git-tree-sha1 = "44b3afd37b17422a62aea25f04c1f7e09ce6b07f"
deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"]
git-tree-sha1 = "000e168f5cc9aded17b6999a560b7c11dda69095"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.5.1"
version = "0.6.0"

[[StructTypes]]
deps = ["Dates", "UUIDs"]
Expand Down Expand Up @@ -1015,9 +1039,9 @@ version = "1.5.5"

[[TimerOutputs]]
deps = ["ExprTools", "Printf"]
git-tree-sha1 = "bf8aacc899a1bd16522d0350e1e2310510d77236"
git-tree-sha1 = "9f494bc54b4c31404a9eff449235836615929de1"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.9"
version = "0.5.10"

[[TranscodingStreams]]
deps = ["Random", "Test"]
Expand Down
10 changes: 7 additions & 3 deletions RunSimulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ set_device_model!(template_dauc, RenewableDispatch, RenewableFullDispatch)
set_device_model!(template_dauc, PowerLoad, StaticPowerLoad)
# Use FixedOutput instead of HydroDispatchRunOfRiver to get consistent results because model might decide to curtail wind vs. hydro (same cost)
set_device_model!(template_dauc, HydroDispatch, FixedOutput)
set_service_model!(template_dauc, ServiceModel(VariableReserve{ReserveUp}, RangeReserve))
set_service_model!(template_dauc, ServiceModel(VariableReserve{ReserveDown}, RangeReserve))
set_service_model!(template_dauc, ServiceModel(VariableReserve{ReserveUp}, RampReserve))
set_service_model!(template_dauc, ServiceModel(VariableReserve{ReserveDown}, RampReserve))
set_device_model!(template_dauc, GenericBattery, BookKeepingwReservation)

set_device_model!(template_dauc, ThermalMultiStart, ThermalMultiStartUnitCommitment)
Expand Down Expand Up @@ -203,7 +203,11 @@ set_device_model!(template_hauc, HydroDispatch, FixedOutput)
set_service_model!(template_hauc, ServiceModel(VariableReserve{ReserveUp}, RampReserve))
set_service_model!(template_hauc, ServiceModel(VariableReserve{ReserveDown}, RangeReserve))
if use_storage
set_device_model!(template_hauc, GenericBattery, BookKeepingwReservation)
if use_storage_reserves
set_device_model!(template_hauc, GenericBattery, BatteryAncillaryServices)
else
set_device_model!(template_hauc, GenericBattery, BookKeepingwReservation)
end
end
### Using Dispatch here, not the same as above
set_device_model!(template_hauc, ThermalMultiStart, ThermalDispatch)
Expand Down
18 changes: 16 additions & 2 deletions src/plot_custom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,22 @@ function my_plot_fuel(res::PSI.SimulationProblemResults, system::PSY.System, sto
# Can also try system instead of res, I made up this timestamps call
load = get_load_data(res; initial_time = first(timestamps))
load_agg = PG.combine_categories(load.data)
load_agg .*= get_base_power(system) ./ 1000
DataFrames.rename!(load_agg, [:Load])
# Back-up strategy if get_load_data failed
if size(load_agg) != (0, 0)
load_agg .*= get_base_power(system) ./ 1000
DataFrames.rename!(load_agg, [:Load])
else
hour_timestamps = collect(first(timestamps):Hour(1):last(timestamps))
load_agg = zeros(length(timestamps))
for i in 1:length(hour_timestamps)
load = get_load_data(system; initial_time = hour_timestamps[i])
for v in values(load.data)
load_agg[((i - 1) * 12 + 1):(i * 12)] .+=
v[1:12, 1] .* get_base_power(system) ./ 1000
end
end
load_agg = DataFrames.DataFrame(Dict(:Load => load_agg))
end

p = plot_dataframe(
p,
Expand Down