System Design Atlas

Generation forecasts and energy balances

02 / 10Worked example

Requirements

Which business rule protects the forecast run, and how is the agreed boundary tested?

The system boundary leads to business rules and measurable goals. For forecast run P-33, each comparison must identify the forecast version, measurement revision and matching interval. Later actual measurements preserve historical forecasts. This invariant must hold after every completed operation; quality goals describe measurable operational behaviour.

Starting point Forecasts and actual measurements retain separate versions.

Assumptions for the example case

A fictional example design for a generation facility using fixed 15-minute intervals and separate forecast and measurement versions. Each interval spans 900 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 900 seconds belongs to the next interval. All figures and test targets are illustrative assumptions.

Business guarantee and measurable limit

Guarantee and validation gates

1
Forecast run P-33Frozen input hash and model version
2
Interval I-33UTC start and exactly 900 seconds duration
3
Measurement revision M-33Complete versioned actual measurements with provenance
Exact limitInterval [0, 900 s) · 900 s starts the next interval

Each comparison binds forecast version, measurement revision and the same interval.

Each comparison identifies the forecast version, measurement revision and matching time interval; later actual measurements do not change historical forecasts.

Business requirements (functional)

Further reading
Durable commitment
Each comparison identifies the forecast version, measurement revision and matching time interval; later actual measurements do not change historical forecasts.
Evidence and closure
Incomplete input or calculation errors.
Domain boundary rule
Each interval spans 900 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 900 seconds starts the next interval.

Operational goals (non-functional)

Further reading
Local processing
Illustrative target: 95% of local commands complete within 800 milliseconds in a 15-minute profile at 50 commands/s. External processing and human waiting time are measured separately.
Traceable processing
The test records the authoritative version and forecast-processing delay. Every accepted change to forecast run P-33 must remain traceable to its stored result after restart.

Check the time interval and unit before comparison

Check the time interval and unit before comparison

Check the time interval and unit before comparison.

Each comparison identifies the forecast version, measurement revision and matching time interval; later actual measurements do not change historical forecasts.

Each interval spans 900 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 900 seconds starts the next interval. The exercise specifies the input and expected result.

Alternative considered
A response-time target alone leaves invalid business states unchecked.
Trade-off
Strict validation can pause an operation for investigation.
Reassess
Measured processing times or new contracts with the measurement source require a fresh review of the targets.

Try it yourself

Separate the business invariant from the 800-millisecond target. Explain the exact limit in this case.

A hint for your attempt

Completing an operation quickly but incorrectly does not satisfy the business guarantee.

Compare with a possible solution
Business rule
Each comparison identifies the forecast version, measurement revision and matching time interval; later actual measurements do not change historical forecasts. The counterexample test checks the permitted state.
Operations and boundary
The 800-millisecond target applies to 95% of local commands in the assumed peak profile. Each interval spans 900 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 900 seconds starts the next interval.

Apply to your project

Which rule of your project remains binding even with slow processing?

Next, interval corrections form their own load profile.