Skip to content

Commit 7fd901f

Browse files
Add DeliveryDuration proto definition
Signed-off-by: camille-bouvy-frequenz <[email protected]> Signed-off-by: camille-bouvy-frequenz <[email protected]>
1 parent 5e01b38 commit 7fd901f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Frequenz definitions of the time increment used for electricity
2+
// deliveries and trading.
3+
//
4+
// Copyright 2023 Frequenz Energy-as-a-Service GmbH
5+
//
6+
// Licensed under the MIT License (the "License");
7+
// you may not use this file except in compliance with the License.
8+
9+
syntax = "proto3";
10+
11+
package frequenz.api.common.v1.grid;
12+
13+
import "google/protobuf/timestamp.proto";
14+
15+
// DeliveryDuration represents the time increment, in minutes,
16+
// used for electricity deliveries and trading. These durations
17+
// serve as the basis for defining the delivery period in contracts,
18+
// and they dictate how energy is scheduled and delivered to meet
19+
// contractual obligations.
20+
//
21+
// !!! note "Compatibility Constraints"
22+
// Not all delivery durations are universally
23+
// compatible with all delivery areas or markets.
24+
//
25+
enum DeliveryDuration {
26+
// Default value, indicates that the duration is unspecified.
27+
DELIVERY_DURATION_UNSPECIFIED = 0;
28+
29+
// 5-minute duration
30+
DELIVERY_DURATION_5 = 1;
31+
32+
// 15-minute contract duration.
33+
DELIVERY_DURATION_15 = 2;
34+
35+
// 30-minute contract duration.
36+
DELIVERY_DURATION_30 = 3;
37+
38+
// 1-hour contract duration.
39+
DELIVERY_DURATION_60 = 4;
40+
}
41+
42+
// DeliveryPeriod represents the time period during which the contract
43+
// is delivered. It is defined by a start timestamp and a duration.
44+
message DeliveryPeriod {
45+
// Start UTC timestamp represents the beginning of the delivery period.
46+
// This timestamp is inclusive, meaning that the delivery period starts
47+
// from this point in time.
48+
//
49+
// !!! note
50+
// Delivery period start time constraints:
51+
// - 5-minute durations must start at times that are multiples of
52+
// 5 minutes past the hour.
53+
// - 15-minute durations must start at :00, :15, :30, or
54+
// :45 past the hour.
55+
// - 30-minute durations must start at :00 or :30 past the hour.
56+
// - 60-minute durations must start at :00 past the hour.
57+
google.protobuf.Timestamp start = 1;
58+
59+
// The length of the delivery period.
60+
DeliveryDuration duration = 2;
61+
}

0 commit comments

Comments
 (0)