Market Calibration Areas¶
Market calibration areas (samkjøringsområder) is used to group busbars into greater areas.
Motivating example:¶
flowchart LR
subgraph MarketArea1
numedal("Numedal")
end
subgraph MarketArea2
otta("Otta")
end
numedal -. "⚡dc⚡" .- otta
Numedal belongs to area MarketArea1.
Otta belongs to MarketArea2.
Numedal and Otta are connected with a DC-line.
This JSON example represents the above model, where certain non-relevant, but required parts are cut for clarity:
1{
2 "model": {
3 "market_calibration_areas": [
4 {
5 "name": "market_area_1"
6 },
7 {
8 "name": "market_area_2"
9 }
10 ],
11 "busbars": [
12 {
13 "name": "numedal"
14 },
15 {
16 "name": "otta"
17 }
18 ],
19 "dclines": [
20 {
21 "name": "DC_A"
22 }
23 ],
24 "connections": [
25 {
26 "from": "numedal",
27 "to": "DC_A"
28 },
29 {
30 "from": "DC_A",
31 "to": "otta"
32 },
33 {
34 "from": "numedal",
35 "to": "market_area_1"
36 },
37 {
38 "from": "otta",
39 "to": "market_area_2"
40 }
41 ]
42 }
43}
Multiple busbars:¶
To expand on the example above, to have multiple busbars per area, connect the busbar object to the market calibration area.
flowchart LR
subgraph MarketArea1
numedal("Numedal")
rjukan("Rjukan")
ustaoset("Ustaoset")
end
subgraph MarketArea2
otta("Otta")
nordherad("Nordherad")
litldalen("Litldalen")
end
numedal -. "⚡dc1⚡" .- otta
rjukan -. "⚡" .- numedal
ustaoset -. "⚡" .- numedal
nordherad -. "⚡" .- otta
litldalen -. "⚡" .- otta
Full JSON source listing:¶
Example code:¶
1import os
2
3from pyltmapi import LtmSession
4
5with LtmSession("market_calibration_areas_session") as session:
6 session.load(filename="market_calibration_areas.json")
7 session.write_model()
8
9
10
11from pyltmapi import LtmSession
12
13with LtmSession("simulation") as session:
14 lake_mead = session.model.add("busbar", "lake_mead")
15 dam = session.model.add("reservoir", "hoover_dam")
16 plant = session.model.add("plant", "power_plant")
17 river = session.model.add("reservoir", "colorado_river")
18
19 session.connect(lake_mead, dam)
20 session.connect(dam, plant)
21 session.connect(plant, river)
22
23 session.write_model()
24 _, results = session.execute_model()