Skip to content

Commit 815d789

Browse files
add test files
1 parent 90fac96 commit 815d789

34 files changed

+205144
-0
lines changed

tests/e2e/models/operators/optest1/input/data-series/load_unique.tsv

Lines changed: 8759 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/minimum_generation_modulation_unique_prod.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/minimum_generation_modulation_unique_prod2.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/minimum_generation_modulation_unique_prod3.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/p_max_cluster_unique_prod.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/p_max_cluster_unique_prod2.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.

tests/e2e/models/operators/optest1/input/data-series/p_max_cluster_unique_prod3.tsv

Lines changed: 8760 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Copyright (c) 2024, RTE (https://www.rte-france.com)
2+
#
3+
# See AUTHORS.txt
4+
#
5+
# This Source Code Form is subject to the terms of the Mozilla Public
6+
# License, v. 2.0. If a copy of the MPL was not distributed with this
7+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8+
#
9+
# SPDX-License-Identifier: MPL-2.0
10+
#
11+
# This file is part of the Antares project.
12+
library:
13+
id: test_lib
14+
description: Antares historic model library
15+
16+
17+
port-types:
18+
- id: flow
19+
description: A port that transfers power flow.
20+
fields:
21+
- id: flow
22+
23+
models:
24+
- id: area
25+
parameters:
26+
- id: spillage_cost
27+
- id: ens_cost
28+
variables:
29+
- id: spillage
30+
lower-bound: 0
31+
variable-type: continuous
32+
- id: unsupplied_energy
33+
lower-bound: 0
34+
variable-type: continuous
35+
ports:
36+
- id: balance_port
37+
type: flow
38+
binding-constraints:
39+
- id: balance
40+
expression: sum_connections(balance_port.flow) = spillage - unsupplied_energy
41+
objective-contributions:
42+
- id: objective
43+
expression: expec(sum(spillage_cost * spillage + ens_cost * unsupplied_energy))
44+
45+
- id: load
46+
parameters:
47+
- id: load
48+
time-dependent: true
49+
scenario-dependent: true
50+
ports:
51+
- id: balance_port
52+
type: flow
53+
port-field-definitions:
54+
- port: balance_port
55+
field: flow
56+
definition: -load
57+
58+
59+
60+
61+
- id: thermal
62+
parameters:
63+
- id: minimum_generation_modulation
64+
scenario-dependent: true
65+
time-dependent: true
66+
- id: p_max_cluster # timeseries that takes outages into account
67+
scenario-dependent: true
68+
time-dependent: true
69+
- id: p_min_unit
70+
- id: p_max_unit
71+
- id: generation_cost
72+
- id: startup_cost
73+
- id: fixed_cost
74+
- id: d_min_up
75+
- id: d_min_down
76+
- id: unit_count
77+
variables:
78+
- id: generation
79+
lower-bound: min(p_max_cluster, minimum_generation_modulation * unit_count * p_max_unit)
80+
upper-bound: p_max_cluster
81+
variable-type: continuous
82+
- id: nb_units_on
83+
lower-bound: ceil(min(p_max_cluster, minimum_generation_modulation * unit_count * p_max_unit)/p_max_unit)
84+
upper-bound: ceil(p_max_cluster/p_max_unit)
85+
variable-type: continuous #integer
86+
- id: nb_starting
87+
lower-bound: 0
88+
variable-type: continuous #integer
89+
- id: nb_stopping
90+
lower-bound: 0
91+
variable-type: continuous #integer
92+
- id: nb_failing
93+
lower-bound: 0
94+
upper-bound: max(0, (ceil(p_max_cluster/p_max_unit))[t-1] - (ceil(p_max_cluster/p_max_unit)))
95+
variable-type: continuous #integer
96+
ports:
97+
- id: balance_port
98+
type: flow
99+
port-field-definitions:
100+
- port: balance_port
101+
field: flow
102+
definition: generation
103+
constraints:
104+
- id: max_generation
105+
expression: generation <= nb_units_on * p_max_unit
106+
- id: min_generation
107+
expression: generation >= nb_units_on * p_min_unit
108+
- id: on_units_dynamics
109+
expression: nb_units_on = nb_units_on[t-1] + nb_starting - nb_stopping
110+
- id: nb_failing_lower_than_stopping
111+
expression: nb_failing <= nb_stopping
112+
- id: min_up_duration
113+
expression: sum(t-d_min_up + 1 .. t, nb_starting - nb_failing) <= nb_units_on
114+
- id: min_down_duration
115+
expression: sum(t-d_min_down + 1 .. t, nb_stopping) <= ((ceil(p_max_cluster/p_max_unit)))[t-d_min_down] - nb_units_on + sum(t-d_min_down + 1 .. t, max(0, ceil(p_max_cluster/p_max_unit) - (ceil(p_max_cluster/p_max_unit))[t-1]))
116+
objective-contributions:
117+
- id: objective
118+
expression: expec(sum(generation_cost * generation + startup_cost * nb_starting + fixed_cost * nb_units_on))
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
system:
2+
components:
3+
- id: unique_prod
4+
model: test_lib.thermal
5+
parameters:
6+
- id: minimum_generation_modulation
7+
scenario-dependent: true
8+
time-dependent: true
9+
value: minimum_generation_modulation_unique_prod
10+
- id: p_max_cluster
11+
scenario-dependent: true
12+
time-dependent: true
13+
value: p_max_cluster_unique_prod
14+
- id: p_min_unit
15+
scenario-dependent: false
16+
time-dependent: false
17+
value: 0.0
18+
- id: p_max_unit
19+
scenario-dependent: false
20+
time-dependent: false
21+
value: 150.0
22+
- id: generation_cost
23+
scenario-dependent: false
24+
time-dependent: false
25+
value: 10.0
26+
- id: startup_cost
27+
scenario-dependent: false
28+
time-dependent: false
29+
value: 0.0
30+
- id: fixed_cost
31+
scenario-dependent: false
32+
time-dependent: false
33+
value: 0.0
34+
- id: d_min_up
35+
scenario-dependent: false
36+
time-dependent: false
37+
value: 1.0
38+
- id: d_min_down
39+
scenario-dependent: false
40+
time-dependent: false
41+
value: 1.0
42+
- id: unit_count
43+
scenario-dependent: false
44+
time-dependent: false
45+
value: 2.0
46+
- id: unique_prod2
47+
model: test_lib.thermal
48+
parameters:
49+
- id: minimum_generation_modulation
50+
scenario-dependent: true
51+
time-dependent: true
52+
value: minimum_generation_modulation_unique_prod2
53+
- id: p_max_cluster
54+
scenario-dependent: true
55+
time-dependent: true
56+
value: p_max_cluster_unique_prod2
57+
- id: p_min_unit
58+
scenario-dependent: false
59+
time-dependent: false
60+
value: 0.0
61+
- id: p_max_unit
62+
scenario-dependent: false
63+
time-dependent: false
64+
value: 200.0
65+
- id: generation_cost
66+
scenario-dependent: false
67+
time-dependent: false
68+
value: 20.0
69+
- id: startup_cost
70+
scenario-dependent: false
71+
time-dependent: false
72+
value: 0.0
73+
- id: fixed_cost
74+
scenario-dependent: false
75+
time-dependent: false
76+
value: 0.0
77+
- id: d_min_up
78+
scenario-dependent: false
79+
time-dependent: false
80+
value: 1.0
81+
- id: d_min_down
82+
scenario-dependent: false
83+
time-dependent: false
84+
value: 1.0
85+
- id: unit_count
86+
scenario-dependent: false
87+
time-dependent: false
88+
value: 1.0
89+
- id: unique_prod3
90+
model: test_lib.thermal
91+
parameters:
92+
- id: minimum_generation_modulation
93+
scenario-dependent: true
94+
time-dependent: true
95+
value: minimum_generation_modulation_unique_prod3
96+
- id: p_max_cluster
97+
scenario-dependent: true
98+
time-dependent: true
99+
value: p_max_cluster_unique_prod3
100+
- id: p_min_unit
101+
scenario-dependent: false
102+
time-dependent: false
103+
value: 0.0
104+
- id: p_max_unit
105+
scenario-dependent: false
106+
time-dependent: false
107+
value: 40.0
108+
- id: generation_cost
109+
scenario-dependent: false
110+
time-dependent: false
111+
value: 5.0
112+
- id: startup_cost
113+
scenario-dependent: false
114+
time-dependent: false
115+
value: 0.0
116+
- id: fixed_cost
117+
scenario-dependent: false
118+
time-dependent: false
119+
value: 0.0
120+
- id: d_min_up
121+
scenario-dependent: false
122+
time-dependent: false
123+
value: 1.0
124+
- id: d_min_down
125+
scenario-dependent: false
126+
time-dependent: false
127+
value: 1.0
128+
- id: unit_count
129+
scenario-dependent: false
130+
time-dependent: false
131+
value: 3.0
132+
- id: load_unique
133+
model: test_lib.load
134+
parameters:
135+
- id: load
136+
scenario-dependent: true
137+
time-dependent: true
138+
value: load_unique
139+
- id: unique
140+
model: test_lib.area
141+
parameters:
142+
- id: ens_cost
143+
scenario-dependent: false
144+
time-dependent: false
145+
value: 500.0
146+
- id: spillage_cost
147+
scenario-dependent: false
148+
time-dependent: false
149+
value: 10.0
150+
connections:
151+
- component1: unique_prod
152+
component2: unique
153+
port1: balance_port
154+
port2: balance_port
155+
- component1: unique_prod2
156+
component2: unique
157+
port1: balance_port
158+
port2: balance_port
159+
- component1: unique_prod3
160+
component2: unique
161+
port1: balance_port
162+
port2: balance_port
163+
- component1: load_unique
164+
component2: unique
165+
port1: balance_port
166+
port2: balance_port
167+
id: e2e_general_test_177428933315
168+
nodes: []

0 commit comments

Comments
 (0)