From f1a5019f3990d6d877629c54ee5b4340188b65df Mon Sep 17 00:00:00 2001 From: Joseph McKinsey Date: Fri, 25 Oct 2024 09:07:07 -0600 Subject: [PATCH] Add updates to schemas, along with generated code + src/sienna_struct_conversion.jl --- generated-julia/.openapi-generator-ignore | 23 + generated-julia/.openapi-generator/FILES | 47 ++ generated-julia/.openapi-generator/VERSION | 1 + generated-julia/Manifest.toml | 764 ++++++++++++++++++ generated-julia/Project.toml | 6 + generated-julia/README.md | 77 ++ generated-julia/docs/AverageRateCurve.md | 15 + .../docs/AverageRateCurveFunctionData.md | 19 + generated-julia/docs/CostCurve.md | 15 + generated-julia/docs/CostCurveValueCurve.md | 19 + generated-julia/docs/FuelCurve.md | 16 + generated-julia/docs/FuelCurveFuelCost.md | 15 + generated-julia/docs/IncrementalCurve.md | 15 + .../docs/IncrementalCurveFunctionData.md | 15 + generated-julia/docs/InputOutputCurve.md | 14 + .../docs/InputOutputCurveFunctionData.md | 19 + generated-julia/docs/LinearFunctionData.md | 14 + generated-julia/docs/MinMax.md | 13 + generated-julia/docs/PiecewiseLinearData.md | 13 + .../docs/PiecewiseLinearDataPointsInner.md | 13 + generated-julia/docs/PiecewiseStepData.md | 14 + generated-julia/docs/QuadraticFunctionData.md | 15 + generated-julia/docs/StartUpStages.md | 14 + generated-julia/docs/ThermalStandard.md | 28 + .../docs/ThermalStandardOperationCost.md | 15 + .../ThermalStandardOperationCostStartUp.md | 15 + .../ThermalStandardOperationCostVariable.md | 18 + generated-julia/docs/UpDown.md | 13 + generated-julia/docs/UpDown1.md | 13 + generated-julia/src/APIServer.jl | 49 ++ generated-julia/src/modelincludes.jl | 25 + .../src/models/model_AverageRateCurve.jl | 46 ++ .../model_AverageRateCurveFunctionData.jl | 26 + generated-julia/src/models/model_CostCurve.jl | 51 ++ .../src/models/model_CostCurveValueCurve.jl | 26 + generated-julia/src/models/model_FuelCurve.jl | 56 ++ .../src/models/model_FuelCurveFuelCost.jl | 20 + .../src/models/model_IncrementalCurve.jl | 46 ++ .../model_IncrementalCurveFunctionData.jl | 20 + .../src/models/model_InputOutputCurve.jl | 42 + .../model_InputOutputCurveFunctionData.jl | 26 + .../src/models/model_LinearFunctionData.jl | 43 + generated-julia/src/models/model_MinMax.jl | 34 + .../src/models/model_PiecewiseLinearData.jl | 38 + .../model_PiecewiseLinearDataPointsInner.jl | 36 + .../src/models/model_PiecewiseStepData.jl | 43 + .../src/models/model_QuadraticFunctionData.jl | 48 ++ .../src/models/model_StartUpStages.jl | 41 + .../src/models/model_ThermalStandard.jl | 104 +++ .../model_ThermalStandardOperationCost.jl | 47 ++ ...del_ThermalStandardOperationCostStartUp.jl | 21 + ...el_ThermalStandardOperationCostVariable.jl | 24 + generated-julia/src/models/model_UpDown.jl | 36 + .../src/sienna_struct_conversion.jl | 220 +++++ schemas/ThermalStandard.json | 12 +- schemas/common.json | 10 +- 56 files changed, 2450 insertions(+), 18 deletions(-) create mode 100644 generated-julia/.openapi-generator-ignore create mode 100644 generated-julia/.openapi-generator/FILES create mode 100644 generated-julia/.openapi-generator/VERSION create mode 100644 generated-julia/Manifest.toml create mode 100644 generated-julia/Project.toml create mode 100644 generated-julia/README.md create mode 100644 generated-julia/docs/AverageRateCurve.md create mode 100644 generated-julia/docs/AverageRateCurveFunctionData.md create mode 100644 generated-julia/docs/CostCurve.md create mode 100644 generated-julia/docs/CostCurveValueCurve.md create mode 100644 generated-julia/docs/FuelCurve.md create mode 100644 generated-julia/docs/FuelCurveFuelCost.md create mode 100644 generated-julia/docs/IncrementalCurve.md create mode 100644 generated-julia/docs/IncrementalCurveFunctionData.md create mode 100644 generated-julia/docs/InputOutputCurve.md create mode 100644 generated-julia/docs/InputOutputCurveFunctionData.md create mode 100644 generated-julia/docs/LinearFunctionData.md create mode 100644 generated-julia/docs/MinMax.md create mode 100644 generated-julia/docs/PiecewiseLinearData.md create mode 100644 generated-julia/docs/PiecewiseLinearDataPointsInner.md create mode 100644 generated-julia/docs/PiecewiseStepData.md create mode 100644 generated-julia/docs/QuadraticFunctionData.md create mode 100644 generated-julia/docs/StartUpStages.md create mode 100644 generated-julia/docs/ThermalStandard.md create mode 100644 generated-julia/docs/ThermalStandardOperationCost.md create mode 100644 generated-julia/docs/ThermalStandardOperationCostStartUp.md create mode 100644 generated-julia/docs/ThermalStandardOperationCostVariable.md create mode 100644 generated-julia/docs/UpDown.md create mode 100644 generated-julia/docs/UpDown1.md create mode 100644 generated-julia/src/APIServer.jl create mode 100644 generated-julia/src/modelincludes.jl create mode 100644 generated-julia/src/models/model_AverageRateCurve.jl create mode 100644 generated-julia/src/models/model_AverageRateCurveFunctionData.jl create mode 100644 generated-julia/src/models/model_CostCurve.jl create mode 100644 generated-julia/src/models/model_CostCurveValueCurve.jl create mode 100644 generated-julia/src/models/model_FuelCurve.jl create mode 100644 generated-julia/src/models/model_FuelCurveFuelCost.jl create mode 100644 generated-julia/src/models/model_IncrementalCurve.jl create mode 100644 generated-julia/src/models/model_IncrementalCurveFunctionData.jl create mode 100644 generated-julia/src/models/model_InputOutputCurve.jl create mode 100644 generated-julia/src/models/model_InputOutputCurveFunctionData.jl create mode 100644 generated-julia/src/models/model_LinearFunctionData.jl create mode 100644 generated-julia/src/models/model_MinMax.jl create mode 100644 generated-julia/src/models/model_PiecewiseLinearData.jl create mode 100644 generated-julia/src/models/model_PiecewiseLinearDataPointsInner.jl create mode 100644 generated-julia/src/models/model_PiecewiseStepData.jl create mode 100644 generated-julia/src/models/model_QuadraticFunctionData.jl create mode 100644 generated-julia/src/models/model_StartUpStages.jl create mode 100644 generated-julia/src/models/model_ThermalStandard.jl create mode 100644 generated-julia/src/models/model_ThermalStandardOperationCost.jl create mode 100644 generated-julia/src/models/model_ThermalStandardOperationCostStartUp.jl create mode 100644 generated-julia/src/models/model_ThermalStandardOperationCostVariable.jl create mode 100644 generated-julia/src/models/model_UpDown.jl create mode 100644 generated-julia/src/sienna_struct_conversion.jl diff --git a/generated-julia/.openapi-generator-ignore b/generated-julia/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/generated-julia/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/generated-julia/.openapi-generator/FILES b/generated-julia/.openapi-generator/FILES new file mode 100644 index 0000000..6537ed9 --- /dev/null +++ b/generated-julia/.openapi-generator/FILES @@ -0,0 +1,47 @@ +README.md +docs/AverageRateCurve.md +docs/AverageRateCurveFunctionData.md +docs/CostCurve.md +docs/CostCurveValueCurve.md +docs/FuelCurve.md +docs/FuelCurveFuelCost.md +docs/IncrementalCurve.md +docs/IncrementalCurveFunctionData.md +docs/InputOutputCurve.md +docs/InputOutputCurveFunctionData.md +docs/LinearFunctionData.md +docs/MinMax.md +docs/PiecewiseLinearData.md +docs/PiecewiseLinearDataPointsInner.md +docs/PiecewiseStepData.md +docs/QuadraticFunctionData.md +docs/StartUpStages.md +docs/ThermalStandard.md +docs/ThermalStandardOperationCost.md +docs/ThermalStandardOperationCostStartUp.md +docs/ThermalStandardOperationCostVariable.md +docs/UpDown.md +src/APIServer.jl +src/modelincludes.jl +src/models/model_AverageRateCurve.jl +src/models/model_AverageRateCurveFunctionData.jl +src/models/model_CostCurve.jl +src/models/model_CostCurveValueCurve.jl +src/models/model_FuelCurve.jl +src/models/model_FuelCurveFuelCost.jl +src/models/model_IncrementalCurve.jl +src/models/model_IncrementalCurveFunctionData.jl +src/models/model_InputOutputCurve.jl +src/models/model_InputOutputCurveFunctionData.jl +src/models/model_LinearFunctionData.jl +src/models/model_MinMax.jl +src/models/model_PiecewiseLinearData.jl +src/models/model_PiecewiseLinearDataPointsInner.jl +src/models/model_PiecewiseStepData.jl +src/models/model_QuadraticFunctionData.jl +src/models/model_StartUpStages.jl +src/models/model_ThermalStandard.jl +src/models/model_ThermalStandardOperationCost.jl +src/models/model_ThermalStandardOperationCostStartUp.jl +src/models/model_ThermalStandardOperationCostVariable.jl +src/models/model_UpDown.jl diff --git a/generated-julia/.openapi-generator/VERSION b/generated-julia/.openapi-generator/VERSION new file mode 100644 index 0000000..4bc5d61 --- /dev/null +++ b/generated-julia/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.9.0 diff --git a/generated-julia/Manifest.toml b/generated-julia/Manifest.toml new file mode 100644 index 0000000..7263cfa --- /dev/null +++ b/generated-julia/Manifest.toml @@ -0,0 +1,764 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.1" +manifest_format = "2.0" +project_hash = "068941e1d2de6b34b83024e79882ec6930d095ae" + +[[deps.AbstractTrees]] +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.5" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.2" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BitFlags]] +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.9" + +[[deps.Blosc]] +deps = ["Blosc_jll"] +git-tree-sha1 = "310b77648d38c223d947ff3f50f511d08690b8d5" +uuid = "a74b3585-a348-5f62-a45c-50e91977d574" +version = "0.7.3" + +[[deps.Blosc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23" +uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" +version = "1.21.6+0" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] +git-tree-sha1 = "deddd8725e5e1cc49ee205a1964256043720a6c3" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.15" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.6" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.16.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.4.2" + +[[deps.ConstructionBase]] +git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.8" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DBInterface]] +git-tree-sha1 = "a444404b3f94deaa43ca2a58e18153a82695282b" +uuid = "a10d1c49-ce27-4219-8d33-6db1a4562965" +version = "2.6.1" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[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" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.6.1" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.20" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates"] +git-tree-sha1 = "7878ff7172a8e6beedd1dea14bd27c3c6340d361" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.22" +weakdeps = ["Mmap", "Test"] + + [deps.FilePathsBase.extensions] + FilePathsBaseMmapExt = "Mmap" + FilePathsBaseTestExt = "Test" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +version = "1.11.0" + +[[deps.H5Zblosc]] +deps = ["Blosc", "HDF5"] +git-tree-sha1 = "d778420e524bcf56066e8c63c7aa315ae7269da2" +uuid = "c8ec2601-a99c-407f-b158-e79c03c2f5f7" +version = "0.1.2" + +[[deps.HDF5]] +deps = ["Compat", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"] +git-tree-sha1 = "e856eef26cf5bf2b0f95f8f4fc37553c72c8641c" +uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" +version = "0.17.2" + + [deps.HDF5.extensions] + MPIExt = "MPI" + + [deps.HDF5.weakdeps] + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + +[[deps.HDF5_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" +uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" +version = "1.14.2+1" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.8" + +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "dd3b49277ec2bb2c6b94eb1604d4d0616016f7a6" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.11.2+0" + +[[deps.InfrastructureSystems]] +deps = ["CSV", "DataFrames", "DataStructures", "Dates", "DocStringExtensions", "H5Zblosc", "HDF5", "InteractiveUtils", "JSON3", "Logging", "Mustache", "Pkg", "PrettyTables", "Random", "SHA", "SQLite", "Serialization", "StructTypes", "TOML", "Tables", "TerminalLoggers", "TimeSeries", "TimerOutputs", "UUIDs", "YAML"] +git-tree-sha1 = "cf441d3b5e49a5ddd9706a74154ada2d7aad8011" +uuid = "2cd47ed4-ca9b-11e9-27f2-ab636a7671f1" +version = "2.2.2" + +[[deps.InlineStrings]] +git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.4.2" + + [deps.InlineStrings.extensions] + ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" + + [deps.InlineStrings.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.InvertedIndices]] +git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.3.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.6.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JSON3]] +deps = ["Dates", "Mmap", "Parsers", "PrecompileTools", "StructTypes", "UUIDs"] +git-tree-sha1 = "1d322381ef7b087548321d3f878cb4c9bd8f8f9b" +uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" +version = "1.14.1" + + [deps.JSON3.extensions] + JSON3ArrowExt = ["ArrowTypes"] + + [deps.JSON3.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "18.1.7+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.4.0" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "fb6803dafae4a5d62ea5cab204b1e657d9737e7f" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.2.0" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.6.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.7.2+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.17.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.1.0" + +[[deps.Lz4_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "abf88ff67f4fd89839efcae2f4c39cbc4ecd0846" +uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" +version = "1.10.0+1" + +[[deps.MIMEs]] +git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" +uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" +version = "0.1.4" + +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "7715e65c47ba3941c502bffb7f266a41a7f54423" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.2.3+0" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "c105fe467859e7f6e9a852cb15cb4301126fac07" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.11" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "70e830dab5d0775183c99fc75e4c24c614ed7142" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.5.1+0" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[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" +version = "2.28.6+0" + +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f12a29c4400ba812841c6ace3f4efbb6dbb3ba01" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.4+2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.2.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" + +[[deps.Mocking]] +deps = ["Compat", "ExprTools"] +git-tree-sha1 = "2c140d60d7cb82badf06d8783800d0bcd1a7daa2" +uuid = "78c3b35d-d492-501b-9361-3d52fe80e533" +version = "0.8.1" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.12.12" + +[[deps.Mustache]] +deps = ["Printf", "Tables"] +git-tree-sha1 = "3b2db451a872b20519ebb0cec759d3d81a1c6bcb" +uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" +version = "1.0.20" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.OpenAPI]] +deps = ["Base64", "Dates", "Downloads", "HTTP", "JSON", "LibCURL", "MIMEs", "MbedTLS", "TimeZones", "URIs", "p7zip_jll"] +git-tree-sha1 = "f421843d7b117406f7e0779b1c4bbaccb3f67b75" +uuid = "d5e62ea6-ddf3-4d43-8e4c-ad5e6c8bfd7d" +version = "0.1.26" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] +git-tree-sha1 = "bfce6d523861a6c562721b262c0d1aaeead2647f" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "5.0.5+0" + +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.4.3" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.0.15+1" + +[[deps.OrderedCollections]] +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.8.1" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.11.0" +weakdeps = ["REPL"] + + [deps.Pkg.extensions] + REPLExt = "REPL" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.3" + +[[deps.PowerFlowData]] +deps = ["DocStringExtensions", "InlineStrings", "Parsers", "PrettyTables", "Tables"] +git-tree-sha1 = "04167df719ef1e8a1471a7033634c441f69bda1c" +uuid = "dd99e9e3-7471-40fc-b48d-a10501125371" +version = "1.5.0" + +[[deps.PowerSystemCaseBuilder]] +deps = ["CSV", "DataFrames", "DataStructures", "Dates", "Downloads", "HDF5", "InfrastructureSystems", "JSON3", "LazyArtifacts", "PowerSystems", "PrettyTables", "Random", "SHA", "TimeSeries"] +git-tree-sha1 = "6c9e58dd3e338ed886fe8cdc8bf45a575b51707e" +uuid = "f00506e0-b84f-492a-93c2-c0a9afc4364e" +version = "1.3.7" + +[[deps.PowerSystems]] +deps = ["CSV", "DataFrames", "DataStructures", "Dates", "DocStringExtensions", "InfrastructureSystems", "InteractiveUtils", "JSON3", "LinearAlgebra", "Logging", "PowerFlowData", "PrettyTables", "TimeSeries", "UUIDs", "Unicode", "YAML"] +git-tree-sha1 = "ae41153cb68fc8fb0582a40e1f34b8329a2d94a1" +uuid = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd" +version = "4.4.0" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SQLite]] +deps = ["DBInterface", "Random", "SQLite_jll", "Serialization", "Tables", "WeakRefStrings"] +git-tree-sha1 = "38b82dbc52b7db40bea182688c7a1103d06948a4" +uuid = "0aa819cd-b072-5ff4-a722-6bc24af294d9" +version = "1.6.1" + +[[deps.SQLite_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "004fffbe2711abdc7263a980bbb1af9620781dd9" +uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" +version = "3.45.3+0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.2.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "305becf8af67eae1dbc912ee9097f00aeeabb8d5" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.4.6" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.2.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.1" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + + [deps.Statistics.weakdeps] + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.StringEncodings]] +deps = ["Libiconv_jll"] +git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" +uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" +version = "0.3.7" + +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "a6b1675a536c5ad1a60e5a5153e1fee12eb146e3" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.0" + +[[deps.StructHelpers]] +deps = ["ConstructionBase"] +git-tree-sha1 = "1d6b389c6d24e0fd76ba12c9c8111c9df197c1cd" +uuid = "4093c41a-2008-41fd-82b8-e3f9d02b504f" +version = "1.2.0" + +[[deps.StructTypes]] +deps = ["Dates", "UUIDs"] +git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" +uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" +version = "1.11.0" + +[[deps.StyledStrings]] +uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" +version = "1.11.0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TZJData]] +deps = ["Artifacts"] +git-tree-sha1 = "36b40607bf2bf856828690e097e1c799623b0602" +uuid = "dc5dba14-91b3-4cab-a142-028a31da12f7" +version = "1.3.0+2024b" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "f133fab380933d042f6796eda4e130272ba520ca" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.7" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" + +[[deps.TimeSeries]] +deps = ["Dates", "DelimitedFiles", "DocStringExtensions", "IteratorInterfaceExtensions", "PrettyTables", "RecipesBase", "Reexport", "Statistics", "TableTraits", "Tables"] +git-tree-sha1 = "b0915b2d6032bab5d8c9424a37bc621500a67df9" +uuid = "9e3dc215-6440-5c97-bce1-76c03772f85e" +version = "0.24.2" + +[[deps.TimeZones]] +deps = ["Dates", "Downloads", "InlineStrings", "Mocking", "Printf", "Scratch", "TZJData", "Unicode", "p7zip_jll"] +git-tree-sha1 = "8323074bc977aa85cf5ad71099a83ac75b0ac107" +uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" +version = "1.18.1" +weakdeps = ["RecipesBase"] + + [deps.TimeZones.extensions] + TimeZonesRecipesBaseExt = "RecipesBase" + +[[deps.TimerOutputs]] +deps = ["ExprTools", "Printf"] +git-tree-sha1 = "3a6f063d690135f5c1ba351412c82bae4d1402bf" +uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" +version = "0.5.25" + +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" + +[[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" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.WorkerUtilities]] +git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" +uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" +version = "1.6.1" + +[[deps.YAML]] +deps = ["Base64", "Dates", "Printf", "StringEncodings"] +git-tree-sha1 = "dea63ff72079443240fbd013ba006bcbc8a9ac00" +uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" +version = "0.4.12" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.6+1" + +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "46bf7be2917b59b761247be3f317ddf75e50e997" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.1.2+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.59.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" diff --git a/generated-julia/Project.toml b/generated-julia/Project.toml new file mode 100644 index 0000000..ff0b5d2 --- /dev/null +++ b/generated-julia/Project.toml @@ -0,0 +1,6 @@ +[deps] +JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +OpenAPI = "d5e62ea6-ddf3-4d43-8e4c-ad5e6c8bfd7d" +PowerSystemCaseBuilder = "f00506e0-b84f-492a-93c2-c0a9afc4364e" +PowerSystems = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd" +StructHelpers = "4093c41a-2008-41fd-82b8-e3f9d02b504f" diff --git a/generated-julia/README.md b/generated-julia/README.md new file mode 100644 index 0000000..ccf4165 --- /dev/null +++ b/generated-julia/README.md @@ -0,0 +1,77 @@ +# Julia API server for APIServer + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +## Overview +This API server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Generator version: 7.9.0 +- Build package: org.openapitools.codegen.languages.JuliaServerCodegen + + +## Installation +Place the Julia files generated under the `src` folder in your Julia project. Include APIServer.jl in the project code. +It would include the module named APIServer. + +Implement the server methods as listed below. They are also documented with the APIServer module. +Launch a HTTP server with a router that has all handlers registered. A `register` method is provided in APIServer module for convenience. + +```julia +register( + router::HTTP.Router, # Router to register handlers in + impl; # Module that implements the server methods + path_prefix::String="", # Prefix to be applied to all paths + optional_middlewares... # Optional middlewares to be applied to all handlers +) +``` + +Optional middlewares can be one or more of: +- `init`: called before the request is processed +- `pre_validation`: called after the request is parsed but before validation +- `pre_invoke`: called after validation but before the handler is invoked +- `post_invoke`: called after the handler is invoked but before the response is sent + +The order in which middlewares are invoked are: +`init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke` + + +## API Endpoints + +The following server methods must be implemented: + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- + + + +## Models + + - [AverageRateCurve](docs/AverageRateCurve.md) + - [AverageRateCurveFunctionData](docs/AverageRateCurveFunctionData.md) + - [CostCurve](docs/CostCurve.md) + - [CostCurveValueCurve](docs/CostCurveValueCurve.md) + - [FuelCurve](docs/FuelCurve.md) + - [FuelCurveFuelCost](docs/FuelCurveFuelCost.md) + - [IncrementalCurve](docs/IncrementalCurve.md) + - [IncrementalCurveFunctionData](docs/IncrementalCurveFunctionData.md) + - [InputOutputCurve](docs/InputOutputCurve.md) + - [InputOutputCurveFunctionData](docs/InputOutputCurveFunctionData.md) + - [LinearFunctionData](docs/LinearFunctionData.md) + - [MinMax](docs/MinMax.md) + - [PiecewiseLinearData](docs/PiecewiseLinearData.md) + - [PiecewiseLinearDataPointsInner](docs/PiecewiseLinearDataPointsInner.md) + - [PiecewiseStepData](docs/PiecewiseStepData.md) + - [QuadraticFunctionData](docs/QuadraticFunctionData.md) + - [StartUpStages](docs/StartUpStages.md) + - [ThermalStandard](docs/ThermalStandard.md) + - [ThermalStandardOperationCost](docs/ThermalStandardOperationCost.md) + - [ThermalStandardOperationCostStartUp](docs/ThermalStandardOperationCostStartUp.md) + - [ThermalStandardOperationCostVariable](docs/ThermalStandardOperationCostVariable.md) + - [UpDown](docs/UpDown.md) + + + +## Author + + diff --git a/generated-julia/docs/AverageRateCurve.md b/generated-julia/docs/AverageRateCurve.md new file mode 100644 index 0000000..032e14c --- /dev/null +++ b/generated-julia/docs/AverageRateCurve.md @@ -0,0 +1,15 @@ +# AverageRateCurve + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**curve_type** | **String** | | [optional] [default to nothing] +**function_data** | [***AverageRateCurveFunctionData**](AverageRateCurveFunctionData.md) | | [default to nothing] +**initial_input** | **Float64** | | [optional] [default to nothing] +**input_at_zero** | **Float64** | | [optional] [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/AverageRateCurveFunctionData.md b/generated-julia/docs/AverageRateCurveFunctionData.md new file mode 100644 index 0000000..8906d73 --- /dev/null +++ b/generated-julia/docs/AverageRateCurveFunctionData.md @@ -0,0 +1,19 @@ +# AverageRateCurveFunctionData + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: LinearFunctionData, PiecewiseLinearData, QuadraticFunctionData | | [optional] + +The discriminator field is `function_type` with the following mapping: + - `LINEAR`: `LinearFunctionData` + - `PIECEWISE_LINEAR`: `PiecewiseLinearData` + - `QUADRATIC`: `QuadraticFunctionData` + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/CostCurve.md b/generated-julia/docs/CostCurve.md new file mode 100644 index 0000000..a272e59 --- /dev/null +++ b/generated-julia/docs/CostCurve.md @@ -0,0 +1,15 @@ +# CostCurve + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**variable_cost_type** | **String** | | [optional] [default to nothing] +**value_curve** | [***CostCurveValueCurve**](CostCurveValueCurve.md) | | [default to nothing] +**power_units** | **String** | | [default to nothing] +**vom_cost** | [***InputOutputCurve**](InputOutputCurve.md) | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/CostCurveValueCurve.md b/generated-julia/docs/CostCurveValueCurve.md new file mode 100644 index 0000000..a178d83 --- /dev/null +++ b/generated-julia/docs/CostCurveValueCurve.md @@ -0,0 +1,19 @@ +# CostCurveValueCurve + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: AverageRateCurve, IncrementalCurve, InputOutputCurve | | [optional] + +The discriminator field is `curve_type` with the following mapping: + - `AVERAGE_RATE`: `AverageRateCurve` + - `INCREMENTAL`: `IncrementalCurve` + - `INPUT_OUTPUT`: `InputOutputCurve` + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/FuelCurve.md b/generated-julia/docs/FuelCurve.md new file mode 100644 index 0000000..15b2e6e --- /dev/null +++ b/generated-julia/docs/FuelCurve.md @@ -0,0 +1,16 @@ +# FuelCurve + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**variable_cost_type** | **String** | | [optional] [default to nothing] +**value_curve** | [***CostCurveValueCurve**](CostCurveValueCurve.md) | | [default to nothing] +**power_units** | **String** | | [default to nothing] +**fuel_cost** | [***FuelCurveFuelCost**](FuelCurveFuelCost.md) | | [default to nothing] +**vom_cost** | [***InputOutputCurve**](InputOutputCurve.md) | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/FuelCurveFuelCost.md b/generated-julia/docs/FuelCurveFuelCost.md new file mode 100644 index 0000000..4c2fa3a --- /dev/null +++ b/generated-julia/docs/FuelCurveFuelCost.md @@ -0,0 +1,15 @@ +# FuelCurveFuelCost + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: Float64, String | | [optional] + + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/IncrementalCurve.md b/generated-julia/docs/IncrementalCurve.md new file mode 100644 index 0000000..37723a2 --- /dev/null +++ b/generated-julia/docs/IncrementalCurve.md @@ -0,0 +1,15 @@ +# IncrementalCurve + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**curve_type** | **String** | | [optional] [default to nothing] +**function_data** | [***IncrementalCurveFunctionData**](IncrementalCurveFunctionData.md) | | [default to nothing] +**initial_input** | **Float64** | | [optional] [default to nothing] +**input_at_zero** | **Float64** | | [optional] [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/IncrementalCurveFunctionData.md b/generated-julia/docs/IncrementalCurveFunctionData.md new file mode 100644 index 0000000..c6eafe0 --- /dev/null +++ b/generated-julia/docs/IncrementalCurveFunctionData.md @@ -0,0 +1,15 @@ +# IncrementalCurveFunctionData + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: LinearFunctionData, PiecewiseStepData | | [optional] + + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/InputOutputCurve.md b/generated-julia/docs/InputOutputCurve.md new file mode 100644 index 0000000..9f4a324 --- /dev/null +++ b/generated-julia/docs/InputOutputCurve.md @@ -0,0 +1,14 @@ +# InputOutputCurve + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**curve_type** | **String** | | [optional] [default to nothing] +**function_data** | [***InputOutputCurveFunctionData**](InputOutputCurveFunctionData.md) | | [default to nothing] +**input_at_zero** | **Float64** | | [optional] [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/InputOutputCurveFunctionData.md b/generated-julia/docs/InputOutputCurveFunctionData.md new file mode 100644 index 0000000..4200185 --- /dev/null +++ b/generated-julia/docs/InputOutputCurveFunctionData.md @@ -0,0 +1,19 @@ +# InputOutputCurveFunctionData + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: LinearFunctionData, PiecewiseLinearData, QuadraticFunctionData | | [optional] + +The discriminator field is `function_type` with the following mapping: + - `LINEAR`: `LinearFunctionData` + - `PIECEWISE_LINEAR`: `PiecewiseLinearData` + - `QUADRATIC`: `QuadraticFunctionData` + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/LinearFunctionData.md b/generated-julia/docs/LinearFunctionData.md new file mode 100644 index 0000000..b00ab47 --- /dev/null +++ b/generated-julia/docs/LinearFunctionData.md @@ -0,0 +1,14 @@ +# LinearFunctionData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_type** | **String** | | [optional] [default to nothing] +**proportional_term** | **Float64** | | [default to nothing] +**constant_term** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/MinMax.md b/generated-julia/docs/MinMax.md new file mode 100644 index 0000000..23b3d2e --- /dev/null +++ b/generated-julia/docs/MinMax.md @@ -0,0 +1,13 @@ +# MinMax + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min** | **Float64** | | [optional] [default to nothing] +**max** | **Float64** | | [optional] [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/PiecewiseLinearData.md b/generated-julia/docs/PiecewiseLinearData.md new file mode 100644 index 0000000..e7ff6f9 --- /dev/null +++ b/generated-julia/docs/PiecewiseLinearData.md @@ -0,0 +1,13 @@ +# PiecewiseLinearData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_type** | **String** | | [optional] [default to nothing] +**points** | [**Vector{PiecewiseLinearDataPointsInner}**](PiecewiseLinearDataPointsInner.md) | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/PiecewiseLinearDataPointsInner.md b/generated-julia/docs/PiecewiseLinearDataPointsInner.md new file mode 100644 index 0000000..b91a3a9 --- /dev/null +++ b/generated-julia/docs/PiecewiseLinearDataPointsInner.md @@ -0,0 +1,13 @@ +# PiecewiseLinearDataPointsInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**x** | **Float64** | | [default to nothing] +**y** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/PiecewiseStepData.md b/generated-julia/docs/PiecewiseStepData.md new file mode 100644 index 0000000..24c3175 --- /dev/null +++ b/generated-julia/docs/PiecewiseStepData.md @@ -0,0 +1,14 @@ +# PiecewiseStepData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_type** | **String** | | [optional] [default to nothing] +**x_coords** | **Vector{Float64}** | | [default to nothing] +**y_coords** | **Vector{Float64}** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/QuadraticFunctionData.md b/generated-julia/docs/QuadraticFunctionData.md new file mode 100644 index 0000000..c1d57ff --- /dev/null +++ b/generated-julia/docs/QuadraticFunctionData.md @@ -0,0 +1,15 @@ +# QuadraticFunctionData + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_type** | **String** | | [optional] [default to nothing] +**quadratic_term** | **Float64** | | [default to nothing] +**proportional_term** | **Float64** | | [default to nothing] +**constant_term** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/StartUpStages.md b/generated-julia/docs/StartUpStages.md new file mode 100644 index 0000000..0aba7f5 --- /dev/null +++ b/generated-julia/docs/StartUpStages.md @@ -0,0 +1,14 @@ +# StartUpStages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hot** | **Float64** | | [default to nothing] +**warm** | **Float64** | | [default to nothing] +**cold** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/ThermalStandard.md b/generated-julia/docs/ThermalStandard.md new file mode 100644 index 0000000..ae8829e --- /dev/null +++ b/generated-julia/docs/ThermalStandard.md @@ -0,0 +1,28 @@ +# ThermalStandard + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [default to nothing] +**name** | **String** | | [default to nothing] +**prime_mover** | **String** | | [optional] [default to "OT"] +**fuel_type** | **String** | Thermal fuels that reflect options in the EIA annual energy review. | [optional] [default to "OTHER"] +**rating** | **Float64** | | [optional] [default to 0.0] +**base_power** | **Float64** | | [optional] [default to 0.0] +**available** | **Bool** | | [optional] [default to true] +**status** | **Bool** | | [optional] [default to true] +**active_power** | **Float64** | | [optional] [default to 0.0] +**reactive_power** | **Float64** | | [optional] [default to 0.0] +**active_power_limits** | [***MinMax**](MinMax.md) | | [optional] [default to nothing] +**reactive_power_limits** | [***MinMax**](MinMax.md) | | [optional] [default to nothing] +**ramp_limits** | [***UpDown**](UpDown.md) | | [optional] [default to nothing] +**operation_cost** | [***ThermalStandardOperationCost**](ThermalStandardOperationCost.md) | | [default to nothing] +**time_limits** | [***UpDown**](UpDown.md) | | [optional] [default to nothing] +**must_run** | **Bool** | | [optional] [default to false] +**bus_id** | **Int64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/ThermalStandardOperationCost.md b/generated-julia/docs/ThermalStandardOperationCost.md new file mode 100644 index 0000000..945644e --- /dev/null +++ b/generated-julia/docs/ThermalStandardOperationCost.md @@ -0,0 +1,15 @@ +# ThermalStandardOperationCost + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**variable** | [***ThermalStandardOperationCostVariable**](ThermalStandardOperationCostVariable.md) | | [default to nothing] +**fixed** | **Float64** | Fixed cost of keeping the unit online. For some cost represenations this field can be duplicative | [default to nothing] +**start_up** | [***ThermalStandardOperationCostStartUp**](ThermalStandardOperationCostStartUp.md) | | [default to nothing] +**shut_down** | **Float64** | Cost to turn the unit off | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/ThermalStandardOperationCostStartUp.md b/generated-julia/docs/ThermalStandardOperationCostStartUp.md new file mode 100644 index 0000000..60d2e6d --- /dev/null +++ b/generated-julia/docs/ThermalStandardOperationCostStartUp.md @@ -0,0 +1,15 @@ +# ThermalStandardOperationCostStartUp + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: Float64, StartUpStages | Start-up cost can take linear or multi-stage cost | [optional] + + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/ThermalStandardOperationCostVariable.md b/generated-julia/docs/ThermalStandardOperationCostVariable.md new file mode 100644 index 0000000..e5ef9f8 --- /dev/null +++ b/generated-julia/docs/ThermalStandardOperationCostVariable.md @@ -0,0 +1,18 @@ +# ThermalStandardOperationCostVariable + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | This is a oneOf model. The value must be exactly one of the following types: CostCurve, FuelCurve | | [optional] + +The discriminator field is `variable_cost_type` with the following mapping: + - `COST`: `CostCurve` + - `FUEL`: `FuelCurve` + + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/UpDown.md b/generated-julia/docs/UpDown.md new file mode 100644 index 0000000..8495386 --- /dev/null +++ b/generated-julia/docs/UpDown.md @@ -0,0 +1,13 @@ +# UpDown + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up** | **Float64** | | [default to nothing] +**down** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/docs/UpDown1.md b/generated-julia/docs/UpDown1.md new file mode 100644 index 0000000..317f737 --- /dev/null +++ b/generated-julia/docs/UpDown1.md @@ -0,0 +1,13 @@ +# UpDown1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up** | **Float64** | | [default to nothing] +**down** | **Float64** | | [default to nothing] + + +[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated-julia/src/APIServer.jl b/generated-julia/src/APIServer.jl new file mode 100644 index 0000000..47f235a --- /dev/null +++ b/generated-julia/src/APIServer.jl @@ -0,0 +1,49 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw""" +Encapsulates generated server code for APIServer + +The following server methods must be implemented: + +""" +module APIServer + +using HTTP +using URIs +using Dates +using TimeZones +using OpenAPI +using OpenAPI.Servers + +const API_VERSION = "1.0.0" + +include("modelincludes.jl") + + +""" +Register handlers for all APIs in this module in the supplied `Router` instance. + +Paramerets: +- `router`: Router to register handlers in +- `impl`: module that implements the server methods + +Optional parameters: +- `path_prefix`: prefix to be applied to all paths +- `optional_middlewares`: Register one or more optional middlewares to be applied to all requests. + +Optional middlewares can be one or more of: + - `init`: called before the request is processed + - `pre_validation`: called after the request is parsed but before validation + - `pre_invoke`: called after validation but before the handler is invoked + - `post_invoke`: called after the handler is invoked but before the response is sent + +The order in which middlewares are invoked are: +`init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke` +""" +function register(router::HTTP.Router, impl; path_prefix::String="", optional_middlewares...) + return router +end + +end # module APIServer diff --git a/generated-julia/src/modelincludes.jl b/generated-julia/src/modelincludes.jl new file mode 100644 index 0000000..4aba3c4 --- /dev/null +++ b/generated-julia/src/modelincludes.jl @@ -0,0 +1,25 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + +include("models/model_AverageRateCurve.jl") +include("models/model_AverageRateCurveFunctionData.jl") +include("models/model_CostCurve.jl") +include("models/model_CostCurveValueCurve.jl") +include("models/model_FuelCurve.jl") +include("models/model_FuelCurveFuelCost.jl") +include("models/model_IncrementalCurve.jl") +include("models/model_IncrementalCurveFunctionData.jl") +include("models/model_InputOutputCurve.jl") +include("models/model_InputOutputCurveFunctionData.jl") +include("models/model_LinearFunctionData.jl") +include("models/model_MinMax.jl") +include("models/model_PiecewiseLinearData.jl") +include("models/model_PiecewiseLinearDataPointsInner.jl") +include("models/model_PiecewiseStepData.jl") +include("models/model_QuadraticFunctionData.jl") +include("models/model_StartUpStages.jl") +include("models/model_ThermalStandard.jl") +include("models/model_ThermalStandardOperationCost.jl") +include("models/model_ThermalStandardOperationCostStartUp.jl") +include("models/model_ThermalStandardOperationCostVariable.jl") +include("models/model_UpDown.jl") diff --git a/generated-julia/src/models/model_AverageRateCurve.jl b/generated-julia/src/models/model_AverageRateCurve.jl new file mode 100644 index 0000000..d1c61a3 --- /dev/null +++ b/generated-julia/src/models/model_AverageRateCurve.jl @@ -0,0 +1,46 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""AverageRateCurve + + AverageRateCurve(; + curve_type=nothing, + function_data=nothing, + initial_input=nothing, + input_at_zero=nothing, + ) + + - curve_type::String + - function_data::AverageRateCurveFunctionData + - initial_input::Float64 + - input_at_zero::Float64 +""" +Base.@kwdef mutable struct AverageRateCurve <: OpenAPI.APIModel + curve_type::Union{Nothing, String} = nothing + function_data = nothing # spec type: Union{ Nothing, AverageRateCurveFunctionData } + initial_input::Union{Nothing, Float64} = nothing + input_at_zero::Union{Nothing, Float64} = nothing + + function AverageRateCurve(curve_type, function_data, initial_input, input_at_zero, ) + OpenAPI.validate_property(AverageRateCurve, Symbol("curve_type"), curve_type) + OpenAPI.validate_property(AverageRateCurve, Symbol("function_data"), function_data) + OpenAPI.validate_property(AverageRateCurve, Symbol("initial_input"), initial_input) + OpenAPI.validate_property(AverageRateCurve, Symbol("input_at_zero"), input_at_zero) + return new(curve_type, function_data, initial_input, input_at_zero, ) + end +end # type AverageRateCurve + +const _property_types_AverageRateCurve = Dict{Symbol,String}(Symbol("curve_type")=>"String", Symbol("function_data")=>"AverageRateCurveFunctionData", Symbol("initial_input")=>"Float64", Symbol("input_at_zero")=>"Float64", ) +OpenAPI.property_type(::Type{ AverageRateCurve }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_AverageRateCurve[name]))} + +function check_required(o::AverageRateCurve) + o.function_data === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ AverageRateCurve }, name::Symbol, val) + if name === Symbol("curve_type") + OpenAPI.validate_param(name, "AverageRateCurve", :enum, val, ["AVERAGE_RATE"]) + end +end diff --git a/generated-julia/src/models/model_AverageRateCurveFunctionData.jl b/generated-julia/src/models/model_AverageRateCurveFunctionData.jl new file mode 100644 index 0000000..6f6e498 --- /dev/null +++ b/generated-julia/src/models/model_AverageRateCurveFunctionData.jl @@ -0,0 +1,26 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""AverageRateCurve_function_data + + AverageRateCurveFunctionData(; value=nothing) +""" +mutable struct AverageRateCurveFunctionData <: OpenAPI.OneOfAPIModel + value::Any # Union{ LinearFunctionData, PiecewiseLinearData, QuadraticFunctionData } + AverageRateCurveFunctionData() = new() + AverageRateCurveFunctionData(value) = new(value) +end # type AverageRateCurveFunctionData + +function OpenAPI.property_type(::Type{ AverageRateCurveFunctionData }, name::Symbol, json::Dict{String,Any}) + discriminator = json["function_type"] + if discriminator == "LINEAR" + return eval(Base.Meta.parse("LinearFunctionData")) + elseif discriminator == "PIECEWISE_LINEAR" + return eval(Base.Meta.parse("PiecewiseLinearData")) + elseif discriminator == "QUADRATIC" + return eval(Base.Meta.parse("QuadraticFunctionData")) + end + throw(OpenAPI.ValidationException("Invalid discriminator value: $discriminator for AverageRateCurveFunctionData")) +end diff --git a/generated-julia/src/models/model_CostCurve.jl b/generated-julia/src/models/model_CostCurve.jl new file mode 100644 index 0000000..593fe8d --- /dev/null +++ b/generated-julia/src/models/model_CostCurve.jl @@ -0,0 +1,51 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""CostCurve + + CostCurve(; + variable_cost_type=nothing, + value_curve=nothing, + power_units=nothing, + vom_cost=nothing, + ) + + - variable_cost_type::String + - value_curve::CostCurveValueCurve + - power_units::String + - vom_cost::InputOutputCurve +""" +Base.@kwdef mutable struct CostCurve <: OpenAPI.APIModel + variable_cost_type::Union{Nothing, String} = nothing + value_curve = nothing # spec type: Union{ Nothing, CostCurveValueCurve } + power_units::Union{Nothing, String} = nothing + vom_cost = nothing # spec type: Union{ Nothing, InputOutputCurve } + + function CostCurve(variable_cost_type, value_curve, power_units, vom_cost, ) + OpenAPI.validate_property(CostCurve, Symbol("variable_cost_type"), variable_cost_type) + OpenAPI.validate_property(CostCurve, Symbol("value_curve"), value_curve) + OpenAPI.validate_property(CostCurve, Symbol("power_units"), power_units) + OpenAPI.validate_property(CostCurve, Symbol("vom_cost"), vom_cost) + return new(variable_cost_type, value_curve, power_units, vom_cost, ) + end +end # type CostCurve + +const _property_types_CostCurve = Dict{Symbol,String}(Symbol("variable_cost_type")=>"String", Symbol("value_curve")=>"CostCurveValueCurve", Symbol("power_units")=>"String", Symbol("vom_cost")=>"InputOutputCurve", ) +OpenAPI.property_type(::Type{ CostCurve }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_CostCurve[name]))} + +function check_required(o::CostCurve) + o.value_curve === nothing && (return false) + o.power_units === nothing && (return false) + o.vom_cost === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ CostCurve }, name::Symbol, val) + if name === Symbol("variable_cost_type") + OpenAPI.validate_param(name, "CostCurve", :enum, val, ["COST"]) + end + if name === Symbol("power_units") + OpenAPI.validate_param(name, "CostCurve", :enum, val, ["SYSTEM_BASE", "DEVICE_BASE", "NATURAL_UNITS"]) + end +end diff --git a/generated-julia/src/models/model_CostCurveValueCurve.jl b/generated-julia/src/models/model_CostCurveValueCurve.jl new file mode 100644 index 0000000..537eee2 --- /dev/null +++ b/generated-julia/src/models/model_CostCurveValueCurve.jl @@ -0,0 +1,26 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""CostCurve_value_curve + + CostCurveValueCurve(; value=nothing) +""" +mutable struct CostCurveValueCurve <: OpenAPI.OneOfAPIModel + value::Any # Union{ AverageRateCurve, IncrementalCurve, InputOutputCurve } + CostCurveValueCurve() = new() + CostCurveValueCurve(value) = new(value) +end # type CostCurveValueCurve + +function OpenAPI.property_type(::Type{ CostCurveValueCurve }, name::Symbol, json::Dict{String,Any}) + discriminator = json["curve_type"] + if discriminator == "AVERAGE_RATE" + return eval(Base.Meta.parse("AverageRateCurve")) + elseif discriminator == "INCREMENTAL" + return eval(Base.Meta.parse("IncrementalCurve")) + elseif discriminator == "INPUT_OUTPUT" + return eval(Base.Meta.parse("InputOutputCurve")) + end + throw(OpenAPI.ValidationException("Invalid discriminator value: $discriminator for CostCurveValueCurve")) +end diff --git a/generated-julia/src/models/model_FuelCurve.jl b/generated-julia/src/models/model_FuelCurve.jl new file mode 100644 index 0000000..e6ebb27 --- /dev/null +++ b/generated-julia/src/models/model_FuelCurve.jl @@ -0,0 +1,56 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""FuelCurve + + FuelCurve(; + variable_cost_type=nothing, + value_curve=nothing, + power_units=nothing, + fuel_cost=nothing, + vom_cost=nothing, + ) + + - variable_cost_type::String + - value_curve::CostCurveValueCurve + - power_units::String + - fuel_cost::FuelCurveFuelCost + - vom_cost::InputOutputCurve +""" +Base.@kwdef mutable struct FuelCurve <: OpenAPI.APIModel + variable_cost_type::Union{Nothing, String} = nothing + value_curve = nothing # spec type: Union{ Nothing, CostCurveValueCurve } + power_units::Union{Nothing, String} = nothing + fuel_cost = nothing # spec type: Union{ Nothing, FuelCurveFuelCost } + vom_cost = nothing # spec type: Union{ Nothing, InputOutputCurve } + + function FuelCurve(variable_cost_type, value_curve, power_units, fuel_cost, vom_cost, ) + OpenAPI.validate_property(FuelCurve, Symbol("variable_cost_type"), variable_cost_type) + OpenAPI.validate_property(FuelCurve, Symbol("value_curve"), value_curve) + OpenAPI.validate_property(FuelCurve, Symbol("power_units"), power_units) + OpenAPI.validate_property(FuelCurve, Symbol("fuel_cost"), fuel_cost) + OpenAPI.validate_property(FuelCurve, Symbol("vom_cost"), vom_cost) + return new(variable_cost_type, value_curve, power_units, fuel_cost, vom_cost, ) + end +end # type FuelCurve + +const _property_types_FuelCurve = Dict{Symbol,String}(Symbol("variable_cost_type")=>"String", Symbol("value_curve")=>"CostCurveValueCurve", Symbol("power_units")=>"String", Symbol("fuel_cost")=>"FuelCurveFuelCost", Symbol("vom_cost")=>"InputOutputCurve", ) +OpenAPI.property_type(::Type{ FuelCurve }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_FuelCurve[name]))} + +function check_required(o::FuelCurve) + o.value_curve === nothing && (return false) + o.power_units === nothing && (return false) + o.fuel_cost === nothing && (return false) + o.vom_cost === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ FuelCurve }, name::Symbol, val) + if name === Symbol("variable_cost_type") + OpenAPI.validate_param(name, "FuelCurve", :enum, val, ["FUEL"]) + end + if name === Symbol("power_units") + OpenAPI.validate_param(name, "FuelCurve", :enum, val, ["SYSTEM_BASE", "DEVICE_BASE", "NATURAL_UNITS"]) + end +end diff --git a/generated-julia/src/models/model_FuelCurveFuelCost.jl b/generated-julia/src/models/model_FuelCurveFuelCost.jl new file mode 100644 index 0000000..f0a7147 --- /dev/null +++ b/generated-julia/src/models/model_FuelCurveFuelCost.jl @@ -0,0 +1,20 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""FuelCurve_fuel_cost + + FuelCurveFuelCost(; value=nothing) +""" +mutable struct FuelCurveFuelCost <: OpenAPI.OneOfAPIModel + value::Any # Union{ Float64, String } + FuelCurveFuelCost() = new() + FuelCurveFuelCost(value) = new(value) +end # type FuelCurveFuelCost + +function OpenAPI.property_type(::Type{ FuelCurveFuelCost }, name::Symbol, json::Dict{String,Any}) + + # no discriminator specified, can't determine the exact type + return fieldtype(FuelCurveFuelCost, name) +end diff --git a/generated-julia/src/models/model_IncrementalCurve.jl b/generated-julia/src/models/model_IncrementalCurve.jl new file mode 100644 index 0000000..2351e3f --- /dev/null +++ b/generated-julia/src/models/model_IncrementalCurve.jl @@ -0,0 +1,46 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""IncrementalCurve + + IncrementalCurve(; + curve_type=nothing, + function_data=nothing, + initial_input=nothing, + input_at_zero=nothing, + ) + + - curve_type::String + - function_data::IncrementalCurveFunctionData + - initial_input::Float64 + - input_at_zero::Float64 +""" +Base.@kwdef mutable struct IncrementalCurve <: OpenAPI.APIModel + curve_type::Union{Nothing, String} = nothing + function_data = nothing # spec type: Union{ Nothing, IncrementalCurveFunctionData } + initial_input::Union{Nothing, Float64} = nothing + input_at_zero::Union{Nothing, Float64} = nothing + + function IncrementalCurve(curve_type, function_data, initial_input, input_at_zero, ) + OpenAPI.validate_property(IncrementalCurve, Symbol("curve_type"), curve_type) + OpenAPI.validate_property(IncrementalCurve, Symbol("function_data"), function_data) + OpenAPI.validate_property(IncrementalCurve, Symbol("initial_input"), initial_input) + OpenAPI.validate_property(IncrementalCurve, Symbol("input_at_zero"), input_at_zero) + return new(curve_type, function_data, initial_input, input_at_zero, ) + end +end # type IncrementalCurve + +const _property_types_IncrementalCurve = Dict{Symbol,String}(Symbol("curve_type")=>"String", Symbol("function_data")=>"IncrementalCurveFunctionData", Symbol("initial_input")=>"Float64", Symbol("input_at_zero")=>"Float64", ) +OpenAPI.property_type(::Type{ IncrementalCurve }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IncrementalCurve[name]))} + +function check_required(o::IncrementalCurve) + o.function_data === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ IncrementalCurve }, name::Symbol, val) + if name === Symbol("curve_type") + OpenAPI.validate_param(name, "IncrementalCurve", :enum, val, ["INCREMENTAL"]) + end +end diff --git a/generated-julia/src/models/model_IncrementalCurveFunctionData.jl b/generated-julia/src/models/model_IncrementalCurveFunctionData.jl new file mode 100644 index 0000000..ce61e69 --- /dev/null +++ b/generated-julia/src/models/model_IncrementalCurveFunctionData.jl @@ -0,0 +1,20 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""IncrementalCurve_function_data + + IncrementalCurveFunctionData(; value=nothing) +""" +mutable struct IncrementalCurveFunctionData <: OpenAPI.OneOfAPIModel + value::Any # Union{ LinearFunctionData, PiecewiseStepData } + IncrementalCurveFunctionData() = new() + IncrementalCurveFunctionData(value) = new(value) +end # type IncrementalCurveFunctionData + +function OpenAPI.property_type(::Type{ IncrementalCurveFunctionData }, name::Symbol, json::Dict{String,Any}) + + # no discriminator specified, can't determine the exact type + return fieldtype(IncrementalCurveFunctionData, name) +end diff --git a/generated-julia/src/models/model_InputOutputCurve.jl b/generated-julia/src/models/model_InputOutputCurve.jl new file mode 100644 index 0000000..76927b3 --- /dev/null +++ b/generated-julia/src/models/model_InputOutputCurve.jl @@ -0,0 +1,42 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""InputOutputCurve + + InputOutputCurve(; + curve_type=nothing, + function_data=nothing, + input_at_zero=nothing, + ) + + - curve_type::String + - function_data::InputOutputCurveFunctionData + - input_at_zero::Float64 +""" +Base.@kwdef mutable struct InputOutputCurve <: OpenAPI.APIModel + curve_type::Union{Nothing, String} = nothing + function_data = nothing # spec type: Union{ Nothing, InputOutputCurveFunctionData } + input_at_zero::Union{Nothing, Float64} = nothing + + function InputOutputCurve(curve_type, function_data, input_at_zero, ) + OpenAPI.validate_property(InputOutputCurve, Symbol("curve_type"), curve_type) + OpenAPI.validate_property(InputOutputCurve, Symbol("function_data"), function_data) + OpenAPI.validate_property(InputOutputCurve, Symbol("input_at_zero"), input_at_zero) + return new(curve_type, function_data, input_at_zero, ) + end +end # type InputOutputCurve + +const _property_types_InputOutputCurve = Dict{Symbol,String}(Symbol("curve_type")=>"String", Symbol("function_data")=>"InputOutputCurveFunctionData", Symbol("input_at_zero")=>"Float64", ) +OpenAPI.property_type(::Type{ InputOutputCurve }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_InputOutputCurve[name]))} + +function check_required(o::InputOutputCurve) + o.function_data === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ InputOutputCurve }, name::Symbol, val) + if name === Symbol("curve_type") + OpenAPI.validate_param(name, "InputOutputCurve", :enum, val, ["INPUT_OUTPUT"]) + end +end diff --git a/generated-julia/src/models/model_InputOutputCurveFunctionData.jl b/generated-julia/src/models/model_InputOutputCurveFunctionData.jl new file mode 100644 index 0000000..1e76b11 --- /dev/null +++ b/generated-julia/src/models/model_InputOutputCurveFunctionData.jl @@ -0,0 +1,26 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""InputOutputCurve_function_data + + InputOutputCurveFunctionData(; value=nothing) +""" +mutable struct InputOutputCurveFunctionData <: OpenAPI.OneOfAPIModel + value::Any # Union{ LinearFunctionData, PiecewiseLinearData, QuadraticFunctionData } + InputOutputCurveFunctionData() = new() + InputOutputCurveFunctionData(value) = new(value) +end # type InputOutputCurveFunctionData + +function OpenAPI.property_type(::Type{ InputOutputCurveFunctionData }, name::Symbol, json::Dict{String,Any}) + discriminator = json["function_type"] + if discriminator == "LINEAR" + return eval(Base.Meta.parse("LinearFunctionData")) + elseif discriminator == "PIECEWISE_LINEAR" + return eval(Base.Meta.parse("PiecewiseLinearData")) + elseif discriminator == "QUADRATIC" + return eval(Base.Meta.parse("QuadraticFunctionData")) + end + throw(OpenAPI.ValidationException("Invalid discriminator value: $discriminator for InputOutputCurveFunctionData")) +end diff --git a/generated-julia/src/models/model_LinearFunctionData.jl b/generated-julia/src/models/model_LinearFunctionData.jl new file mode 100644 index 0000000..8fc8e52 --- /dev/null +++ b/generated-julia/src/models/model_LinearFunctionData.jl @@ -0,0 +1,43 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""LinearFunctionData + + LinearFunctionData(; + function_type=nothing, + proportional_term=nothing, + constant_term=nothing, + ) + + - function_type::String + - proportional_term::Float64 + - constant_term::Float64 +""" +Base.@kwdef mutable struct LinearFunctionData <: OpenAPI.APIModel + function_type::Union{Nothing, String} = nothing + proportional_term::Union{Nothing, Float64} = nothing + constant_term::Union{Nothing, Float64} = nothing + + function LinearFunctionData(function_type, proportional_term, constant_term, ) + OpenAPI.validate_property(LinearFunctionData, Symbol("function_type"), function_type) + OpenAPI.validate_property(LinearFunctionData, Symbol("proportional_term"), proportional_term) + OpenAPI.validate_property(LinearFunctionData, Symbol("constant_term"), constant_term) + return new(function_type, proportional_term, constant_term, ) + end +end # type LinearFunctionData + +const _property_types_LinearFunctionData = Dict{Symbol,String}(Symbol("function_type")=>"String", Symbol("proportional_term")=>"Float64", Symbol("constant_term")=>"Float64", ) +OpenAPI.property_type(::Type{ LinearFunctionData }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_LinearFunctionData[name]))} + +function check_required(o::LinearFunctionData) + o.proportional_term === nothing && (return false) + o.constant_term === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ LinearFunctionData }, name::Symbol, val) + if name === Symbol("function_type") + OpenAPI.validate_param(name, "LinearFunctionData", :enum, val, ["LINEAR"]) + end +end diff --git a/generated-julia/src/models/model_MinMax.jl b/generated-julia/src/models/model_MinMax.jl new file mode 100644 index 0000000..f7b2ed4 --- /dev/null +++ b/generated-julia/src/models/model_MinMax.jl @@ -0,0 +1,34 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""MinMax + + MinMax(; + min=nothing, + max=nothing, + ) + + - min::Float64 + - max::Float64 +""" +Base.@kwdef mutable struct MinMax <: OpenAPI.APIModel + min::Union{Nothing, Float64} = nothing + max::Union{Nothing, Float64} = nothing + + function MinMax(min, max, ) + OpenAPI.validate_property(MinMax, Symbol("min"), min) + OpenAPI.validate_property(MinMax, Symbol("max"), max) + return new(min, max, ) + end +end # type MinMax + +const _property_types_MinMax = Dict{Symbol,String}(Symbol("min")=>"Float64", Symbol("max")=>"Float64", ) +OpenAPI.property_type(::Type{ MinMax }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_MinMax[name]))} + +function check_required(o::MinMax) + true +end + +function OpenAPI.validate_property(::Type{ MinMax }, name::Symbol, val) +end diff --git a/generated-julia/src/models/model_PiecewiseLinearData.jl b/generated-julia/src/models/model_PiecewiseLinearData.jl new file mode 100644 index 0000000..15d513e --- /dev/null +++ b/generated-julia/src/models/model_PiecewiseLinearData.jl @@ -0,0 +1,38 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""PiecewiseLinearData + + PiecewiseLinearData(; + function_type=nothing, + points=nothing, + ) + + - function_type::String + - points::Vector{PiecewiseLinearDataPointsInner} +""" +Base.@kwdef mutable struct PiecewiseLinearData <: OpenAPI.APIModel + function_type::Union{Nothing, String} = nothing + points::Union{Nothing, Vector} = nothing # spec type: Union{ Nothing, Vector{PiecewiseLinearDataPointsInner} } + + function PiecewiseLinearData(function_type, points, ) + OpenAPI.validate_property(PiecewiseLinearData, Symbol("function_type"), function_type) + OpenAPI.validate_property(PiecewiseLinearData, Symbol("points"), points) + return new(function_type, points, ) + end +end # type PiecewiseLinearData + +const _property_types_PiecewiseLinearData = Dict{Symbol,String}(Symbol("function_type")=>"String", Symbol("points")=>"Vector{PiecewiseLinearDataPointsInner}", ) +OpenAPI.property_type(::Type{ PiecewiseLinearData }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PiecewiseLinearData[name]))} + +function check_required(o::PiecewiseLinearData) + o.points === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ PiecewiseLinearData }, name::Symbol, val) + if name === Symbol("function_type") + OpenAPI.validate_param(name, "PiecewiseLinearData", :enum, val, ["PIECEWISE_LINEAR"]) + end +end diff --git a/generated-julia/src/models/model_PiecewiseLinearDataPointsInner.jl b/generated-julia/src/models/model_PiecewiseLinearDataPointsInner.jl new file mode 100644 index 0000000..d448c2e --- /dev/null +++ b/generated-julia/src/models/model_PiecewiseLinearDataPointsInner.jl @@ -0,0 +1,36 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""PiecewiseLinearData_points_inner + + PiecewiseLinearDataPointsInner(; + x=nothing, + y=nothing, + ) + + - x::Float64 + - y::Float64 +""" +Base.@kwdef mutable struct PiecewiseLinearDataPointsInner <: OpenAPI.APIModel + x::Union{Nothing, Float64} = nothing + y::Union{Nothing, Float64} = nothing + + function PiecewiseLinearDataPointsInner(x, y, ) + OpenAPI.validate_property(PiecewiseLinearDataPointsInner, Symbol("x"), x) + OpenAPI.validate_property(PiecewiseLinearDataPointsInner, Symbol("y"), y) + return new(x, y, ) + end +end # type PiecewiseLinearDataPointsInner + +const _property_types_PiecewiseLinearDataPointsInner = Dict{Symbol,String}(Symbol("x")=>"Float64", Symbol("y")=>"Float64", ) +OpenAPI.property_type(::Type{ PiecewiseLinearDataPointsInner }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PiecewiseLinearDataPointsInner[name]))} + +function check_required(o::PiecewiseLinearDataPointsInner) + o.x === nothing && (return false) + o.y === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ PiecewiseLinearDataPointsInner }, name::Symbol, val) +end diff --git a/generated-julia/src/models/model_PiecewiseStepData.jl b/generated-julia/src/models/model_PiecewiseStepData.jl new file mode 100644 index 0000000..8826f4e --- /dev/null +++ b/generated-julia/src/models/model_PiecewiseStepData.jl @@ -0,0 +1,43 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""PiecewiseStepData + + PiecewiseStepData(; + function_type=nothing, + x_coords=nothing, + y_coords=nothing, + ) + + - function_type::String + - x_coords::Vector{Float64} + - y_coords::Vector{Float64} +""" +Base.@kwdef mutable struct PiecewiseStepData <: OpenAPI.APIModel + function_type::Union{Nothing, String} = nothing + x_coords::Union{Nothing, Vector{Float64}} = nothing + y_coords::Union{Nothing, Vector{Float64}} = nothing + + function PiecewiseStepData(function_type, x_coords, y_coords, ) + OpenAPI.validate_property(PiecewiseStepData, Symbol("function_type"), function_type) + OpenAPI.validate_property(PiecewiseStepData, Symbol("x_coords"), x_coords) + OpenAPI.validate_property(PiecewiseStepData, Symbol("y_coords"), y_coords) + return new(function_type, x_coords, y_coords, ) + end +end # type PiecewiseStepData + +const _property_types_PiecewiseStepData = Dict{Symbol,String}(Symbol("function_type")=>"String", Symbol("x_coords")=>"Vector{Float64}", Symbol("y_coords")=>"Vector{Float64}", ) +OpenAPI.property_type(::Type{ PiecewiseStepData }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PiecewiseStepData[name]))} + +function check_required(o::PiecewiseStepData) + o.x_coords === nothing && (return false) + o.y_coords === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ PiecewiseStepData }, name::Symbol, val) + if name === Symbol("function_type") + OpenAPI.validate_param(name, "PiecewiseStepData", :enum, val, ["PIECEWISE_STEP"]) + end +end diff --git a/generated-julia/src/models/model_QuadraticFunctionData.jl b/generated-julia/src/models/model_QuadraticFunctionData.jl new file mode 100644 index 0000000..617a1f4 --- /dev/null +++ b/generated-julia/src/models/model_QuadraticFunctionData.jl @@ -0,0 +1,48 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""QuadraticFunctionData + + QuadraticFunctionData(; + function_type=nothing, + quadratic_term=nothing, + proportional_term=nothing, + constant_term=nothing, + ) + + - function_type::String + - quadratic_term::Float64 + - proportional_term::Float64 + - constant_term::Float64 +""" +Base.@kwdef mutable struct QuadraticFunctionData <: OpenAPI.APIModel + function_type::Union{Nothing, String} = nothing + quadratic_term::Union{Nothing, Float64} = nothing + proportional_term::Union{Nothing, Float64} = nothing + constant_term::Union{Nothing, Float64} = nothing + + function QuadraticFunctionData(function_type, quadratic_term, proportional_term, constant_term, ) + OpenAPI.validate_property(QuadraticFunctionData, Symbol("function_type"), function_type) + OpenAPI.validate_property(QuadraticFunctionData, Symbol("quadratic_term"), quadratic_term) + OpenAPI.validate_property(QuadraticFunctionData, Symbol("proportional_term"), proportional_term) + OpenAPI.validate_property(QuadraticFunctionData, Symbol("constant_term"), constant_term) + return new(function_type, quadratic_term, proportional_term, constant_term, ) + end +end # type QuadraticFunctionData + +const _property_types_QuadraticFunctionData = Dict{Symbol,String}(Symbol("function_type")=>"String", Symbol("quadratic_term")=>"Float64", Symbol("proportional_term")=>"Float64", Symbol("constant_term")=>"Float64", ) +OpenAPI.property_type(::Type{ QuadraticFunctionData }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_QuadraticFunctionData[name]))} + +function check_required(o::QuadraticFunctionData) + o.quadratic_term === nothing && (return false) + o.proportional_term === nothing && (return false) + o.constant_term === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ QuadraticFunctionData }, name::Symbol, val) + if name === Symbol("function_type") + OpenAPI.validate_param(name, "QuadraticFunctionData", :enum, val, ["QUADRATIC"]) + end +end diff --git a/generated-julia/src/models/model_StartUpStages.jl b/generated-julia/src/models/model_StartUpStages.jl new file mode 100644 index 0000000..7fcd431 --- /dev/null +++ b/generated-julia/src/models/model_StartUpStages.jl @@ -0,0 +1,41 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""StartUpStages + + StartUpStages(; + hot=nothing, + warm=nothing, + cold=nothing, + ) + + - hot::Float64 + - warm::Float64 + - cold::Float64 +""" +Base.@kwdef mutable struct StartUpStages <: OpenAPI.APIModel + hot::Union{Nothing, Float64} = nothing + warm::Union{Nothing, Float64} = nothing + cold::Union{Nothing, Float64} = nothing + + function StartUpStages(hot, warm, cold, ) + OpenAPI.validate_property(StartUpStages, Symbol("hot"), hot) + OpenAPI.validate_property(StartUpStages, Symbol("warm"), warm) + OpenAPI.validate_property(StartUpStages, Symbol("cold"), cold) + return new(hot, warm, cold, ) + end +end # type StartUpStages + +const _property_types_StartUpStages = Dict{Symbol,String}(Symbol("hot")=>"Float64", Symbol("warm")=>"Float64", Symbol("cold")=>"Float64", ) +OpenAPI.property_type(::Type{ StartUpStages }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_StartUpStages[name]))} + +function check_required(o::StartUpStages) + o.hot === nothing && (return false) + o.warm === nothing && (return false) + o.cold === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ StartUpStages }, name::Symbol, val) +end diff --git a/generated-julia/src/models/model_ThermalStandard.jl b/generated-julia/src/models/model_ThermalStandard.jl new file mode 100644 index 0000000..d64ee8d --- /dev/null +++ b/generated-julia/src/models/model_ThermalStandard.jl @@ -0,0 +1,104 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""ThermalStandard + + ThermalStandard(; + id=nothing, + name=nothing, + prime_mover="OT", + fuel_type="OTHER", + rating=0.0, + base_power=0.0, + available=true, + status=true, + active_power=0.0, + reactive_power=0.0, + active_power_limits=nothing, + reactive_power_limits=nothing, + ramp_limits=nothing, + operation_cost=nothing, + time_limits=nothing, + must_run=false, + bus_id=nothing, + ) + + - id::Int64 + - name::String + - prime_mover::String + - fuel_type::String : Thermal fuels that reflect options in the EIA annual energy review. + - rating::Float64 + - base_power::Float64 + - available::Bool + - status::Bool + - active_power::Float64 + - reactive_power::Float64 + - active_power_limits::MinMax + - reactive_power_limits::MinMax + - ramp_limits::UpDown + - operation_cost::ThermalStandardOperationCost + - time_limits::UpDown + - must_run::Bool + - bus_id::Int64 +""" +Base.@kwdef mutable struct ThermalStandard <: OpenAPI.APIModel + id::Union{Nothing, Int64} = nothing + name::Union{Nothing, String} = nothing + prime_mover::Union{Nothing, String} = "OT" + fuel_type::Union{Nothing, String} = "OTHER" + rating::Union{Nothing, Float64} = 0.0 + base_power::Union{Nothing, Float64} = 0.0 + available::Union{Nothing, Bool} = true + status::Union{Nothing, Bool} = true + active_power::Union{Nothing, Float64} = 0.0 + reactive_power::Union{Nothing, Float64} = 0.0 + active_power_limits = nothing # spec type: Union{ Nothing, MinMax } + reactive_power_limits = nothing # spec type: Union{ Nothing, MinMax } + ramp_limits = nothing # spec type: Union{ Nothing, UpDown } + operation_cost = nothing # spec type: Union{ Nothing, ThermalStandardOperationCost } + time_limits = nothing # spec type: Union{ Nothing, UpDown } + must_run::Union{Nothing, Bool} = false + bus_id::Union{Nothing, Int64} = nothing + + function ThermalStandard(id, name, prime_mover, fuel_type, rating, base_power, available, status, active_power, reactive_power, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, time_limits, must_run, bus_id, ) + OpenAPI.validate_property(ThermalStandard, Symbol("id"), id) + OpenAPI.validate_property(ThermalStandard, Symbol("name"), name) + OpenAPI.validate_property(ThermalStandard, Symbol("prime_mover"), prime_mover) + OpenAPI.validate_property(ThermalStandard, Symbol("fuel_type"), fuel_type) + OpenAPI.validate_property(ThermalStandard, Symbol("rating"), rating) + OpenAPI.validate_property(ThermalStandard, Symbol("base_power"), base_power) + OpenAPI.validate_property(ThermalStandard, Symbol("available"), available) + OpenAPI.validate_property(ThermalStandard, Symbol("status"), status) + OpenAPI.validate_property(ThermalStandard, Symbol("active_power"), active_power) + OpenAPI.validate_property(ThermalStandard, Symbol("reactive_power"), reactive_power) + OpenAPI.validate_property(ThermalStandard, Symbol("active_power_limits"), active_power_limits) + OpenAPI.validate_property(ThermalStandard, Symbol("reactive_power_limits"), reactive_power_limits) + OpenAPI.validate_property(ThermalStandard, Symbol("ramp_limits"), ramp_limits) + OpenAPI.validate_property(ThermalStandard, Symbol("operation_cost"), operation_cost) + OpenAPI.validate_property(ThermalStandard, Symbol("time_limits"), time_limits) + OpenAPI.validate_property(ThermalStandard, Symbol("must_run"), must_run) + OpenAPI.validate_property(ThermalStandard, Symbol("bus_id"), bus_id) + return new(id, name, prime_mover, fuel_type, rating, base_power, available, status, active_power, reactive_power, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, time_limits, must_run, bus_id, ) + end +end # type ThermalStandard + +const _property_types_ThermalStandard = Dict{Symbol,String}(Symbol("id")=>"Int64", Symbol("name")=>"String", Symbol("prime_mover")=>"String", Symbol("fuel_type")=>"String", Symbol("rating")=>"Float64", Symbol("base_power")=>"Float64", Symbol("available")=>"Bool", Symbol("status")=>"Bool", Symbol("active_power")=>"Float64", Symbol("reactive_power")=>"Float64", Symbol("active_power_limits")=>"MinMax", Symbol("reactive_power_limits")=>"MinMax", Symbol("ramp_limits")=>"UpDown", Symbol("operation_cost")=>"ThermalStandardOperationCost", Symbol("time_limits")=>"UpDown", Symbol("must_run")=>"Bool", Symbol("bus_id")=>"Int64", ) +OpenAPI.property_type(::Type{ ThermalStandard }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ThermalStandard[name]))} + +function check_required(o::ThermalStandard) + o.id === nothing && (return false) + o.name === nothing && (return false) + o.operation_cost === nothing && (return false) + o.bus_id === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ ThermalStandard }, name::Symbol, val) + if name === Symbol("prime_mover") + OpenAPI.validate_param(name, "ThermalStandard", :enum, val, ["BA", "BT", "CA", "CC", "CE", "CP", "CS", "CT", "ES", "FC", "FW", "GT", "HA", "HB", "HK", "HY", "IC", "PS", "OT", "ST", "PVe", "WT", "WS"]) + end + if name === Symbol("fuel_type") + OpenAPI.validate_param(name, "ThermalStandard", :enum, val, ["COAL", "WASTE_COAL", "DISTILLATE_FUEL_OIL", "WASTE_OIL", "PETROLEUM_COKE", "RESIDUAL_FUEL_OIL", "NATURAL_GAS", "OTHER_GAS", "NUCLEAR", "AG_BIPRODUCT", "MUNICIPAL_WASTE", "WOOD_WASTE", "GEOTHERMAL", "OTHER"]) + end +end diff --git a/generated-julia/src/models/model_ThermalStandardOperationCost.jl b/generated-julia/src/models/model_ThermalStandardOperationCost.jl new file mode 100644 index 0000000..1b69856 --- /dev/null +++ b/generated-julia/src/models/model_ThermalStandardOperationCost.jl @@ -0,0 +1,47 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""ThermalStandard_operation_cost +Cost representation for thermal generation units + + ThermalStandardOperationCost(; + variable=nothing, + fixed=nothing, + start_up=nothing, + shut_down=nothing, + ) + + - variable::ThermalStandardOperationCostVariable + - fixed::Float64 : Fixed cost of keeping the unit online. For some cost represenations this field can be duplicative + - start_up::ThermalStandardOperationCostStartUp + - shut_down::Float64 : Cost to turn the unit off +""" +Base.@kwdef mutable struct ThermalStandardOperationCost <: OpenAPI.APIModel + variable = nothing # spec type: Union{ Nothing, ThermalStandardOperationCostVariable } + fixed::Union{Nothing, Float64} = nothing + start_up = nothing # spec type: Union{ Nothing, ThermalStandardOperationCostStartUp } + shut_down::Union{Nothing, Float64} = nothing + + function ThermalStandardOperationCost(variable, fixed, start_up, shut_down, ) + OpenAPI.validate_property(ThermalStandardOperationCost, Symbol("variable"), variable) + OpenAPI.validate_property(ThermalStandardOperationCost, Symbol("fixed"), fixed) + OpenAPI.validate_property(ThermalStandardOperationCost, Symbol("start_up"), start_up) + OpenAPI.validate_property(ThermalStandardOperationCost, Symbol("shut_down"), shut_down) + return new(variable, fixed, start_up, shut_down, ) + end +end # type ThermalStandardOperationCost + +const _property_types_ThermalStandardOperationCost = Dict{Symbol,String}(Symbol("variable")=>"ThermalStandardOperationCostVariable", Symbol("fixed")=>"Float64", Symbol("start_up")=>"ThermalStandardOperationCostStartUp", Symbol("shut_down")=>"Float64", ) +OpenAPI.property_type(::Type{ ThermalStandardOperationCost }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ThermalStandardOperationCost[name]))} + +function check_required(o::ThermalStandardOperationCost) + o.variable === nothing && (return false) + o.fixed === nothing && (return false) + o.start_up === nothing && (return false) + o.shut_down === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ ThermalStandardOperationCost }, name::Symbol, val) +end diff --git a/generated-julia/src/models/model_ThermalStandardOperationCostStartUp.jl b/generated-julia/src/models/model_ThermalStandardOperationCostStartUp.jl new file mode 100644 index 0000000..c073e22 --- /dev/null +++ b/generated-julia/src/models/model_ThermalStandardOperationCostStartUp.jl @@ -0,0 +1,21 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""ThermalStandard_operation_cost_start_up +Start-up cost can take linear or multi-stage cost + + ThermalStandardOperationCostStartUp(; value=nothing) +""" +mutable struct ThermalStandardOperationCostStartUp <: OpenAPI.OneOfAPIModel + value::Any # Union{ Float64, StartUpStages } + ThermalStandardOperationCostStartUp() = new() + ThermalStandardOperationCostStartUp(value) = new(value) +end # type ThermalStandardOperationCostStartUp + +function OpenAPI.property_type(::Type{ ThermalStandardOperationCostStartUp }, name::Symbol, json::Dict{String,Any}) + + # no discriminator specified, can't determine the exact type + return fieldtype(ThermalStandardOperationCostStartUp, name) +end diff --git a/generated-julia/src/models/model_ThermalStandardOperationCostVariable.jl b/generated-julia/src/models/model_ThermalStandardOperationCostVariable.jl new file mode 100644 index 0000000..f878ccd --- /dev/null +++ b/generated-julia/src/models/model_ThermalStandardOperationCostVariable.jl @@ -0,0 +1,24 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + + +@doc raw"""ThermalStandard_operation_cost_variable + + ThermalStandardOperationCostVariable(; value=nothing) +""" +mutable struct ThermalStandardOperationCostVariable <: OpenAPI.OneOfAPIModel + value::Any # Union{ CostCurve, FuelCurve } + ThermalStandardOperationCostVariable() = new() + ThermalStandardOperationCostVariable(value) = new(value) +end # type ThermalStandardOperationCostVariable + +function OpenAPI.property_type(::Type{ ThermalStandardOperationCostVariable }, name::Symbol, json::Dict{String,Any}) + discriminator = json["variable_cost_type"] + if discriminator == "COST" + return eval(Base.Meta.parse("CostCurve")) + elseif discriminator == "FUEL" + return eval(Base.Meta.parse("FuelCurve")) + end + throw(OpenAPI.ValidationException("Invalid discriminator value: $discriminator for ThermalStandardOperationCostVariable")) +end diff --git a/generated-julia/src/models/model_UpDown.jl b/generated-julia/src/models/model_UpDown.jl new file mode 100644 index 0000000..245d346 --- /dev/null +++ b/generated-julia/src/models/model_UpDown.jl @@ -0,0 +1,36 @@ +# This file was generated by the Julia OpenAPI Code Generator +# Do not modify this file directly. Modify the OpenAPI specification instead. + + +@doc raw"""UpDown + + UpDown(; + up=nothing, + down=nothing, + ) + + - up::Float64 + - down::Float64 +""" +Base.@kwdef mutable struct UpDown <: OpenAPI.APIModel + up::Union{Nothing, Float64} = nothing + down::Union{Nothing, Float64} = nothing + + function UpDown(up, down, ) + OpenAPI.validate_property(UpDown, Symbol("up"), up) + OpenAPI.validate_property(UpDown, Symbol("down"), down) + return new(up, down, ) + end +end # type UpDown + +const _property_types_UpDown = Dict{Symbol,String}(Symbol("up")=>"Float64", Symbol("down")=>"Float64", ) +OpenAPI.property_type(::Type{ UpDown }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_UpDown[name]))} + +function check_required(o::UpDown) + o.up === nothing && (return false) + o.down === nothing && (return false) + true +end + +function OpenAPI.validate_property(::Type{ UpDown }, name::Symbol, val) +end diff --git a/generated-julia/src/sienna_struct_conversion.jl b/generated-julia/src/sienna_struct_conversion.jl new file mode 100644 index 0000000..d440c6f --- /dev/null +++ b/generated-julia/src/sienna_struct_conversion.jl @@ -0,0 +1,220 @@ +using PowerSystems: PowerSystems +const PSY = PowerSystems +using PowerSystemCaseBuilder: PowerSystemCaseBuilder +using JSON: JSON +using StructHelpers: @batteries + + +using OpenAPI: OpenAPI +include("modelincludes.jl") + +@batteries MinMax +@batteries UpDown +@batteries ThermalStandardOperationCostStartUp +@batteries StartUpStages +@batteries ThermalStandardOperationCostVariable +@batteries CostCurve +@batteries CostCurveValueCurve +@batteries FuelCurve +@batteries FuelCurveFuelCost +@batteries InputOutputCurve +@batteries InputOutputCurveFunctionData +@batteries AverageRateCurve +@batteries AverageRateCurveFunctionData +@batteries IncrementalCurve +@batteries IncrementalCurveFunctionData +@batteries LinearFunctionData +@batteries QuadraticFunctionData +@batteries PiecewiseLinearData +@batteries PiecewiseLinearDataPointsInner +@batteries PiecewiseStepData +@batteries ThermalStandard +@batteries ThermalStandardOperationCost + + +function get_min_max(min_max::NamedTuple{(:min, :max), Tuple{Float64, Float64}}) + MinMax( + min = min_max.min, + max = min_max.max, + ) +end + +get_min_max(::Nothing) = nothing + +function get_up_down(up_down::NamedTuple{(:up, :down), Tuple{Float64, Float64}}) + UpDown( + up = up_down.up, + down = up_down.down, + ) +end + +get_up_down(::Nothing) = nothing + +function get_startup(startup::Float64) + return ThermalStandardOperationCostStartUp(startup) +end + +function get_startup(startup::@NamedTuple{hot::Float64, warm::Float64, cold::Float64}) + ThermalStandardOperationCostStartUp( + StartUpStages( + hot = startup.hot, + warm = startup.warm, + cold = startup.cold, + ), + ) +end + +function get_variable_cost(variable::T) where {T <: PSY.ProductionVariableCostCurve} + error("Unsupported type $T") +end + +function get_cost_value_curve(curve::T) where T <: PSY.ValueCurve + error("Unsupported type $T") +end + +function get_cost_value_curve(curve::PSY.InputOutputCurve) + CostCurveValueCurve(get_input_output_curve(curve)) +end + +function get_cost_value_curve(curve::PSY.AverageRateCurve) + CostCurveValueCurve(get_average_rate_curve(curve)) +end + +function get_cost_value_curve(curve::PSY.IncrementalCurve) + CostCurveValueCurve(get_incremental_curve(curve)) +end + +function get_function_data(::T) where {T <: PSY.LinearFunctionData} + error("Unsupported type $T") +end + +function get_function_data(function_data::PSY.LinearFunctionData) + LinearFunctionData( + function_type = "LINEAR", + proportional_term = function_data.proportional_term, + constant_term = function_data.constant_term, + ) +end + +function get_function_data(function_data::PSY.QuadraticFunctionData) + QuadraticFunctionData( + function_type = "QUADRATIC", + quadratic_term = function_data.quadratic_term, + proportional_term = function_data.proportional_term, + constant_term = function_data.constant_term, + ) +end + +function get_xy_coords(nt::@NamedTuple{x::Float64, y::Float64}) + PiecewiseLinearDataPointsInner( + x = nt.x, + y = nt.y, + ) +end + +function get_function_data(function_data::PSY.PiecewiseLinearData) + PiecewiseLinearData( + function_type = "PIECEWISE_LINEAR", + points = get_xy_coords.(function_data.points), + ) +end + +function get_function_data(function_data::PSY.PiecewiseStepData) + PiecewiseStepData( + function_type = "PIECEWISE_STEP", + x_coords = function_data.x_coords, + y_coords = function_data.y_coords, + ) +end + +function get_input_output_curve(curve::PSY.InputOutputCurve) + InputOutputCurve( + curve_type = "INPUT_OUTPUT", + function_data = InputOutputCurveFunctionData( + get_function_data(curve.function_data), + ), + input_at_zero = curve.input_at_zero, + ) +end + +function get_average_rate_curve(curve::PSY.AverageRateCurve) + AverageRateCurve( + curve_type = "AVERAGE_RATE", + function_data = AverageRateCurveFunctionData( + get_function_data(curve.function_data), + ), + initial_input = curve.initial_input, + input_at_zero = curve.input_at_zero, + ) +end + +function get_incremental_curve(curve::PSY.IncrementalCurve) + IncrementalCurve( + curve_type = "INCREMENTAL", + function_data = IncrementalCurveFunctionData( + get_function_data(curve.function_data), + ), + initial_input = curve.initial_input, + input_at_zero = curve.input_at_zero, + ) +end + +function get_variable_cost(variable::PSY.CostCurve) + ThermalStandardOperationCostVariable( + CostCurve( + variable_cost_type = "COST", + value_curve = get_cost_value_curve(variable.value_curve), + vom_cost = get_input_output_curve(variable.vom_cost), + power_units = string(variable.power_units), + ), + ) +end + +function get_variable_cost(variable::PSY.FuelCurve) + FuelCurve( + variable_cost_type = "FUEL", + value_curve = get_cost_value_curve(variable.value_curve), + power_units = string(variable.power_units), + fuel_cost = FuelCurveFuelCost(variable.fuel_cost), + vom_cost = get_input_output_curve(variable.vom_cost), + ) +end + +function convert(cost::PSY.ThermalGenerationCost) + ThermalStandardOperationCost( + start_up = get_startup(cost.start_up), + shut_down = cost.shut_down, + fixed = cost.fixed, + variable = get_variable_cost(cost.variable), + ) +end + +function convert(thermal_standard::PSY.ThermalStandard) + ThermalStandard( + id = 1, + name = thermal_standard.name, + prime_mover = string(thermal_standard.prime_mover_type), + fuel_type = string(thermal_standard.fuel), + rating = thermal_standard.rating, + base_power = thermal_standard.base_power, + available = thermal_standard.available, + status = thermal_standard.status, + active_power = thermal_standard.active_power, + reactive_power = thermal_standard.reactive_power, + active_power_limits = get_min_max(thermal_standard.active_power_limits), + reactive_power_limits = get_min_max(thermal_standard.reactive_power_limits), + ramp_limits = get_up_down(thermal_standard.ramp_limits), + operation_cost = convert(thermal_standard.operation_cost), + time_limits = get_up_down(thermal_standard.time_limits), + must_run = thermal_standard.must_run, + bus_id = 4, + ) +end + +sys = PowerSystemCaseBuilder.build_system(PowerSystemCaseBuilder.PSISystems, "c_sys5_pjm") + +thermal_standard = PSY.get_component(PSY.ThermalStandard, sys, "Solitude") + +test_convert = convert(thermal_standard) +post_json = OpenAPI.from_json(ThermalStandard, JSON.parse(OpenAPI.to_json(test_convert))) +@assert test_convert == post_json "Conversion test failed" diff --git a/schemas/ThermalStandard.json b/schemas/ThermalStandard.json index 87aff68..b4e57af 100644 --- a/schemas/ThermalStandard.json +++ b/schemas/ThermalStandard.json @@ -47,21 +47,13 @@ "$ref": "common.json#/definitions/MinMax" }, "ramp_limits": { - "$ref": "common.json#/definitions/MinMax" + "$ref": "common.json#/definitions/UpDown" }, "operation_cost": { "$ref": "common.json#/definitions/ThermalGenerationCost" }, "time_limits": { - "oneOf": [ - { - "$ref": "common.json#/definitions/UpDown" - }, - { - "type": "null" - } - ], - "default": null + "$ref": "common.json#/definitions/UpDown" }, "must_run": { "default": false, diff --git a/schemas/common.json b/schemas/common.json index adc4d49..dd95d81 100644 --- a/schemas/common.json +++ b/schemas/common.json @@ -409,17 +409,11 @@ "properties": { "min": { "title": "Min", - "type": [ - "null", - "number" - ] + "type": "number" }, "max": { "title": "Max", - "type": [ - "null", - "number" - ] + "type": "number" } } },