diff --git a/docs/src/model_developer_guide/adding_custom_types.md b/docs/src/model_developer_guide/adding_custom_types.md index 00fb4af935..92fb6ea190 100644 --- a/docs/src/model_developer_guide/adding_custom_types.md +++ b/docs/src/model_developer_guide/adding_custom_types.md @@ -12,9 +12,11 @@ Refer to the [managing components guide](https://nrel-sienna.github.io/InfrastructureSystems.jl/stable/dev_guide/components_and_container/) for component requirements. -**Note**: `get_internal`, `get_name`, and `get_time_series_container` are -imported into `PowerSystems`, so you should implement your methods as -`PowerSystems` methods. +In particular, please note the methods `supports_time_series` (default = false) and +`supports_supplemental_attributes` (default = true) that you may need to implement. + +**Note**: `get_internal` and `get_name` are imported into `PowerSystems`, so you should +implement your methods as `PowerSystems` methods. Some abstract types define required interface functions in docstring. Be sure to implement each of them for your new type. diff --git a/docs/src/modeler_guide/system.md b/docs/src/modeler_guide/system.md index 78f9320ac2..4bff2b2509 100644 --- a/docs/src/modeler_guide/system.md +++ b/docs/src/modeler_guide/system.md @@ -213,9 +213,3 @@ jq '.data.components | .[] | select(.__metadata__.type == "ThermalStandard" and ```zsh jq '.data.components | .[] | select(.__metadata__.type == "ThermalStandard" and .active_power > 2.3)' system.json ``` - -- View the time series metadata for a component. - -```zsh -jq '.data.components | .[] | select(.__metadata__.type == "RenewableDispatch") | .time_series_container' system.json -``` diff --git a/docs/src/tutorials/basics.md b/docs/src/tutorials/basics.md index 57d3bcb168..04991e32e1 100644 --- a/docs/src/tutorials/basics.md +++ b/docs/src/tutorials/basics.md @@ -52,8 +52,8 @@ print(join(tt(PowerSystems.IS.InfrastructureSystemsType, concrete = false), "")) ### `TimeSeriesData` [_Read the Docs!_](https://nrel-sienna.github.io/PowerSystems.jl/stable/modeler_guide/time_series/) -Every `Component` has a `time_series_container::InfrastructureSystems.TimeSeriesContainer` -field. `TimeSeriesData` are used to hold time series information that describes the +Some `Component` types support time series data (refer to `supports_time_series(component)`. +`TimeSeriesData` are used to hold time series information that describes the temporally dependent data of fields within the same struct. For example, the `ThermalStandard.time_series_container` field can describe other fields in the struct (`available`, `activepower`, `reactivepower`). diff --git a/src/PowerSystems.jl b/src/PowerSystems.jl index 92c85199eb..feefbfcc1d 100644 --- a/src/PowerSystems.jl +++ b/src/PowerSystems.jl @@ -324,6 +324,8 @@ export iterate_supplemental_attributes export get_time_series export get_time_series_array export list_time_series_resolutions +export supports_time_series +export supports_supplemental_attributes export get_time_series_timestamps export get_time_series_values export get_time_series_counts @@ -364,7 +366,6 @@ export get_bus_numbers export get_name export set_name! export get_component_uuids -export get_supplemental_attributes_container export get_description export set_description! export get_base_power @@ -507,11 +508,9 @@ import InfrastructureSystems: get_component_uuids, get_supplemental_attribute, get_supplemental_attributes, - get_supplemental_attributes_container, set_name!, get_internal, set_internal!, - get_time_series_container, iterate_windows, get_time_series, has_time_series, @@ -561,7 +560,9 @@ import InfrastructureSystems: get_points, # TODO possible rename to disambiguate from geographical information get_x_coords, get_y_coords, - get_raw_data_type + get_raw_data_type, + supports_time_series, + supports_supplemental_attributes const IS = InfrastructureSystems @@ -588,6 +589,9 @@ abstract type Component <: IS.InfrastructureSystemsComponent end """ Supertype for "devices" (bus, line, etc.) """ abstract type Device <: Component end +supports_time_series(::Device) = true +supports_supplemental_attributes(::Device) = true + # Include utilities include("utils/logging.jl") include("utils/IO/base_checks.jl") diff --git a/src/base.jl b/src/base.jl index 40c59e1dea..2def976910 100644 --- a/src/base.jl +++ b/src/base.jl @@ -252,14 +252,6 @@ function IS.from_json( kwargs..., ) data = JSON3.read(io, Dict) - # These objects could be removed in to_json(sys). Doing it here will allow us to - # keep that JSON string fully consistent with time series and potentially use it in the - # future. - for component in data["data"]["components"] - if haskey(component, "time_series_container") - empty!(component["time_series_container"]) - end - end sys = from_dict(System, data; kwargs...) _post_deserialize_handling( sys; @@ -999,10 +991,13 @@ end """ Check to see if the component of type T with name exists. """ -function has_component(::Type{T}, sys::System, name::AbstractString) where {T <: Component} - return IS.has_component(T, sys.data.components, name) +function has_component(sys::System, T::Type{<:Component}, name::AbstractString) + return IS.has_component(sys.data, T, name) end +has_component(T::Type{<:Component}, sys::System, name::AbstractString) = + has_component(sys, T, name) + """ Get the component of type T with name. Returns nothing if no component matches. If T is an abstract type then the names of components across all subtypes of T must be unique. @@ -1857,19 +1852,18 @@ Allow types to implement handling of special cases during deserialization. """ handle_deserialization_special_cases!(component::Dict, ::Type{<:Component}) = nothing -function handle_deserialization_special_cases!(component::Dict, ::Type{DynamicBranch}) - # IS handles deserialization of supplemental attribues in each component. - # In this case the DynamicBranch's composed branch is not part of the system and so - # IS will not handle it. It can never attributes. - if !isempty(component["branch"]["supplemental_attributes_container"]) - error( - "Bug: serialized DynamicBranch.branch has supplemental attributes: $component", - ) - end - component["branch"]["supplemental_attributes_container"] = - IS.SupplementalAttributesContainer() - return -end +# TODO DT: Do I need to handle this in the new format upgrade? +#function handle_deserialization_special_cases!(component::Dict, ::Type{DynamicBranch}) +# # IS handles deserialization of supplemental attribues in each component. +# # In this case the DynamicBranch's composed branch is not part of the system and so +# # IS will not handle it. It can never attributes. +# if !isempty(component["branch"]["supplemental_attributes_container"]) +# error( +# "Bug: serialized DynamicBranch.branch has supplemental attributes: $component", +# ) +# end +# return +#end """ Return bus with name. @@ -2303,9 +2297,7 @@ function convert_component!( line.angle_limits, line.services, line.ext, - InfrastructureSystems.TimeSeriesContainer(), - InfrastructureSystems.SupplementalAttributesContainer(), - deepcopy(line.internal), + _copy_internal_for_conversion(line), ) IS.assign_new_uuid!(sys, line) add_component!(sys, new_line) @@ -2348,9 +2340,7 @@ function convert_component!( line.angle_limits, line.services, line.ext, - InfrastructureSystems.TimeSeriesContainer(), - InfrastructureSystems.SupplementalAttributesContainer(), - deepcopy(line.internal), + _copy_internal_for_conversion(line), ) IS.assign_new_uuid!(sys, line) add_component!(sys, new_line) @@ -2381,10 +2371,8 @@ function convert_component!( max_constant_active_power = get_max_active_power(old_load), max_constant_reactive_power = get_max_active_power(old_load), dynamic_injector = get_dynamic_injector(old_load), - internal = deepcopy(get_internal(old_load)), + internal = _copy_internal_for_conversion(old_load), services = Device[], - supplemental_attributes_container = InfrastructureSystems.SupplementalAttributesContainer(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), ) IS.assign_new_uuid!(sys, old_load) add_component!(sys, new_load) @@ -2397,6 +2385,21 @@ function convert_component!( remove_component!(sys, old_load) end +# Use this function to avoid deepcopy of shared_system_references. +function _copy_internal_for_conversion(component::Component) + internal = get_internal(component) + refs = internal.shared_system_references + return InfrastructureSystemsInternal(; + uuid = deepcopy(internal.uuid), + units_info = deepcopy(internal.units_info), + shared_system_references = IS.SharedSystemReferences(; + supplemental_attribute_manager = refs.supplemental_attribute_manager, + time_series_manager = refs.time_series_manager, + ), + ext = deepcopy(internal.ext), + ) +end + function _validate_or_skip!(sys, component, skip_validation) if skip_validation && get_runchecks(sys) @warn( @@ -2440,3 +2443,5 @@ Throws InfrastructureSystems.InvalidValue if any time series is inconsistent. function check_time_series_consistency(sys::System, ::Type{T}) where {T <: TimeSeriesData} return IS.check_time_series_consistency(sys.data, T) end + +stores_time_series_in_memory(sys::System) = IS.stores_time_series_in_memory(sys.data) diff --git a/src/data_format_conversions.jl b/src/data_format_conversions.jl index 4469de42d8..bd762219d8 100644 --- a/src/data_format_conversions.jl +++ b/src/data_format_conversions.jl @@ -10,29 +10,6 @@ const COST_CONTAINERS = ["MultiStartCost", "StorageManagementCost", "ThreePartCost", "TwoPartCost"] -function _convert_data!( - raw::Dict{String, Any}, - ::Val{Symbol("1.0.0")}, - ::Val{Symbol("2.0.0")}, -) - for component in raw["data"]["components"] - for ts_metadata in get(component, "time_series_container", []) - if ts_metadata["__metadata__"]["type"] == "DeterministicMetadata" && - !haskey(ts_metadata, "time_series_type") - # This will allow deserialization to work. - # post_deserialize_conversion will fix the type. - ts_metadata["time_series_type"] = Dict( - "__metadata__" => Dict( - "module" => "InfrastructureSystems", - "type" => "AbstractDeterministic", - ), - ) - end - end - end - return -end - function _convert_data!( raw::Dict{String, Any}, ::Val{Symbol("2.0.0")}, @@ -166,24 +143,7 @@ end # Conversions to occur at the end of deserialization function post_deserialize_conversion!(sys::System, raw) old = raw["data_format_version"] - if old == "1.0.0" - for component in IS.iterate_components_with_time_series(sys.data.components) - ts_container = get_time_series_container(component) - for key in keys(ts_container.data) - if key.time_series_type == IS.DeterministicMetadata - ts_metadata = ts_container.data[key] - ts = get_time_series( - AbstractDeterministic, - component, - get_name(ts_metadata); - len = get_horizon(ts_metadata), - count = 1, - ) - ts_metadata.time_series_type = typeof(ts) - end - end - end - elseif old == "1.0.1" || old == "2.0.0" || old == "3.0.0" + if old == "1.0.1" || old == "2.0.0" || old == "3.0.0" # Version 1.0.1 can be converted raw["data_format_version"] = DATA_FORMAT_VERSION @warn( diff --git a/src/descriptors/power_system_structs.json b/src/descriptors/power_system_structs.json index 225fca1cf0..98830ad462 100644 --- a/src/descriptors/power_system_structs.json +++ b/src/descriptors/power_system_structs.json @@ -30,20 +30,6 @@ "data_type": "Float64", "default": "0.0" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -76,20 +62,6 @@ "data_type": "Float64", "needs_conversion": true }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -135,20 +107,6 @@ "data_type": "Dict{String, Int}", "default": "Dict{String, Int}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -239,13 +197,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -318,13 +269,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -455,20 +399,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -580,20 +510,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -723,20 +639,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -845,20 +747,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -958,20 +846,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1050,20 +924,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1143,20 +1003,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1327,20 +1173,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1397,20 +1229,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1481,20 +1299,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1581,20 +1385,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1741,20 +1531,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -1863,20 +1639,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -2620,20 +2382,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -2988,20 +2736,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -3143,20 +2877,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -3423,20 +3143,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -3550,20 +3256,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -3666,20 +3358,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -3847,20 +3525,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4048,20 +3712,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4218,20 +3868,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4402,20 +4038,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4758,20 +4380,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4869,20 +4477,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -4980,20 +4574,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -5102,20 +4682,6 @@ "null_value": "Dict{String, Any}()", "default": "Dict{String, Any}()" }, - { - "name": "time_series_container", - "comment": "internal time_series storage", - "null_value": "InfrastructureSystems.TimeSeriesContainer()", - "data_type": "InfrastructureSystems.TimeSeriesContainer", - "default": "InfrastructureSystems.TimeSeriesContainer()" - }, - { - "name": "supplemental_attributes_container", - "comment": "container for supplemental attributes", - "null_value": "InfrastructureSystems.SupplementalAttributesContainer()", - "data_type": "InfrastructureSystems.SupplementalAttributesContainer", - "default": "InfrastructureSystems.SupplementalAttributesContainer()" - }, { "name": "internal", "comment": "power system internal reference, do not modify", @@ -16380,10 +15946,6 @@ "max": null } }, - { - "name": "time_series_container", - "data_type": "InfrastructureSystems.TimeSeriesContainer" - }, { "name": "internal", "data_type": "InfrastructureSystems.InfrastructureSystemsInternal" diff --git a/src/models/HybridSystem.jl b/src/models/HybridSystem.jl index 3ef2ba5cfa..a214e31c43 100644 --- a/src/models/HybridSystem.jl +++ b/src/models/HybridSystem.jl @@ -34,7 +34,6 @@ mutable struct HybridSystem <: StaticInjectionSubsystem dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} "internal forecast storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end @@ -60,7 +59,6 @@ function HybridSystem(; services = Service[], dynamic_injector = nothing, ext = Dict{String, Any}(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), internal = InfrastructureSystemsInternal(), ) return HybridSystem( @@ -84,7 +82,6 @@ function HybridSystem(; services, dynamic_injector, ext, - time_series_container, internal, ) end @@ -112,7 +109,6 @@ function HybridSystem(::Nothing) services = Service[], dynamic_injector = nothing, ext = Dict{String, Any}(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), internal = InfrastructureSystemsInternal(), ) end @@ -177,8 +173,6 @@ get_dynamic_injector(value::HybridSystem) = value.dynamic_injector """Get [`HybridSystem`](@ref) `ext`.""" get_ext(value::HybridSystem) = value.ext -InfrastructureSystems.get_time_series_container(value::HybridSystem) = - value.time_series_container """Get [`HybridSystem`](@ref) `internal`.""" get_internal(value::HybridSystem) = value.internal @@ -214,9 +208,6 @@ set_services!(value::HybridSystem, val) = value.services = val """Set [`HybridSystem`](@ref) `ext`.""" set_ext!(value::HybridSystem, val) = value.ext = val -InfrastructureSystems.set_time_series_container!(value::HybridSystem, val) = - value.time_series_container = val - """ Return an iterator over the subcomponents in the HybridSystem. diff --git a/src/models/devices.jl b/src/models/devices.jl index 70d9eb289c..c21b6473b2 100644 --- a/src/models/devices.jl +++ b/src/models/devices.jl @@ -93,6 +93,8 @@ function has_service(device::Device, ::Type{T}) where {T <: Service} return false end +has_service(T::Type{<:Service}, device::Device) = has_service(device, T) + """ Remove service from device if it is attached. """ diff --git a/src/models/generated/ACBus.jl b/src/models/generated/ACBus.jl index fc0aa8961c..087086aa95 100644 --- a/src/models/generated/ACBus.jl +++ b/src/models/generated/ACBus.jl @@ -16,7 +16,6 @@ This file is auto-generated. Do not edit. area::Union{Nothing, Area} load_zone::Union{Nothing, LoadZone} ext::Dict{String, Any} - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -33,7 +32,6 @@ A power-system bus. - `area::Union{Nothing, Area}`: the area containing the bus - `load_zone::Union{Nothing, LoadZone}`: the load zone containing the bus - `ext::Dict{String, Any}` -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct ACBus <: Bus @@ -56,13 +54,11 @@ mutable struct ACBus <: Bus "the load zone containing the bus" load_zone::Union{Nothing, LoadZone} ext::Dict{String, Any} - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal - function ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, internal, ) - (number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, internal, ) = check_bus_params( + function ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) + (number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) = check_bus_params( number, name, bustype, @@ -73,19 +69,18 @@ mutable struct ACBus <: Bus area, load_zone, ext, - supplemental_attributes_container, internal, ) - new(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, internal, ) + new(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) end end -function ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), ) + ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, InfrastructureSystemsInternal(), ) end -function ACBus(; number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, internal, ) +function ACBus(; number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + ACBus(number, name, bustype, angle, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -101,7 +96,6 @@ function ACBus(::Nothing) area=nothing, load_zone=nothing, ext=Dict{String, Any}(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -125,8 +119,6 @@ get_area(value::ACBus) = value.area get_load_zone(value::ACBus) = value.load_zone """Get [`ACBus`](@ref) `ext`.""" get_ext(value::ACBus) = value.ext -"""Get [`ACBus`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::ACBus) = value.supplemental_attributes_container """Get [`ACBus`](@ref) `internal`.""" get_internal(value::ACBus) = value.internal @@ -148,5 +140,3 @@ set_area!(value::ACBus, val) = value.area = val set_load_zone!(value::ACBus, val) = value.load_zone = val """Set [`ACBus`](@ref) `ext`.""" set_ext!(value::ACBus, val) = value.ext = val -"""Set [`ACBus`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::ACBus, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/Area.jl b/src/models/generated/Area.jl index 6b2fba51f0..c79a6bf64f 100644 --- a/src/models/generated/Area.jl +++ b/src/models/generated/Area.jl @@ -10,8 +10,6 @@ This file is auto-generated. Do not edit. peak_active_power::Float64 peak_reactive_power::Float64 load_response::Float64 - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -22,8 +20,6 @@ A collection of buses for control purposes. - `peak_active_power::Float64` - `peak_reactive_power::Float64` - `load_response::Float64` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct Area <: AggregationTopology @@ -31,20 +27,16 @@ mutable struct Area <: AggregationTopology peak_active_power::Float64 peak_reactive_power::Float64 load_response::Float64 - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function Area(name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - Area(name, peak_active_power, peak_reactive_power, load_response, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function Area(name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, ) + Area(name, peak_active_power, peak_reactive_power, load_response, InfrastructureSystemsInternal(), ) end -function Area(; name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - Area(name, peak_active_power, peak_reactive_power, load_response, time_series_container, supplemental_attributes_container, internal, ) +function Area(; name, peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, internal=InfrastructureSystemsInternal(), ) + Area(name, peak_active_power, peak_reactive_power, load_response, internal, ) end # Constructor for demo purposes; non-functional. @@ -54,8 +46,6 @@ function Area(::Nothing) peak_active_power=0.0, peak_reactive_power=0.0, load_response=0.0, - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -67,10 +57,6 @@ get_peak_active_power(value::Area) = get_value(value, value.peak_active_power) get_peak_reactive_power(value::Area) = get_value(value, value.peak_reactive_power) """Get [`Area`](@ref) `load_response`.""" get_load_response(value::Area) = value.load_response -"""Get [`Area`](@ref) `time_series_container`.""" -get_time_series_container(value::Area) = value.time_series_container -"""Get [`Area`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::Area) = value.supplemental_attributes_container """Get [`Area`](@ref) `internal`.""" get_internal(value::Area) = value.internal @@ -80,7 +66,3 @@ set_peak_active_power!(value::Area, val) = value.peak_active_power = set_value(v set_peak_reactive_power!(value::Area, val) = value.peak_reactive_power = set_value(value, val) """Set [`Area`](@ref) `load_response`.""" set_load_response!(value::Area, val) = value.load_response = val -"""Set [`Area`](@ref) `time_series_container`.""" -set_time_series_container!(value::Area, val) = value.time_series_container = val -"""Set [`Area`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::Area, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/BatteryEMS.jl b/src/models/generated/BatteryEMS.jl index 58a9da816e..c7764e6e89 100644 --- a/src/models/generated/BatteryEMS.jl +++ b/src/models/generated/BatteryEMS.jl @@ -26,8 +26,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -54,8 +52,6 @@ Data structure for a battery compatible with energy management formulations. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct BatteryEMS <: Storage @@ -87,20 +83,16 @@ mutable struct BatteryEMS <: Storage "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), storage_target=0.0, cycle_limits=1e4, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, storage_target, cycle_limits, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), storage_target=0.0, cycle_limits=1e4, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, storage_target, cycle_limits, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function BatteryEMS(; name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), storage_target=0.0, cycle_limits=1e4, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, storage_target, cycle_limits, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function BatteryEMS(; name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), storage_target=0.0, cycle_limits=1e4, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + BatteryEMS(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, storage_target, cycle_limits, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -126,8 +118,6 @@ function BatteryEMS(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -171,10 +161,6 @@ get_services(value::BatteryEMS) = value.services get_dynamic_injector(value::BatteryEMS) = value.dynamic_injector """Get [`BatteryEMS`](@ref) `ext`.""" get_ext(value::BatteryEMS) = value.ext -"""Get [`BatteryEMS`](@ref) `time_series_container`.""" -get_time_series_container(value::BatteryEMS) = value.time_series_container -"""Get [`BatteryEMS`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::BatteryEMS) = value.supplemental_attributes_container """Get [`BatteryEMS`](@ref) `internal`.""" get_internal(value::BatteryEMS) = value.internal @@ -214,7 +200,3 @@ set_cycle_limits!(value::BatteryEMS, val) = value.cycle_limits = val set_services!(value::BatteryEMS, val) = value.services = val """Set [`BatteryEMS`](@ref) `ext`.""" set_ext!(value::BatteryEMS, val) = value.ext = val -"""Set [`BatteryEMS`](@ref) `time_series_container`.""" -set_time_series_container!(value::BatteryEMS, val) = value.time_series_container = val -"""Set [`BatteryEMS`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::BatteryEMS, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/DCBus.jl b/src/models/generated/DCBus.jl index 929306b442..7b260bdd5e 100644 --- a/src/models/generated/DCBus.jl +++ b/src/models/generated/DCBus.jl @@ -14,7 +14,6 @@ This file is auto-generated. Do not edit. area::Union{Nothing, Area} load_zone::Union{Nothing, LoadZone} ext::Dict{String, Any} - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -29,7 +28,6 @@ A power-system DC bus. - `area::Union{Nothing, Area}`: the area containing the DC bus - `load_zone::Union{Nothing, LoadZone}`: the load zone containing the DC bus - `ext::Dict{String, Any}` -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct DCBus <: Bus @@ -48,18 +46,16 @@ mutable struct DCBus <: Bus "the load zone containing the DC bus" load_zone::Union{Nothing, LoadZone} ext::Dict{String, Any} - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function DCBus(number, name, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - DCBus(number, name, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function DCBus(number, name, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), ) + DCBus(number, name, magnitude, voltage_limits, base_voltage, area, load_zone, ext, InfrastructureSystemsInternal(), ) end -function DCBus(; number, name, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - DCBus(number, name, magnitude, voltage_limits, base_voltage, area, load_zone, ext, supplemental_attributes_container, internal, ) +function DCBus(; number, name, magnitude, voltage_limits, base_voltage, area=nothing, load_zone=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + DCBus(number, name, magnitude, voltage_limits, base_voltage, area, load_zone, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -73,7 +69,6 @@ function DCBus(::Nothing) area=nothing, load_zone=nothing, ext=Dict{String, Any}(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -93,8 +88,6 @@ get_area(value::DCBus) = value.area get_load_zone(value::DCBus) = value.load_zone """Get [`DCBus`](@ref) `ext`.""" get_ext(value::DCBus) = value.ext -"""Get [`DCBus`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::DCBus) = value.supplemental_attributes_container """Get [`DCBus`](@ref) `internal`.""" get_internal(value::DCBus) = value.internal @@ -112,5 +105,3 @@ set_area!(value::DCBus, val) = value.area = val set_load_zone!(value::DCBus, val) = value.load_zone = val """Set [`DCBus`](@ref) `ext`.""" set_ext!(value::DCBus, val) = value.ext = val -"""Set [`DCBus`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::DCBus, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/ExponentialLoad.jl b/src/models/generated/ExponentialLoad.jl index ccddd4e4d2..e432a1dbca 100644 --- a/src/models/generated/ExponentialLoad.jl +++ b/src/models/generated/ExponentialLoad.jl @@ -19,8 +19,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -40,8 +38,6 @@ Data structure for a static exponential load. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct ExponentialLoad <: StaticLoad @@ -63,20 +59,16 @@ mutable struct ExponentialLoad <: StaticLoad "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function ExponentialLoad(; name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function ExponentialLoad(; name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + ExponentialLoad(name, available, bus, active_power, reactive_power, active_power_coefficient, reactive_power_coefficient, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -95,8 +87,6 @@ function ExponentialLoad(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -126,10 +116,6 @@ get_services(value::ExponentialLoad) = value.services get_dynamic_injector(value::ExponentialLoad) = value.dynamic_injector """Get [`ExponentialLoad`](@ref) `ext`.""" get_ext(value::ExponentialLoad) = value.ext -"""Get [`ExponentialLoad`](@ref) `time_series_container`.""" -get_time_series_container(value::ExponentialLoad) = value.time_series_container -"""Get [`ExponentialLoad`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::ExponentialLoad) = value.supplemental_attributes_container """Get [`ExponentialLoad`](@ref) `internal`.""" get_internal(value::ExponentialLoad) = value.internal @@ -155,7 +141,3 @@ set_max_reactive_power!(value::ExponentialLoad, val) = value.max_reactive_power set_services!(value::ExponentialLoad, val) = value.services = val """Set [`ExponentialLoad`](@ref) `ext`.""" set_ext!(value::ExponentialLoad, val) = value.ext = val -"""Set [`ExponentialLoad`](@ref) `time_series_container`.""" -set_time_series_container!(value::ExponentialLoad, val) = value.time_series_container = val -"""Set [`ExponentialLoad`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::ExponentialLoad, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/FixedAdmittance.jl b/src/models/generated/FixedAdmittance.jl index a709b4ebcc..86812f0b5e 100644 --- a/src/models/generated/FixedAdmittance.jl +++ b/src/models/generated/FixedAdmittance.jl @@ -13,8 +13,6 @@ This file is auto-generated. Do not edit. dynamic_injector::Union{Nothing, DynamicInjection} services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -28,8 +26,6 @@ This file is auto-generated. Do not edit. - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection model for admittance - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct FixedAdmittance <: ElectricLoad @@ -43,20 +39,16 @@ mutable struct FixedAdmittance <: ElectricLoad "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function FixedAdmittance(name, available, bus, Y, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - FixedAdmittance(name, available, bus, Y, dynamic_injector, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function FixedAdmittance(name, available, bus, Y, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), ) + FixedAdmittance(name, available, bus, Y, dynamic_injector, services, ext, InfrastructureSystemsInternal(), ) end -function FixedAdmittance(; name, available, bus, Y, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - FixedAdmittance(name, available, bus, Y, dynamic_injector, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function FixedAdmittance(; name, available, bus, Y, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + FixedAdmittance(name, available, bus, Y, dynamic_injector, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -69,8 +61,6 @@ function FixedAdmittance(::Nothing) dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -88,10 +78,6 @@ get_dynamic_injector(value::FixedAdmittance) = value.dynamic_injector get_services(value::FixedAdmittance) = value.services """Get [`FixedAdmittance`](@ref) `ext`.""" get_ext(value::FixedAdmittance) = value.ext -"""Get [`FixedAdmittance`](@ref) `time_series_container`.""" -get_time_series_container(value::FixedAdmittance) = value.time_series_container -"""Get [`FixedAdmittance`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::FixedAdmittance) = value.supplemental_attributes_container """Get [`FixedAdmittance`](@ref) `internal`.""" get_internal(value::FixedAdmittance) = value.internal @@ -105,7 +91,3 @@ set_Y!(value::FixedAdmittance, val) = value.Y = val set_services!(value::FixedAdmittance, val) = value.services = val """Set [`FixedAdmittance`](@ref) `ext`.""" set_ext!(value::FixedAdmittance, val) = value.ext = val -"""Set [`FixedAdmittance`](@ref) `time_series_container`.""" -set_time_series_container!(value::FixedAdmittance, val) = value.time_series_container = val -"""Set [`FixedAdmittance`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::FixedAdmittance, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/GenericBattery.jl b/src/models/generated/GenericBattery.jl index 8dcd1ed304..063d45e5ff 100644 --- a/src/models/generated/GenericBattery.jl +++ b/src/models/generated/GenericBattery.jl @@ -24,8 +24,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -50,8 +48,6 @@ Data structure for a generic battery - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct GenericBattery <: Storage @@ -79,20 +75,16 @@ mutable struct GenericBattery <: Storage "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function GenericBattery(; name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function GenericBattery(; name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost=StorageCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + GenericBattery(name, available, bus, prime_mover_type, initial_energy, state_of_charge_limits, rating, active_power, input_active_power_limits, output_active_power_limits, efficiency, reactive_power, reactive_power_limits, base_power, operation_cost, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -116,8 +108,6 @@ function GenericBattery(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -157,10 +147,6 @@ get_services(value::GenericBattery) = value.services get_dynamic_injector(value::GenericBattery) = value.dynamic_injector """Get [`GenericBattery`](@ref) `ext`.""" get_ext(value::GenericBattery) = value.ext -"""Get [`GenericBattery`](@ref) `time_series_container`.""" -get_time_series_container(value::GenericBattery) = value.time_series_container -"""Get [`GenericBattery`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::GenericBattery) = value.supplemental_attributes_container """Get [`GenericBattery`](@ref) `internal`.""" get_internal(value::GenericBattery) = value.internal @@ -196,7 +182,3 @@ set_operation_cost!(value::GenericBattery, val) = value.operation_cost = val set_services!(value::GenericBattery, val) = value.services = val """Set [`GenericBattery`](@ref) `ext`.""" set_ext!(value::GenericBattery, val) = value.ext = val -"""Set [`GenericBattery`](@ref) `time_series_container`.""" -set_time_series_container!(value::GenericBattery, val) = value.time_series_container = val -"""Set [`GenericBattery`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::GenericBattery, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/HydroDispatch.jl b/src/models/generated/HydroDispatch.jl index 41bb795c75..c081ac81dd 100644 --- a/src/models/generated/HydroDispatch.jl +++ b/src/models/generated/HydroDispatch.jl @@ -22,8 +22,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -46,8 +44,6 @@ This file is auto-generated. Do not edit. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct HydroDispatch <: HydroGen @@ -75,20 +71,16 @@ mutable struct HydroDispatch <: HydroGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function HydroDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function HydroDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -110,8 +102,6 @@ function HydroDispatch(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -147,10 +137,6 @@ get_services(value::HydroDispatch) = value.services get_dynamic_injector(value::HydroDispatch) = value.dynamic_injector """Get [`HydroDispatch`](@ref) `ext`.""" get_ext(value::HydroDispatch) = value.ext -"""Get [`HydroDispatch`](@ref) `time_series_container`.""" -get_time_series_container(value::HydroDispatch) = value.time_series_container -"""Get [`HydroDispatch`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::HydroDispatch) = value.supplemental_attributes_container """Get [`HydroDispatch`](@ref) `internal`.""" get_internal(value::HydroDispatch) = value.internal @@ -182,7 +168,3 @@ set_operation_cost!(value::HydroDispatch, val) = value.operation_cost = val set_services!(value::HydroDispatch, val) = value.services = val """Set [`HydroDispatch`](@ref) `ext`.""" set_ext!(value::HydroDispatch, val) = value.ext = val -"""Set [`HydroDispatch`](@ref) `time_series_container`.""" -set_time_series_container!(value::HydroDispatch, val) = value.time_series_container = val -"""Set [`HydroDispatch`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::HydroDispatch, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/HydroEnergyReservoir.jl b/src/models/generated/HydroEnergyReservoir.jl index 6cf31b8f63..d280fb5869 100644 --- a/src/models/generated/HydroEnergyReservoir.jl +++ b/src/models/generated/HydroEnergyReservoir.jl @@ -28,8 +28,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -58,8 +56,6 @@ This file is auto-generated. Do not edit. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct HydroEnergyReservoir <: HydroGen @@ -98,20 +94,16 @@ mutable struct HydroEnergyReservoir <: HydroGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function HydroEnergyReservoir(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function HydroEnergyReservoir(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -139,8 +131,6 @@ function HydroEnergyReservoir(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -188,10 +178,6 @@ get_services(value::HydroEnergyReservoir) = value.services get_dynamic_injector(value::HydroEnergyReservoir) = value.dynamic_injector """Get [`HydroEnergyReservoir`](@ref) `ext`.""" get_ext(value::HydroEnergyReservoir) = value.ext -"""Get [`HydroEnergyReservoir`](@ref) `time_series_container`.""" -get_time_series_container(value::HydroEnergyReservoir) = value.time_series_container -"""Get [`HydroEnergyReservoir`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::HydroEnergyReservoir) = value.supplemental_attributes_container """Get [`HydroEnergyReservoir`](@ref) `internal`.""" get_internal(value::HydroEnergyReservoir) = value.internal @@ -235,7 +221,3 @@ set_time_at_status!(value::HydroEnergyReservoir, val) = value.time_at_status = v set_services!(value::HydroEnergyReservoir, val) = value.services = val """Set [`HydroEnergyReservoir`](@ref) `ext`.""" set_ext!(value::HydroEnergyReservoir, val) = value.ext = val -"""Set [`HydroEnergyReservoir`](@ref) `time_series_container`.""" -set_time_series_container!(value::HydroEnergyReservoir, val) = value.time_series_container = val -"""Set [`HydroEnergyReservoir`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::HydroEnergyReservoir, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/HydroPumpedStorage.jl b/src/models/generated/HydroPumpedStorage.jl index 8c3fcb6fed..dc7a7dac3b 100644 --- a/src/models/generated/HydroPumpedStorage.jl +++ b/src/models/generated/HydroPumpedStorage.jl @@ -35,8 +35,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -72,8 +70,6 @@ This file is auto-generated. Do not edit. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct HydroPumpedStorage <: HydroGen @@ -124,20 +120,16 @@ mutable struct HydroPumpedStorage <: HydroGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function HydroPumpedStorage(; name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function HydroPumpedStorage(; name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -172,8 +164,6 @@ function HydroPumpedStorage(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -235,10 +225,6 @@ get_services(value::HydroPumpedStorage) = value.services get_dynamic_injector(value::HydroPumpedStorage) = value.dynamic_injector """Get [`HydroPumpedStorage`](@ref) `ext`.""" get_ext(value::HydroPumpedStorage) = value.ext -"""Get [`HydroPumpedStorage`](@ref) `time_series_container`.""" -get_time_series_container(value::HydroPumpedStorage) = value.time_series_container -"""Get [`HydroPumpedStorage`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::HydroPumpedStorage) = value.supplemental_attributes_container """Get [`HydroPumpedStorage`](@ref) `internal`.""" get_internal(value::HydroPumpedStorage) = value.internal @@ -296,7 +282,3 @@ set_time_at_status!(value::HydroPumpedStorage, val) = value.time_at_status = val set_services!(value::HydroPumpedStorage, val) = value.services = val """Set [`HydroPumpedStorage`](@ref) `ext`.""" set_ext!(value::HydroPumpedStorage, val) = value.ext = val -"""Set [`HydroPumpedStorage`](@ref) `time_series_container`.""" -set_time_series_container!(value::HydroPumpedStorage, val) = value.time_series_container = val -"""Set [`HydroPumpedStorage`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::HydroPumpedStorage, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/InterconnectingConverter.jl b/src/models/generated/InterconnectingConverter.jl index 446c7511b8..9fa62960be 100644 --- a/src/models/generated/InterconnectingConverter.jl +++ b/src/models/generated/InterconnectingConverter.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ Interconnecting Power Converter (IPC) for transforming power from an ACBus to a - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct InterconnectingConverter <: StaticInjection @@ -61,20 +57,16 @@ mutable struct InterconnectingConverter <: StaticInjection "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, efficiency, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -92,8 +84,6 @@ function InterconnectingConverter(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -121,10 +111,6 @@ get_services(value::InterconnectingConverter) = value.services get_dynamic_injector(value::InterconnectingConverter) = value.dynamic_injector """Get [`InterconnectingConverter`](@ref) `ext`.""" get_ext(value::InterconnectingConverter) = value.ext -"""Get [`InterconnectingConverter`](@ref) `time_series_container`.""" -get_time_series_container(value::InterconnectingConverter) = value.time_series_container -"""Get [`InterconnectingConverter`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::InterconnectingConverter) = value.supplemental_attributes_container """Get [`InterconnectingConverter`](@ref) `internal`.""" get_internal(value::InterconnectingConverter) = value.internal @@ -148,7 +134,3 @@ set_efficiency!(value::InterconnectingConverter, val) = value.efficiency = val set_services!(value::InterconnectingConverter, val) = value.services = val """Set [`InterconnectingConverter`](@ref) `ext`.""" set_ext!(value::InterconnectingConverter, val) = value.ext = val -"""Set [`InterconnectingConverter`](@ref) `time_series_container`.""" -set_time_series_container!(value::InterconnectingConverter, val) = value.time_series_container = val -"""Set [`InterconnectingConverter`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::InterconnectingConverter, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/InterruptiblePowerLoad.jl b/src/models/generated/InterruptiblePowerLoad.jl index f543b4f834..008719960c 100644 --- a/src/models/generated/InterruptiblePowerLoad.jl +++ b/src/models/generated/InterruptiblePowerLoad.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ This file is auto-generated. Do not edit. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct InterruptiblePowerLoad <: ControllableLoad @@ -59,20 +55,16 @@ mutable struct InterruptiblePowerLoad <: ControllableLoad "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function InterruptiblePowerLoad(; name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function InterruptiblePowerLoad(; name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + InterruptiblePowerLoad(name, available, bus, active_power, reactive_power, max_active_power, max_reactive_power, base_power, operation_cost, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -90,8 +82,6 @@ function InterruptiblePowerLoad(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -119,10 +109,6 @@ get_services(value::InterruptiblePowerLoad) = value.services get_dynamic_injector(value::InterruptiblePowerLoad) = value.dynamic_injector """Get [`InterruptiblePowerLoad`](@ref) `ext`.""" get_ext(value::InterruptiblePowerLoad) = value.ext -"""Get [`InterruptiblePowerLoad`](@ref) `time_series_container`.""" -get_time_series_container(value::InterruptiblePowerLoad) = value.time_series_container -"""Get [`InterruptiblePowerLoad`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::InterruptiblePowerLoad) = value.supplemental_attributes_container """Get [`InterruptiblePowerLoad`](@ref) `internal`.""" get_internal(value::InterruptiblePowerLoad) = value.internal @@ -146,7 +132,3 @@ set_operation_cost!(value::InterruptiblePowerLoad, val) = value.operation_cost = set_services!(value::InterruptiblePowerLoad, val) = value.services = val """Set [`InterruptiblePowerLoad`](@ref) `ext`.""" set_ext!(value::InterruptiblePowerLoad, val) = value.ext = val -"""Set [`InterruptiblePowerLoad`](@ref) `time_series_container`.""" -set_time_series_container!(value::InterruptiblePowerLoad, val) = value.time_series_container = val -"""Set [`InterruptiblePowerLoad`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::InterruptiblePowerLoad, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/Line.jl b/src/models/generated/Line.jl index 30f00db137..204d21c630 100644 --- a/src/models/generated/Line.jl +++ b/src/models/generated/Line.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. angle_limits::MinMax services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ This file is auto-generated. Do not edit. - `angle_limits::MinMax`, validation range: `(-1.571, 1.571)`, action if invalid: `error` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct Line <: ACBranch @@ -59,20 +55,16 @@ mutable struct Line <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), ) + Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services, ext, InfrastructureSystemsInternal(), ) end -function Line(; name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function Line(; name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + Line(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, rate, angle_limits, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -90,8 +82,6 @@ function Line(::Nothing) angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -119,10 +109,6 @@ get_angle_limits(value::Line) = value.angle_limits get_services(value::Line) = value.services """Get [`Line`](@ref) `ext`.""" get_ext(value::Line) = value.ext -"""Get [`Line`](@ref) `time_series_container`.""" -get_time_series_container(value::Line) = value.time_series_container -"""Get [`Line`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::Line) = value.supplemental_attributes_container """Get [`Line`](@ref) `internal`.""" get_internal(value::Line) = value.internal @@ -148,7 +134,3 @@ set_angle_limits!(value::Line, val) = value.angle_limits = val set_services!(value::Line, val) = value.services = val """Set [`Line`](@ref) `ext`.""" set_ext!(value::Line, val) = value.ext = val -"""Set [`Line`](@ref) `time_series_container`.""" -set_time_series_container!(value::Line, val) = value.time_series_container = val -"""Set [`Line`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::Line, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/LoadZone.jl b/src/models/generated/LoadZone.jl index 6dbc24f358..88d12cb757 100644 --- a/src/models/generated/LoadZone.jl +++ b/src/models/generated/LoadZone.jl @@ -9,8 +9,6 @@ This file is auto-generated. Do not edit. name::String peak_active_power::Float64 peak_reactive_power::Float64 - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -20,28 +18,22 @@ A collection of buses for electricity price analysis. - `name::String` - `peak_active_power::Float64` - `peak_reactive_power::Float64` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct LoadZone <: AggregationTopology name::String peak_active_power::Float64 peak_reactive_power::Float64 - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function LoadZone(name, peak_active_power, peak_reactive_power, time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - LoadZone(name, peak_active_power, peak_reactive_power, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function LoadZone(name, peak_active_power, peak_reactive_power, ) + LoadZone(name, peak_active_power, peak_reactive_power, InfrastructureSystemsInternal(), ) end -function LoadZone(; name, peak_active_power, peak_reactive_power, time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - LoadZone(name, peak_active_power, peak_reactive_power, time_series_container, supplemental_attributes_container, internal, ) +function LoadZone(; name, peak_active_power, peak_reactive_power, internal=InfrastructureSystemsInternal(), ) + LoadZone(name, peak_active_power, peak_reactive_power, internal, ) end # Constructor for demo purposes; non-functional. @@ -50,8 +42,6 @@ function LoadZone(::Nothing) name="init", peak_active_power=0.0, peak_reactive_power=0.0, - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -61,10 +51,6 @@ get_name(value::LoadZone) = value.name get_peak_active_power(value::LoadZone) = get_value(value, value.peak_active_power) """Get [`LoadZone`](@ref) `peak_reactive_power`.""" get_peak_reactive_power(value::LoadZone) = get_value(value, value.peak_reactive_power) -"""Get [`LoadZone`](@ref) `time_series_container`.""" -get_time_series_container(value::LoadZone) = value.time_series_container -"""Get [`LoadZone`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::LoadZone) = value.supplemental_attributes_container """Get [`LoadZone`](@ref) `internal`.""" get_internal(value::LoadZone) = value.internal @@ -72,7 +58,3 @@ get_internal(value::LoadZone) = value.internal set_peak_active_power!(value::LoadZone, val) = value.peak_active_power = set_value(value, val) """Set [`LoadZone`](@ref) `peak_reactive_power`.""" set_peak_reactive_power!(value::LoadZone, val) = value.peak_reactive_power = set_value(value, val) -"""Set [`LoadZone`](@ref) `time_series_container`.""" -set_time_series_container!(value::LoadZone, val) = value.time_series_container = val -"""Set [`LoadZone`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::LoadZone, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/MonitoredLine.jl b/src/models/generated/MonitoredLine.jl index 9fdd181f32..ba7e0cd188 100644 --- a/src/models/generated/MonitoredLine.jl +++ b/src/models/generated/MonitoredLine.jl @@ -19,8 +19,6 @@ This file is auto-generated. Do not edit. angle_limits::MinMax services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -40,8 +38,6 @@ This file is auto-generated. Do not edit. - `angle_limits::MinMax`, validation range: `(-1.571, 1.571)`, action if invalid: `error` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct MonitoredLine <: ACBranch @@ -64,20 +60,16 @@ mutable struct MonitoredLine <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), ) + MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services, ext, InfrastructureSystemsInternal(), ) end -function MonitoredLine(; name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function MonitoredLine(; name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + MonitoredLine(name, available, active_power_flow, reactive_power_flow, arc, r, x, b, flow_limits, rate, angle_limits, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -96,8 +88,6 @@ function MonitoredLine(::Nothing) angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -127,10 +117,6 @@ get_angle_limits(value::MonitoredLine) = value.angle_limits get_services(value::MonitoredLine) = value.services """Get [`MonitoredLine`](@ref) `ext`.""" get_ext(value::MonitoredLine) = value.ext -"""Get [`MonitoredLine`](@ref) `time_series_container`.""" -get_time_series_container(value::MonitoredLine) = value.time_series_container -"""Get [`MonitoredLine`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::MonitoredLine) = value.supplemental_attributes_container """Get [`MonitoredLine`](@ref) `internal`.""" get_internal(value::MonitoredLine) = value.internal @@ -158,7 +144,3 @@ set_angle_limits!(value::MonitoredLine, val) = value.angle_limits = val set_services!(value::MonitoredLine, val) = value.services = val """Set [`MonitoredLine`](@ref) `ext`.""" set_ext!(value::MonitoredLine, val) = value.ext = val -"""Set [`MonitoredLine`](@ref) `time_series_container`.""" -set_time_series_container!(value::MonitoredLine, val) = value.time_series_container = val -"""Set [`MonitoredLine`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::MonitoredLine, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/PhaseShiftingTransformer.jl b/src/models/generated/PhaseShiftingTransformer.jl index 23ac764a45..f9a650b984 100644 --- a/src/models/generated/PhaseShiftingTransformer.jl +++ b/src/models/generated/PhaseShiftingTransformer.jl @@ -20,8 +20,6 @@ This file is auto-generated. Do not edit. phase_angle_limits::MinMax services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -42,8 +40,6 @@ This file is auto-generated. Do not edit. - `phase_angle_limits::MinMax`, validation range: `(-1.571, 1.571)`, action if invalid: `error` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct PhaseShiftingTransformer <: ACBranch @@ -64,20 +60,16 @@ mutable struct PhaseShiftingTransformer <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), ) + PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits, services, ext, InfrastructureSystemsInternal(), ) end -function PhaseShiftingTransformer(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function PhaseShiftingTransformer(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + PhaseShiftingTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, α, rate, phase_angle_limits, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -97,8 +89,6 @@ function PhaseShiftingTransformer(::Nothing) phase_angle_limits=(min=-1.571, max=1.571), services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -130,10 +120,6 @@ get_phase_angle_limits(value::PhaseShiftingTransformer) = value.phase_angle_limi get_services(value::PhaseShiftingTransformer) = value.services """Get [`PhaseShiftingTransformer`](@ref) `ext`.""" get_ext(value::PhaseShiftingTransformer) = value.ext -"""Get [`PhaseShiftingTransformer`](@ref) `time_series_container`.""" -get_time_series_container(value::PhaseShiftingTransformer) = value.time_series_container -"""Get [`PhaseShiftingTransformer`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::PhaseShiftingTransformer) = value.supplemental_attributes_container """Get [`PhaseShiftingTransformer`](@ref) `internal`.""" get_internal(value::PhaseShiftingTransformer) = value.internal @@ -163,7 +149,3 @@ set_phase_angle_limits!(value::PhaseShiftingTransformer, val) = value.phase_angl set_services!(value::PhaseShiftingTransformer, val) = value.services = val """Set [`PhaseShiftingTransformer`](@ref) `ext`.""" set_ext!(value::PhaseShiftingTransformer, val) = value.ext = val -"""Set [`PhaseShiftingTransformer`](@ref) `time_series_container`.""" -set_time_series_container!(value::PhaseShiftingTransformer, val) = value.time_series_container = val -"""Set [`PhaseShiftingTransformer`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::PhaseShiftingTransformer, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/PowerLoad.jl b/src/models/generated/PowerLoad.jl index 7a202e270a..c8a303bb16 100644 --- a/src/models/generated/PowerLoad.jl +++ b/src/models/generated/PowerLoad.jl @@ -17,8 +17,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -36,8 +34,6 @@ Data structure for a static power load. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct PowerLoad <: StaticLoad @@ -55,20 +51,16 @@ mutable struct PowerLoad <: StaticLoad "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function PowerLoad(; name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function PowerLoad(; name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + PowerLoad(name, available, bus, active_power, reactive_power, base_power, max_active_power, max_reactive_power, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -85,8 +77,6 @@ function PowerLoad(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -112,10 +102,6 @@ get_services(value::PowerLoad) = value.services get_dynamic_injector(value::PowerLoad) = value.dynamic_injector """Get [`PowerLoad`](@ref) `ext`.""" get_ext(value::PowerLoad) = value.ext -"""Get [`PowerLoad`](@ref) `time_series_container`.""" -get_time_series_container(value::PowerLoad) = value.time_series_container -"""Get [`PowerLoad`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::PowerLoad) = value.supplemental_attributes_container """Get [`PowerLoad`](@ref) `internal`.""" get_internal(value::PowerLoad) = value.internal @@ -137,7 +123,3 @@ set_max_reactive_power!(value::PowerLoad, val) = value.max_reactive_power = set_ set_services!(value::PowerLoad, val) = value.services = val """Set [`PowerLoad`](@ref) `ext`.""" set_ext!(value::PowerLoad, val) = value.ext = val -"""Set [`PowerLoad`](@ref) `time_series_container`.""" -set_time_series_container!(value::PowerLoad, val) = value.time_series_container = val -"""Set [`PowerLoad`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::PowerLoad, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/RenewableDispatch.jl b/src/models/generated/RenewableDispatch.jl index cb4e19a069..05fd004668 100644 --- a/src/models/generated/RenewableDispatch.jl +++ b/src/models/generated/RenewableDispatch.jl @@ -20,8 +20,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -42,8 +40,6 @@ This file is auto-generated. Do not edit. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct RenewableDispatch <: RenewableGen @@ -67,20 +63,16 @@ mutable struct RenewableDispatch <: RenewableGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function RenewableDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function RenewableDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + RenewableDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, reactive_power_limits, power_factor, operation_cost, base_power, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -100,8 +92,6 @@ function RenewableDispatch(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -133,10 +123,6 @@ get_services(value::RenewableDispatch) = value.services get_dynamic_injector(value::RenewableDispatch) = value.dynamic_injector """Get [`RenewableDispatch`](@ref) `ext`.""" get_ext(value::RenewableDispatch) = value.ext -"""Get [`RenewableDispatch`](@ref) `time_series_container`.""" -get_time_series_container(value::RenewableDispatch) = value.time_series_container -"""Get [`RenewableDispatch`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::RenewableDispatch) = value.supplemental_attributes_container """Get [`RenewableDispatch`](@ref) `internal`.""" get_internal(value::RenewableDispatch) = value.internal @@ -164,7 +150,3 @@ set_base_power!(value::RenewableDispatch, val) = value.base_power = val set_services!(value::RenewableDispatch, val) = value.services = val """Set [`RenewableDispatch`](@ref) `ext`.""" set_ext!(value::RenewableDispatch, val) = value.ext = val -"""Set [`RenewableDispatch`](@ref) `time_series_container`.""" -set_time_series_container!(value::RenewableDispatch, val) = value.time_series_container = val -"""Set [`RenewableDispatch`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::RenewableDispatch, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/RenewableFix.jl b/src/models/generated/RenewableFix.jl index 8a2bf8c0ad..aa7c77d12c 100644 --- a/src/models/generated/RenewableFix.jl +++ b/src/models/generated/RenewableFix.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ Data Structure for fixed renewable generation technologies. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct RenewableFix <: RenewableGen @@ -60,20 +56,16 @@ mutable struct RenewableFix <: RenewableGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function RenewableFix(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function RenewableFix(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + RenewableFix(name, available, bus, active_power, reactive_power, rating, prime_mover_type, power_factor, base_power, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -91,8 +83,6 @@ function RenewableFix(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -120,10 +110,6 @@ get_services(value::RenewableFix) = value.services get_dynamic_injector(value::RenewableFix) = value.dynamic_injector """Get [`RenewableFix`](@ref) `ext`.""" get_ext(value::RenewableFix) = value.ext -"""Get [`RenewableFix`](@ref) `time_series_container`.""" -get_time_series_container(value::RenewableFix) = value.time_series_container -"""Get [`RenewableFix`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::RenewableFix) = value.supplemental_attributes_container """Get [`RenewableFix`](@ref) `internal`.""" get_internal(value::RenewableFix) = value.internal @@ -147,7 +133,3 @@ set_base_power!(value::RenewableFix, val) = value.base_power = val set_services!(value::RenewableFix, val) = value.services = val """Set [`RenewableFix`](@ref) `ext`.""" set_ext!(value::RenewableFix, val) = value.ext = val -"""Set [`RenewableFix`](@ref) `time_series_container`.""" -set_time_series_container!(value::RenewableFix, val) = value.time_series_container = val -"""Set [`RenewableFix`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::RenewableFix, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/ReserveDemandCurve.jl b/src/models/generated/ReserveDemandCurve.jl index 720c8f599b..9596cbee4c 100644 --- a/src/models/generated/ReserveDemandCurve.jl +++ b/src/models/generated/ReserveDemandCurve.jl @@ -14,8 +14,6 @@ This file is auto-generated. Do not edit. max_participation_factor::Float64 deployed_fraction::Float64 ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -30,8 +28,6 @@ Data Structure for a operating reserve with demand curve product for system simu - `max_participation_factor::Float64`: the maximum limit of reserve contribution per device, validation range: `(0, 1)`, action if invalid: `error` - `deployed_fraction::Float64`: Fraction of ancillary services participation deployed from the assignment, validation range: `(0, 1)`, action if invalid: `error` - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct ReserveDemandCurve{T <: ReserveDirection} <: Reserve{T} @@ -48,20 +44,16 @@ mutable struct ReserveDemandCurve{T <: ReserveDirection} <: Reserve{T} "Fraction of ancillary services participation deployed from the assignment" deployed_fraction::Float64 ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time=3600.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) where T <: ReserveDirection - ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time=3600.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), ) where T <: ReserveDirection + ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time, max_participation_factor, deployed_fraction, ext, InfrastructureSystemsInternal(), ) end -function ReserveDemandCurve{T}(; variable, name, available, time_frame, sustained_time=3600.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) where T <: ReserveDirection - ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, internal, ) +function ReserveDemandCurve{T}(; variable, name, available, time_frame, sustained_time=3600.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) where T <: ReserveDirection + ReserveDemandCurve{T}(variable, name, available, time_frame, sustained_time, max_participation_factor, deployed_fraction, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -75,8 +67,6 @@ function ReserveDemandCurve{T}(::Nothing) where T <: ReserveDirection max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -96,10 +86,6 @@ get_max_participation_factor(value::ReserveDemandCurve) = value.max_participatio get_deployed_fraction(value::ReserveDemandCurve) = value.deployed_fraction """Get [`ReserveDemandCurve`](@ref) `ext`.""" get_ext(value::ReserveDemandCurve) = value.ext -"""Get [`ReserveDemandCurve`](@ref) `time_series_container`.""" -get_time_series_container(value::ReserveDemandCurve) = value.time_series_container -"""Get [`ReserveDemandCurve`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::ReserveDemandCurve) = value.supplemental_attributes_container """Get [`ReserveDemandCurve`](@ref) `internal`.""" get_internal(value::ReserveDemandCurve) = value.internal @@ -117,7 +103,3 @@ set_max_participation_factor!(value::ReserveDemandCurve, val) = value.max_partic set_deployed_fraction!(value::ReserveDemandCurve, val) = value.deployed_fraction = val """Set [`ReserveDemandCurve`](@ref) `ext`.""" set_ext!(value::ReserveDemandCurve, val) = value.ext = val -"""Set [`ReserveDemandCurve`](@ref) `time_series_container`.""" -set_time_series_container!(value::ReserveDemandCurve, val) = value.time_series_container = val -"""Set [`ReserveDemandCurve`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::ReserveDemandCurve, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/StandardLoad.jl b/src/models/generated/StandardLoad.jl index 4e7558b0f7..b366d3655f 100644 --- a/src/models/generated/StandardLoad.jl +++ b/src/models/generated/StandardLoad.jl @@ -25,8 +25,6 @@ This file is auto-generated. Do not edit. services::Vector{Service} dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -52,8 +50,6 @@ Data structure for a standard load. - `services::Vector{Service}`: Services that this device contributes to - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct StandardLoad <: StaticLoad @@ -79,20 +75,16 @@ mutable struct StandardLoad <: StaticLoad "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function StandardLoad(name, available, bus, base_power, constant_active_power=0.0, constant_reactive_power=0.0, impedance_active_power=0.0, impedance_reactive_power=0.0, current_active_power=0.0, current_reactive_power=0.0, max_constant_active_power=0.0, max_constant_reactive_power=0.0, max_impedance_active_power=0.0, max_impedance_reactive_power=0.0, max_current_active_power=0.0, max_current_reactive_power=0.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - StandardLoad(name, available, bus, base_power, constant_active_power, constant_reactive_power, impedance_active_power, impedance_reactive_power, current_active_power, current_reactive_power, max_constant_active_power, max_constant_reactive_power, max_impedance_active_power, max_impedance_reactive_power, max_current_active_power, max_current_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function StandardLoad(name, available, bus, base_power, constant_active_power=0.0, constant_reactive_power=0.0, impedance_active_power=0.0, impedance_reactive_power=0.0, current_active_power=0.0, current_reactive_power=0.0, max_constant_active_power=0.0, max_constant_reactive_power=0.0, max_impedance_active_power=0.0, max_impedance_reactive_power=0.0, max_current_active_power=0.0, max_current_reactive_power=0.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), ) + StandardLoad(name, available, bus, base_power, constant_active_power, constant_reactive_power, impedance_active_power, impedance_reactive_power, current_active_power, current_reactive_power, max_constant_active_power, max_constant_reactive_power, max_impedance_active_power, max_impedance_reactive_power, max_current_active_power, max_current_reactive_power, services, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function StandardLoad(; name, available, bus, base_power, constant_active_power=0.0, constant_reactive_power=0.0, impedance_active_power=0.0, impedance_reactive_power=0.0, current_active_power=0.0, current_reactive_power=0.0, max_constant_active_power=0.0, max_constant_reactive_power=0.0, max_impedance_active_power=0.0, max_impedance_reactive_power=0.0, max_current_active_power=0.0, max_current_reactive_power=0.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - StandardLoad(name, available, bus, base_power, constant_active_power, constant_reactive_power, impedance_active_power, impedance_reactive_power, current_active_power, current_reactive_power, max_constant_active_power, max_constant_reactive_power, max_impedance_active_power, max_impedance_reactive_power, max_current_active_power, max_current_reactive_power, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function StandardLoad(; name, available, bus, base_power, constant_active_power=0.0, constant_reactive_power=0.0, impedance_active_power=0.0, impedance_reactive_power=0.0, current_active_power=0.0, current_reactive_power=0.0, max_constant_active_power=0.0, max_constant_reactive_power=0.0, max_impedance_active_power=0.0, max_impedance_reactive_power=0.0, max_current_active_power=0.0, max_current_reactive_power=0.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + StandardLoad(name, available, bus, base_power, constant_active_power, constant_reactive_power, impedance_active_power, impedance_reactive_power, current_active_power, current_reactive_power, max_constant_active_power, max_constant_reactive_power, max_impedance_active_power, max_impedance_reactive_power, max_current_active_power, max_current_reactive_power, services, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -117,8 +109,6 @@ function StandardLoad(::Nothing) services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -160,10 +150,6 @@ get_services(value::StandardLoad) = value.services get_dynamic_injector(value::StandardLoad) = value.dynamic_injector """Get [`StandardLoad`](@ref) `ext`.""" get_ext(value::StandardLoad) = value.ext -"""Get [`StandardLoad`](@ref) `time_series_container`.""" -get_time_series_container(value::StandardLoad) = value.time_series_container -"""Get [`StandardLoad`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::StandardLoad) = value.supplemental_attributes_container """Get [`StandardLoad`](@ref) `internal`.""" get_internal(value::StandardLoad) = value.internal @@ -201,7 +187,3 @@ set_max_current_reactive_power!(value::StandardLoad, val) = value.max_current_re set_services!(value::StandardLoad, val) = value.services = val """Set [`StandardLoad`](@ref) `ext`.""" set_ext!(value::StandardLoad, val) = value.ext = val -"""Set [`StandardLoad`](@ref) `time_series_container`.""" -set_time_series_container!(value::StandardLoad, val) = value.time_series_container = val -"""Set [`StandardLoad`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::StandardLoad, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/SwitchedAdmittance.jl b/src/models/generated/SwitchedAdmittance.jl index 20e039856d..f8aff96b93 100644 --- a/src/models/generated/SwitchedAdmittance.jl +++ b/src/models/generated/SwitchedAdmittance.jl @@ -15,8 +15,6 @@ This file is auto-generated. Do not edit. dynamic_injector::Union{Nothing, DynamicInjection} services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -32,8 +30,6 @@ This file is auto-generated. Do not edit. - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection model for admittance - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct SwitchedAdmittance <: ElectricLoad @@ -51,20 +47,16 @@ mutable struct SwitchedAdmittance <: ElectricLoad "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function SwitchedAdmittance(name, available, bus, Y, number_of_steps=0, Y_increase=0, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - SwitchedAdmittance(name, available, bus, Y, number_of_steps, Y_increase, dynamic_injector, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function SwitchedAdmittance(name, available, bus, Y, number_of_steps=0, Y_increase=0, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), ) + SwitchedAdmittance(name, available, bus, Y, number_of_steps, Y_increase, dynamic_injector, services, ext, InfrastructureSystemsInternal(), ) end -function SwitchedAdmittance(; name, available, bus, Y, number_of_steps=0, Y_increase=0, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - SwitchedAdmittance(name, available, bus, Y, number_of_steps, Y_increase, dynamic_injector, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function SwitchedAdmittance(; name, available, bus, Y, number_of_steps=0, Y_increase=0, dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + SwitchedAdmittance(name, available, bus, Y, number_of_steps, Y_increase, dynamic_injector, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -79,8 +71,6 @@ function SwitchedAdmittance(::Nothing) dynamic_injector=nothing, services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -102,10 +92,6 @@ get_dynamic_injector(value::SwitchedAdmittance) = value.dynamic_injector get_services(value::SwitchedAdmittance) = value.services """Get [`SwitchedAdmittance`](@ref) `ext`.""" get_ext(value::SwitchedAdmittance) = value.ext -"""Get [`SwitchedAdmittance`](@ref) `time_series_container`.""" -get_time_series_container(value::SwitchedAdmittance) = value.time_series_container -"""Get [`SwitchedAdmittance`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::SwitchedAdmittance) = value.supplemental_attributes_container """Get [`SwitchedAdmittance`](@ref) `internal`.""" get_internal(value::SwitchedAdmittance) = value.internal @@ -123,7 +109,3 @@ set_Y_increase!(value::SwitchedAdmittance, val) = value.Y_increase = val set_services!(value::SwitchedAdmittance, val) = value.services = val """Set [`SwitchedAdmittance`](@ref) `ext`.""" set_ext!(value::SwitchedAdmittance, val) = value.ext = val -"""Set [`SwitchedAdmittance`](@ref) `time_series_container`.""" -set_time_series_container!(value::SwitchedAdmittance, val) = value.time_series_container = val -"""Set [`SwitchedAdmittance`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::SwitchedAdmittance, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/TapTransformer.jl b/src/models/generated/TapTransformer.jl index 4fcbf5e573..a7309ca0f2 100644 --- a/src/models/generated/TapTransformer.jl +++ b/src/models/generated/TapTransformer.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. rate::Union{Nothing, Float64} services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ This file is auto-generated. Do not edit. - `rate::Union{Nothing, Float64}`, validation range: `(0, nothing)`, action if invalid: `error` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct TapTransformer <: ACBranch @@ -59,20 +55,16 @@ mutable struct TapTransformer <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services=Device[], ext=Dict{String, Any}(), ) + TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services, ext, InfrastructureSystemsInternal(), ) end -function TapTransformer(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function TapTransformer(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + TapTransformer(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, tap, rate, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -90,8 +82,6 @@ function TapTransformer(::Nothing) rate=0.0, services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -119,10 +109,6 @@ get_rate(value::TapTransformer) = get_value(value, value.rate) get_services(value::TapTransformer) = value.services """Get [`TapTransformer`](@ref) `ext`.""" get_ext(value::TapTransformer) = value.ext -"""Get [`TapTransformer`](@ref) `time_series_container`.""" -get_time_series_container(value::TapTransformer) = value.time_series_container -"""Get [`TapTransformer`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::TapTransformer) = value.supplemental_attributes_container """Get [`TapTransformer`](@ref) `internal`.""" get_internal(value::TapTransformer) = value.internal @@ -148,7 +134,3 @@ set_rate!(value::TapTransformer, val) = value.rate = set_value(value, val) set_services!(value::TapTransformer, val) = value.services = val """Set [`TapTransformer`](@ref) `ext`.""" set_ext!(value::TapTransformer, val) = value.ext = val -"""Set [`TapTransformer`](@ref) `time_series_container`.""" -set_time_series_container!(value::TapTransformer, val) = value.time_series_container = val -"""Set [`TapTransformer`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::TapTransformer, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/ThermalMultiStart.jl b/src/models/generated/ThermalMultiStart.jl index 0a9b94e47d..3c44482209 100644 --- a/src/models/generated/ThermalMultiStart.jl +++ b/src/models/generated/ThermalMultiStart.jl @@ -29,8 +29,6 @@ This file is auto-generated. Do not edit. must_run::Bool dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -60,8 +58,6 @@ Data Structure for thermal generation technologies. - `must_run::Bool` - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct ThermalMultiStart <: ThermalGen @@ -98,20 +94,16 @@ mutable struct ThermalMultiStart <: ThermalGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services=Device[], time_at_status=INFINITE_TIME, must_run=false, dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services, time_at_status, must_run, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services=Device[], time_at_status=INFINITE_TIME, must_run=false, dynamic_injector=nothing, ext=Dict{String, Any}(), ) + ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services, time_at_status, must_run, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function ThermalMultiStart(; name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services=Device[], time_at_status=INFINITE_TIME, must_run=false, dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services, time_at_status, must_run, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function ThermalMultiStart(; name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services=Device[], time_at_status=INFINITE_TIME, must_run=false, dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + ThermalMultiStart(name, available, status, bus, active_power, reactive_power, rating, prime_mover_type, fuel, active_power_limits, reactive_power_limits, ramp_limits, power_trajectory, time_limits, start_time_limits, start_types, operation_cost, base_power, services, time_at_status, must_run, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -140,8 +132,6 @@ function ThermalMultiStart(::Nothing) must_run=false, dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -191,10 +181,6 @@ get_must_run(value::ThermalMultiStart) = value.must_run get_dynamic_injector(value::ThermalMultiStart) = value.dynamic_injector """Get [`ThermalMultiStart`](@ref) `ext`.""" get_ext(value::ThermalMultiStart) = value.ext -"""Get [`ThermalMultiStart`](@ref) `time_series_container`.""" -get_time_series_container(value::ThermalMultiStart) = value.time_series_container -"""Get [`ThermalMultiStart`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::ThermalMultiStart) = value.supplemental_attributes_container """Get [`ThermalMultiStart`](@ref) `internal`.""" get_internal(value::ThermalMultiStart) = value.internal @@ -240,7 +226,3 @@ set_time_at_status!(value::ThermalMultiStart, val) = value.time_at_status = val set_must_run!(value::ThermalMultiStart, val) = value.must_run = val """Set [`ThermalMultiStart`](@ref) `ext`.""" set_ext!(value::ThermalMultiStart, val) = value.ext = val -"""Set [`ThermalMultiStart`](@ref) `time_series_container`.""" -set_time_series_container!(value::ThermalMultiStart, val) = value.time_series_container = val -"""Set [`ThermalMultiStart`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::ThermalMultiStart, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/ThermalStandard.jl b/src/models/generated/ThermalStandard.jl index 567e897dd2..a6e4d5a332 100644 --- a/src/models/generated/ThermalStandard.jl +++ b/src/models/generated/ThermalStandard.jl @@ -26,8 +26,6 @@ This file is auto-generated. Do not edit. time_at_status::Float64 dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -54,8 +52,6 @@ Data Structure for thermal generation technologies. - `time_at_status::Float64` - `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct ThermalStandard <: ThermalGen @@ -87,20 +83,16 @@ mutable struct ThermalStandard <: ThermalGen "corresponding dynamic injection device" dynamic_injector::Union{Nothing, DynamicInjection} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits=nothing, must_run=false, prime_mover_type=PrimeMovers.OT, fuel=ThermalFuels.OTHER, services=Device[], time_at_status=INFINITE_TIME, dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits, must_run, prime_mover_type, fuel, services, time_at_status, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits=nothing, must_run=false, prime_mover_type=PrimeMovers.OT, fuel=ThermalFuels.OTHER, services=Device[], time_at_status=INFINITE_TIME, dynamic_injector=nothing, ext=Dict{String, Any}(), ) + ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits, must_run, prime_mover_type, fuel, services, time_at_status, dynamic_injector, ext, InfrastructureSystemsInternal(), ) end -function ThermalStandard(; name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits=nothing, must_run=false, prime_mover_type=PrimeMovers.OT, fuel=ThermalFuels.OTHER, services=Device[], time_at_status=INFINITE_TIME, dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits, must_run, prime_mover_type, fuel, services, time_at_status, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, ) +function ThermalStandard(; name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits=nothing, must_run=false, prime_mover_type=PrimeMovers.OT, fuel=ThermalFuels.OTHER, services=Device[], time_at_status=INFINITE_TIME, dynamic_injector=nothing, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + ThermalStandard(name, available, status, bus, active_power, reactive_power, rating, active_power_limits, reactive_power_limits, ramp_limits, operation_cost, base_power, time_limits, must_run, prime_mover_type, fuel, services, time_at_status, dynamic_injector, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -126,8 +118,6 @@ function ThermalStandard(::Nothing) time_at_status=INFINITE_TIME, dynamic_injector=nothing, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -171,10 +161,6 @@ get_time_at_status(value::ThermalStandard) = value.time_at_status get_dynamic_injector(value::ThermalStandard) = value.dynamic_injector """Get [`ThermalStandard`](@ref) `ext`.""" get_ext(value::ThermalStandard) = value.ext -"""Get [`ThermalStandard`](@ref) `time_series_container`.""" -get_time_series_container(value::ThermalStandard) = value.time_series_container -"""Get [`ThermalStandard`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::ThermalStandard) = value.supplemental_attributes_container """Get [`ThermalStandard`](@ref) `internal`.""" get_internal(value::ThermalStandard) = value.internal @@ -214,7 +200,3 @@ set_services!(value::ThermalStandard, val) = value.services = val set_time_at_status!(value::ThermalStandard, val) = value.time_at_status = val """Set [`ThermalStandard`](@ref) `ext`.""" set_ext!(value::ThermalStandard, val) = value.ext = val -"""Set [`ThermalStandard`](@ref) `time_series_container`.""" -set_time_series_container!(value::ThermalStandard, val) = value.time_series_container = val -"""Set [`ThermalStandard`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::ThermalStandard, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/Transfer.jl b/src/models/generated/Transfer.jl index ade7ab3b63..ddf115bd99 100644 --- a/src/models/generated/Transfer.jl +++ b/src/models/generated/Transfer.jl @@ -10,8 +10,6 @@ This file is auto-generated. Do not edit. available::Bool requirement::Float64 ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -22,8 +20,6 @@ This file is auto-generated. Do not edit. - `available::Bool` - `requirement::Float64` - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct Transfer <: Service @@ -31,20 +27,16 @@ mutable struct Transfer <: Service available::Bool requirement::Float64 ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function Transfer(name, available, requirement, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - Transfer(name, available, requirement, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function Transfer(name, available, requirement, ext=Dict{String, Any}(), ) + Transfer(name, available, requirement, ext, InfrastructureSystemsInternal(), ) end -function Transfer(; name, available, requirement, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - Transfer(name, available, requirement, ext, time_series_container, supplemental_attributes_container, internal, ) +function Transfer(; name, available, requirement, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + Transfer(name, available, requirement, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -54,8 +46,6 @@ function Transfer(::Nothing) available=false, requirement=0.0, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -67,10 +57,6 @@ get_available(value::Transfer) = value.available get_requirement(value::Transfer) = value.requirement """Get [`Transfer`](@ref) `ext`.""" get_ext(value::Transfer) = value.ext -"""Get [`Transfer`](@ref) `time_series_container`.""" -get_time_series_container(value::Transfer) = value.time_series_container -"""Get [`Transfer`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::Transfer) = value.supplemental_attributes_container """Get [`Transfer`](@ref) `internal`.""" get_internal(value::Transfer) = value.internal @@ -80,7 +66,3 @@ set_available!(value::Transfer, val) = value.available = val set_requirement!(value::Transfer, val) = value.requirement = val """Set [`Transfer`](@ref) `ext`.""" set_ext!(value::Transfer, val) = value.ext = val -"""Set [`Transfer`](@ref) `time_series_container`.""" -set_time_series_container!(value::Transfer, val) = value.time_series_container = val -"""Set [`Transfer`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::Transfer, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/Transformer2W.jl b/src/models/generated/Transformer2W.jl index ef55398787..d9c63ae176 100644 --- a/src/models/generated/Transformer2W.jl +++ b/src/models/generated/Transformer2W.jl @@ -17,8 +17,6 @@ This file is auto-generated. Do not edit. rate::Union{Nothing, Float64} services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -36,8 +34,6 @@ The 2-W transformer model uses an equivalent circuit assuming the impedance is o - `rate::Union{Nothing, Float64}`, validation range: `(0, nothing)`, action if invalid: `error` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct Transformer2W <: ACBranch @@ -56,20 +52,16 @@ mutable struct Transformer2W <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services=Device[], ext=Dict{String, Any}(), ) + Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services, ext, InfrastructureSystemsInternal(), ) end -function Transformer2W(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function Transformer2W(; name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + Transformer2W(name, available, active_power_flow, reactive_power_flow, arc, r, x, primary_shunt, rate, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -86,8 +78,6 @@ function Transformer2W(::Nothing) rate=nothing, services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -113,10 +103,6 @@ get_rate(value::Transformer2W) = get_value(value, value.rate) get_services(value::Transformer2W) = value.services """Get [`Transformer2W`](@ref) `ext`.""" get_ext(value::Transformer2W) = value.ext -"""Get [`Transformer2W`](@ref) `time_series_container`.""" -get_time_series_container(value::Transformer2W) = value.time_series_container -"""Get [`Transformer2W`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::Transformer2W) = value.supplemental_attributes_container """Get [`Transformer2W`](@ref) `internal`.""" get_internal(value::Transformer2W) = value.internal @@ -140,7 +126,3 @@ set_rate!(value::Transformer2W, val) = value.rate = set_value(value, val) set_services!(value::Transformer2W, val) = value.services = val """Set [`Transformer2W`](@ref) `ext`.""" set_ext!(value::Transformer2W, val) = value.ext = val -"""Set [`Transformer2W`](@ref) `time_series_container`.""" -set_time_series_container!(value::Transformer2W, val) = value.time_series_container = val -"""Set [`Transformer2W`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::Transformer2W, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/TransmissionInterface.jl b/src/models/generated/TransmissionInterface.jl index bb19ec1e70..7ce05e014f 100644 --- a/src/models/generated/TransmissionInterface.jl +++ b/src/models/generated/TransmissionInterface.jl @@ -11,8 +11,6 @@ This file is auto-generated. Do not edit. active_power_flow_limits::MinMax violation_penalty::Float64 direction_mapping::Dict{String, Int} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -24,8 +22,6 @@ A collection of branches that make up an interface or corridor for the transfer - `active_power_flow_limits::MinMax` - `violation_penalty::Float64`: Penalty for violating the flow limits in the interface - `direction_mapping::Dict{String, Int}`: Map to set of multiplier to the flow in the line for cases when the line has a reverse direction with respect to the interface -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct TransmissionInterface <: Service @@ -36,20 +32,16 @@ mutable struct TransmissionInterface <: Service violation_penalty::Float64 "Map to set of multiplier to the flow in the line for cases when the line has a reverse direction with respect to the interface" direction_mapping::Dict{String, Int} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function TransmissionInterface(name, available, active_power_flow_limits, violation_penalty=INFINITE_COST, direction_mapping=Dict{String, Int}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - TransmissionInterface(name, available, active_power_flow_limits, violation_penalty, direction_mapping, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function TransmissionInterface(name, available, active_power_flow_limits, violation_penalty=INFINITE_COST, direction_mapping=Dict{String, Int}(), ) + TransmissionInterface(name, available, active_power_flow_limits, violation_penalty, direction_mapping, InfrastructureSystemsInternal(), ) end -function TransmissionInterface(; name, available, active_power_flow_limits, violation_penalty=INFINITE_COST, direction_mapping=Dict{String, Int}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - TransmissionInterface(name, available, active_power_flow_limits, violation_penalty, direction_mapping, time_series_container, supplemental_attributes_container, internal, ) +function TransmissionInterface(; name, available, active_power_flow_limits, violation_penalty=INFINITE_COST, direction_mapping=Dict{String, Int}(), internal=InfrastructureSystemsInternal(), ) + TransmissionInterface(name, available, active_power_flow_limits, violation_penalty, direction_mapping, internal, ) end # Constructor for demo purposes; non-functional. @@ -60,8 +52,6 @@ function TransmissionInterface(::Nothing) active_power_flow_limits=(min=0.0, max=0.0), violation_penalty=0.0, direction_mapping=Dict{String, Int}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -75,10 +65,6 @@ get_active_power_flow_limits(value::TransmissionInterface) = get_value(value, va get_violation_penalty(value::TransmissionInterface) = value.violation_penalty """Get [`TransmissionInterface`](@ref) `direction_mapping`.""" get_direction_mapping(value::TransmissionInterface) = value.direction_mapping -"""Get [`TransmissionInterface`](@ref) `time_series_container`.""" -get_time_series_container(value::TransmissionInterface) = value.time_series_container -"""Get [`TransmissionInterface`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::TransmissionInterface) = value.supplemental_attributes_container """Get [`TransmissionInterface`](@ref) `internal`.""" get_internal(value::TransmissionInterface) = value.internal @@ -90,7 +76,3 @@ set_active_power_flow_limits!(value::TransmissionInterface, val) = value.active_ set_violation_penalty!(value::TransmissionInterface, val) = value.violation_penalty = val """Set [`TransmissionInterface`](@ref) `direction_mapping`.""" set_direction_mapping!(value::TransmissionInterface, val) = value.direction_mapping = val -"""Set [`TransmissionInterface`](@ref) `time_series_container`.""" -set_time_series_container!(value::TransmissionInterface, val) = value.time_series_container = val -"""Set [`TransmissionInterface`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::TransmissionInterface, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/TwoTerminalHVDCLine.jl b/src/models/generated/TwoTerminalHVDCLine.jl index 68f76fad10..03a92f9ded 100644 --- a/src/models/generated/TwoTerminalHVDCLine.jl +++ b/src/models/generated/TwoTerminalHVDCLine.jl @@ -17,8 +17,6 @@ This file is auto-generated. Do not edit. loss::NamedTuple{(:l0, :l1), Tuple{Float64, Float64}} services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -36,8 +34,6 @@ a High voltage DC line. - `loss::NamedTuple{(:l0, :l1), Tuple{Float64, Float64}}` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct TwoTerminalHVDCLine <: ACBranch @@ -53,20 +49,16 @@ mutable struct TwoTerminalHVDCLine <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services=Device[], ext=Dict{String, Any}(), ) + TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services, ext, InfrastructureSystemsInternal(), ) end -function TwoTerminalHVDCLine(; name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function TwoTerminalHVDCLine(; name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + TwoTerminalHVDCLine(name, available, active_power_flow, arc, active_power_limits_from, active_power_limits_to, reactive_power_limits_from, reactive_power_limits_to, loss, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -83,8 +75,6 @@ function TwoTerminalHVDCLine(::Nothing) loss=(l0=0.0, l1=0.0), services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -110,10 +100,6 @@ get_loss(value::TwoTerminalHVDCLine) = value.loss get_services(value::TwoTerminalHVDCLine) = value.services """Get [`TwoTerminalHVDCLine`](@ref) `ext`.""" get_ext(value::TwoTerminalHVDCLine) = value.ext -"""Get [`TwoTerminalHVDCLine`](@ref) `time_series_container`.""" -get_time_series_container(value::TwoTerminalHVDCLine) = value.time_series_container -"""Get [`TwoTerminalHVDCLine`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::TwoTerminalHVDCLine) = value.supplemental_attributes_container """Get [`TwoTerminalHVDCLine`](@ref) `internal`.""" get_internal(value::TwoTerminalHVDCLine) = value.internal @@ -137,7 +123,3 @@ set_loss!(value::TwoTerminalHVDCLine, val) = value.loss = val set_services!(value::TwoTerminalHVDCLine, val) = value.services = val """Set [`TwoTerminalHVDCLine`](@ref) `ext`.""" set_ext!(value::TwoTerminalHVDCLine, val) = value.ext = val -"""Set [`TwoTerminalHVDCLine`](@ref) `time_series_container`.""" -set_time_series_container!(value::TwoTerminalHVDCLine, val) = value.time_series_container = val -"""Set [`TwoTerminalHVDCLine`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::TwoTerminalHVDCLine, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/TwoTerminalVSCDCLine.jl b/src/models/generated/TwoTerminalVSCDCLine.jl index 274e297e1b..a0e5086249 100644 --- a/src/models/generated/TwoTerminalVSCDCLine.jl +++ b/src/models/generated/TwoTerminalVSCDCLine.jl @@ -18,8 +18,6 @@ This file is auto-generated. Do not edit. inverter_firing_angle::MinMax services::Vector{Service} ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -38,8 +36,6 @@ As implemented in Milano's Book, Page 397. - `inverter_firing_angle::MinMax` - `services::Vector{Service}`: Services that this device contributes to - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct TwoTerminalVSCDCLine <: ACBranch @@ -56,20 +52,16 @@ mutable struct TwoTerminalVSCDCLine <: ACBranch "Services that this device contributes to" services::Vector{Service} ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services=Device[], ext=Dict{String, Any}(), ) + TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services, ext, InfrastructureSystemsInternal(), ) end -function TwoTerminalVSCDCLine(; name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services=Device[], ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services, ext, time_series_container, supplemental_attributes_container, internal, ) +function TwoTerminalVSCDCLine(; name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services=Device[], ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + TwoTerminalVSCDCLine(name, available, active_power_flow, arc, rectifier_tap_limits, rectifier_xrc, rectifier_firing_angle, inverter_tap_limits, inverter_xrc, inverter_firing_angle, services, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -87,8 +79,6 @@ function TwoTerminalVSCDCLine(::Nothing) inverter_firing_angle=(min=0.0, max=0.0), services=Device[], ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -116,10 +106,6 @@ get_inverter_firing_angle(value::TwoTerminalVSCDCLine) = value.inverter_firing_a get_services(value::TwoTerminalVSCDCLine) = value.services """Get [`TwoTerminalVSCDCLine`](@ref) `ext`.""" get_ext(value::TwoTerminalVSCDCLine) = value.ext -"""Get [`TwoTerminalVSCDCLine`](@ref) `time_series_container`.""" -get_time_series_container(value::TwoTerminalVSCDCLine) = value.time_series_container -"""Get [`TwoTerminalVSCDCLine`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::TwoTerminalVSCDCLine) = value.supplemental_attributes_container """Get [`TwoTerminalVSCDCLine`](@ref) `internal`.""" get_internal(value::TwoTerminalVSCDCLine) = value.internal @@ -145,7 +131,3 @@ set_inverter_firing_angle!(value::TwoTerminalVSCDCLine, val) = value.inverter_fi set_services!(value::TwoTerminalVSCDCLine, val) = value.services = val """Set [`TwoTerminalVSCDCLine`](@ref) `ext`.""" set_ext!(value::TwoTerminalVSCDCLine, val) = value.ext = val -"""Set [`TwoTerminalVSCDCLine`](@ref) `time_series_container`.""" -set_time_series_container!(value::TwoTerminalVSCDCLine, val) = value.time_series_container = val -"""Set [`TwoTerminalVSCDCLine`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::TwoTerminalVSCDCLine, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/VariableReserve.jl b/src/models/generated/VariableReserve.jl index b64d694e07..52b002490a 100644 --- a/src/models/generated/VariableReserve.jl +++ b/src/models/generated/VariableReserve.jl @@ -15,8 +15,6 @@ This file is auto-generated. Do not edit. max_participation_factor::Float64 deployed_fraction::Float64 ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -32,8 +30,6 @@ Data Structure for the procurement products for system simulations. - `max_participation_factor::Float64`: the maximum limit of reserve contribution per device, validation range: `(0, 1)`, action if invalid: `error` - `deployed_fraction::Float64`: Fraction of ancillary services participation deployed from the assignment, validation range: `(0, 1)`, action if invalid: `error` - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct VariableReserve{T <: ReserveDirection} <: Reserve{T} @@ -52,20 +48,16 @@ mutable struct VariableReserve{T <: ReserveDirection} <: Reserve{T} "Fraction of ancillary services participation deployed from the assignment" deployed_fraction::Float64 ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function VariableReserve{T}(name, available, time_frame, requirement, sustained_time=3600.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) where T <: ReserveDirection - VariableReserve{T}(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function VariableReserve{T}(name, available, time_frame, requirement, sustained_time=3600.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), ) where T <: ReserveDirection + VariableReserve{T}(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, InfrastructureSystemsInternal(), ) end -function VariableReserve{T}(; name, available, time_frame, requirement, sustained_time=3600.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) where T <: ReserveDirection - VariableReserve{T}(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, internal, ) +function VariableReserve{T}(; name, available, time_frame, requirement, sustained_time=3600.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) where T <: ReserveDirection + VariableReserve{T}(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -80,8 +72,6 @@ function VariableReserve{T}(::Nothing) where T <: ReserveDirection max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -103,10 +93,6 @@ get_max_participation_factor(value::VariableReserve) = value.max_participation_f get_deployed_fraction(value::VariableReserve) = value.deployed_fraction """Get [`VariableReserve`](@ref) `ext`.""" get_ext(value::VariableReserve) = value.ext -"""Get [`VariableReserve`](@ref) `time_series_container`.""" -get_time_series_container(value::VariableReserve) = value.time_series_container -"""Get [`VariableReserve`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::VariableReserve) = value.supplemental_attributes_container """Get [`VariableReserve`](@ref) `internal`.""" get_internal(value::VariableReserve) = value.internal @@ -126,7 +112,3 @@ set_max_participation_factor!(value::VariableReserve, val) = value.max_participa set_deployed_fraction!(value::VariableReserve, val) = value.deployed_fraction = val """Set [`VariableReserve`](@ref) `ext`.""" set_ext!(value::VariableReserve, val) = value.ext = val -"""Set [`VariableReserve`](@ref) `time_series_container`.""" -set_time_series_container!(value::VariableReserve, val) = value.time_series_container = val -"""Set [`VariableReserve`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::VariableReserve, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/VariableReserveNonSpinning.jl b/src/models/generated/VariableReserveNonSpinning.jl index 790994356b..1cd53d8ced 100644 --- a/src/models/generated/VariableReserveNonSpinning.jl +++ b/src/models/generated/VariableReserveNonSpinning.jl @@ -15,8 +15,6 @@ This file is auto-generated. Do not edit. max_participation_factor::Float64 deployed_fraction::Float64 ext::Dict{String, Any} - time_series_container::InfrastructureSystems.TimeSeriesContainer - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer internal::InfrastructureSystemsInternal end @@ -32,8 +30,6 @@ Data Structure for the procurement products for system simulations. - `max_participation_factor::Float64`: the maximum limit of reserve contribution per device, validation range: `(0, 1)`, action if invalid: `error` - `deployed_fraction::Float64`: Fraction of ancillary services participation deployed from the assignment, validation range: `(0, 1)`, action if invalid: `error` - `ext::Dict{String, Any}` -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage -- `supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer`: container for supplemental attributes - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ mutable struct VariableReserveNonSpinning <: ReserveNonSpinning @@ -52,20 +48,16 @@ mutable struct VariableReserveNonSpinning <: ReserveNonSpinning "Fraction of ancillary services participation deployed from the assignment" deployed_fraction::Float64 ext::Dict{String, Any} - "internal time_series storage" - time_series_container::InfrastructureSystems.TimeSeriesContainer - "container for supplemental attributes" - supplemental_attributes_container::InfrastructureSystems.SupplementalAttributesContainer "power system internal reference, do not modify" internal::InfrastructureSystemsInternal end -function VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time=14400.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) - VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), ) +function VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time=14400.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), ) + VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, InfrastructureSystemsInternal(), ) end -function VariableReserveNonSpinning(; name, available, time_frame, requirement, sustained_time=14400.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), ) - VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, time_series_container, supplemental_attributes_container, internal, ) +function VariableReserveNonSpinning(; name, available, time_frame, requirement, sustained_time=14400.0, max_output_fraction=1.0, max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), internal=InfrastructureSystemsInternal(), ) + VariableReserveNonSpinning(name, available, time_frame, requirement, sustained_time, max_output_fraction, max_participation_factor, deployed_fraction, ext, internal, ) end # Constructor for demo purposes; non-functional. @@ -80,8 +72,6 @@ function VariableReserveNonSpinning(::Nothing) max_participation_factor=1.0, deployed_fraction=0.0, ext=Dict{String, Any}(), - time_series_container=InfrastructureSystems.TimeSeriesContainer(), - supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), ) end @@ -103,10 +93,6 @@ get_max_participation_factor(value::VariableReserveNonSpinning) = value.max_part get_deployed_fraction(value::VariableReserveNonSpinning) = value.deployed_fraction """Get [`VariableReserveNonSpinning`](@ref) `ext`.""" get_ext(value::VariableReserveNonSpinning) = value.ext -"""Get [`VariableReserveNonSpinning`](@ref) `time_series_container`.""" -get_time_series_container(value::VariableReserveNonSpinning) = value.time_series_container -"""Get [`VariableReserveNonSpinning`](@ref) `supplemental_attributes_container`.""" -get_supplemental_attributes_container(value::VariableReserveNonSpinning) = value.supplemental_attributes_container """Get [`VariableReserveNonSpinning`](@ref) `internal`.""" get_internal(value::VariableReserveNonSpinning) = value.internal @@ -126,7 +112,3 @@ set_max_participation_factor!(value::VariableReserveNonSpinning, val) = value.ma set_deployed_fraction!(value::VariableReserveNonSpinning, val) = value.deployed_fraction = val """Set [`VariableReserveNonSpinning`](@ref) `ext`.""" set_ext!(value::VariableReserveNonSpinning, val) = value.ext = val -"""Set [`VariableReserveNonSpinning`](@ref) `time_series_container`.""" -set_time_series_container!(value::VariableReserveNonSpinning, val) = value.time_series_container = val -"""Set [`VariableReserveNonSpinning`](@ref) `supplemental_attributes_container`.""" -set_supplemental_attributes_container!(value::VariableReserveNonSpinning, val) = value.supplemental_attributes_container = val diff --git a/src/models/generated/includes.jl b/src/models/generated/includes.jl index c378aec68a..6ae4d91b10 100644 --- a/src/models/generated/includes.jl +++ b/src/models/generated/includes.jl @@ -607,7 +607,6 @@ export get_states_types export get_status export get_storage_capacity export get_storage_target -export get_supplemental_attributes_container export get_sustained_time export get_switch export get_tF_delay @@ -619,7 +618,6 @@ export get_time_at_status export get_time_frame export get_time_limits export get_time_limits_pump -export get_time_series_container export get_to export get_to_branch_control export get_valve_position_limits @@ -1137,7 +1135,6 @@ export set_states_types! export set_status! export set_storage_capacity! export set_storage_target! -export set_supplemental_attributes_container! export set_sustained_time! export set_switch! export set_tF_delay! @@ -1149,7 +1146,6 @@ export set_time_at_status! export set_time_frame! export set_time_limits! export set_time_limits_pump! -export set_time_series_container! export set_to! export set_to_branch_control! export set_valve_position_limits! diff --git a/src/models/regulation_device.jl b/src/models/regulation_device.jl index 3c630a7b86..bd8a61829f 100644 --- a/src/models/regulation_device.jl +++ b/src/models/regulation_device.jl @@ -10,7 +10,6 @@ mutable struct RegulationDevice{T <: StaticInjection} <: Device reserve_limit_dn::Float64 inertia::Float64 cost::Float64 - time_series_container::IS.TimeSeriesContainer internal::IS.InfrastructureSystemsInternal function RegulationDevice{T}( @@ -21,7 +20,6 @@ mutable struct RegulationDevice{T <: StaticInjection} <: Device reserve_limit_dn::Float64, inertia::Float64, cost::Float64, - time_series_container::IS.TimeSeriesContainer = IS.TimeSeriesContainer(), internal::IS.InfrastructureSystemsInternal = IS.InfrastructureSystemsInternal(), ) where {T <: StaticInjection} # Note that time_series are not forwarded to T. They get copied from T in @@ -34,7 +32,6 @@ mutable struct RegulationDevice{T <: StaticInjection} <: Device reserve_limit_dn, inertia, cost, - time_series_container, internal, ) end @@ -77,7 +74,6 @@ function RegulationDevice(; reserve_limit_dn::Float64 = 0.0, inertia::Float64 = 0.0, cost::Float64 = 1.0, - time_series_container = IS.TimeSeriesContainer(), internal = IS.InfrastructureSystemsInternal(), ) where {T <: StaticInjection} return RegulationDevice{T}( @@ -88,12 +84,10 @@ function RegulationDevice(; reserve_limit_dn, inertia, cost, - time_series_container, internal, ) end -get_time_series_container(value::RegulationDevice) = value.time_series_container get_name(value::RegulationDevice) = IS.get_name(value.device) get_internal(value::RegulationDevice) = value.internal get_droop(value::RegulationDevice) = value.droop @@ -113,8 +107,6 @@ set_reserve_limit_up!(value::RegulationDevice, val::Float64) = value.reserve_lim set_reserve_limit_dn!(value::RegulationDevice, val::Float64) = value.reserve_limit_dn = val set_inertia!(value::RegulationDevice, val::Float64) = value.inertia = val set_cost!(value::RegulationDevice, val::Float64) = value.cost = val -IS.set_time_series_container!(value::RegulationDevice, val::IS.TimeSeriesContainer) = - value.time_series_container = val function set_units_setting!(value::RegulationDevice, settings::SystemUnitsSettings) value.internal.units_info = value.device.internal.units_info = settings return @@ -135,6 +127,6 @@ for RDT in RegulationDeviceSupportedTypes IS.@forward( (RegulationDevice{RDT}, :device), RDT, - [:get_internal, :get_name, :get_time_series_container, :set_time_series_container!] + [:get_internal, :get_name] ) end diff --git a/src/models/services.jl b/src/models/services.jl index 1315da7745..b3d7d489ab 100644 --- a/src/models/services.jl +++ b/src/models/services.jl @@ -1 +1,4 @@ abstract type Service <: Component end + +supports_time_series(::Service) = true +supports_supplemental_attributes(::Service) = true diff --git a/src/models/supplemental_constructors.jl b/src/models/supplemental_constructors.jl index c6e98e6d50..3512138b5d 100644 --- a/src/models/supplemental_constructors.jl +++ b/src/models/supplemental_constructors.jl @@ -49,7 +49,6 @@ function ACBus( area, load_zone, ext, - IS.SupplementalAttributesContainer(), InfrastructureSystemsInternal(), ) end @@ -87,7 +86,6 @@ function InterruptibleLoad( services = Device[], dynamic_injector = nothing, ext = Dict{String, Any}(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), ) @warn( "The InterruptibleLoad constructor that accepts a model type has been removed and \\ @@ -106,7 +104,6 @@ function InterruptibleLoad( services, dynamic_injector, ext, - time_series_container, InfrastructureSystemsInternal(), ) end @@ -125,7 +122,6 @@ function InterruptibleLoad(; services = Device[], dynamic_injector = nothing, ext = Dict{String, Any}(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), internal = InfrastructureSystemsInternal(), ) @warn( @@ -145,7 +141,6 @@ function InterruptibleLoad(; services, dynamic_injector, ext, - time_series_container, internal, ) end @@ -169,7 +164,6 @@ function GenericBattery( services = Device[], dynamic_injector = nothing, ext = Dict{String, Any}(), - time_series_container = InfrastructureSystems.TimeSeriesContainer(), internal = InfrastructureSystemsInternal(), ) GenericBattery( @@ -191,7 +185,6 @@ function GenericBattery( services, dynamic_injector, ext, - time_series_container, internal, ) end diff --git a/src/models/topological_elements.jl b/src/models/topological_elements.jl index fed1bd592f..e84c2132b8 100644 --- a/src/models/topological_elements.jl +++ b/src/models/topological_elements.jl @@ -10,6 +10,8 @@ All subtypes must implement the method `get_aggregation_topology_accessor`. """ abstract type AggregationTopology <: Topology end +supports_time_series(::AggregationTopology) = true + """ Abstract type to represent any type of Bus, AC or DC. """ @@ -34,7 +36,6 @@ function check_bus_params( area, load_zone, ext, - attributes, internal, ) if !isnothing(bustype) @@ -56,6 +57,5 @@ function check_bus_params( area, load_zone, ext, - attributes, internal end diff --git a/src/outages.jl b/src/outages.jl index b13390c64f..3f14f64479 100644 --- a/src/outages.jl +++ b/src/outages.jl @@ -1,11 +1,9 @@ abstract type Outage <: Contingency end -"""Get `components_uuid`.""" -get_component_uuids(x::Outage) = x.component_uuids +supports_time_series(::Outage) = true + """Get `internal`.""" get_internal(x::Outage) = x.internal -"""Get `time_series_container`.""" -get_time_series_container(x::Outage) = x.time_series_container """ Attribute that contains information regarding forced outages where the transition probabilities @@ -15,29 +13,22 @@ series. # Arguments - `time_to_recovery::Int`: Time elapsed to recovery after a failure in Milliseconds. - `outage_transition_probability::Float64`: Characterizes the probability of failure (1 - p) in the geometric distribution. -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ struct GeometricDistributionForcedOutage <: Outage mean_time_to_recovery::Float64 outage_transition_probability::Float64 - time_series_container::InfrastructureSystems.TimeSeriesContainer - component_uuids::InfrastructureSystems.ComponentUUIDs internal::InfrastructureSystemsInternal end function GeometricDistributionForcedOutage(; mean_time_to_recovery = 0.0, outage_transition_probability = 0.0, - time_series_container = InfrastructureSystems.TimeSeriesContainer(), - component_uuids = InfrastructureSystems.ComponentUUIDs(), internal = InfrastructureSystemsInternal(), ) return GeometricDistributionForcedOutage( mean_time_to_recovery, outage_transition_probability, - time_series_container, - component_uuids, internal, ) end @@ -54,26 +45,19 @@ Attribute that contains information regarding planned outages. # Arguments - `outage_schedule::String`: String name of the time series used for the scheduled outages -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ struct PlannedOutage <: Outage outage_schedule::String - time_series_container::InfrastructureSystems.TimeSeriesContainer - component_uuids::InfrastructureSystems.ComponentUUIDs internal::InfrastructureSystemsInternal end function PlannedOutage(; outage_schedule, - time_series_container = InfrastructureSystems.TimeSeriesContainer(), - component_uuids = InfrastructureSystems.ComponentUUIDs(), internal = InfrastructureSystemsInternal(), ) return PlannedOutage( outage_schedule, - time_series_container, - component_uuids, internal, ) end @@ -87,28 +71,18 @@ The data can be obtained from the simulation of an stochastic process or histori # Arguments - `outage_status_scenario::String`: String name of the time series used for the forced outage status in the model. 1 is used represent outaged and 0 for available. -- `time_series_container::InfrastructureSystems.TimeSeriesContainer`: internal time_series storage - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify """ struct TimeSeriesForcedOutage <: Outage outage_status_scenario::String - time_series_container::InfrastructureSystems.TimeSeriesContainer - component_uuids::InfrastructureSystems.ComponentUUIDs internal::InfrastructureSystemsInternal end function TimeSeriesForcedOutage(; outage_status_scenario, - time_series_container = InfrastructureSystems.TimeSeriesContainer(), - component_uuids = InfrastructureSystems.ComponentUUIDs(), internal = InfrastructureSystemsInternal(), ) - return TimeSeriesForcedOutage( - outage_status_scenario, - time_series_container, - component_uuids, - internal, - ) + return TimeSeriesForcedOutage(outage_status_scenario, internal) end """Get [`TimeSeriesForcedOutage`](@ref) `outage_status_scenario`.""" diff --git a/src/utils/print.jl b/src/utils/print.jl index ab42667533..2e81b66c58 100644 --- a/src/utils/print.jl +++ b/src/utils/print.jl @@ -149,8 +149,7 @@ function Base.show(io::IO, ist::Component) is_first = true for (name, field_type) in zip(fieldnames(typeof(ist)), fieldtypes(typeof(ist))) getter_name = Symbol("get_$name") - if field_type <: IS.TimeSeriesContainer || - field_type <: InfrastructureSystemsInternal + if field_type <: InfrastructureSystemsInternal continue elseif hasproperty(PowerSystems, getter_name) getter_func = getproperty(PowerSystems, getter_name) @@ -191,8 +190,6 @@ function Base.show(io::IO, ::MIME"text/plain", ist::Component) print(io, "\n ") show(io, MIME"text/plain"(), obj.units_info) continue - elseif obj isa IS.TimeSeriesContainer - continue elseif obj isa InfrastructureSystemsType || obj isa Vector{<:InfrastructureSystemsComponent} val = summary(getproperty(ist, name)) @@ -258,3 +255,21 @@ function show_components( ) return end + +# The placement of the type in the argument list has been confusing for people. Support +# it both before and after the system. + +show_components( + component_type::Type{<:Component}, + sys::System, + additional_columns::Union{Dict, Vector} = Dict(); + kwargs..., +) = show_components(sys, component_type, additional_columns; kwargs...) + +show_components( + io::IO, + component_type::Type{<:Component}, + sys::System, + additional_columns::Union{Dict, Vector} = Dict(); + kwargs..., +) = show_components(io, sys, component_type, additional_columns; kwargs...) diff --git a/test/common.jl b/test/common.jl index 4196323f86..8990d91f3e 100644 --- a/test/common.jl +++ b/test/common.jl @@ -271,7 +271,7 @@ function test_accessors(component) ps_type = typeof(component) for (field_name, field_type) in zip(fieldnames(ps_type), fieldtypes(ps_type)) - if field_name === :name || field_name === :time_series_container + if field_name === :name func = getfield(InfrastructureSystems, Symbol("get_" * string(field_name))) _func! = getfield(InfrastructureSystems, Symbol("set_" * string(field_name) * "!")) diff --git a/test/test_cost_functions.jl b/test/test_cost_functions.jl index f317b4506e..8f7817d5aa 100644 --- a/test/test_cost_functions.jl +++ b/test/test_cost_functions.jl @@ -151,7 +151,7 @@ test_costs = Dict( resolution = Dates.Hour(1) name = "test" horizon = 24 - service_data = Dict(initial_time => ones(horizon)) + service_data = Dict(initial_time => rand(horizon)) data_quadratic = SortedDict(initial_time => test_costs[QuadraticFunctionData]) sys = PSB.build_system(PSITestSystems, "test_RTS_GMLC_sys") diff --git a/test/test_outages.jl b/test/test_outages.jl index b1b69a1500..788605fb9f 100644 --- a/test/test_outages.jl +++ b/test/test_outages.jl @@ -21,7 +21,7 @@ for gen in (gen1, gen2) for type in (GeometricDistributionForcedOutage, PlannedOutage, GeographicInfo) - attributes = collect(get_supplemental_attributes(type, gen)) + attributes = get_supplemental_attributes(type, gen) @test length(attributes) == 1 uuid = IS.get_uuid(attributes[1]) get_supplemental_attribute(sys, uuid) diff --git a/test/test_printing.jl b/test/test_printing.jl index 5f276a91c7..9b7f563e4d 100644 --- a/test/test_printing.jl +++ b/test/test_printing.jl @@ -30,10 +30,7 @@ function are_type_and_fields_in_output(obj::T) where {T <: Component} # Account for the fact that type may be abstract. actual_type = typeof(val) - if actual_type <: IS.TimeSeriesContainer - continue - elseif actual_type <: IS.InfrastructureSystemsType || - actual_type <: Vector{<:Service} + if actual_type <: IS.InfrastructureSystemsType || actual_type <: Vector{<:Service} expected = string(actual_type) else expected = string(val) diff --git a/test/test_serialization.jl b/test/test_serialization.jl index 7a75fe5163..bc800d08d9 100644 --- a/test/test_serialization.jl +++ b/test/test_serialization.jl @@ -252,7 +252,7 @@ end @test !isempty(collect(IS.iterate_components_with_time_series(sys.data))) text = to_json(sys) sys2 = from_json(text, System) - exclude = Set([:time_series_container, :time_series_manager]) + exclude = Set([:time_series_manager]) @test PSY.compare_values(sys2, sys, exclude = exclude) @test isempty(collect(IS.iterate_components_with_time_series(sys2.data))) end diff --git a/test/test_system.jl b/test/test_system.jl index f5ffdd8dc1..ee02219ba1 100644 --- a/test/test_system.jl +++ b/test/test_system.jl @@ -375,8 +375,8 @@ end @test IS.compare_values(sys, sys2) # Ensure that the storage references got updated correctly. for component in get_components(x -> has_time_series(x), Component, sys2) - @test component.time_series_container.manager.data_store === - sys2.data.time_series_manager.data_store + @test component.internal.shared_system_references.time_series_manager === + sys2.data.time_series_manager end sys = PSB.build_system( @@ -392,8 +392,8 @@ end sys2.data.time_series_manager.data_store.file_path @test IS.compare_values(sys, sys2) for component in get_components(x -> has_time_series(x), Component, sys2) - @test component.time_series_container.manager.data_store === - sys2.data.time_series_manager.data_store + @test component.internal.shared_system_references.time_series_manager === + sys2.data.time_series_manager end end