Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update units in docstrings to per-unit #8

Merged
merged 1 commit into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/accessors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,28 @@ get_ptdf(system::System) = system.ptdf
"Returns the line outage distribution factor matrix of the system for a set of contingencies."
get_lodf(system::System) = system.lodf

"Returns the generation of the generator at the start of the time period (MW)"
"Returns the generation of the generator at the start of the time period (pu)"
get_initial_generation(system::System) = system.generator_time_series.initial_generation
"Returns time series data of the load in the system"
get_load(system::System) = system.loads
"Returns time series data of the generator offer curves"
get_offer_curve(system::System) = system.generator_time_series.offer_curve
"Returns time series data of minimum generator output (MW)"
"Returns time series data of minimum generator output (pu)"
get_pmin(system::System) = system.generator_time_series.pmin
"Returns time series data of maximum generator output (MW)"
"Returns time series data of maximum generator output (pu)"
get_pmax(system::System) = system.generator_time_series.pmax
"Returns time series data of minimum generator output in the ancillary services market (MW)"
"Returns time series data of minimum generator output in the ancillary services market (pu)"
get_regmin(system::System) = system.generator_time_series.regulation_min
"Returns time series data of maximum generator output in the ancillary services market (MW)"
"Returns time series data of maximum generator output in the ancillary services market (pu)"
get_regmax(system::System) = system.generator_time_series.regulation_max

"Returns time series data of offer prices for ancillary servives regulation (\$ /MW)"
"Returns time series data of offer prices for ancillary servives regulation (\$ /pu)"
get_regulation(system::System) = system.generator_time_series.asm_regulation
"Returns time series data of offer prices for ancillary servives spinning (\$ /MW)"
"Returns time series data of offer prices for ancillary servives spinning (\$ /pu)"
get_spinning(system::System) = system.generator_time_series.asm_spin
"Returns time series data of offer prices for ancillary servives supplemental on (\$ /MW)"
"Returns time series data of offer prices for ancillary servives supplemental on (\$ /pu)"
get_supplemental_on(system::System) = system.generator_time_series.asm_sup_on
"Returns time series data of offer prices for ancillary servives supplemental off (\$ /MW)"
"Returns time series data of offer prices for ancillary servives supplemental off (\$ /pu)"
get_supplemental_off(system::System) = system.generator_time_series.asm_sup_off

"Returns a flag indicating whether each generator was on at the start of the day."
Expand Down
34 changes: 18 additions & 16 deletions src/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ const MARKET_WIDE_ZONE = -9999
$TYPEDEF

Type defining a market zone. The `Zone` is identified by a number. The other fields contain
the service requirements for the zone.
the service requirements for the zone. Requirements are given in `pu` assuming a base power
of 100MW.

Fields:
$TYPEDFIELDS
"""
struct Zone
"Zone number"
number::Int64
"Zonal regulation requirement (MW)"
"Zonal regulation requirement (pu)"
regulation::Float64
"Zonal operating reserve requirement (regulation + spinning + supplemental) (MW)"
"Zonal operating reserve requirement (regulation + spinning + supplemental) (pu)"
operating_reserve::Float64
"Zonal good utility practice requirement (regulation + spinning) (MW)"
"Zonal good utility practice requirement (regulation + spinning) (pu)"
good_utility::Float64
end

Expand All @@ -27,7 +28,7 @@ const BranchName = InlineString31
$TYPEDEF

Type for static generator attribute (i.e. things that describe a generator that are not time
series data).
series data). Parameters given in `pu` assume a base power of 100MW.

Fields:
$TYPEDFIELDS
Expand All @@ -47,9 +48,9 @@ struct Generator
min_uptime::Float64
"Minimum time the generator has to be off for (hours)"
min_downtime::Float64
"Rate at which the generator can increase generation (MW/minute)"
"Rate at which the generator can increase generation (pu/minute)"
ramp_up::Float64
"Rate at which the generator can decrease generation (MW/minute)"
"Rate at which the generator can decrease generation (pu/minute)"
ramp_down::Float64
"Symbol describing the technology of the generator"
technology::Symbol
Expand Down Expand Up @@ -195,40 +196,41 @@ end
$TYPEDEF

Generator related time series data that is needed for both the day-ahead and real-time formulations.
Values given in `pu` assume a base power of 100MW.

Fields:
$TYPEDFIELDS
"""
struct GeneratorTimeSeries
"Generation of the generator at the start of the time period (MW)"
"Generation of the generator at the start of the time period (pu)"
initial_generation::KeyedArray{Float64, 1}
"Generator offer curves. `KeyedArray` where the axis keys are `generator names x datetimes`"
offer_curve::KeyedArray{Vector{Tuple{Float64, Float64}}, 2}
"Generator minimum output in the ancillary services market (MW)"
"Generator minimum output in the ancillary services market (pu)"
regulation_min::KeyedArray{Float64, 2}
"Generator maximum output in the ancillary services market (MW)"
"Generator maximum output in the ancillary services market (pu)"
regulation_max::KeyedArray{Float64, 2}
"Generator minimum output (MW)"
"Generator minimum output (pu)"
pmin::KeyedArray{Float64, 2}
"Generator maximum output (MW)"
"Generator maximum output (pu)"
pmax::KeyedArray{Float64, 2}
"""
Ancillary services regulation offer prices (\$ /MW). Generators not providing the service
Ancillary services regulation offer prices (\$ /pu). Generators not providing the service
will have `missing` offer data
"""
asm_regulation::KeyedArray{Union{Missing, Float64}, 2}
"""
Ancillary services spinning offer prices (\$ /MW). Generators not providing the service
Ancillary services spinning offer prices (\$ /pu). Generators not providing the service
will have `missing` offer data
"""
asm_spin::KeyedArray{Union{Missing, Float64}, 2}
"""
Ancillary services supplemental on offer prices (\$ /MW). Generators not providing the service
Ancillary services supplemental on offer prices (\$ /pu). Generators not providing the service
will have `missing` offer data
"""
asm_sup_on::KeyedArray{Union{Missing, Float64}, 2}
"""
Ancillary services supplemental off offer prices (\$ /MW). Generators not providing the service
Ancillary services supplemental off offer prices (\$ /pu). Generators not providing the service
will have `missing` offer data
"""
asm_sup_off::KeyedArray{Union{Missing, Float64}, 2}
Expand Down