-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOWTO.txt
More file actions
101 lines (64 loc) · 4.13 KB
/
HOWTO.txt
File metadata and controls
101 lines (64 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
How to use pytreemap:
*Setup*
1. You will need to have Python 3.3 or greater installed on your system, along with the PySide, Numpy and Scipy packages. The easiest way to achieve this is to download Pyzo, which is a scientific python distribution based on Python 3.4. You can download Pyzo at the following address: http://www.pyzo.org/downloads.html
2. You will need to ensure that you add the pyzo installation directory (or the base directory of your python distribution), to your PATH variable so that you can run `python`* from the command line.
* the actual command may be different depending on your python distribution; e.g. on Ubuntu the command for Python 3.3 is `python3`, and you should use this command wherever you see `python` below.
3. You will need to make sure that pytreemap is in the python path. You can do this by moving the directory 'pytreemap' to <pyzo installation directory>/Lib/site-packages.
4. Finally, you can try pytreemap by opening up a terminal, navigating to this directory and running the following command:
>>> python run_pytreemap.py
You can try a treemap diagram by running
>>> python run_treemap.py
You can try a tree diagram by running
>>> python run_tree.py
You can try a system diagram by running
>>> python oneline.py
For instructions on how to use these files to look at other data, see the comments in each file.
*Using your own data*
If you want to input your own system and your own contingency measurements, you can do that by formatting your data into json files.
1.
If you want to use a system other than the IEEE 30-bus or IEEE 118-bus systems supplied, you need to create a file representing that data in the same format as the files given (e.g.'case30_geometry.json') The format for this file is a json list of elements with property-> value attributes. The different elements should have the following information:
a) Branch
type: 'Branch'
id: <numeric id of the element>
buses: <list of integers corresponding to ids of buses at each end of the branch>
pos: <list of x-y points describing the multisegment path of the branch>
b) Bus
type: 'Bus'
id: <numeric id of the element>
pos: <x,y> point describing the location of the bus
c) Generator
type: 'Gen'
id: <numeric id of the element>
pos: []
bus: <id of bus it is connected to>
d) Transformer
type: 'Transformer'
id: <numeric id of the element>
pos: []
connected: {
'Bus': <list of ids of buses on the transformer>
'Branch': <list of ids of Branches represented in the transformer>
}
The representation of transformers used in this software is an equivalent combination of buses and branches. It is entirely optional to include any transformers in the geometry file
2.
If you want to use your own results, you need to format them in immitation of the results files supplied, eg. 'cpfResults_small.json'. You can use any index to evaluate your contingencies as long as it produces a single numeric value per contingency scenario.
This software interprets the value of the base load to be the maximum value the index could have and that 'load' in each contingency scenario would be less than 'baseLoad' but greater than 0. and calculates 'baseLoad - load' for every contingency. For this reason you should ensure that the values for 'baseLoad' and for 'load' of each element are positive and that 'baseLoad' is the highest value.
The results should be reported as a json structure:
{
"baseLoad": <value of index for the unfaulted base case>
"geometry_file": <name of geometry file described above. the geometry file must be in the same directory>
"faults": [
<list of contingency scenarios as described below>
]
}
The listing for each fault should be in the following format:
{
"load": <value of the index for the faulted case>
"elements"{
"Bus": <list of id numbers of buses involved in the contingency>
"Branch": <list of id numbers of branches involved in the contingency>
"Gen": <list of id numbers of generators involved in the contingency>
"Transformer": <list of id numbers of transformers involved in the contingency>
}
}
For more details, see the attached data files.