-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadjust_Automatic.py
59 lines (56 loc) · 1.6 KB
/
adjust_Automatic.py
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
import os
from adjust import AdjustTrend
from const import *
adjustProcess = AdjustTrend(templatePath, runPath, resPath)
print('Adjust trendData of input files.....')
adjustList = []
while (True):
target = 7
while target not in [0,1,2,3,4,5]:
print('\nPlease input 0-4; 0:generators(LF.L5) 1:loads(LF.L6)\n' + \
' 2:transformers(LF.L3) 3:acLiniesData(LF.L2)\n' + \
' 4: run 5:exit')
target = int(input('input = '))
if target == 5:
print('Exit!')
break
if target == 4:
print(adjustList)
adjustProcess(adjustList)
adjustList = []
continue
line = 0
lineMax = adjustProcess.get_lines(target)
while line < 1 or line > lineMax:
print('please input the line of data to change( range:[1: {}], int)'.format(lineMax))
line = int(input('line = '))
if line < 1 or line > lineMax:
print('{} out of range [1: {}]'.format(line, lineMax))
adjustList.append({
'target': target,
'value': {},
'line': line,
'auto': True
})
# adjustList = [
# {
# 'target': 'generators',
# 'value': {
# 'mark': 1
# },
# 'line': 1,
# 'auto': True
# },
# {
# 'target': 'acLines',
# 'value': {},
# 'line': 3,
# 'auto': True
# },
# {
# 'target': 'loads',
# 'value': {},
# 'line': 3,
# 'auto': True
# }
# ]