Skip to content

Commit

Permalink
refactor to remove seasonal-rating-period.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
catkins-miso committed Nov 5, 2024
1 parent cd5fa4c commit a08e055
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 99 deletions.
8 changes: 4 additions & 4 deletions docs/_data/components/schemas/array-max-seasons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ seasonal-proposals:
periods:
<<: *schedule
items:
$ref: ./seasonal-rating-period.yaml#/proposal
$ref: 'period-limit.yaml#/seasonal-proposal'

missing-seasonal-obligation:
type: object
Expand Down Expand Up @@ -65,7 +65,7 @@ seasonal-proposals-slim:
to each season in the `default-seasonal-schedule`.
items:
$ref: ./seasonal-rating-period.yaml#/proposal-slim
$ref: './period-limit.yaml#/seasonal-proposal-slim'
example: [[50, 55, 60, 65], [70, 75, 80, 85], [90, 95, 100, 105],[90, 95, 100, 105]]

seasonal-rating-snapshot-item:
Expand All @@ -76,7 +76,7 @@ seasonal-rating-snapshot-item:
periods:
<<: *schedule
items:
$ref: ./seasonal-rating-period.yaml#/snapshot
$ref: './period-limit.yaml#/seasonal-snapshot'

seasonal-rating-snapshot-item-detailed:
type: object
Expand All @@ -86,4 +86,4 @@ seasonal-rating-snapshot-item-detailed:
periods:
<<: *schedule
items:
$ref: ./seasonal-rating-period.yaml#/snapshot-detailed
$ref: './period-limit.yaml#/seasonal-snapshot-detailed'
103 changes: 103 additions & 0 deletions docs/_data/components/schemas/period-limit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ forecast-snapshot: &forecast-snapshot
- period-end
- continuous-operating-limit
- emergency-operating-limits
additionalProperties: false

forecast-snapshot-detailed:
<<: *forecast-snapshot
Expand All @@ -53,6 +54,7 @@ realtime-snapshot: &rt-normal
- resource-id
- continuous-operating-limit
- emergency-operating-limits
additionalProperties: false

realtime-snapshot-detailed:
<<: *rt-normal
Expand Down Expand Up @@ -109,6 +111,7 @@ real-time-proposal: &real-time-proposal
properties: &real-time-proposal-props
<<: [*rt-normal-props, *proposal-props]
required: *rt-normal-required
additionalProperties: false

forecast-proposal: &forecast-proposal
<<: *proposal
Expand All @@ -121,6 +124,7 @@ forecast-proposal: &forecast-proposal
properties: &forecast-proposal-props
<<: [*period-props, *proposal-props]
required: *forecast-snapshot-required
additionalProperties: false

provenance:
type: object
Expand Down Expand Up @@ -163,6 +167,7 @@ forecast-provenance:
- emergency-operating-limits
- source
- proposal-disposition
additionalProperties: false

real-time-provenance:
<<: *real-time-proposal
Expand All @@ -174,3 +179,101 @@ real-time-provenance:
- emergency-operating-limits
- source
- proposal-disposition
additionalProperties: false

seasonal-proposal:
<<: *forecast-proposal
description: Proposes the continuous and emergency ratings for the specified Season.
title: Seasonal Rating Proposal
properties:
<<: *forecast-proposal-props
season-name:
$ref: ./season-name.yaml
day-night:
$ref: ./day-night.yaml
additionalProperties: false

seasonal-proposal-slim:
type: array
title: Seasonal Period Proposal slim
maxItems: 20 # (max continuous + emergency ratings) * max num fields in limit type, e.g. MW and p.f.
minItems: 1
items:
type: number
title: Continuous and Emergency Ratings values
description: |
Each number in this array corresponds to a value of the continuous and
emergency ratings for a particular period. The first values correspond to
the continuous (normal) rating and the subsequent values correspond to the
emergency ratings in order of decreasing duration. The durations are
defined in the `proposal-header.default-emergency-durations` field.
The exact number of values in this array is further determined by the
`limit-type` parameter of the media type.
```http
Content-Type: application/vnd.trolie.seasonal-ratings-proposal-slim.v1+json; limit-type=apparent-power
```
If the [limit-type](#tag/limit-type) is single valued, like
`apparent-power`, then the array will have a single value for each rating.
For example, if there was only one emergency duration defined, then the
array would have two values, e.g. `[50, 55]`, corresponding to a 50MVA
continuous rating and 55MVA emergency rating, respectively. A
single-valued limit type is anticipated to be the most common case in
practice.
However, if the [limit-type](#tag/limit-type) is `active-power` and the
Clearinghouse Provider has required both MW and power factor, e.g.,
`{"mw":1, "pf":1}`, then the array will have two values for each rating.
If we continue with the example of having only one emergency duration
defined, then the array would have four values. Thus, instead of
`[normal_MVA, emergency_MVA]`, we would have `[normal_MW, normal_pf,
emergency_MW, emergency_pf]`, e.g., `[300, 1.0, 350, 1.0]`.
seasonal-snapshot: &seasonal-snapshot
<<: *forecast-snapshot
description: Proposes the continuous and emergency ratings for the specified Season.
title: Seasonal Rating Proposal
properties: &seasonal-snapshot-props
<<: *forecast-snapshot-props
season-name:
$ref: ./season-name.yaml
day-night:
$ref: ./day-night.yaml
additionalProperties: false

seasonal-snapshot-detailed:
<<: *seasonal-snapshot
description: Proposes the continuous and emergency ratings for the specified Season.
title: Seasonal Rating Proposal
properties:
<<: *seasonal-snapshot-props
proposals-considered:
description: |
The seasonal ratings proposals considered when determining the
seasonal ratings of a power system resource, e.g., a line or
transformer.
type: array
minItems: 1
maxItems: 10
items:
allOf:
- $ref: '#/proposal'
- type: object
properties:
source:
$ref: ./data-provenance.yaml
resource-id:
$ref: ./resource-id.yaml
required:
- source
- resource-id
required:
- proposals-considered
- period-start
- period-end
- continuous-operating-limit
- emergency-operating-limits
additionalProperties: false
95 changes: 0 additions & 95 deletions docs/_data/components/schemas/seasonal-rating-period.yaml

This file was deleted.

0 comments on commit a08e055

Please sign in to comment.