diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5adb111..92a65a7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,10 +3,12 @@ on: push: branches: - main + - dev_lb tags: ['*'] pull_request: branches: - main + - dev_lb tags: ['*'] workflow_dispatch: concurrency: diff --git a/Manifest.toml b/Manifest.toml index e86e4cf..1feaa18 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.1" manifest_format = "2.0" -project_hash = "1fdb2fba14a163e0b57127705a95c6bb25a01a8b" +project_hash = "f6a1748316fc32cfa85feb77e6a3a46fb2931a38" [[deps.ASL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -21,26 +21,27 @@ weakdeps = ["ChainRulesCore", "Test"] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" AbstractFFTsTestExt = "Test" -[[deps.AbstractLattices]] -git-tree-sha1 = "222ee9e50b98f51b5d78feb93dd928880df35f06" -uuid = "398f06c4-4d28-53ec-89ca-5b2656b7603d" -version = "0.3.0" - [[deps.AbstractTrees]] -git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" -version = "0.4.4" +version = "0.4.5" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "0fb305e0253fd4e833d486914367a2ee2c2e78d0" +git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.1" +version = "4.0.4" weakdeps = ["StaticArrays"] [deps.Adapt.extensions] AdaptStaticArraysExt = "StaticArrays" +[[deps.AliasTables]] +deps = ["PtrArrays", "Random"] +git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.1.3" + [[deps.Animations]] deps = ["Colors"] git-tree-sha1 = "e81c509d2c8e49592413bfb0bb3b08150056c79d" @@ -49,25 +50,28 @@ version = "0.4.1" [[deps.Aqua]] deps = ["Compat", "Pkg", "Test"] -git-tree-sha1 = "497d933e5998358c2626f782c99a8d4b90af2dd0" +git-tree-sha1 = "12e575f31a6f233ba2485ed86b9325b85df37c61" uuid = "4c88cf16-eb10-579e-8560-4a9242c79595" -version = "0.8.4" +version = "0.8.7" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "bbec08a37f8722786d87bedf84eae19c020c4efa" +deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "5c9b74c973181571deb6442d41e5c902e6b9f38e" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.7.0" +version = "7.12.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceReverseDiffExt = "ReverseDiff" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -75,7 +79,10 @@ version = "7.7.0" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -84,9 +91,9 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.Automa]] deps = ["PrecompileTools", "TranscodingStreams"] -git-tree-sha1 = "588e0d680ad1d7201d4c6a804dcb1cd9cba79fbb" +git-tree-sha1 = "014bc22d6c400a7703c0f5dc1fdc302440cf88be" uuid = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b" -version = "1.0.3" +version = "1.0.4" [[deps.AxisAlgorithms]] deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] @@ -105,14 +112,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BenchmarkTools]] deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "f1f03a9fa24271160ed7e73051fba3c1a759b53f" +git-tree-sha1 = "f1dff6729bc61f4d49e140da1af55dcd1ac97b2f" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.4.0" - -[[deps.BitFlags]] -git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.8" +version = "1.5.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -121,19 +123,13 @@ uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" version = "1.0.8+1" [[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" +version = "0.5.0" [[deps.CRC32c]] uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" -[[deps.CRlibm]] -deps = ["CRlibm_jll"] -git-tree-sha1 = "32abd86e3c2025db5172aa182b982debed519834" -uuid = "96374032-68de-5a5b-8d9e-752f78720389" -version = "1.0.1" - [[deps.CRlibm_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "e329286945d0cfc04456972ea732551869af1cfc" @@ -142,9 +138,9 @@ version = "1.0.1+0" [[deps.CSV]] deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] -git-tree-sha1 = "679e69c611fff422038e9e21e270c4197d49d918" +git-tree-sha1 = "6c834533dc1fabd820c1db03c839bf97e45a3fab" uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -version = "0.10.12" +version = "0.10.14" [[deps.Cairo]] deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] @@ -153,16 +149,16 @@ uuid = "159f3aea-2a34-519c-b102-8c37f9878175" version = "1.0.5" [[deps.CairoMakie]] -deps = ["CRC32c", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"] -git-tree-sha1 = "a80d49ed3333f5f78df8ffe76d07e88cc35e9172" +deps = ["CRC32c", "Cairo", "Colors", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"] +git-tree-sha1 = "d69c7593fe9d7d617973adcbe4762028c6899b2c" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -version = "0.11.8" +version = "0.11.11" [[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.16.1+1" +version = "1.18.0+2" [[deps.Calculus]] deps = ["LinearAlgebra"] @@ -172,9 +168,9 @@ version = "0.5.1" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "ad25e7d21ce10e01de973cdc68ad0f850a953c52" +git-tree-sha1 = "71acdbf594aab5bbb2cec89b208c41b4c411e49f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.21.1" +version = "1.24.0" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -188,15 +184,15 @@ version = "1.3.5" [[deps.CodecBzip2]] deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"] -git-tree-sha1 = "9b1ca1aa6ce3f71b3d1840c538a8210a043625eb" +git-tree-sha1 = "f8889d1770addf59d0a015c49a473fa2bdb9f809" uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" -version = "0.8.2" +version = "0.8.3" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" +git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.4" +version = "0.7.5" [[deps.ColorBrewer]] deps = ["Colors", "JSON", "Test"] @@ -206,15 +202,15 @@ version = "0.4.0" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "67c1f244b991cad9b0aa4b7540fb758c2488b129" +git-tree-sha1 = "4b270d6465eb21ae89b732182c20dc165f8bf9f2" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.24.0" +version = "3.25.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.11.5" [[deps.ColorVectorSpace]] deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] @@ -228,14 +224,9 @@ weakdeps = ["SpecialFunctions"] [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" +git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.10" - -[[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" +version = "0.12.11" [[deps.CommonSubexpressions]] deps = ["MacroTools", "Test"] @@ -245,9 +236,9 @@ version = "0.3.0" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "75bd5b6fc5089df449b5d35fa501c846c9b6549b" +git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.12.0" +version = "4.15.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -264,17 +255,11 @@ path = "deps/Complementarity.jl-master" uuid = "a9b2a840-c9d5-5181-a245-8df664c2d6e7" version = "0.9.0" -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.3.1" - [[deps.ConstructionBase]] deps = ["LinearAlgebra"] -git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" +git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.4" +version = "1.5.5" weakdeps = ["IntervalSets", "StaticArrays"] [deps.ConstructionBase.extensions] @@ -282,9 +267,9 @@ weakdeps = ["IntervalSets", "StaticArrays"] ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.Contour]] -git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.2" +version = "0.6.3" [[deps.CoordinateTransformations]] deps = ["LinearAlgebra", "StaticArrays"] @@ -302,12 +287,6 @@ git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" version = "1.16.0" -[[deps.DataDeps]] -deps = ["HTTP", "Libdl", "Reexport", "SHA", "Scratch", "p7zip_jll"] -git-tree-sha1 = "8ae085b71c462c2cb1cfedcb10c3c877ec6cf03f" -uuid = "124859b0-ceae-595e-8997-d05f6a7a8dfe" -version = "0.7.13" - [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8" @@ -316,9 +295,9 @@ version = "1.6.1" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "ac67408d9ddf207de5cfa9a97e114352430f01ed" +git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.16" +version = "0.18.20" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -330,10 +309,10 @@ deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DelaunayTriangulation]] -deps = ["DataStructures", "EnumX", "ExactPredicates", "Random", "SimpleGraphs"] -git-tree-sha1 = "d4e9dc4c6106b8d44e40cd4faf8261a678552c7c" +deps = ["EnumX", "ExactPredicates", "Random"] +git-tree-sha1 = "078c716cbb032242df18b960e8b1fec6b1b0b9f9" uuid = "927a84f5-c5f4-47a5-9785-b46e178433df" -version = "0.8.12" +version = "1.0.5" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -363,10 +342,10 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "7c302d7a5fec5214eb8a5a4c466dcf7a51fcf169" +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "9c405847cc7ecda2dc921ccf18b47ca150d7317e" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.107" +version = "0.25.109" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -412,28 +391,22 @@ git-tree-sha1 = "b3f2ff58735b5f024c392fde763f29b057e4b025" uuid = "429591f6-91af-11e9-00e2-59fbe8cec110" version = "2.2.8" -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.10" - [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" +git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.5.0+0" +version = "2.6.2+0" [[deps.Extents]] -git-tree-sha1 = "2140cd04483da90b2da7f99b2add0750504fc39c" +git-tree-sha1 = "94997910aca72897524d2237c41eb852153b0f65" uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" -version = "0.1.2" +version = "0.1.3" [[deps.FFMPEG_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "466d45dc38e15794ec7d5d63ec03d776a9aff36e" +git-tree-sha1 = "ab3f7e1819dba9434a3a5126510c8fda3a4e7000" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "4.4.4+1" +version = "6.1.1+0" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] @@ -449,9 +422,9 @@ version = "3.3.10+0" [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "c5c28c245101bd59154f649e19b038d15901b5dc" +git-tree-sha1 = "82d8afa92ecf4b52d78d869f038ebfb881267322" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.16.2" +version = "1.16.3" [[deps.FilePaths]] deps = ["FilePathsBase", "MacroTools", "Reexport", "Requires"] @@ -469,10 +442,10 @@ version = "0.9.21" uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] -deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "5b93957f6dcd33fc343044af3d48c215be2562f1" +deps = ["LinearAlgebra"] +git-tree-sha1 = "0653c0a2396a6da5bc4766c43041ef5fd3efbe57" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.9.3" +version = "1.11.0" weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] @@ -482,9 +455,9 @@ weakdeps = ["PDMats", "SparseArrays", "Statistics"] [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "73d1214fec245096717847c62d389a5d2ac86504" +git-tree-sha1 = "2de436b72c3422940cbe1367611d137008af7ec3" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.22.0" +version = "2.23.1" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" @@ -498,21 +471,20 @@ version = "2.22.0" [[deps.FixedPointNumbers]] deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" +version = "0.8.5" [[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "db16beca600632c95fc8aca29890d83788dd8b23" uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.13.93+0" +version = "2.13.96+0" -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" +[[deps.Format]] +git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] @@ -532,32 +504,26 @@ version = "4.1.1" [[deps.FreeType2_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d8db6a5a2fe1381c1ea4ef2cab7c69c2de7f9ea0" +git-tree-sha1 = "5c1d8ae0efc6c2e7b1fc502cbe25def8f661b7bc" uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.1+0" +version = "2.13.2+0" [[deps.FreeTypeAbstraction]] deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"] -git-tree-sha1 = "055626e1a35f6771fe99060e835b72ca61a52621" +git-tree-sha1 = "2493cdfd0740015955a8e46de4ef28f49460d8bc" uuid = "663a7486-cb36-511b-a19d-713bb74d65c9" -version = "0.10.1" +version = "0.10.3" [[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1ed150b39aebcc805c26b93a8d0122c940f64ce2" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.10+0" +version = "1.0.14+0" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "ec632f177c0d990e64d955ccc1b8c04c485a0950" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.6" - [[deps.GeoFormatTypes]] git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f" @@ -565,15 +531,15 @@ version = "0.4.2" [[deps.GeoInterface]] deps = ["Extents"] -git-tree-sha1 = "d4f85701f569584f2cff7ba67a137d03f0cfb7d0" +git-tree-sha1 = "9fff8990361d5127b770e3454488360443019bb3" uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" -version = "1.3.3" +version = "1.3.5" [[deps.GeoInterfaceMakie]] deps = ["GeoInterface", "GeometryBasics", "MakieCore"] -git-tree-sha1 = "c15f793d501789ffa1cd171103406573d00f71cc" +git-tree-sha1 = "3f87fd8414194dd25ea5d0371c3950985e3c8d86" uuid = "0edc0954-3250-4c18-859d-ec71c1660c08" -version = "0.1.5" +version = "0.1.8" [[deps.GeoInterfaceRecipes]] deps = ["GeoInterface", "RecipesBase"] @@ -583,9 +549,9 @@ version = "1.0.2" [[deps.GeoJSON]] deps = ["Extents", "GeoFormatTypes", "GeoInterface", "GeoInterfaceMakie", "GeoInterfaceRecipes", "JSON3", "StructTypes", "Tables"] -git-tree-sha1 = "5846df44b97b4af377fd057b3a2a393228081a3c" +git-tree-sha1 = "e2ae0c6d4f6b8c49eccc261fef29c290998e44a5" uuid = "61d90e0f-e114-555e-ac52-39dfb47a3ef9" -version = "0.8.0" +version = "0.8.1" weakdeps = ["Makie"] [deps.GeoJSON.extensions] @@ -593,9 +559,9 @@ weakdeps = ["Makie"] [[deps.GeoMakie]] deps = ["Colors", "Downloads", "GeoInterface", "GeoJSON", "Geodesy", "GeometryBasics", "ImageIO", "LinearAlgebra", "Makie", "Proj", "Reexport", "Statistics", "StructArrays"] -git-tree-sha1 = "2036e8f732018eb0219325ece08389b086bfc600" +git-tree-sha1 = "cd10770fef1d33132ec73c21fae1047a00ff3831" uuid = "db073c08-6b98-4ee5-b6a4-5efafb3259c6" -version = "0.6.1" +version = "0.6.5" [[deps.Geodesy]] deps = ["CoordinateTransformations", "Dates", "LinearAlgebra", "StaticArrays"] @@ -605,9 +571,9 @@ version = "1.1.0" [[deps.GeometryBasics]] deps = ["EarCut_jll", "Extents", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] -git-tree-sha1 = "5694b56ccf9d15addedc35e9a4ba9c317721b788" +git-tree-sha1 = "b62f2b2d76cee0d61a2ef2b3118cd2a3215d3134" uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" -version = "0.4.10" +version = "0.4.11" [[deps.Gettext_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] @@ -617,9 +583,9 @@ version = "0.21.0+0" [[deps.Glib_jll]] deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "e94c92c7bf4819685eb80186d51c43e71d4afa17" +git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.76.5+0" +version = "2.80.2+0" [[deps.Graphics]] deps = ["Colors", "LinearAlgebra", "NaNMath"] @@ -635,21 +601,15 @@ version = "1.3.14+0" [[deps.GridLayoutBase]] deps = ["GeometryBasics", "InteractiveUtils", "Observables"] -git-tree-sha1 = "af13a277efd8a6e716d79ef635d5342ccb75be61" +git-tree-sha1 = "6f93a83ca11346771a93bbde2bdad2f65b61498f" uuid = "3955a311-db13-416c-9275-1d80ed98e5e9" -version = "0.10.0" +version = "0.10.2" [[deps.Grisu]] git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "abbbb9ec3afd783a7cbd82ef01dcd088ea051398" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.1" - [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" @@ -658,9 +618,9 @@ version = "2.8.1+1" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "ca0f6bf568b4bfc807e7537f081c81e35ceca114" +git-tree-sha1 = "1d334207121865ac8c1c97eb7f42d0339e4635bf" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.10.0+0" +version = "2.11.0+0" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -688,9 +648,9 @@ version = "0.10.2" [[deps.ImageIO]] deps = ["FileIO", "IndirectArrays", "JpegTurbo", "LazyModules", "Netpbm", "OpenEXR", "PNGFiles", "QOI", "Sixel", "TiffImages", "UUIDs"] -git-tree-sha1 = "bca20b2f5d00c4fbc192c3212da8fa79f4688009" +git-tree-sha1 = "437abb322a41d527c197fa800455f79d414f0a3c" uuid = "82e4d734-157c-48bb-816b-45c225c6df19" -version = "0.6.7" +version = "0.6.8" [[deps.ImageMetadata]] deps = ["AxisArrays", "ImageAxes", "ImageBase", "ImageCore"] @@ -700,9 +660,9 @@ version = "0.9.9" [[deps.Imath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3d09a9f60edf77f8a4d99f9e015e8fbf9989605d" +git-tree-sha1 = "0936ba688c6d201805a83da835b55c61a180db52" uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1" -version = "3.1.7+0" +version = "3.1.11+0" [[deps.IndirectArrays]] git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f" @@ -710,26 +670,28 @@ uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" version = "1.0.0" [[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" +version = "0.1.5" [[deps.InlineStrings]] -deps = ["Parsers"] -git-tree-sha1 = "9cc2baf75c6d09f9da536ddf58eb2f29dedaf461" +git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.0" +version = "1.4.2" -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" + [deps.InlineStrings.extensions] + ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" + + [deps.InlineStrings.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "5fdf2fe6724d8caabf43b557b84ce53f3b7e2f6b" +git-tree-sha1 = "14eb2b542e748570b56446f4c50fbfb2306ebc45" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.0.2+0" +version = "2024.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] @@ -748,24 +710,26 @@ version = "0.15.1" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.IntervalArithmetic]] -deps = ["CRlibm", "RoundingEmulator"] -git-tree-sha1 = "c274ec586ea58eb7b42afd0c5d67e50ff50229b5" +deps = ["CRlibm_jll", "MacroTools", "RoundingEmulator"] +git-tree-sha1 = "433b0bb201cd76cb087b017e49244f10394ebe9c" uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" -version = "0.22.5" -weakdeps = ["DiffRules", "RecipesBase"] +version = "0.22.14" +weakdeps = ["DiffRules", "ForwardDiff", "RecipesBase"] [deps.IntervalArithmetic.extensions] IntervalArithmeticDiffRulesExt = "DiffRules" + IntervalArithmeticForwardDiffExt = "ForwardDiff" IntervalArithmeticRecipesBaseExt = "RecipesBase" [[deps.IntervalSets]] -git-tree-sha1 = "581191b15bcb56a2aa257e9c160085d0f128a380" +git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.9" -weakdeps = ["Random", "Statistics"] +version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" IntervalSetsStatisticsExt = "Statistics" [[deps.InvertedIndices]] @@ -775,9 +739,9 @@ version = "1.3.0" [[deps.Ipopt]] deps = ["Ipopt_jll", "LinearAlgebra", "MathOptInterface", "OpenBLAS32_jll", "PrecompileTools"] -git-tree-sha1 = "6600353576cee7e7388e57e94115f6aee034fb1c" +git-tree-sha1 = "344df015370d87d9ee6ff0be2f57d0ba81c4d863" uuid = "b6b21f68-93f8-5de0-b562-5493be1d77c9" -version = "1.6.1" +version = "1.6.3" [[deps.Ipopt_jll]] deps = ["ASL_jll", "Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "MUMPS_seq_jll", "SPRAL_jll", "libblastrampoline_jll"] @@ -807,10 +771,16 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JET]] -deps = ["InteractiveUtils", "JuliaInterpreter", "LoweredCodeUtils", "MacroTools", "Pkg", "PrecompileTools", "Preferences", "Revise", "Test"] -git-tree-sha1 = "f5dc65935992dfdf259bad9c295dd2361364e221" +deps = ["CodeTracking", "InteractiveUtils", "JuliaInterpreter", "LoweredCodeUtils", "MacroTools", "Pkg", "PrecompileTools", "Preferences", "Test"] +git-tree-sha1 = "1f209ff8dce4cebff6bfebd2da9cdc0e982874a6" uuid = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" -version = "0.8.21" +version = "0.9.6" + + [deps.JET.extensions] + ReviseExt = "Revise" + + [deps.JET.weakdeps] + Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -844,15 +814,15 @@ version = "0.1.5" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "60b1194df0a3298f460063de985eae7b01bc011a" +git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.1+0" +version = "3.0.3+0" [[deps.JuMP]] deps = ["LinearAlgebra", "MacroTools", "MathOptInterface", "MutableArithmetics", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays"] -git-tree-sha1 = "5036b4cf6d85b08d80de09ef65b4d951f6e68659" +git-tree-sha1 = "7e10a0d8b534f2d8e9f712b33488584254624fb1" uuid = "4076af6c-e467-56ae-b986-b466b2749572" -version = "1.19.0" +version = "1.22.2" [deps.JuMP.extensions] JuMPDimensionalDataExt = "DimensionalData" @@ -862,21 +832,21 @@ version = "1.19.0" [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] -git-tree-sha1 = "04663b9e1eb0d0eabf76a6d0752e0dac83d53b36" +git-tree-sha1 = "a6adc2dcfe4187c40dc7c2c9d2128e326360e90a" uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -version = "0.9.28" +version = "0.9.32" [[deps.KernelDensity]] deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] -git-tree-sha1 = "fee018a29b60733876eb557804b5b109dd3dd8a7" +git-tree-sha1 = "7d703202e65efa1369de1279c162b915e245eed1" uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" -version = "0.6.8" +version = "0.6.9" [[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "170b660facf5df5de098d866564877e119141cbd" uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.1+0" +version = "3.100.2+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -891,10 +861,10 @@ uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.7+0" [[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.1+0" +version = "2.10.2+0" [[deps.LaTeXStrings]] git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" @@ -944,16 +914,16 @@ uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" version = "3.2.2+1" [[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] -git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] +git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.7+0" +version = "1.8.11+0" [[deps.Libgpg_error_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.42.0+0" +version = "1.49.0+0" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -962,10 +932,10 @@ uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.17.0+0" [[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "0c4f9c4f1a50d8f35048fa0532dabbadf702f81e" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.35.0+0" +version = "2.40.1+0" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] @@ -974,16 +944,10 @@ uuid = "89763e89-9b03-5906-acba-b20f662cd828" version = "4.6.0+0" [[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "5ee6203157c120d79034c748a2acba45b82b8807" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.36.0+0" - -[[deps.LightXML]] -deps = ["Libdl", "XML2_jll"] -git-tree-sha1 = "3a994404d3f6709610701c7dabfc03fed87a81f8" -uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" -version = "0.9.1" +version = "2.40.1+0" [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] @@ -995,17 +959,11 @@ version = "7.2.0" deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[deps.LinearAlgebraX]] -deps = ["LinearAlgebra", "Mods", "Primes", "SimplePolynomials"] -git-tree-sha1 = "d76cec8007ec123c2b681269d40f94b053473fcf" -uuid = "9b3f67b0-2d00-526e-9884-9e4938f8fb88" -version = "0.2.7" - [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" +git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.26" +version = "0.3.28" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -1020,17 +978,11 @@ version = "0.3.26" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - [[deps.LoweredCodeUtils]] deps = ["JuliaInterpreter"] -git-tree-sha1 = "20ce1091ba18bcdae71ad9b71ee2367796ba6c48" +git-tree-sha1 = "eeaedcf337f33c039f9f3a209a8db992deefd7e9" uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -version = "2.4.4" +version = "2.4.8" [[deps.METIS_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1039,10 +991,10 @@ uuid = "d00139f3-1899-568f-a2f0-47f597d42d70" version = "5.1.2+0" [[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "72dc3cf284559eb8f53aa593fe62cb33f83ed0c0" +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.0.0+0" +version = "2024.2.0+0" [[deps.MUMPS_seq_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "libblastrampoline_jll"] @@ -1057,10 +1009,10 @@ uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.13" [[deps.Makie]] -deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalArithmetic", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "StableHashTraits", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun"] -git-tree-sha1 = "40c5dfbb99c91835171536cd571fe6f1ba18ff97" +deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun"] +git-tree-sha1 = "4d49c9ee830eec99d3e8de2425ff433ece7cc1bc" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.20.7" +version = "0.20.10" [[deps.MakieCore]] deps = ["Observables", "REPL"] @@ -1079,9 +1031,9 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MathOptInterface]] deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test", "Unicode"] -git-tree-sha1 = "8b40681684df46785a0012d352982e22ac3be59e" +git-tree-sha1 = "91b08d27a27d83cf1e63e50837403e7f53a0fd74" uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" -version = "1.25.2" +version = "1.31.0" [[deps.MathTeXEngine]] deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"] @@ -1089,12 +1041,6 @@ git-tree-sha1 = "96ca8a313eb6437db5ffe946c457a401bbb8ce1d" uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" version = "0.5.7" -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" @@ -1102,18 +1048,13 @@ version = "2.28.2+1" [[deps.Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" +version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -[[deps.Mods]] -git-tree-sha1 = "924f962b524a71eef7a21dae1e6853817f9b658f" -uuid = "7475f97c-0381-53b1-977b-4c60186c8d62" -version = "2.2.4" - [[deps.MosaicViews]] deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" @@ -1124,16 +1065,11 @@ version = "0.3.4" uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2023.1.10" -[[deps.Multisets]] -git-tree-sha1 = "8d852646862c96e226367ad10c8af56099b4047e" -uuid = "3b2b4ff1-bcff-5658-a3ee-dbcf1ce5ac09" -version = "0.4.4" - [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "806eea990fb41f9b36f1253e5697aa645bf6a9f8" +git-tree-sha1 = "898c56fbf8bf71afb0c02146ef26f3a454e88873" uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.4.0" +version = "1.4.5" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1169,9 +1105,9 @@ uuid = "510215fc-4207-5dde-b226-833fc4488ee2" version = "0.5.5" [[deps.OffsetArrays]] -git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" +git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.13.0" +version = "1.14.1" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -1184,10 +1120,10 @@ uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" version = "1.3.5+1" [[deps.OpenBLAS32_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "2fb9ee2dc14d555a6df2a714b86b7125178344c2" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6065c4cff8fee6c6770b277af45d5082baacdba1" uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.21+0" +version = "0.3.24+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] @@ -1202,26 +1138,20 @@ version = "0.3.2" [[deps.OpenEXR_jll]] deps = ["Artifacts", "Imath_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "a4ca623df1ae99d09bc9868b008262d0c0ac1e4f" +git-tree-sha1 = "8292dd5c8a38257111ada2174000a33745b06d4e" uuid = "18a262bb-aa17-5467-a713-aee519bc75cb" -version = "3.1.4+0" +version = "3.2.4+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" version = "0.8.1+2" -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.1" - [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c" +git-tree-sha1 = "a028ee3cb5641cccc4c24e90c36b0a4f7707bdf5" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.13+0" +version = "3.0.14+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -1229,12 +1159,6 @@ git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.5+0" -[[deps.Optim]] -deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "MathOptInterface", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "d024bfb56144d947d4fafcd9cb5cafbe3410b133" -uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.9.2" - [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" @@ -1247,10 +1171,10 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.6.3" [[deps.PATHSolver]] -deps = ["DataDeps", "MathOptInterface", "SparseArrays"] -git-tree-sha1 = "40d548f55f831af270c62d0748088d6af16ceda0" +deps = ["LazyArtifacts", "MathOptInterface", "SparseArrays"] +git-tree-sha1 = "44623cb7bebf7eff01e44608d8a0a38e61a60171" uuid = "f5f7c340-0bb3-5c69-969a-41884d311d1b" -version = "1.7.2" +version = "1.7.7" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1271,9 +1195,9 @@ version = "0.4.3" [[deps.PROJ_jll]] deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Libtiff_jll", "SQLite_jll"] -git-tree-sha1 = "f3e45027ea0f44a2725fbedfdb7ed118d5deec8d" +git-tree-sha1 = "84aa844bd56f62282116b413fbefb45e370e54d6" uuid = "58948b4f-47e0-5654-a9ad-f609743f8632" -version = "901.300.0+0" +version = "901.300.0+1" [[deps.Packing]] deps = ["GeometryBasics"] @@ -1289,9 +1213,9 @@ version = "0.5.12" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4745216e94f71cb768d58330b059c9b76f32cb66" +git-tree-sha1 = "cb5a2ab6763464ae0f19c86c56c63d4a2b0f5bda" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.50.14+0" +version = "1.52.2+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1305,23 +1229,11 @@ git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" -[[deps.Permutations]] -deps = ["Combinatorics", "LinearAlgebra", "Random"] -git-tree-sha1 = "eb3f9df2457819bf0a9019bd93cc451697a0751e" -uuid = "2ae35dd2-176d-5d53-8349-f30d82d94d4f" -version = "0.4.20" - -[[deps.PikaParser]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "d6ff87de27ff3082131f31a714d25ab6d0a88abf" -uuid = "3bbf5609-3e7b-44cd-8549-7c69f321e792" -version = "0.6.1" - [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "64779bc4c9784fee475689a1752ef4d5747c5e87" +git-tree-sha1 = "35621f10a7531bc8fa58f74610b1bfb70a3cfc6b" uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.42.2+0" +version = "0.43.4+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] @@ -1336,63 +1248,38 @@ version = "0.3.3" [[deps.PlotUtils]] deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "Statistics"] -git-tree-sha1 = "862942baf5663da528f66d24996eb6da85218e76" +git-tree-sha1 = "7b1a9df27f072ac4c9c7cbe5efb198489258d1f5" uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.0" +version = "1.4.1" [[deps.PolygonOps]] git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6" uuid = "647866c9-e3ac-4575-94e7-e3d426903924" version = "0.1.2" -[[deps.Polynomials]] -deps = ["LinearAlgebra", "RecipesBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "a9c7a523d5ed375be3983db190f6a5874ae9286d" -uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "4.0.6" -weakdeps = ["ChainRulesCore", "FFTW", "MakieCore", "MutableArithmetics"] - - [deps.Polynomials.extensions] - PolynomialsChainRulesCoreExt = "ChainRulesCore" - PolynomialsFFTWExt = "FFTW" - PolynomialsMakieCoreExt = "MakieCore" - PolynomialsMutableArithmeticsExt = "MutableArithmetics" - [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" version = "1.4.3" -[[deps.PositiveFactorizations]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" -uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" -version = "0.2.4" - [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.0" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.1" +version = "1.4.3" [[deps.PrettyTables]] deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] -git-tree-sha1 = "88b895d13d53b5577fd53379d913b9ab9ac82660" +git-tree-sha1 = "66b20dd35966a748321d3b2537c4584cf40387c7" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "2.3.1" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "1d05623b5952aed1307bf8b43bec8b8d1ef94b6e" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.5" +version = "2.3.2" [[deps.Printf]] deps = ["Unicode"] @@ -1404,15 +1291,20 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] -git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c" +git-tree-sha1 = "80686d28ecb3ee7fb3ac5371cacaa0d673eb0d4a" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.9.0" +version = "1.10.1" [[deps.Proj]] deps = ["CEnum", "CoordinateTransformations", "GeoFormatTypes", "GeoInterface", "NetworkOptions", "PROJ_jll"] -git-tree-sha1 = "76ab3cbf876f3c859b6cc5817d8262809add3e13" +git-tree-sha1 = "0af230735907f040d52854afc600c17b58e9e73a" uuid = "c94c279d-25a6-4763-9509-64d165bea63e" -version = "1.7.0" +version = "1.7.1" + +[[deps.PtrArrays]] +git-tree-sha1 = "f011fbb92c4d401059b2212c05c0601b70f8b759" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.2.0" [[deps.QOI]] deps = ["ColorTypes", "FileIO", "FixedPointNumbers"] @@ -1472,18 +1364,6 @@ git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.0" -[[deps.Revise]] -deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] -git-tree-sha1 = "3fe4e5b9cdbb9bbc851c57b149e516acc07f8f72" -uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.5.13" - -[[deps.RingLists]] -deps = ["Random"] -git-tree-sha1 = "f39da63aa6d2d88e0c1bd20ed6a3ff9ea7171ada" -uuid = "286e9d63-9694-5540-9e3c-4e6708fa07b2" -version = "0.2.8" - [[deps.Rmath]] deps = ["Random", "Rmath_jll"] git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" @@ -1491,10 +1371,10 @@ uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" version = "0.7.1" [[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d483cd324ce5cf5d61b77930f0bbd6cb61927d21" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.0+0" +version = "0.4.2+0" [[deps.RoundingEmulator]] git-tree-sha1 = "40b9edad2e5287e05bd413a38f61a8ff55b9557b" @@ -1505,6 +1385,12 @@ version = "0.2.1" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" +[[deps.SIMD]] +deps = ["PrecompileTools"] +git-tree-sha1 = "2803cab51702db743f3fda07dd1745aadfbf43bd" +uuid = "fdea26ae-647d-5447-a871-4b548cad5224" +version = "3.5.0" + [[deps.SPRAL_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "Libdl", "METIS_jll", "libblastrampoline_jll"] git-tree-sha1 = "34b9dacd687cace8aa4d550e3e9bb8615f1a61e9" @@ -1513,9 +1399,9 @@ version = "2024.1.18+0" [[deps.SQLite_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "75e28667a36b5650b5cc4baa266c5760c3672275" +git-tree-sha1 = "004fffbe2711abdc7263a980bbb1af9620781dd9" uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" -version = "3.45.0+0" +version = "3.45.3+0" [[deps.Scratch]] deps = ["Dates"] @@ -1525,9 +1411,9 @@ version = "1.2.1" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "0e7508ff27ba32f26cd459474ca2ede1bc10991f" +git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.1" +version = "1.4.5" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -1560,35 +1446,6 @@ git-tree-sha1 = "d263a08ec505853a5ff1c1ebde2070419e3f28e9" uuid = "73760f76-fbc4-59ce-8f25-708e95d2df96" version = "0.4.0" -[[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" - -[[deps.SimpleGraphs]] -deps = ["AbstractLattices", "Combinatorics", "DataStructures", "IterTools", "LightXML", "LinearAlgebra", "LinearAlgebraX", "Optim", "Primes", "Random", "RingLists", "SimplePartitions", "SimplePolynomials", "SimpleRandom", "SparseArrays", "Statistics"] -git-tree-sha1 = "f65caa24a622f985cc341de81d3f9744435d0d0f" -uuid = "55797a34-41de-5266-9ec1-32ac4eb504d3" -version = "0.8.6" - -[[deps.SimplePartitions]] -deps = ["AbstractLattices", "DataStructures", "Permutations"] -git-tree-sha1 = "e9330391d04241eafdc358713b48396619c83bcb" -uuid = "ec83eff0-a5b5-5643-ae32-5cbf6eedec9d" -version = "0.3.1" - -[[deps.SimplePolynomials]] -deps = ["Mods", "Multisets", "Polynomials", "Primes"] -git-tree-sha1 = "7063828369cafa93f3187b3d0159f05582011405" -uuid = "cc47b68c-3164-5771-a705-2bc0097375a0" -version = "0.2.17" - -[[deps.SimpleRandom]] -deps = ["Distributions", "LinearAlgebra", "Random"] -git-tree-sha1 = "3a6fb395e37afab81aeea85bae48a4db5cd7244a" -uuid = "a6525b86-64cd-54fa-8f65-62fc48bdc0e8" -version = "0.3.1" - [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -1617,20 +1474,14 @@ version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +git-tree-sha1 = "2f5d4697f21388cbe1ff299430dd169ef97d7e14" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" +version = "2.4.0" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" -[[deps.StableHashTraits]] -deps = ["Compat", "PikaParser", "SHA", "Tables", "TupleTools"] -git-tree-sha1 = "60c334d923094a5fa4c2f65899b212261d429323" -uuid = "c5dd0088-6c3f-4803-b00e-f31a60c170fa" -version = "1.1.7" - [[deps.StackViews]] deps = ["OffsetArrays"] git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" @@ -1639,9 +1490,9 @@ version = "0.1.1" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "7b0e9c14c624e435076d19aea1e5cbdec2b9ca37" +git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.2" +version = "1.9.7" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1649,9 +1500,9 @@ weakdeps = ["ChainRulesCore", "Statistics"] StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] @@ -1666,15 +1517,15 @@ version = "1.7.0" [[deps.StatsBase]] deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "1d77abd07f617c4868c33d4f5b9e1dbb2643c9cf" +git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.2" +version = "0.34.3" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +git-tree-sha1 = "cef0472124fab0695b58ca35a77c6fb942fdab8a" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.0" +version = "1.3.1" [deps.StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" @@ -1691,10 +1542,22 @@ uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.3.4" [[deps.StructArrays]] -deps = ["Adapt", "ConstructionBase", "DataAPI", "GPUArraysCore", "StaticArraysCore", "Tables"] -git-tree-sha1 = "1b0b1205a56dc288b71b1961d48e351520702e24" +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "f4dc295e983502292c4c3f951dbb4e985e35b3be" uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.6.17" +version = "0.6.18" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = "GPUArraysCore" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.StructTypes]] deps = ["Dates", "UUIDs"] @@ -1723,10 +1586,10 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" +version = "1.12.0" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -1744,15 +1607,15 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.TiffImages]] -deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "UUIDs"] -git-tree-sha1 = "34cc045dd0aaa59b8bbe86c644679bc57f1d5bd0" +deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "SIMD", "UUIDs"] +git-tree-sha1 = "bc7fd5c91041f44636b2c134041f7e5263ce58ae" uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69" -version = "0.6.8" +version = "0.10.0" [[deps.TranscodingStreams]] -git-tree-sha1 = "54194d92959d8ebaa8e26227dbe3cdefcdcd594f" +git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.10.3" +version = "0.11.0" weakdeps = ["Random", "Test"] [deps.TranscodingStreams.extensions] @@ -1763,16 +1626,6 @@ git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b" uuid = "981d1d27-644d-49a2-9326-4793e63143c3" version = "0.1.0" -[[deps.TupleTools]] -git-tree-sha1 = "41d61b1c545b06279871ef1a4b5fcb2cac2191cd" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.5.0" - -[[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" - [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" @@ -1810,21 +1663,21 @@ version = "1.6.1" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "801cbe47eae69adc50f36c3caec4758d2650741b" +git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.2+0" +version = "2.13.1+0" [[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "1.1.41+0" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "522b8414d40c4cbbab8dee346ac3a09f9768f25d" +git-tree-sha1 = "ac88fb95ae6447c8dda6a5503f3bafd496ae8632" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.4.5+0" +version = "5.4.6+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] @@ -1845,16 +1698,16 @@ uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" version = "1.1.4+0" [[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "d2d1a5c49fae4ba39983f63de6afcbea47194e85" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.4+4" +version = "1.3.6+0" [[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "47e45cd78224c53109495b3e324df0c37bb61fbe" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.10+4" +version = "0.9.11+0" [[deps.Xorg_libpthread_stubs_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1864,9 +1717,9 @@ version = "0.1.1+0" [[deps.Xorg_libxcb_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1881,9 +1734,9 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" +git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.5+0" +version = "1.5.6+0" [[deps.isoband_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1892,10 +1745,10 @@ uuid = "9a68df92-36a6-505f-a73e-abb412b6bfb4" version = "0.2.3+0" [[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1827acba325fdcdf1d2647fc8d5301dd9ba43a9d" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.4.0+0" +version = "3.9.0+0" [[deps.libass_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] @@ -1916,9 +1769,9 @@ version = "2.0.2+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "93284c28274d9e75218a416c65ec49d0e0fcdf3d" +git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.40+0" +version = "1.6.43+1" [[deps.libsixel_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Pkg", "libpng_jll"] @@ -1937,6 +1790,12 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.52.0+1" +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7d0ea0f4895ef2f5cb83645fa689e52cb55cf493" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2021.12.0+0" + [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/Project.toml b/Project.toml index 20cfc72..7d52811 100644 --- a/Project.toml +++ b/Project.toml @@ -26,7 +26,7 @@ CairoMakie = ">=0.11.8" Complementarity = "0.9" DataFrames = "1" GeoJSON = ">=0.8.0" -GeoMakie = ">=0.6.1" +GeoMakie = "0.6" Ipopt = "1" JET = "0.8, 0.9" JuMP = "1" diff --git a/data/data_pc/general_data/Nodes.csv b/data/data_pc/general_data/Nodes.csv index e5c5bca..37cc06f 100644 --- a/data/data_pc/general_data/Nodes.csv +++ b/data/data_pc/general_data/Nodes.csv @@ -1,27 +1,27 @@ -Node,Cost Factor,Region,Nodal Trader -PAC,1,EUR,T_PAC -SWA,1,EUR,T_SWA -SEA,1,EUR,T_SEA -SEE,1,EUR,T_SEE -IND,1,EUR,T_IND -CHN,1,EUR,T_CHN -LEV,1,EUR,T_LEV -EAF,1,EUR,T_EAF -IRN,1,EUR,T_IRN -SWE,1,EUR,T_SWE -JSK,1,EUR,T_JSK -NAF,1,EUR,T_NAF -CEA,1,EUR,T_CEA -WAF,1,EUR,T_WAF -EAS,1,EUR,T_EAS -EAE,1,EUR,T_EAE -RUS,1,EUR,T_RUS -SAF,1,EUR,T_SAF -GLF,1,EUR,T_GLF -CAS,1,EUR,T_CAS -CEE,1,EUR,T_CEE -NOE,1,EUR,T_NOE -BRI,1,EUR,T_BRI -USA,1,EUR,T_USA -CAN,1,EUR,T_CAN -ANZ,1,EUR,T_ANZ +Node,Cost Factor,Region,Nodal Trader +PAC,1,EUR,T_ALL +SWA,1,EUR,T_ALL +SEA,1,EUR,T_ALL +SEE,1,EUR,T_ALL +IND,1,EUR,T_ALL +CHN,1,EUR,T_ALL +LEV,1,EUR,T_ALL +EAF,1,EUR,T_ALL +IRN,1,EUR,T_ALL +SWE,1,EUR,T_ALL +JSK,1,EUR,T_ALL +NAF,1,EUR,T_ALL +CEA,1,EUR,T_ALL +WAF,1,EUR,T_ALL +EAS,1,EUR,T_ALL +EAE,1,EUR,T_ALL +RUS,1,EUR,T_ALL +SAF,1,EUR,T_ALL +GLF,1,EUR,T_ALL +CAS,1,EUR,T_ALL +CEE,1,EUR,T_ALL +NOE,1,EUR,T_ALL +BRI,1,EUR,T_ALL +USA,1,EUR,T_ALL +CAN,1,EUR,T_ALL +ANZ,1,EUR,T_ALL \ No newline at end of file diff --git a/data/run_cvx_mp.jl b/data/run_cvx_mp.jl new file mode 100644 index 0000000..4ca1aab --- /dev/null +++ b/data/run_cvx_mp.jl @@ -0,0 +1,10 @@ +using HydrOGEnMod +using Gurobi +using JuMP + +data_mp = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp")); + +model_mp = build_optimization_model(data_mp) + +optimize!(model_mp, Gurobi.Optimizer) \ No newline at end of file diff --git a/data/run_mp_pc.jl b/data/run_cvx_mp_pc_incl_plots.jl similarity index 73% rename from data/run_mp_pc.jl rename to data/run_cvx_mp_pc_incl_plots.jl index bebefe8..3263829 100644 --- a/data/run_mp_pc.jl +++ b/data/run_cvx_mp_pc_incl_plots.jl @@ -2,11 +2,10 @@ using HydrOGEnMod using Gurobi using JuMP -pc_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "pc") +pc_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_pc") -data_pc = get_HydrOGEnMod_data( - joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc") -); +data_pc = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc")); write_csv(joinpath(pc_results_path, "precalculated"), data_pc) model_pc = build_optimization_model(data_pc) @@ -38,6 +37,19 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end + plot_model_nodes( + ( + data_pc.weights["L"] .* value.(model_pc[:prices][:, c, "Block 1", "L", y]) .+ + data_pc.weights["H"] .* value.(model_pc[:prices][:, c, "Block 1", "H", y]) + ) ./ data_pc.weights["year"]; + save_path = joinpath( + pc_results_path, + "graphics", + "pc_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + plot_model_nodes( value.(model_pc[:yearly_demand][:, c, y]); save_path = joinpath(pc_results_path, "graphics", "pc_demand_$(c)_$(y).pdf"), @@ -75,11 +87,10 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end -mp_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "mp") +mp_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_mp") -data_mp = get_HydrOGEnMod_data( - joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp") -); +data_mp = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp")); write_csv(joinpath(mp_results_path, "precalculated"), data_mp) model_mp = build_optimization_model(data_mp) @@ -110,6 +121,19 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end + plot_model_nodes( + ( + data_mp.weights["L"] .* value.(model_mp[:prices][:, c, "Block 1", "L", y]) .+ + data_mp.weights["H"] .* value.(model_mp[:prices][:, c, "Block 1", "H", y]) + ) ./ data_mp.weights["year"]; + save_path = joinpath( + mp_results_path, + "graphics", + "mp_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + plot_model_nodes( value.(model_mp[:yearly_demand][:, c, y]); save_path = joinpath(mp_results_path, "graphics", "mp_demand_$(c)_$(y).pdf"), @@ -147,7 +171,7 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end -diff_plots_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "diff") +diff_plots_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_diff") for y in [2030, 2050] for s in ["L", "H"], c in ["GH2", "NH3"] @@ -161,6 +185,26 @@ for y in [2030, 2050] ) end + for c in ["GH2", "NH3"] + plot_model_nodes( + ( + data_mp.weights["L"] .* ( + value.(model_mp[:prices][:, c, "Block 1", "L", y]) .- + value.(model_pc[:prices][:, c, "Block 1", "L", y]) + ) .+ + data_mp.weights["H"] .* ( + value.(model_mp[:prices][:, c, "Block 1", "H", y]) .- + value.(model_pc[:prices][:, c, "Block 1", "H", y]) + ) + ) ./ data_mp.weights["year"]; + save_path = joinpath( + diff_plots_path, + "diff_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + end + for i in ["Renewable Hydrogen", "Nuclear Hydrogen"] plot_model_nodes( value.( @@ -172,4 +216,4 @@ for y in [2030, 2050] rasterize = 5, ) end -end \ No newline at end of file +end diff --git a/data/run_cvx_pc.jl b/data/run_cvx_pc.jl new file mode 100644 index 0000000..ba37d45 --- /dev/null +++ b/data/run_cvx_pc.jl @@ -0,0 +1,10 @@ +using HydrOGEnMod +using Gurobi +using JuMP + +data_pc = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc")); + +model_pc = build_optimization_model(data_pc) + +optimize!(model_pc, Gurobi.Optimizer) \ No newline at end of file diff --git a/data/run_mcp_mp.jl b/data/run_mcp_mp.jl new file mode 100644 index 0000000..032ccf7 --- /dev/null +++ b/data/run_mcp_mp.jl @@ -0,0 +1,14 @@ +using HydrOGEnMod +using JuMP, Complementarity + +# Before using the package, a valid license string to the PATH solver needs to be specified. +# An official license string is available from https://pages.cs.wisc.edu/~ferris/path/LICENSE +# ENV["PATH_LICENSE_STRING"] = "Copy_license_string_here" + +data_mp = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp")); + +model_mp = build_complementarity_model(data_mp) + +options = (output = "yes", time_limit = 36000, cumulative_iteration_limit = 100000) +solve_mcp(model_mp; options...) \ No newline at end of file diff --git a/data/run_mcp_pc.jl b/data/run_mcp_pc.jl new file mode 100644 index 0000000..ec1d8b5 --- /dev/null +++ b/data/run_mcp_pc.jl @@ -0,0 +1,14 @@ +using HydrOGEnMod +using JuMP, Complementarity + +# Before using the package, a valid license string to the PATH solver needs to be specified. +# An official license string is available from https://pages.cs.wisc.edu/~ferris/path/LICENSE +# ENV["PATH_LICENSE_STRING"] = "Copy_license_string_here" + +data_pc = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc")); + +model_pc = build_complementarity_model(data_pc) + +options = (output = "yes", time_limit = 36000, cumulative_iteration_limit = 100000) +solve_mcp(model_pc; options...) \ No newline at end of file diff --git a/docs/src/replication.md b/docs/src/replication.md index b055158..e674737 100644 --- a/docs/src/replication.md +++ b/docs/src/replication.md @@ -7,11 +7,10 @@ using HydrOGEnMod using Gurobi using JuMP -pc_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "pc") +pc_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_pc") -data_pc = get_HydrOGEnMod_data( - joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc") -); +data_pc = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_pc")); write_csv(joinpath(pc_results_path, "precalculated"), data_pc) model_pc = build_optimization_model(data_pc) @@ -43,6 +42,19 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end + plot_model_nodes( + ( + data_pc.weights["L"] .* value.(model_pc[:prices][:, c, "Block 1", "L", y]) .+ + data_pc.weights["H"] .* value.(model_pc[:prices][:, c, "Block 1", "H", y]) + ) ./ data_pc.weights["year"]; + save_path = joinpath( + pc_results_path, + "graphics", + "pc_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + plot_model_nodes( value.(model_pc[:yearly_demand][:, c, y]); save_path = joinpath(pc_results_path, "graphics", "pc_demand_$(c)_$(y).pdf"), @@ -80,11 +92,10 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end -mp_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "mp") +mp_results_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_mp") -data_mp = get_HydrOGEnMod_data( - joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp") -); +data_mp = + get_HydrOGEnMod_data(joinpath(dirname(dirname(pathof(HydrOGEnMod))), "data", "data_mp")); write_csv(joinpath(mp_results_path, "precalculated"), data_mp) model_mp = build_optimization_model(data_mp) @@ -115,6 +126,19 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end + plot_model_nodes( + ( + data_mp.weights["L"] .* value.(model_mp[:prices][:, c, "Block 1", "L", y]) .+ + data_mp.weights["H"] .* value.(model_mp[:prices][:, c, "Block 1", "H", y]) + ) ./ data_mp.weights["year"]; + save_path = joinpath( + mp_results_path, + "graphics", + "mp_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + plot_model_nodes( value.(model_mp[:yearly_demand][:, c, y]); save_path = joinpath(mp_results_path, "graphics", "mp_demand_$(c)_$(y).pdf"), @@ -152,7 +176,7 @@ for y in [2030, 2050], c in ["GH2", "NH3", "LH2"] end end -diff_plots_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "diff") +diff_plots_path = joinpath(dirname(dirname(pathof(HydrOGEnMod))), "results", "cvx_diff") for y in [2030, 2050] for s in ["L", "H"], c in ["GH2", "NH3"] @@ -166,6 +190,26 @@ for y in [2030, 2050] ) end + for c in ["GH2", "NH3"] + plot_model_nodes( + ( + data_mp.weights["L"] .* ( + value.(model_mp[:prices][:, c, "Block 1", "L", y]) .- + value.(model_pc[:prices][:, c, "Block 1", "L", y]) + ) .+ + data_mp.weights["H"] .* ( + value.(model_mp[:prices][:, c, "Block 1", "H", y]) .- + value.(model_pc[:prices][:, c, "Block 1", "H", y]) + ) + ) ./ data_mp.weights["year"]; + save_path = joinpath( + diff_plots_path, + "diff_prices_$(c)_weighted_average_$(y).pdf", + ), + rasterize = 5, + ) + end + for i in ["Renewable Hydrogen", "Nuclear Hydrogen"] plot_model_nodes( value.( @@ -178,4 +222,5 @@ for y in [2030, 2050] ) end end + ``` diff --git a/src/HydrOGEnMod.jl b/src/HydrOGEnMod.jl index 1e5448d..f3125db 100644 --- a/src/HydrOGEnMod.jl +++ b/src/HydrOGEnMod.jl @@ -9,7 +9,8 @@ export get_HydrOGEnMod_data, plot_model_nodes, write_csv -using JuMP, DataFrames, Makie, CairoMakie, CSV, GeoMakie, Complementarity, MathOptInterface, Printf +using JuMP, + DataFrames, Makie, CairoMakie, CSV, GeoMakie, Complementarity, MathOptInterface, Printf import GeoJSON include("logging.jl") diff --git a/src/complementarity_model.jl b/src/complementarity_model.jl index e22317b..b7486ca 100644 --- a/src/complementarity_model.jl +++ b/src/complementarity_model.jl @@ -234,7 +234,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") o = get_name.(data.origins), s = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] <= BIG ) @@ -334,15 +334,21 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c = get_name.(data.commodities), s = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] <= BIG ) @variable( model, - 0 <= Δ_A[a = get_name.(data.arcs), c = get_name.(data.commodities), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c]] <= BIG + 0 <= + Δ_A[ + a = get_name.(data.arcs), + c = get_name.(data.commodities), + y = data.years.range; + data.arc_adjacency.is_a_of_c[a, c], + ] <= + BIG ) @variable( @@ -353,7 +359,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c_old = get_from_throughput.(data.repurposing_arc_technologies), c_new = get_to_throughput.(data.repurposing_arc_technologies), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c_old] + data.arc_adjacency.is_a_of_c[a, c_old], ] <= BIG ) @@ -366,7 +372,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c = get_name.(data.commodities), m = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] <= BIG ) @@ -377,7 +383,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] ) @@ -388,9 +394,10 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c_old in get_name.(data.commodities), c_new in get_name.(data.commodities), y in data.years.range; - ((c_old, c_new) in - get_repurposing_technology.(data.repurposing_arc_technologies)) - && (data.arc_adjacency.is_a_of_c[a,c_old]) + ( + (c_old, c_new) in + get_repurposing_technology.(data.repurposing_arc_technologies) + ) && (data.arc_adjacency.is_a_of_c[a, c_old]), ] ) @@ -552,7 +559,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c in get_name.(data.commodities), m in get_name.(data.timesteps), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] <= BIG ) @@ -585,6 +592,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") BIG ) + @_status "Building Model" Progress = "Finished Creating Variables" Variables = num_variables(model) "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @_status "Building Model" Progress = "Creating Demand Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile @expression( @@ -628,7 +638,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") m in get_name.(data.timesteps), y in data.years.range, ], - data.weights[m] / 2 * data.demand_data.β_D[n, c, b, m, y] * (demand[n, c, b, m, y])^2 + + data.weights[m] / 2 * + data.demand_data.β_D[n, c, b, m, y] * + (demand[n, c, b, m, y])^2 + data.weights[m] * data.demand_data.α_D[n, c, b, m, y] * demand[n, c, b, m, y] ) @@ -677,7 +689,10 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") i in get_name.(data.inputs), y in data.years.range, ], - sum(data.weights[m] * q_I[p, i, b, m, y] for b in get_name.(data.input_operational_blocks), m in get_name.(data.timesteps)) + sum( + data.weights[m] * q_I[p, i, b, m, y] for + b in get_name.(data.input_operational_blocks), m in get_name.(data.timesteps) + ) ) @_status "Building Model" Progress = "Creating Input Capacity Expansion Cost Expression." "Time elapsed" = @@ -784,7 +799,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") o in get_name.(data.origins), m in get_name.(data.timesteps), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], data.weights[m] * data.arc_data.c_A[a, c, y] * q_T[t, a, c, o, m, y] ) @@ -797,7 +812,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], data.arc_data.c_Δ_A[a, c, y] / data.years.step * Δ_A[a, c, y] ) @@ -811,8 +826,10 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c_old in get_from_throughput.(data.repurposing_arc_technologies), c_new in get_to_throughput.(data.repurposing_arc_technologies), y in data.years.range; - ((c_old, c_new) in - get_repurposing_technology.(data.repurposing_arc_technologies)) & data.arc_adjacency.is_a_of_c[a,c_old] + ( + (c_old, c_new) in + get_repurposing_technology.(data.repurposing_arc_technologies) + ) & data.arc_adjacency.is_a_of_c[a, c_old], ], data.arc_data.c_Δ_RA[a, c_old, c_new, y] / data.years.step * Δ_RA[a, c_old, c_new, y] @@ -820,7 +837,19 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") @_status "Building Model" Progress = "Creating Aggregated Arc Flow Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile - @expression(model, yearly_arc_flows[a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range], sum(data.weights[m] * q_T[t, a, c, o, m, y] for t in get_name.(data.traders), o in get_name.(data.origins), m in get_name.(data.timesteps) if data.arc_adjacency.is_a_of_c[a,c] )); + @expression( + model, + yearly_arc_flows[ + a in get_name.(data.arcs), + c in get_name.(data.commodities), + y in data.years.range, + ], + sum( + data.weights[m] * q_T[t, a, c, o, m, y] for + t in get_name.(data.traders), o in get_name.(data.origins), + m in get_name.(data.timesteps) if data.arc_adjacency.is_a_of_c[a, c] + ) + ) @_status "Building Model" Progress = "Creating Storage Cost Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile @@ -864,7 +893,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.storage_data.c_Δ_RS[s, r, c, y] / data.years.step * Δ_RS[s, r, c, y] ) - @_status "Building Model" Progress = "Creating LHS Expressions." "Time elapsed" = + @_status "Building Model" Progress = "Creating LHS_q_I Expressions." "Time elapsed" = temporal(time() - starttime) logfile = logfile @mapping( @@ -884,6 +913,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - ϕ_P[p, i, m, y] + λ_I[p, i, b, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_P_to_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_P_to_T[ @@ -912,6 +944,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") λ_P[p, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_Δ_I Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_I[ @@ -935,6 +970,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_Δ_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_P[ @@ -953,6 +991,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) + ω_P[p, c, o, y] ) + @_status "Building Model" Progress = "Creating LHS_ϕ_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ϕ_P[ @@ -968,6 +1009,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_λ_I Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_I[ @@ -985,6 +1029,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - q_I[p, i, b, m, y] ) + @_status "Building Model" Progress = "Creating LHS_λ_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_P[ @@ -1001,6 +1048,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - q_P_to_T[p, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_ω_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ω_P[ @@ -1013,6 +1063,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.production_data.Ω_P[p, c, o, y] - Δ_P[p, c, o, y] ) + @_status "Building Model" Progress = "Creating LHS_ω_I Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ω_I[ @@ -1027,6 +1080,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_q_T_to_D Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_to_D[ @@ -1055,6 +1111,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_q_T_from_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_from_P[ @@ -1069,6 +1128,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.discount[y] * data.weights[m] * π_P[n, c, o, m, y] - ϕ_T[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_T_to_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_to_V[ @@ -1083,6 +1145,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.discount[y] * data.weights[m] * π_T_to_V[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_T_from_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_from_V[ @@ -1097,6 +1162,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_T[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_T_to_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_to_S[ @@ -1111,6 +1179,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.discount[y] * data.weights[m] * π_T_to_S[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_T_from_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T_from_S[ @@ -1125,6 +1196,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_T[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_T[ @@ -1134,7 +1208,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") o = get_name.(data.origins), m = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], data.discount[y] * data.weights[m] * π_A[a, c, m, y] + (1 + data.arc_data.l_a[a, c]) * @@ -1142,6 +1216,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_T[t, data.arcs[findfirst(x -> x.name == a, data.arcs)].end_node, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_ϕ_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ϕ_T[ @@ -1154,7 +1231,8 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ], sum( q_T[t, a, c, o, m, y] for - a in data.nodes[findfirst(x -> x.name == n, data.nodes)].ending_arcs if data.arc_adjacency.is_a_of_c[a,c] + a in data.nodes[findfirst(x -> x.name == n, data.nodes)].ending_arcs if + data.arc_adjacency.is_a_of_c[a, c] ) + sum( q_P_to_T[p, c, o, m, y] for @@ -1166,11 +1244,15 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") q_T_from_V[t, n, c, o, m, y] + q_T_from_S[t, n, c, o, m, y] - sum( (1 + data.arc_data.l_a[a, c]) * q_T[t, a, c, o, m, y] for - a in data.nodes[findfirst(x -> x.name == n, data.nodes)].starting_arcs if data.arc_adjacency.is_a_of_c[a,c] + a in data.nodes[findfirst(x -> x.name == n, data.nodes)].starting_arcs if + data.arc_adjacency.is_a_of_c[a, c] ) - sum(q_T_to_D[t, n, c, b, o, m, y] for b in get_name.(data.demand_blocks)) - q_T_to_V[t, n, c, o, m, y] - q_T_to_S[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_λ_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_T[ @@ -1188,6 +1270,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_q_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_V[ @@ -1223,6 +1308,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) + λ_V[v, c_i, c_o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_Δ_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_V[ @@ -1242,6 +1330,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_Δ_RV Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_RV[ @@ -1256,7 +1347,8 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ], data.discount[y] / data.years.step * data.conversion_data.c_Δ_RV[v, c_in_old, c_out_old, c_in_new, c_out_new, y] - sum( - data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * λ_V[v, c_in_new, c_out_new, m, ys] for ys = + data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * + λ_V[v, c_in_new, c_out_new, m, ys] for ys = (y+data.years.step):data.years.step:min( y + data.conversion_data.L_V[c_in_new, c_out_new], data.years.last, @@ -1268,6 +1360,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_λ_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_V[ @@ -1283,7 +1378,8 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_V[v, c_i, c_o, ys] for ys = max(y - data.conversion_data.L_V[c_i, c_o], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * + sum( + data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * Δ_RV[v, c_in_old, c_out_old, c_in_new, c_out_new, ys] for ((c_in_old, c_out_old), (c_in_new, c_out_new)) in get_repurposing_technology.(data.repurposing_conversion_technologies), ys = @@ -1301,6 +1397,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_q_A Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_A[ @@ -1308,19 +1407,23 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c = get_name.(data.commodities), m = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], - data.discount[y] * data.weights[m] * (-π_A[a, c, m, y] + data.arc_data.c_A[a, c, y]) + - λ_A[a, c, m, y] + data.discount[y] * + data.weights[m] * + (-π_A[a, c, m, y] + data.arc_data.c_A[a, c, y]) + λ_A[a, c, m, y] ) + # @_status "Building Model" Progress = "Creating LHS_Δ_A Expressions." "Time elapsed" = + # temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_A[ a = get_name.(data.arcs), c = get_name.(data.commodities), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], 0.5 * data.discount[y] / data.years.step * data.arc_data.c_Δ_A[a, c, y] - sum( λ_A[a, c, m, ys] for ys = @@ -1328,9 +1431,13 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") y + data.arc_data.L_A[c], data.years.last, ), m in get_name.(data.timesteps) - ) + δ_A[a, c, y] - δ_A[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c, y] + ) + δ_A[a, c, y] - + δ_A[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c, y] ) + @_status "Building Model" Progress = "Creating LHS_Δ_RA Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_RA[ @@ -1338,22 +1445,32 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c_old = get_from_throughput.(data.repurposing_arc_technologies), c_new = get_to_throughput.(data.repurposing_arc_technologies), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c_old] + data.arc_adjacency.is_a_of_c[a, c_old], ], - 0.5 * data.discount[y] / data.years.step * data.arc_data.c_Δ_RA[a, c_old, c_new, y] - - sum( data.arc_data.f_RA[c_old, c_new] * - λ_A[a, c_new, m, ys] for ys = + 0.5 * data.discount[y] / data.years.step * + data.arc_data.c_Δ_RA[a, c_old, c_new, y] - sum( + data.arc_data.f_RA[c_old, c_new] * λ_A[a, c_new, m, ys] for ys = (y+data.years.step):data.years.step:min( y + data.arc_data.L_A[c_new], data.years.last, ), m in get_name.(data.timesteps) - ) + sum( + ) + + sum( λ_A[a, c_old, m, ys] for ys = (y+data.years.step):data.years.step:data.years.last, m in get_name.(data.timesteps) - ) + δ_RA[a, c_old, c_new, y] - δ_RA[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c_old, c_new, y] + ) + + δ_RA[a, c_old, c_new, y] - δ_RA[ + data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, + c_old, + c_new, + y, + ] ) + @_status "Building Model" Progress = "Creating LHS_λ_A Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_A[ @@ -1361,15 +1478,16 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c = get_name.(data.commodities), m = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], data.arc_data.Λ_A[a, c, y] + sum( Δ_A[a, c, ys] for ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.arc_data.f_RA[c_old, c_new] * - Δ_RA[a, c_old, c_new, ys] for (c_old, c_new) in + sum( + data.arc_data.f_RA[c_old, c_new] * Δ_RA[a, c_old, c_new, ys] for + (c_old, c_new) in get_repurposing_technology.(data.repurposing_arc_technologies), ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) if (c_new) == c @@ -1377,20 +1495,27 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_RA[a, c_old, c_new, ys] for (c_old, c_new) in get_repurposing_technology.(data.repurposing_arc_technologies), ys = data.years.start:data.years.step:(y-data.years.step) if (c_old) == c - ) - q_A[a, c, m, y] + ) - q_A[a, c, m, y] ) + @_status "Building Model" Progress = "Creating LHS_δ_A Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_δ_A[ a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] - ], - Δ_A[a, c, y] - Δ_A[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c, y] + data.arc_adjacency.is_a_of_c[a, c], + ], + Δ_A[a, c, y] - + Δ_A[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c, y] ) + @_status "Building Model" Progress = "Creating LHS_δ_RA Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_δ_RA[ @@ -1398,13 +1523,22 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c_old in get_name.(data.commodities), c_new in get_name.(data.commodities), y in data.years.range; - ((c_old, c_new) in - get_repurposing_technology.(data.repurposing_arc_technologies)) - && (data.arc_adjacency.is_a_of_c[a,c_old]) + ( + (c_old, c_new) in + get_repurposing_technology.(data.repurposing_arc_technologies) + ) && (data.arc_adjacency.is_a_of_c[a, c_old]), ], - Δ_RA[a, c_old, c_new, y] - Δ_RA[data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, c_old, c_new, y] + Δ_RA[a, c_old, c_new, y] - Δ_RA[ + data.arcs[findfirst(x -> get_name(x) == a, data.arcs)].inverse_arc, + c_old, + c_new, + y, + ] ) + @_status "Building Model" Progress = "Creating LHS_q_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_S[ @@ -1420,6 +1554,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_S[s, t, c, o, m, y] + ϕ_S[s, t, c, o, data.timestep_mapping.previous_step[m], y] ) + @_status "Building Model" Progress = "Creating LHS_q_S_in Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_S_in[ @@ -1447,6 +1584,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_S[s, t, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_q_S_out Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_q_S_out[ @@ -1474,6 +1614,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ϕ_S[s, t, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_Δ_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_S[ @@ -1496,6 +1639,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_Δ_RS Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_Δ_RS[ @@ -1506,8 +1652,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") (r, c) ∈ get_repurposing_technology.(data.repurposing_storage_technologies), ], data.discount[y] / data.years.step * data.storage_data.c_Δ_RS[s, r, c, y] - sum( - data.storage_data.f_RS[r, c] * - λ_S[s, c, m, ys] for ys = + data.storage_data.f_RS[r, c] * λ_S[s, c, m, ys] for ys = (y+data.years.step):data.years.step:min( y + data.storage_data.L_S[c], data.years.last, @@ -1517,8 +1662,8 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") λ_S[s, r, m, ys] for ys = (y+data.years.step):data.years.step:data.years.last, m in get_name.(data.timesteps) ) + - sum( data.storage_data.f_RS[r, c] * - ω_S[s, c, ys] for ys = + sum( + data.storage_data.f_RS[r, c] * ω_S[s, c, ys] for ys = (y+data.years.step):data.years.step:min( y + data.storage_data.L_S[c], data.years.last, @@ -1526,6 +1671,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - sum(ω_S[s, r, ys] for ys = (y+data.years.step):data.years.step:data.years.last) ) + @_status "Building Model" Progress = "Creating LHS_λ_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_λ_S[ @@ -1539,8 +1687,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_S[s, c, ys] for ys = max(y - data.storage_data.L_S[c], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.storage_data.f_RS[c_old, c_new] * - Δ_RS[s, c_old, c_new, ys] for (c_old, c_new) in + sum( + data.storage_data.f_RS[c_old, c_new] * Δ_RS[s, c_old, c_new, ys] for + (c_old, c_new) in get_repurposing_technology.(data.repurposing_storage_technologies), ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) if (c_new) == c @@ -1554,6 +1703,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_ϕ_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ϕ_S[ @@ -1570,6 +1722,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - q_S[s, t, c, o, data.timestep_mapping.next_step[m], y] ) + @_status "Building Model" Progress = "Creating LHS_ω_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_ω_S[ @@ -1580,8 +1735,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") data.storage_data.Ω_S[s, c, y] - sum( Δ_S[s, c, ys] for ys = max(y - data.storage_data.L_S[c], data.years.start):data.years.step:(y-data.years.step) - ) - sum( data.storage_data.f_RS[c_old, c_new] * - Δ_RS[s, c_old, c_new, ys] for (c_old, c_new) in + ) - sum( + data.storage_data.f_RS[c_old, c_new] * Δ_RS[s, c_old, c_new, ys] for + (c_old, c_new) in get_repurposing_technology.(data.repurposing_storage_technologies), ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) if (c_new) == c @@ -1592,6 +1748,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_π_P Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_P[ @@ -1613,6 +1772,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ] ) + @_status "Building Model" Progress = "Creating LHS_π_T_to_D Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_T_to_D[ @@ -1625,6 +1787,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") π_T_to_D[n, c, b, m, y] - prices[n, c, b, m, y] ) + @_status "Building Model" Progress = "Creating LHS_π_T_to_V Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_T_to_V[ @@ -1650,6 +1815,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - q_T_to_V[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_π_V_to_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_V_to_T[ @@ -1675,6 +1843,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) - q_T_from_V[t, n, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_π_A Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_A[ @@ -1682,7 +1853,7 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") c in get_name.(data.commodities), m in get_name.(data.timesteps), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], q_A[a, c, m, y] - sum( q_T[t, a, c, o, m, y] for o in get_name.(data.origins), @@ -1690,6 +1861,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") ) ) + @_status "Building Model" Progress = "Creating LHS_π_T_to_S Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_T_to_S[ @@ -1704,6 +1878,9 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") q_S_in[data.nodes[findfirst(x -> x.name == n, data.nodes)].storage, t, c, o, m, y] ) + @_status "Building Model" Progress = "Creating LHS_π_S_to_T Expressions." "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @mapping( model, LHS_π_S_to_T[ @@ -1727,90 +1904,176 @@ function build_complementarity_model(data::ModelData, BIG = 1e+6, logfile = "") @_status "Building Model" Progress = "Creating Complementarity Conditions." "Time elapsed" = temporal(time() - starttime) logfile = logfile + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_I" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_I, q_I) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_P_to_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_P_to_T, q_P_to_T) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_I" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_I, Δ_I) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_P, Δ_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ϕ_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ϕ_P, ϕ_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_I" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_I, λ_I) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_P, λ_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ω_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ω_P, ω_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ω_I" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ω_I, ω_I) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_to_D" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_to_D, q_T_to_D) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_from_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_from_P, q_T_from_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_to_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_to_V, q_T_to_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_from_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_from_V, q_T_from_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_to_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_to_S, q_T_to_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T_from_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T_from_S, q_T_from_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_T, q_T) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ϕ_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ϕ_T, ϕ_T) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_T, λ_T) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_V, q_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_V, Δ_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_RV" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_RV, Δ_RV) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_V, λ_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_A" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_A, q_A) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_A" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_A, Δ_A) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_RA" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_RA, Δ_RA) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_A" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_A, λ_A) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "δ_A" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_δ_A, δ_A) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "δ_RA" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_δ_RA, δ_RA) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_S, q_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_S_in" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_S_in, q_S_in) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "q_S_out" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_q_S_out, q_S_out) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_S, Δ_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "Δ_RS" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_Δ_RS, Δ_RS) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "λ_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_λ_S, λ_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ϕ_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ϕ_S, ϕ_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "ω_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_ω_S, ω_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_P" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_P, π_P) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_T_to_D" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_T_to_D, π_T_to_D) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_T_to_V" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_T_to_V, π_T_to_V) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_V_to_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_V_to_T, π_V_to_T) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_A" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_A, π_A) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_T_to_S" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_T_to_S, π_T_to_S) + @_status "Building Model" Progress = "Creating Complementarity Conditions." Variable = "π_S_to_T" "Time elapsed" = + temporal(time() - starttime) logfile = logfile @complementarity(model, LHS_π_S_to_T, π_S_to_T) @_status "Building Model" Progress = "Returning built Model." "Time elapsed" = diff --git a/src/data_processing.jl b/src/data_processing.jl index 0b28217..e04c84c 100644 --- a/src/data_processing.jl +++ b/src/data_processing.jl @@ -1,7 +1,12 @@ function get_timesteps(datafile) timesteps = Timestep[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Timesteps.csv"), DataFrame, delim=',')) + for r in eachrow( + CSV.read( + joinpath(datafile, "general_data", "Timesteps.csv"), + DataFrame, + delim = ',', + ), + ) s = Timestep(r[:Timestep], r[:Weights], r[:Type]) push!(timesteps, s) end @@ -35,8 +40,9 @@ function get_timestep_mapping(timesteps) end function get_years(datafile) - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Years.csv"), DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Years.csv"), DataFrame, delim = ','), + ) years = Years( r[:Initial]:r[:Step]:r[:Last], r[:Initial], @@ -45,7 +51,13 @@ function get_years(datafile) sum(s.weights for s in get_timesteps(datafile)), "$(r[:Initial]) - $(r[:Last])", ) - r = CSV.read(joinpath(datafile, "general_data", "Temporal_Preferences.csv"), DataFrame)[1,"Discount Rate"] + r = CSV.read( + joinpath(datafile, "general_data", "Temporal_Preferences.csv"), + DataFrame, + )[ + 1, + "Discount Rate", + ] discount = JuMP.Containers.DenseAxisArray( [1.0 / (1.0 + r)^(y - years.start) for y in years.range], years.range, @@ -57,8 +69,9 @@ end function get_nodes(datafile) nodes = Node[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Nodes.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim = ','), + ) n = Node( name = r[:Node], producer = "P_$(r[:Node])", @@ -75,8 +88,9 @@ end function get_producers(datafile) producers = Producer[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Nodes.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim = ','), + ) p = Producer( name = "P_$(r[:Node])", node = r[:Node], @@ -110,31 +124,40 @@ function get_input_data( ) av_I_df = CSV.read( - joinpath(datafile, "inputs", "Availability_Factors.csv"), DataFrame, delim=',' + joinpath(datafile, "inputs", "Availability_Factors.csv"), + DataFrame, + delim = ',', ) L_I = JuMP.Containers.DenseAxisArray(zeros(length(inputs)), get_name.(inputs)) Λ_I_df = CSV.read( - joinpath(datafile, "inputs", "Exogenous_Capacities.csv"), DataFrame, delim=',' + joinpath(datafile, "inputs", "Exogenous_Capacities.csv"), + DataFrame, + delim = ',', ) Ω_I_df = CSV.read( - joinpath(datafile, "inputs", "Capacity_Expansion_Limits.csv"), DataFrame, delim=',' + joinpath(datafile, "inputs", "Capacity_Expansion_Limits.csv"), + DataFrame, + delim = ',', ) op_cost_par_df = CSV.read( - joinpath(datafile, "inputs", "Cost_Parameters.csv"), DataFrame, delim=',' + joinpath(datafile, "inputs", "Cost_Parameters.csv"), + DataFrame, + delim = ',', ) inv_cost_par_df = CSV.read( - joinpath(datafile, "inputs", "Investment_Cost_Parameters.csv"), DataFrame, delim=',' + joinpath(datafile, "inputs", "Investment_Cost_Parameters.csv"), + DataFrame, + delim = ',', ) - life_df = CSV.read( - joinpath(datafile, "inputs", "Lifetimes.csv"), DataFrame, delim=',' - ) - + life_df = + CSV.read(joinpath(datafile, "inputs", "Lifetimes.csv"), DataFrame, delim = ',') + for i in get_name.(inputs) L_I_h = life_df[(life_df.Input.==i), "Lifetime"] if length(L_I_h) == 1 @@ -223,10 +246,7 @@ function get_input_data( for b in get_name.(input_operational_blocks) - Λ_I_h = Λ_I_df[ - (Λ_I_df.Input.==i).&(Λ_I_df.Node.==n), - "Capacity $b $y", - ] + Λ_I_h = Λ_I_df[(Λ_I_df.Input.==i).&(Λ_I_df.Node.==n), "Capacity $b $y"] if length(Λ_I_h) == 1 Λ_I[p_name, i, b, y] = Λ_I_h[1] @@ -336,16 +356,19 @@ function get_production_data( origins::Vector{Origin}, years::Years, ) - tec_df = CSV.read( - joinpath(datafile, "production", "Technology.csv"), DataFrame, delim=',' - ) + tec_df = + CSV.read(joinpath(datafile, "production", "Technology.csv"), DataFrame, delim = ',') cap_df = CSV.read( - joinpath(datafile, "production", "Exogenous_Capacities.csv"), DataFrame, delim=',' + joinpath(datafile, "production", "Exogenous_Capacities.csv"), + DataFrame, + delim = ',', ) - + lim_df = CSV.read( - joinpath(datafile, "production", "Capacity_Expansion_Limits.csv"), DataFrame, delim=',' + joinpath(datafile, "production", "Capacity_Expansion_Limits.csv"), + DataFrame, + delim = ',', ) for i in get_name.(inputs) @@ -481,9 +504,8 @@ function get_trade_data( origins::Vector{Origin}, years::Years, ) - sanctions_df = CSV.read( - joinpath(datafile, "trade", "Sanctions.csv"), DataFrame, delim=',' - ) + sanctions_df = + CSV.read(joinpath(datafile, "trade", "Sanctions.csv"), DataFrame, delim = ',') interim_sanctions = Dict{Tuple{String,String,String,String,Int64},Float64}( (row.Trader, row.Node, row.Commodity, row.Origin, y) => @@ -498,10 +520,8 @@ function get_trade_data( Λ_T = JuMP.Containers.SparseAxisArray(interim_sanctions) - NC_df = CSV.read( - joinpath(datafile, "general_data", "Market_Power.csv"), DataFrame - ) - + NC_df = CSV.read(joinpath(datafile, "general_data", "Market_Power.csv"), DataFrame) + NC = JuMP.Containers.DenseAxisArray( zeros(length(traders), length(nodes), length(commodities)), get_name.(traders), @@ -526,7 +546,9 @@ function get_trade_data( end specific_df = CSV.read( - joinpath(datafile, "trade", "Specific_Market_Power.csv"), DataFrame, delim=',' + joinpath(datafile, "trade", "Specific_Market_Power.csv"), + DataFrame, + delim = ',', ) specific_dict = Dict{Tuple{String,String,String},Float64}( @@ -556,17 +578,20 @@ function get_conversion_data( years::Years, ) df = CSV.read( - joinpath(datafile, "conversion", "Conversion_Data.csv"), DataFrame, delim=',' - ) - - cap_df = CSV.read( - joinpath(datafile, "conversion", "Capacities.csv"), DataFrame, delim=',' + joinpath(datafile, "conversion", "Conversion_Data.csv"), + DataFrame, + delim = ',', ) + cap_df = + CSV.read(joinpath(datafile, "conversion", "Capacities.csv"), DataFrame, delim = ',') + repurposing_df = CSV.read( - joinpath(datafile, "conversion", "Repurposing.csv"), DataFrame, delim=',' + joinpath(datafile, "conversion", "Repurposing.csv"), + DataFrame, + delim = ',', ) - + for f in get_name.(input_commodities) if f ∉ df[!, "Input Commodity"] @_warning "Missing input commodity in converison technologies" Commodity = f @@ -701,7 +726,8 @@ function get_conversion_data( (repurposing_df[!, "To Input Commodity"] .== c_in_new) .& (repurposing_df[!, "To Output Commodity"] .== c_out_new) - f_RV[c_in_old, c_out_old, c_in_new, c_out_new] = repurposing_df[filter_idxs, "Repurposing Factor"][1] + f_RV[c_in_old, c_out_old, c_in_new, c_out_new] = + repurposing_df[filter_idxs, "Repurposing Factor"][1] for v in converters, y in years.range c_Δ_RV[get_name(v), c_in_old, c_out_old, c_in_new, c_out_new, y] = @@ -730,23 +756,33 @@ function get_arc_data( years::Years, ) commodity_df = CSV.read( - joinpath(datafile, "transport", "Commodity_Data.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Commodity_Data.csv"), + DataFrame, + delim = ',', ) - + pipe_dist_df = CSV.read( - joinpath(datafile, "transport", "Pipeline_Distances.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Pipeline_Distances.csv"), + DataFrame, + delim = ',', ) - + ship_dist_df = CSV.read( - joinpath(datafile, "transport", "Shipping_Distances.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Shipping_Distances.csv"), + DataFrame, + delim = ',', ) - + exist_pipes = CSV.read( - joinpath(datafile, "transport", "Exogenous_Pipelines.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Exogenous_Pipelines.csv"), + DataFrame, + delim = ',', ) - + repurposing_df = CSV.read( - joinpath(datafile, "transport", "Repurposing_Data.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Repurposing_Data.csv"), + DataFrame, + delim = ',', ) c_A = JuMP.Containers.DenseAxisArray( @@ -799,11 +835,11 @@ function get_arc_data( f.transport = transport_type[1] elseif length(transport_type) == 0 @_error "Found $(length(transport_type)) values for flow commodity transport type" Commodity = - get_name(f) + get_name(f) elseif length(transport_type) !== 1 f.transport = transport_type[1] @_warning "Found $(length(transport_type)) values for flow commodity transport type, using first type" Commodity = - get_name(f) + get_name(f) end L_A[get_name(f)] = commodity_df[flow_commodity_idx, "Lifetime"][1] for a in arcs @@ -828,7 +864,10 @@ function get_arc_data( ].==a.start_node).&(exist_pipes[ !, "End", - ].==a.end_node).&(exist_pipes[!, "Flow Commodity"].==get_name(f)), + ].==a.end_node).&(exist_pipes[ + !, + "Flow Commodity", + ].==get_name(f)), "Capacity $y", ] if length(pipe_cap_arr) == 1 @@ -867,7 +906,8 @@ function get_arc_data( (repurposing_df[!, "Old Flow Commodity"] .== r.from_throughput) .& (repurposing_df[!, "New Flow Commodity"] .== r.to_throughput) - f_RA[r.from_throughput, r.to_throughput] = repurposing_df[filter_idxs, "Repurposing Factor"][1] + f_RA[r.from_throughput, r.to_throughput] = + repurposing_df[filter_idxs, "Repurposing Factor"][1] for y in years.range, a in arcs distance = @@ -879,8 +919,15 @@ function get_arc_data( end end - arc_data = - ArcData(c_A = c_A, c_Δ_A = c_Δ_A, c_Δ_RA = c_Δ_RA, Λ_A = Λ_A, l_a = l_a, L_A = L_A, f_RA = f_RA) + arc_data = ArcData( + c_A = c_A, + c_Δ_A = c_Δ_A, + c_Δ_RA = c_Δ_RA, + Λ_A = Λ_A, + l_a = l_a, + L_A = L_A, + f_RA = f_RA, + ) return arc_data end @@ -894,20 +941,18 @@ function get_storage_data( years::Years, timestep_mapping::TimestepMapping, ) - tec_df = CSV.read( - joinpath(datafile, "storage", "Technologies.csv"), DataFrame, delim=',' - ) - - los_df = CSV.read( - joinpath(datafile, "storage", "Losses.csv"), DataFrame, delim=',' - ) - - cap_df = CSV.read( - joinpath(datafile, "storage", "Capacities.csv"), DataFrame, delim=',' - ) - + tec_df = + CSV.read(joinpath(datafile, "storage", "Technologies.csv"), DataFrame, delim = ',') + + los_df = CSV.read(joinpath(datafile, "storage", "Losses.csv"), DataFrame, delim = ',') + + cap_df = + CSV.read(joinpath(datafile, "storage", "Capacities.csv"), DataFrame, delim = ',') + repurposing_df = CSV.read( - joinpath(datafile, "storage", "Repurposing_Data.csv"), DataFrame, delim=',' + joinpath(datafile, "storage", "Repurposing_Data.csv"), + DataFrame, + delim = ',', ) Λ_S = JuMP.Containers.DenseAxisArray( @@ -952,10 +997,7 @@ function get_storage_data( ) f_RS = JuMP.Containers.DenseAxisArray( - zeros( - length(commodities), - length(commodities), - ), + zeros(length(commodities), length(commodities)), get_name.(commodities), get_name.(commodities), ) @@ -1064,7 +1106,8 @@ function get_storage_data( (repurposing_df[!, "Old Commodity"] .== r.from_input) .& (repurposing_df[!, "New Commodity"] .== r.to_input) - f_RS[r.from_input, r.to_input] = repurposing_df[filter_idxs, "Repurposing Factor"][1] + f_RS[r.from_input, r.to_input] = + repurposing_df[filter_idxs, "Repurposing Factor"][1] for y in years.range, s in storages c_Δ_RS[get_name(s), r.from_input, r.to_input, y] = @@ -1083,7 +1126,7 @@ function get_storage_data( l_S = l_S, L_S = L_S, Ω_S = Ω_S, - f_RS = f_RS + f_RS = f_RS, ) return storage_data @@ -1098,9 +1141,8 @@ function get_demand_data( years::Years, ) - ref_df = CSV.read( - joinpath(datafile, "demand", "Reference_Data.csv"), DataFrame, delim=',' - ) + ref_df = + CSV.read(joinpath(datafile, "demand", "Reference_Data.csv"), DataFrame, delim = ',') α_D = JuMP.Containers.DenseAxisArray( zeros( @@ -1179,8 +1221,9 @@ end function get_traders(datafile) traders = Trader[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim = ','), + ) idx = findfirst(x -> r[Symbol("Nodal Trader")] == get_name(x), traders) if !isnothing(idx) t = traders[idx] @@ -1195,8 +1238,9 @@ end function get_converters(datafile) converters = Converter[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Nodes.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim = ','), + ) c = Converter( name = "V_$(r[:Node])", node = r[:Node], @@ -1230,39 +1274,48 @@ function get_arc_adjacency(datafile, nodes, arcs, commodities) arc_adjacency = ArcAdjacencyCommodity() df_pipe = CSV.read( - joinpath(datafile, "transport", "Pipeline_Adjacency.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Pipeline_Adjacency.csv"), + DataFrame, + delim = ',', ) - - @assert df_pipe.Start == names(df_pipe[!,2:end]) + + @assert df_pipe.Start == names(df_pipe[!, 2:end]) @assert get_name.(nodes) ⊆ df_pipe.Start node_names = df_pipe.Start - adjacency_pipe = JuMP.Containers.DenseAxisArray(Matrix(df_pipe[!,2:end]), node_names, node_names) - @assert isequal(adjacency_pipe.data,permutedims(adjacency_pipe.data)) + adjacency_pipe = + JuMP.Containers.DenseAxisArray(Matrix(df_pipe[!, 2:end]), node_names, node_names) + @assert isequal(adjacency_pipe.data, permutedims(adjacency_pipe.data)) df_shipping = CSV.read( - joinpath(datafile, "transport", "Shipping_Adjacency.csv"), DataFrame, delim=',' + joinpath(datafile, "transport", "Shipping_Adjacency.csv"), + DataFrame, + delim = ',', ) - - @assert df_shipping.Start == names(df_shipping[!,2:end]) + + @assert df_shipping.Start == names(df_shipping[!, 2:end]) @assert get_name.(nodes) ⊆ df_shipping.Start node_names = df_shipping.Start - adjacency_shipping = JuMP.Containers.DenseAxisArray(Matrix(df_shipping[!,2:end]), node_names, node_names) - @assert isequal(adjacency_shipping.data,permutedims(adjacency_shipping.data)) + adjacency_shipping = JuMP.Containers.DenseAxisArray( + Matrix(df_shipping[!, 2:end]), + node_names, + node_names, + ) + @assert isequal(adjacency_shipping.data, permutedims(adjacency_shipping.data)) for a in arcs, c in commodities if c.transport == "Shipping" - if !ismissing(adjacency_shipping[a.start_node,a.end_node]) - push!(arc_adjacency.AC,(get_name(a),get_name(c))) - arc_adjacency.is_a_of_c[get_name(a),get_name(c)] = true + if !ismissing(adjacency_shipping[a.start_node, a.end_node]) + push!(arc_adjacency.AC, (get_name(a), get_name(c))) + arc_adjacency.is_a_of_c[get_name(a), get_name(c)] = true else - arc_adjacency.is_a_of_c[get_name(a),get_name(c)] = false + arc_adjacency.is_a_of_c[get_name(a), get_name(c)] = false end elseif c.transport == "Pipeline" - if !ismissing(adjacency_pipe[a.start_node,a.end_node]) - push!(arc_adjacency.AC,(get_name(a),get_name(c))) - arc_adjacency.is_a_of_c[get_name(a),get_name(c)] = true + if !ismissing(adjacency_pipe[a.start_node, a.end_node]) + push!(arc_adjacency.AC, (get_name(a), get_name(c))) + arc_adjacency.is_a_of_c[get_name(a), get_name(c)] = true else - arc_adjacency.is_a_of_c[get_name(a),get_name(c)] = false + arc_adjacency.is_a_of_c[get_name(a), get_name(c)] = false end else @warn "Unassigned Transport Mode" Commodity = c.name @@ -1275,8 +1328,9 @@ end function get_storages(datafile) storages = Storage[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Nodes.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Nodes.csv"), DataFrame, delim = ','), + ) s = Storage( name = "S_$(r[:Node])", node = r[:Node], @@ -1291,7 +1345,11 @@ end function get_commodities(datafile) commodities = Commodity[] for r in eachrow( - CSV.read(joinpath(datafile, "general_data", "Commodities.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "general_data", "Commodities.csv"), + DataFrame, + delim = ',', + ), ) c = Commodity(name = r[Symbol("Commodity")], transport = "unassigned") push!(commodities, c) @@ -1301,8 +1359,9 @@ end function get_origins(datafile) origins = Origin[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Origins.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Origins.csv"), DataFrame, delim = ','), + ) o = Origin(name = r[:Origin]) push!(origins, o) end @@ -1311,8 +1370,9 @@ end function get_inputs(datafile) inputs = Input[] - for r in - eachrow(CSV.read(joinpath(datafile, "general_data", "Inputs.csv"),DataFrame, delim=',')) + for r in eachrow( + CSV.read(joinpath(datafile, "general_data", "Inputs.csv"), DataFrame, delim = ','), + ) i = Input(name = r[:Input]) push!(inputs, i) end @@ -1322,7 +1382,11 @@ end function get_input_operational_blocks(datafile) input_operational_blocks = InputOperationalBlock[] for r in eachrow( - CSV.read(joinpath(datafile, "general_data", "Input_Blocks.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "general_data", "Input_Blocks.csv"), + DataFrame, + delim = ',', + ), ) i = InputOperationalBlock(name = r[Symbol("Input Block")]) push!(input_operational_blocks, i) @@ -1333,7 +1397,11 @@ end function get_demand_blocks(datafile) demand_blocks = DemandBlock[] for r in eachrow( - CSV.read(joinpath(datafile, "general_data", "Demand_Blocks.csv"),DataFrame; delim=',') + CSV.read( + joinpath(datafile, "general_data", "Demand_Blocks.csv"), + DataFrame; + delim = ',', + ), ) i = DemandBlock(name = r[Symbol("Demand Blocks")]) push!(demand_blocks, i) @@ -1346,7 +1414,11 @@ function get_production_technology_data(datafile::String) origins = get_origins(datafile) production_technologies = ProductionTechnology[] for r in eachrow( - CSV.read(joinpath(datafile, "production", "Technology.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "production", "Technology.csv"), + DataFrame, + delim = ',', + ), ) c = r[Symbol("Output")] o = r[Symbol("Origin")] @@ -1370,7 +1442,11 @@ function get_conversion_technology_data(datafile::String) commodities = get_commodities(datafile) conversion_technologies = ConversionTechnology[] for r in eachrow( - CSV.read(joinpath(datafile, "conversion", "Conversion_Data.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "conversion", "Conversion_Data.csv"), + DataFrame, + delim = ',', + ), ) c_in = r[Symbol("Input Commodity")] c_out = r[Symbol("Output Commodity")] @@ -1394,7 +1470,11 @@ function get_arc_repurposing_technology(datafile) commodities = get_commodities(datafile) arc_repurposing_technologies = RepurposingArcs[] for r in eachrow( - CSV.read(joinpath(datafile, "transport", "Repurposing_Data.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "transport", "Repurposing_Data.csv"), + DataFrame, + delim = ',', + ), ) c_old = r[Symbol("Old Flow Commodity")] c_new = r[Symbol("New Flow Commodity")] @@ -1418,7 +1498,11 @@ function get_storage_repurposing_technology(datafile) commodities = get_commodities(datafile) storage_repurposing_technologies = RepurposingStorage[] for r in eachrow( - CSV.read(joinpath(datafile, "storage", "Repurposing_Data.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "storage", "Repurposing_Data.csv"), + DataFrame, + delim = ',', + ), ) c_old = r[Symbol("Old Commodity")] c_new = r[Symbol("New Commodity")] @@ -1442,7 +1526,11 @@ function get_conversion_repurposing_technology(datafile) commodities = get_commodities(datafile) repurposing_technology = RepurposingConversion[] for r in eachrow( - CSV.read(joinpath(datafile, "conversion", "Repurposing.csv"),DataFrame, delim=',') + CSV.read( + joinpath(datafile, "conversion", "Repurposing.csv"), + DataFrame, + delim = ',', + ), ) c_in_old = r[Symbol("From Input Commodity")] c_out_old = r[Symbol("From Output Commodity")] @@ -1483,10 +1571,7 @@ julia> using HydrOGEnMod julia> data = get_HydrOGEnMod_data("path/to/my/data"); ``` """ -function get_HydrOGEnMod_data( - data; - logfile = "", -) +function get_HydrOGEnMod_data(data; logfile = "") starttime = time() @_status "Loading Data" Progress = "Reading in Timesteps." "Time elapsed" = diff --git a/src/optimization_model.jl b/src/optimization_model.jl index 5c8ffaf..e95edf8 100644 --- a/src/optimization_model.jl +++ b/src/optimization_model.jl @@ -144,15 +144,21 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") o = get_name.(data.origins), s = get_name.(data.timesteps), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ] <= BIG ) @variable( model, - 0 <= Δ_A[a = get_name.(data.arcs), c = get_name.(data.commodities), y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c]] <= BIG + 0 <= + Δ_A[ + a = get_name.(data.arcs), + c = get_name.(data.commodities), + y = data.years.range; + data.arc_adjacency.is_a_of_c[a, c], + ] <= + BIG ) @variable( @@ -162,8 +168,8 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") a = get_name.(data.arcs), c_old = get_from_throughput.(data.repurposing_arc_technologies), c_new = get_to_throughput.(data.repurposing_arc_technologies), - y = data.years.range; - data.arc_adjacency.is_a_of_c[a,c_old] + y = data.years.range; + data.arc_adjacency.is_a_of_c[a, c_old], ] <= BIG ) @@ -230,6 +236,9 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") BIG ) + @_status "Building Model" Progress = "Finished Creating Variables" Variables = num_variables(model) "Time elapsed" = + temporal(time() - starttime) logfile = logfile + @_status "Building Model" Progress = "Creating Demand Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile @expression( @@ -305,7 +314,9 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") m in get_name.(data.timesteps), y in data.years.range, ], - data.weights[m] / 2 * data.demand_data.β_D[n, c, b, m, y] * (demand[n, c, b, m, y])^2 + + data.weights[m] / 2 * + data.demand_data.β_D[n, c, b, m, y] * + (demand[n, c, b, m, y])^2 + data.weights[m] * data.demand_data.α_D[n, c, b, m, y] * demand[n, c, b, m, y] ) @@ -354,7 +365,10 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") i in get_name.(data.inputs), y in data.years.range, ], - sum(data.weights[m] * q_I[p, i, b, m, y] for b in get_name.(data.input_operational_blocks), m in get_name.(data.timesteps)) + sum( + data.weights[m] * q_I[p, i, b, m, y] for + b in get_name.(data.input_operational_blocks), m in get_name.(data.timesteps) + ) ) @_status "Building Model" Progress = "Creating Input Capacity Expansion Cost Expression." "Time elapsed" = @@ -461,7 +475,7 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") o in get_name.(data.origins), m in get_name.(data.timesteps), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], data.weights[m] * data.arc_data.c_A[a, c, y] * q_T[t, a, c, o, m, y] ) @@ -474,7 +488,7 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], 0.5 * data.arc_data.c_Δ_A[a, c, y] / data.years.step * Δ_A[a, c, y] ) @@ -488,9 +502,10 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") c_old in get_from_throughput.(data.repurposing_arc_technologies), c_new in get_to_throughput.(data.repurposing_arc_technologies), y in data.years.range; - ((c_old, c_new) in - get_repurposing_technology.(data.repurposing_arc_technologies)) - && (data.arc_adjacency.is_a_of_c[a,c_old]) + ( + (c_old, c_new) in + get_repurposing_technology.(data.repurposing_arc_technologies) + ) && (data.arc_adjacency.is_a_of_c[a, c_old]), ], 0.5 * data.arc_data.c_Δ_RA[a, c_old, c_new, y] / data.years.step * Δ_RA[a, c_old, c_new, y] @@ -498,7 +513,19 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") @_status "Building Model" Progress = "Creating Aggregated Arc Flow Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile - @expression(model, yearly_arc_flows[a in get_name.(data.arcs), c in get_name.(data.commodities), y in data.years.range], sum(data.weights[m] * q_T[t, a, c, o, m, y] for t in get_name.(data.traders), o in get_name.(data.origins), m in get_name.(data.timesteps) if data.arc_adjacency.is_a_of_c[a,c] )); + @expression( + model, + yearly_arc_flows[ + a in get_name.(data.arcs), + c in get_name.(data.commodities), + y in data.years.range, + ], + sum( + data.weights[m] * q_T[t, a, c, o, m, y] for + t in get_name.(data.traders), o in get_name.(data.origins), + m in get_name.(data.timesteps) if data.arc_adjacency.is_a_of_c[a, c] + ) + ) @_status "Building Model" Progress = "Creating Storage Cost Expression." "Time elapsed" = temporal(time() - starttime) logfile = logfile @@ -698,7 +725,7 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") ], sum( (1 + data.arc_data.l_a[a, c]) * q_T[get_name(t), a, c, o, m, y] for - a in n.starting_arcs if data.arc_adjacency.is_a_of_c[a,c] + a in n.starting_arcs if data.arc_adjacency.is_a_of_c[a, c] ) + sum( q_T_D[get_name(t), get_name(n), c, b, o, m, y] for @@ -711,7 +738,10 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") c_o == c ) + q_S_in[n.storage, get_name(t), c, o, m, y] == - sum(q_T[get_name(t), a, c, o, m, y] for a in n.ending_arcs if data.arc_adjacency.is_a_of_c[a,c]) + + sum( + q_T[get_name(t), a, c, o, m, y] for + a in n.ending_arcs if data.arc_adjacency.is_a_of_c[a, c] + ) + sum( q_V[n.converter, get_name(t), c_o, c_n, o, m, y] for (c_o, c_n) in get_conversion_technology.(data.conversion_technologies) if @@ -757,7 +787,8 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_V[v, c_i, c_o, ys] for ys = max(y - data.conversion_data.L_V[c_i, c_o], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * + sum( + data.conversion_data.f_RV[c_in_old, c_out_old, c_in_new, c_out_new] * Δ_RV[v, c_in_old, c_out_old, c_in_new, c_out_new, ys] for ((c_in_old, c_out_old), (c_in_new, c_out_new)) in get_repurposing_technology.(data.repurposing_conversion_technologies), ys = @@ -781,7 +812,7 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") c in get_name.(data.commodities), m in get_name.(data.timesteps), y in data.years.range; - data.arc_adjacency.is_a_of_c[a,c] + data.arc_adjacency.is_a_of_c[a, c], ], sum( q_T[t, a, c, o, m, y] for o in get_name.(data.origins), @@ -792,8 +823,9 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_A[a, c, ys] for ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.arc_data.f_RA[c_old, c_new] * - Δ_RA[a, c_old, c_new, ys] for (c_old, c_new) in + sum( + data.arc_data.f_RA[c_old, c_new] * Δ_RA[a, c_old, c_new, ys] for + (c_old, c_new) in get_repurposing_technology.(data.repurposing_arc_technologies), ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) if (c_new) == c @@ -812,7 +844,7 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") a in data.arcs, c in get_name.(data.commodities), y in data.years.range; - data.arc_adjacency.is_a_of_c[get_name(a),c] + data.arc_adjacency.is_a_of_c[get_name(a), c], ], Δ_A[get_name(a), c, y] == Δ_A[a.inverse_arc, c, y] ) @@ -826,9 +858,10 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") c_old in get_name.(data.commodities), c_new in get_name.(data.commodities), y in data.years.range; - ((c_old, c_new) in - get_repurposing_technology.(data.repurposing_arc_technologies)) - && (data.arc_adjacency.is_a_of_c[get_name(a),c_old]) + ( + (c_old, c_new) in + get_repurposing_technology.(data.repurposing_arc_technologies) + ) && (data.arc_adjacency.is_a_of_c[get_name(a), c_old]), ], Δ_RA[get_name(a), c_old, c_new, y] == Δ_RA[a.inverse_arc, c_old, c_new, y] ) @@ -852,8 +885,9 @@ function build_optimization_model(data::ModelData, BIG = 1e+6, logfile = "") Δ_S[s, c, ys] for ys = max(y - data.storage_data.L_S[c], data.years.start):data.years.step:(y-data.years.step) ) + - sum( data.storage_data.f_RS[c_old, c_new] * - Δ_RS[s, c_old, c_new, ys] for (c_old, c_new) in + sum( + data.storage_data.f_RS[c_old, c_new] * Δ_RS[s, c_old, c_new, ys] for + (c_old, c_new) in get_repurposing_technology.(data.repurposing_storage_technologies), ys = max(y - data.arc_data.L_A[c], data.years.start):data.years.step:(y-data.years.step) if (c_new) == c diff --git a/src/plotting.jl b/src/plotting.jl index 8ee6fba..86cb7f8 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -52,15 +52,15 @@ function plot_model_nodes(; ] - fig = Figure(size = (1200,900), fonts = (; regular = "CMU Serif", bold = "CMU Serif")) + fig = Figure(size = (1200, 900), fonts = (; regular = "CMU Serif", bold = "CMU Serif")) ax = GeoAxis( fig[1, 1:5]; dest = "+proj=wintri", xgridcolor = (:grey, 0.5), - ygridcolor= (:grey, 0.5), - xautolimitmargin = (0,0), - yautolimitmargin = (0,0), + ygridcolor = (:grey, 0.5), + xautolimitmargin = (0, 0), + yautolimitmargin = (0, 0), titlevisible = false, ) @@ -71,7 +71,7 @@ function plot_model_nodes(; field; colormap = Reverse(:Blues_3), shading = NoShading, - rasterize = rasterize, + rasterize = rasterize, ) translate!(hm1, 0, 0, -10) @@ -81,7 +81,7 @@ function plot_model_nodes(; color = [unassigned_color for i in disputed_areas], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) hm2 = poly!( @@ -90,7 +90,7 @@ function plot_model_nodes(; color = [colormap[i.properties[:MODEL_NODE]] for i in all_countries], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) leg = Legend( @@ -149,7 +149,7 @@ function plot_model_nodes( for i in all_countries push!(modelnodes, i.properties[geojson_property_tag]) end - modelnodes = filter!(e -> e ∉ ["N.A.","P_N.A."], unique(modelnodes)) + modelnodes = filter!(e -> e ∉ ["N.A.", "P_N.A."], unique(modelnodes)) @assert issetequal(modelnodes, axes(container)...) "Data to be plotted does not match given map data, make sure that model nodes are correctly mapped in file $nodes_path" fig = Figure(fonts = (; regular = "CMU Serif", bold = "CMU Serif")) @@ -158,9 +158,9 @@ function plot_model_nodes( fig[1, 1:3]; dest = "+proj=wintri", xgridcolor = (:grey, 0.5), - ygridcolor= (:grey, 0.5), - xautolimitmargin = (0,0), - yautolimitmargin = (0,0), + ygridcolor = (:grey, 0.5), + xautolimitmargin = (0, 0), + yautolimitmargin = (0, 0), titlevisible = false, ) @@ -171,7 +171,7 @@ function plot_model_nodes( field; colormap = Reverse(:Blues_3), shading = NoShading, - rasterize = rasterize, + rasterize = rasterize, ) translate!(hm1, 0, 0, -10) @@ -181,7 +181,7 @@ function plot_model_nodes( color = [unassigned_color for i in disputed_areas], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) hm2 = poly!( @@ -195,12 +195,13 @@ function plot_model_nodes( nan_color = unassigned_color, strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) - cb_lims = extrema(container.data) .+ (-1e-12,1e-12) + cb_lims = extrema(container.data) .+ (-1e-12, 1e-12) - lower_label_cb_lims, upper_label_cb_lims = replace.(map( x-> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") + lower_label_cb_lims, upper_label_cb_lims = + replace.(map(x -> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") Label(fig[2, 1], lower_label_cb_lims) Label(fig[2, 3], upper_label_cb_lims) @@ -246,7 +247,7 @@ function plot_model_nodes( unassigned_color = :gray85, strokecolor = :black, strokewidth = 0.1, - rasterize = false, + rasterize = false, save_path = "", geojson_property_tag = :MODEL_NODE_3, ) where {T,N,K<:NTuple{N,Any}} @@ -277,9 +278,9 @@ function plot_model_nodes( fig[1, 1:3]; dest = "+proj=wintri", xgridcolor = (:grey, 0.5), - ygridcolor= (:grey, 0.5), - xautolimitmargin = (0,0), - yautolimitmargin = (0,0), + ygridcolor = (:grey, 0.5), + xautolimitmargin = (0, 0), + yautolimitmargin = (0, 0), titlevisible = false, ) @@ -290,7 +291,7 @@ function plot_model_nodes( field; colormap = Reverse(:Blues_3), shading = NoShading, - rasterize = rasterize, + rasterize = rasterize, ) translate!(hm1, 0, 0, -10) @@ -300,7 +301,7 @@ function plot_model_nodes( color = [unassigned_color for i in disputed_areas], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) hm2 = poly!( @@ -314,17 +315,18 @@ function plot_model_nodes( nan_color = unassigned_color, strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) - cb_lims = extrema(values(container.data)) .+ (-1e-12,1e-12) + cb_lims = extrema(values(container.data)) .+ (-1e-12, 1e-12) - lower_label_cb_lims, upper_label_cb_lims = replace.(map( x-> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") + lower_label_cb_lims, upper_label_cb_lims = + replace.(map(x -> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") Label(fig[2, 1], lower_label_cb_lims) Label(fig[2, 3], upper_label_cb_lims) - + cb = Colorbar( fig[2, 2]; limits = cb_lims, @@ -372,7 +374,7 @@ function plot_model_nodes( strokewidth = 0.1, linewidth = 0.2, linecolor = :black, - rasterize = false, + rasterize = false, save_path = "", ) all_countries = GeoMakie.GeoJSON.read(nodes_path) @@ -409,9 +411,9 @@ function plot_model_nodes( fig[1, 1:3]; dest = "+proj=wintri", xgridcolor = (:grey, 0.5), - ygridcolor= (:grey, 0.5), - xautolimitmargin = (0,0), - yautolimitmargin = (0,0), + ygridcolor = (:grey, 0.5), + xautolimitmargin = (0, 0), + yautolimitmargin = (0, 0), titlevisible = false, ) @@ -422,7 +424,7 @@ function plot_model_nodes( field; colormap = Reverse(:Blues_3), shading = NoShading, - rasterize = rasterize, + rasterize = rasterize, ) translate!(hm1, 0, 0, -10) @@ -432,7 +434,7 @@ function plot_model_nodes( color = [unassigned_color for i in disputed_areas], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) hm2 = poly!( @@ -441,7 +443,7 @@ function plot_model_nodes( color = [colormap[i.properties[:MODEL_NODE]] for i in all_countries], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) for a in arcs @@ -496,7 +498,7 @@ function plot_model_nodes( strokewidth = 0.1, linewidth = 1, linecolorscheme = :plasma, - rasterize = false, + rasterize = false, largestvalues = 10, minval = 1, save_path = "", @@ -544,18 +546,18 @@ function plot_model_nodes( fig = Figure(fonts = (; regular = "CMU Serif", bold = "CMU Serif")) if !isempty(relevant_values) - cb_lims = extrema(values(relevant_values)) .+ (-1e-12,1e-12) + cb_lims = extrema(values(relevant_values)) .+ (-1e-12, 1e-12) else - cb_lims = (-1e-12,1e-12) + cb_lims = (-1e-12, 1e-12) end ax = GeoAxis( fig[1, 1:3]; dest = "+proj=wintri", xgridcolor = (:grey, 0.5), - ygridcolor= (:grey, 0.5), - xautolimitmargin = (0,0), - yautolimitmargin = (0,0), + ygridcolor = (:grey, 0.5), + xautolimitmargin = (0, 0), + yautolimitmargin = (0, 0), titlevisible = false, ) @@ -566,7 +568,7 @@ function plot_model_nodes( field; colormap = Reverse(:Blues_3), shading = NoShading, - rasterize = rasterize, + rasterize = rasterize, ) translate!(hm1, 0, 0, -10) @@ -576,7 +578,7 @@ function plot_model_nodes( color = [unassigned_color for i in disputed_areas], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) hm2 = poly!( @@ -585,7 +587,7 @@ function plot_model_nodes( color = [colormap[i.properties[:MODEL_NODE]] for i in all_countries], strokecolor = strokecolor, strokewidth = strokewidth, - rasterize = rasterize, + rasterize = rasterize, ) for a in arcs @@ -603,12 +605,13 @@ function plot_model_nodes( ) end end - - lower_label_cb_lims, upper_label_cb_lims = replace.(map( x-> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") + + lower_label_cb_lims, upper_label_cb_lims = + replace.(map(x -> @sprintf("%.3g", x), collect(cb_lims)), "-" => "−") Label(fig[2, 1], lower_label_cb_lims) Label(fig[2, 3], upper_label_cb_lims) - + cb = Colorbar( fig[2, 2]; limits = cb_lims, diff --git a/src/types.jl b/src/types.jl index 1779282..551069b 100644 --- a/src/types.jl +++ b/src/types.jl @@ -163,7 +163,7 @@ Base.@kwdef mutable struct RepurposingArcs <: AbstractSet RA::Tuple{T,T} end -Base.@kwdef mutable struct ArcAdjacencyCommodity +Base.@kwdef mutable struct ArcAdjacencyCommodity AC::Vector{Tuple{T,T}} = Tuple{T,T}[] is_a_of_c::Dict{Tuple{T,T},Bool} = Dict{Tuple{T,T},Bool}() end diff --git a/test/functional_tests/functional_test_3.jl b/test/functional_tests/functional_test_3.jl index bf21235..a8f047f 100644 --- a/test/functional_tests/functional_test_3.jl +++ b/test/functional_tests/functional_test_3.jl @@ -7,11 +7,7 @@ function functional_test_3(config) exdir = joinpath(writedir, "expressions") model = build_optimization_model(data) - optimize!( - model, - Ipopt.Optimizer, - config.solver_options..., - ) + optimize!(model, Ipopt.Optimizer, config.solver_options...) write_csv(writedir, model) @testset "Variables" begin diff --git a/test/functional_tests/functional_test_4.jl b/test/functional_tests/functional_test_4.jl index 46053c4..8792996 100644 --- a/test/functional_tests/functional_test_4.jl +++ b/test/functional_tests/functional_test_4.jl @@ -7,11 +7,11 @@ function functional_test_4(config) model = build_complementarity_model(data) - if haskey(ENV,"PATH_LICENSE_STRING") + if haskey(ENV, "PATH_LICENSE_STRING") status = solve_mcp(model; output = "no", time_limit = 5) else mcp_data = Complementarity.get_MCP_data(model) - for i in 1:length(mcp_data) + for i = 1:length(mcp_data) Complementarity.set_result_value(mcp_data[i], 0.0) end end diff --git a/test/runtests.jl b/test/runtests.jl index fb0e476..0548043 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,10 +11,18 @@ import Logging Logging.disable_logging(Logging.LogLevel(1500)) struct TestConfig - optimizer + optimizer::Any testing_tol::Float64 - solver_options - function TestConfig(; optimizer = Ipopt.Optimizer, testing_tol = 1e-3, solver_options = ("bound_relax_factor" => 1e-8, "max_wall_time" => 100.0, "print_level" => 0)) + solver_options::Any + function TestConfig(; + optimizer = Ipopt.Optimizer, + testing_tol = 1e-3, + solver_options = ( + "bound_relax_factor" => 1e-8, + "max_wall_time" => 100.0, + "print_level" => 0, + ), + ) return new(optimizer, testing_tol, solver_options) end end @@ -26,7 +34,7 @@ end # @testset "Code linting (JET.jl)" begin # JET.test_package(HydrOGEnMod; target_defined_modules = true) # end - + @testset "Test Cases Optimization Model" verbose = true begin include(joinpath("test_cases", "test_case_1_opt.jl")) test_case_1_opt(TestConfig()) @@ -111,11 +119,13 @@ end test_case_11_mcp(TestConfig()) include(joinpath("test_cases", "test_case_12_mcp.jl")) test_case_12_mcp(TestConfig()) - if haskey(ENV,"PATH_LICENSE_STRING") + if haskey(ENV, "PATH_LICENSE_STRING") include(joinpath("test_cases", "test_case_13_mcp.jl")) test_case_13_mcp(TestConfig()) else - @testset "Test Case 13 (license missing)" begin @test true end + @testset "Test Case 13 (license missing)" begin + @test true + end end include(joinpath("test_cases", "test_case_14_mcp.jl")) test_case_14_mcp(TestConfig()) @@ -123,24 +133,30 @@ end test_case_15_mcp(TestConfig()) include(joinpath("test_cases", "test_case_16_mcp.jl")) test_case_16_mcp(TestConfig()) - if haskey(ENV,"PATH_LICENSE_STRING") + if haskey(ENV, "PATH_LICENSE_STRING") include(joinpath("test_cases", "test_case_17_mcp.jl")) test_case_17_mcp(TestConfig()) include(joinpath("test_cases", "test_case_18_mcp.jl")) test_case_18_mcp(TestConfig()) else - @testset "Test Case 17 (license missing)" begin @test true end - @testset "Test Case 18 (license missing)" begin @test true end + @testset "Test Case 17 (license missing)" begin + @test true + end + @testset "Test Case 18 (license missing)" begin + @test true + end end include(joinpath("test_cases", "test_case_19_mcp.jl")) test_case_19_mcp(TestConfig()) include(joinpath("test_cases", "test_case_20_mcp.jl")) test_case_20_mcp(TestConfig()) - if haskey(ENV,"PATH_LICENSE_STRING") + if haskey(ENV, "PATH_LICENSE_STRING") include(joinpath("test_cases", "test_case_21_mcp.jl")) test_case_21_mcp(TestConfig()) else - @testset "Test Case 21 (license missing)" begin @test true end + @testset "Test Case 21 (license missing)" begin + @test true + end end include(joinpath("test_cases", "test_case_22_mcp.jl")) test_case_22_mcp(TestConfig()) @@ -154,11 +170,13 @@ end test_case_26_mcp(TestConfig()) include(joinpath("test_cases", "test_case_27_mcp.jl")) test_case_27_mcp(TestConfig()) - if haskey(ENV,"PATH_LICENSE_STRING") + if haskey(ENV, "PATH_LICENSE_STRING") include(joinpath("test_cases", "test_case_28_mcp.jl")) test_case_28_mcp(TestConfig()) else - @testset "Test Case 28 (license missing)" begin @test true end + @testset "Test Case 28 (license missing)" begin + @test true + end end end diff --git a/test/test_cases/test_case_10_opt.jl b/test/test_cases/test_case_10_opt.jl index 28d7003..486a3ee 100644 --- a/test/test_cases/test_case_10_opt.jl +++ b/test/test_cases/test_case_10_opt.jl @@ -4,11 +4,7 @@ function test_case_10_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_10")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_11_opt.jl b/test/test_cases/test_case_11_opt.jl index 27750cd..b65fd43 100644 --- a/test/test_cases/test_case_11_opt.jl +++ b/test/test_cases/test_case_11_opt.jl @@ -4,11 +4,7 @@ function test_case_11_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_11")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_12_opt.jl b/test/test_cases/test_case_12_opt.jl index fc1be97..4ba4281 100644 --- a/test/test_cases/test_case_12_opt.jl +++ b/test/test_cases/test_case_12_opt.jl @@ -4,11 +4,7 @@ function test_case_12_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_12")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_13_opt.jl b/test/test_cases/test_case_13_opt.jl index ba1c091..91b5b02 100644 --- a/test/test_cases/test_case_13_opt.jl +++ b/test/test_cases/test_case_13_opt.jl @@ -4,11 +4,7 @@ function test_case_13_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_13")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_14_opt.jl b/test/test_cases/test_case_14_opt.jl index d0174b4..c3d3720 100644 --- a/test/test_cases/test_case_14_opt.jl +++ b/test/test_cases/test_case_14_opt.jl @@ -4,11 +4,7 @@ function test_case_14_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_14")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_15_opt.jl b/test/test_cases/test_case_15_opt.jl index 1ba5396..c36c6fa 100644 --- a/test/test_cases/test_case_15_opt.jl +++ b/test/test_cases/test_case_15_opt.jl @@ -4,11 +4,7 @@ function test_case_15_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_15")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_16_opt.jl b/test/test_cases/test_case_16_opt.jl index 2bc175c..8ebc885 100644 --- a/test/test_cases/test_case_16_opt.jl +++ b/test/test_cases/test_case_16_opt.jl @@ -4,11 +4,7 @@ function test_case_16_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_16")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_17_opt.jl b/test/test_cases/test_case_17_opt.jl index 2a77bc1..2fd58b0 100644 --- a/test/test_cases/test_case_17_opt.jl +++ b/test/test_cases/test_case_17_opt.jl @@ -4,11 +4,7 @@ function test_case_17_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_17")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_18_opt.jl b/test/test_cases/test_case_18_opt.jl index 17f27da..ea3ef1c 100644 --- a/test/test_cases/test_case_18_opt.jl +++ b/test/test_cases/test_case_18_opt.jl @@ -4,11 +4,7 @@ function test_case_18_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_18")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_19_mcp.jl b/test/test_cases/test_case_19_mcp.jl index 5b3b01b..9b7de8b 100644 --- a/test/test_cases/test_case_19_mcp.jl +++ b/test/test_cases/test_case_19_mcp.jl @@ -22,7 +22,13 @@ function test_case_19_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 1.5, atol = config.testing_tol, diff --git a/test/test_cases/test_case_19_opt.jl b/test/test_cases/test_case_19_opt.jl index e48da48..8c8c83a 100644 --- a/test/test_cases/test_case_19_opt.jl +++ b/test/test_cases/test_case_19_opt.jl @@ -4,11 +4,7 @@ function test_case_19_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_19")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -25,7 +21,13 @@ function test_case_19_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 1.5, atol = config.testing_tol, diff --git a/test/test_cases/test_case_1_opt.jl b/test/test_cases/test_case_1_opt.jl index c29e2df..145be19 100644 --- a/test/test_cases/test_case_1_opt.jl +++ b/test/test_cases/test_case_1_opt.jl @@ -4,11 +4,7 @@ function test_case_1_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_1")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options... - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_20_opt.jl b/test/test_cases/test_case_20_opt.jl index 009ccd8..ccf4b76 100644 --- a/test/test_cases/test_case_20_opt.jl +++ b/test/test_cases/test_case_20_opt.jl @@ -4,11 +4,7 @@ function test_case_20_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_20")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_21_mcp.jl b/test/test_cases/test_case_21_mcp.jl index f4af115..c145261 100644 --- a/test/test_cases/test_case_21_mcp.jl +++ b/test/test_cases/test_case_21_mcp.jl @@ -71,28 +71,52 @@ function test_case_21_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0.88, atol = config.testing_tol, diff --git a/test/test_cases/test_case_21_opt.jl b/test/test_cases/test_case_21_opt.jl index 1201496..ed67e39 100644 --- a/test/test_cases/test_case_21_opt.jl +++ b/test/test_cases/test_case_21_opt.jl @@ -4,11 +4,7 @@ function test_case_21_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_21")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -60,28 +56,52 @@ function test_case_21_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0.88, atol = config.testing_tol, diff --git a/test/test_cases/test_case_22_opt.jl b/test/test_cases/test_case_22_opt.jl index b49b36a..79e5312 100644 --- a/test/test_cases/test_case_22_opt.jl +++ b/test/test_cases/test_case_22_opt.jl @@ -4,11 +4,7 @@ function test_case_22_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_22")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_23_opt.jl b/test/test_cases/test_case_23_opt.jl index 9c67b18..17eaf1e 100644 --- a/test/test_cases/test_case_23_opt.jl +++ b/test/test_cases/test_case_23_opt.jl @@ -4,11 +4,7 @@ function test_case_23_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_23")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options...; - ) + optimize!(model, config.optimizer, config.solver_options...;) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_24_opt.jl b/test/test_cases/test_case_24_opt.jl index a54391b..ab29db6 100644 --- a/test/test_cases/test_case_24_opt.jl +++ b/test/test_cases/test_case_24_opt.jl @@ -4,11 +4,7 @@ function test_case_24_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_24")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options... - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_25_opt.jl b/test/test_cases/test_case_25_opt.jl index 6904c01..eb76208 100644 --- a/test/test_cases/test_case_25_opt.jl +++ b/test/test_cases/test_case_25_opt.jl @@ -4,11 +4,7 @@ function test_case_25_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_25")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options... - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_26_mcp.jl b/test/test_cases/test_case_26_mcp.jl index 67c150e..bcbcd9e 100644 --- a/test/test_cases/test_case_26_mcp.jl +++ b/test/test_cases/test_case_26_mcp.jl @@ -29,14 +29,26 @@ function test_case_26_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.0, atol = config.testing_tol, @@ -79,14 +91,26 @@ function test_case_26_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_26_opt.jl b/test/test_cases/test_case_26_opt.jl index be594a4..7d03229 100644 --- a/test/test_cases/test_case_26_opt.jl +++ b/test/test_cases/test_case_26_opt.jl @@ -4,11 +4,7 @@ function test_case_26_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_26a")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -30,14 +26,26 @@ function test_case_26_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, @@ -55,11 +63,7 @@ function test_case_26_opt(config) @test all(isapprox.(data.arc_data.Λ_A.data, 1e+6, atol = config.testing_tol)) end - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -81,14 +85,26 @@ function test_case_26_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_27_opt.jl b/test/test_cases/test_case_27_opt.jl index dc7267e..f11b6a4 100644 --- a/test/test_cases/test_case_27_opt.jl +++ b/test/test_cases/test_case_27_opt.jl @@ -4,11 +4,7 @@ function test_case_27_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_27a")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -119,11 +115,7 @@ function test_case_27_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_27b")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_28_mcp.jl b/test/test_cases/test_case_28_mcp.jl index e7fdfbd..a69ae6f 100644 --- a/test/test_cases/test_case_28_mcp.jl +++ b/test/test_cases/test_case_28_mcp.jl @@ -71,28 +71,52 @@ function test_case_28_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, @@ -173,28 +197,52 @@ function test_case_28_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_28_opt.jl b/test/test_cases/test_case_28_opt.jl index 9d86fdf..177aa7f 100644 --- a/test/test_cases/test_case_28_opt.jl +++ b/test/test_cases/test_case_28_opt.jl @@ -4,11 +4,7 @@ function test_case_28_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_28a")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -60,28 +56,52 @@ function test_case_28_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, @@ -95,11 +115,7 @@ function test_case_28_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_28b")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -151,28 +167,52 @@ function test_case_28_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2021], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2021, + ], ), 0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_2_opt.jl b/test/test_cases/test_case_2_opt.jl index 364238d..e985f17 100644 --- a/test/test_cases/test_case_2_opt.jl +++ b/test/test_cases/test_case_2_opt.jl @@ -4,11 +4,7 @@ function test_case_2_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_2")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options... - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_3_opt.jl b/test/test_cases/test_case_3_opt.jl index fbe5b9d..b28dd8d 100644 --- a/test/test_cases/test_case_3_opt.jl +++ b/test/test_cases/test_case_3_opt.jl @@ -4,11 +4,7 @@ function test_case_3_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_3")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_4_opt.jl b/test/test_cases/test_case_4_opt.jl index 402b3ec..9685198 100644 --- a/test/test_cases/test_case_4_opt.jl +++ b/test/test_cases/test_case_4_opt.jl @@ -4,11 +4,7 @@ function test_case_4_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_4")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_5_opt.jl b/test/test_cases/test_case_5_opt.jl index c69231c..5222bb6 100644 --- a/test/test_cases/test_case_5_opt.jl +++ b/test/test_cases/test_case_5_opt.jl @@ -4,11 +4,7 @@ function test_case_5_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_5")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_6_opt.jl b/test/test_cases/test_case_6_opt.jl index 2dfb9dd..2fd721e 100644 --- a/test/test_cases/test_case_6_opt.jl +++ b/test/test_cases/test_case_6_opt.jl @@ -4,11 +4,7 @@ function test_case_6_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_6")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin diff --git a/test/test_cases/test_case_7_mcp.jl b/test/test_cases/test_case_7_mcp.jl index 45e1a80..347d73f 100644 --- a/test/test_cases/test_case_7_mcp.jl +++ b/test/test_cases/test_case_7_mcp.jl @@ -22,7 +22,13 @@ function test_case_7_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 1, atol = config.testing_tol, diff --git a/test/test_cases/test_case_7_opt.jl b/test/test_cases/test_case_7_opt.jl index 318ae47..e99657b 100644 --- a/test/test_cases/test_case_7_opt.jl +++ b/test/test_cases/test_case_7_opt.jl @@ -4,11 +4,7 @@ function test_case_7_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_7")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -25,7 +21,13 @@ function test_case_7_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 1, atol = config.testing_tol, diff --git a/test/test_cases/test_case_8_mcp.jl b/test/test_cases/test_case_8_mcp.jl index c52f67e..e3e77a4 100644 --- a/test/test_cases/test_case_8_mcp.jl +++ b/test/test_cases/test_case_8_mcp.jl @@ -29,7 +29,13 @@ function test_case_8_mcp(config) @testset "Production Quantity" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 5.0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_8_opt.jl b/test/test_cases/test_case_8_opt.jl index 9b5d4af..7ed54df 100644 --- a/test/test_cases/test_case_8_opt.jl +++ b/test/test_cases/test_case_8_opt.jl @@ -4,11 +4,7 @@ function test_case_8_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_8")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -30,7 +26,13 @@ function test_case_8_opt(config) @testset "Production Quantity" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 5.0, atol = config.testing_tol, diff --git a/test/test_cases/test_case_9_mcp.jl b/test/test_cases/test_case_9_mcp.jl index f40f72c..45b3eb9 100644 --- a/test/test_cases/test_case_9_mcp.jl +++ b/test/test_cases/test_case_9_mcp.jl @@ -29,14 +29,26 @@ function test_case_9_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol, @@ -79,14 +91,26 @@ function test_case_9_mcp(config) @testset "Production Quantities" begin @test isapprox( result_value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( result_value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol, diff --git a/test/test_cases/test_case_9_opt.jl b/test/test_cases/test_case_9_opt.jl index 87f9c90..8fefbfc 100644 --- a/test/test_cases/test_case_9_opt.jl +++ b/test/test_cases/test_case_9_opt.jl @@ -4,11 +4,7 @@ function test_case_9_opt(config) data = get_HydrOGEnMod_data(joinpath(@__DIR__, "test_9a")) model = build_optimization_model(data) - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -30,14 +26,26 @@ function test_case_9_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol, @@ -55,11 +63,7 @@ function test_case_9_opt(config) @test all(isapprox.(data.arc_data.Λ_A.data, 1e+6, atol = config.testing_tol)) end - optimize!( - model, - config.optimizer, - config.solver_options..., - ) + optimize!(model, config.optimizer, config.solver_options...) @testset "Results" begin @testset "Termination Status" begin @@ -81,14 +85,26 @@ function test_case_9_opt(config) @testset "Production Quantities" begin @test isapprox( value( - model[:q_I]["P_DEU", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_DEU", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0, atol = config.testing_tol, ) @test isapprox( value( - model[:q_I]["P_NLD", "Natural Gas", "Block 1", "OnlyTimestep", 2020], + model[:q_I][ + "P_NLD", + "Natural Gas", + "Block 1", + "OnlyTimestep", + 2020, + ], ), 0.88, atol = config.testing_tol,