pysddp 0.0.70__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PySDDP/Pde.py +304 -0
- PySDDP/Pen.py +68 -0
- PySDDP/Pmo.py +73 -0
- PySDDP/PowerSystem.py +2852 -0
- PySDDP/__init__.py +0 -0
- PySDDP/dadosgerais.py +20 -0
- PySDDP/decomp/__init__.py +0 -0
- PySDDP/decomp/script/__init__.py +0 -0
- PySDDP/decomp/script/caso.py +71 -0
- PySDDP/decomp/script/dadgnl.py +249 -0
- PySDDP/decomp/script/hidr.py +230 -0
- PySDDP/decomp/script/indice.py +74 -0
- PySDDP/decomp/script/perdas.py +267 -0
- PySDDP/decomp/script/polinjus.py +156 -0
- PySDDP/decomp/script/templates/__init__.py +0 -0
- PySDDP/decomp/script/templates/arquivo_entrada.py +61 -0
- PySDDP/decomp/script/templates/caso.py +41 -0
- PySDDP/decomp/script/templates/dadgnl.py +87 -0
- PySDDP/decomp/script/templates/hidr.py +266 -0
- PySDDP/decomp/script/templates/indice.py +44 -0
- PySDDP/decomp/script/templates/perdas.py +76 -0
- PySDDP/decomp/script/templates/polinjus.py +80 -0
- PySDDP/decomp/script/templates/vazoes.py +62 -0
- PySDDP/decomp/script/vazoes.py +125 -0
- PySDDP/dessem/__init__.py +0 -0
- PySDDP/dessem/script/__init__.py +0 -0
- PySDDP/dessem/script/areacont.py +146 -0
- PySDDP/dessem/script/arquivos.py +126 -0
- PySDDP/dessem/script/bateria.py +93 -0
- PySDDP/dessem/script/cadterm.py +277 -0
- PySDDP/dessem/script/cotasr11.py +84 -0
- PySDDP/dessem/script/curvtviag.py +121 -0
- PySDDP/dessem/script/dadger.py +1777 -0
- PySDDP/dessem/script/dados_eletricos.py +527 -0
- PySDDP/dessem/script/dadvaz.py +178 -0
- PySDDP/dessem/script/deflant.py +126 -0
- PySDDP/dessem/script/dessopc.py +203 -0
- PySDDP/dessem/script/eolica.py +129 -0
- PySDDP/dessem/script/hidr.py +224 -0
- PySDDP/dessem/script/ilibs.py +73 -0
- PySDDP/dessem/script/ilstri.py +86 -0
- PySDDP/dessem/script/indelet.py +120 -0
- PySDDP/dessem/script/infofcf.py +256 -0
- PySDDP/dessem/script/operuh.py +270 -0
- PySDDP/dessem/script/operut.py +221 -0
- PySDDP/dessem/script/polinjus.py +212 -0
- PySDDP/dessem/script/ptoper.py +118 -0
- PySDDP/dessem/script/rampas.py +148 -0
- PySDDP/dessem/script/respot.py +128 -0
- PySDDP/dessem/script/respotele.py +123 -0
- PySDDP/dessem/script/restseg.py +258 -0
- PySDDP/dessem/script/rmpflx.py +172 -0
- PySDDP/dessem/script/rstlpp.py +297 -0
- PySDDP/dessem/script/simul.py +149 -0
- PySDDP/dessem/script/solar.py +131 -0
- PySDDP/dessem/script/templates/__init__.py +0 -0
- PySDDP/dessem/script/templates/areacont.py +53 -0
- PySDDP/dessem/script/templates/arquivo_entrada.py +65 -0
- PySDDP/dessem/script/templates/arquivos.py +271 -0
- PySDDP/dessem/script/templates/bateria.py +51 -0
- PySDDP/dessem/script/templates/cadterm.py +105 -0
- PySDDP/dessem/script/templates/cotasr11.py +46 -0
- PySDDP/dessem/script/templates/curvtviag.py +67 -0
- PySDDP/dessem/script/templates/dadger.py +429 -0
- PySDDP/dessem/script/templates/dados_eletricos.py +136 -0
- PySDDP/dessem/script/templates/dadvaz.py +81 -0
- PySDDP/dessem/script/templates/deflant.py +53 -0
- PySDDP/dessem/script/templates/dessopc.py +197 -0
- PySDDP/dessem/script/templates/eolica.py +89 -0
- PySDDP/dessem/script/templates/hidr.py +242 -0
- PySDDP/dessem/script/templates/ilibs.py +45 -0
- PySDDP/dessem/script/templates/ilstri.py +41 -0
- PySDDP/dessem/script/templates/indelet.py +52 -0
- PySDDP/dessem/script/templates/infofcf.py +111 -0
- PySDDP/dessem/script/templates/operuh.py +93 -0
- PySDDP/dessem/script/templates/operut.py +73 -0
- PySDDP/dessem/script/templates/polinjus.py +79 -0
- PySDDP/dessem/script/templates/ptoper.py +68 -0
- PySDDP/dessem/script/templates/rampas.py +51 -0
- PySDDP/dessem/script/templates/respot.py +65 -0
- PySDDP/dessem/script/templates/respotele.py +49 -0
- PySDDP/dessem/script/templates/restseg.py +108 -0
- PySDDP/dessem/script/templates/rmpflx.py +58 -0
- PySDDP/dessem/script/templates/rstlpp.py +93 -0
- PySDDP/dessem/script/templates/simul.py +69 -0
- PySDDP/dessem/script/templates/solar.py +89 -0
- PySDDP/dessem/script/templates/tolperd.py +88 -0
- PySDDP/dessem/script/templates/vazao_lateral.py +67 -0
- PySDDP/dessem/script/tolperd.py +169 -0
- PySDDP/dessem/script/vazao_lateral.py +131 -0
- PySDDP/fcf.py +35 -0
- PySDDP/hidr.py +1202 -0
- PySDDP/interc.py +14 -0
- PySDDP/mixins.py +16 -0
- PySDDP/newave/__init__.py +0 -0
- PySDDP/newave/script/__init__.py +0 -0
- PySDDP/newave/script/arquivos.py +99 -0
- PySDDP/newave/script/caso.py +71 -0
- PySDDP/newave/script/confhd.py +1710 -0
- PySDDP/newave/script/dger.py +1106 -0
- PySDDP/newave/script/exph.py +231 -0
- PySDDP/newave/script/hidr.py +397 -0
- PySDDP/newave/script/modif.py +289 -0
- PySDDP/newave/script/ree.py +440 -0
- PySDDP/newave/script/sistema.py +837 -0
- PySDDP/newave/script/templates/__init__.py +0 -0
- PySDDP/newave/script/templates/arquivo_entrada.py +66 -0
- PySDDP/newave/script/templates/arquivos.py +415 -0
- PySDDP/newave/script/templates/caso.py +41 -0
- PySDDP/newave/script/templates/confhd.py +444 -0
- PySDDP/newave/script/templates/dger.py +827 -0
- PySDDP/newave/script/templates/exph.py +42 -0
- PySDDP/newave/script/templates/hidr.py +245 -0
- PySDDP/newave/script/templates/modif.py +43 -0
- PySDDP/newave/script/templates/ree.py +49 -0
- PySDDP/newave/script/templates/sistema.py +64 -0
- PySDDP/newave/script/templates/term.py +99 -0
- PySDDP/newave/script/templates/vazoes.py +41 -0
- PySDDP/newave/script/term.py +167 -0
- PySDDP/newave/script/vazoes.py +76 -0
- PySDDP/planerg.py +100 -0
- PySDDP/pmo_old.py +852 -0
- PySDDP/resequiv.py +171 -0
- PySDDP/submercado.py +207 -0
- PySDDP/term.py +23 -0
- pysddp-0.0.70.dist-info/LICENSE.txt +21 -0
- pysddp-0.0.70.dist-info/METADATA +86 -0
- pysddp-0.0.70.dist-info/RECORD +130 -0
- pysddp-0.0.70.dist-info/WHEEL +5 -0
- pysddp-0.0.70.dist-info/top_level.txt +1 -0
PySDDP/Pde.py
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from PySDDP.dessem.script.arquivos import Arquivos
|
|
3
|
+
from PySDDP.dessem.script.areacont import Areacont
|
|
4
|
+
from PySDDP.dessem.script.bateria import Bateria
|
|
5
|
+
from PySDDP.dessem.script.cadterm import CadTerm
|
|
6
|
+
from PySDDP.dessem.script.hidr import Hidr
|
|
7
|
+
from PySDDP.dessem.script.cotasr11 import Cotasr11
|
|
8
|
+
from PySDDP.dessem.script.curvtviag import Curvtviag
|
|
9
|
+
from PySDDP.dessem.script.dadvaz import DadVaz
|
|
10
|
+
from PySDDP.dessem.script.deflant import DeflAnt
|
|
11
|
+
from PySDDP.dessem.script.eolica import Eolica
|
|
12
|
+
from PySDDP.dessem.script.ilstri import Ilstri
|
|
13
|
+
from PySDDP.dessem.script.indelet import Indelet
|
|
14
|
+
from PySDDP.dessem.script.infofcf import Infofcf
|
|
15
|
+
from PySDDP.dessem.script.operuh import Operuh
|
|
16
|
+
from PySDDP.dessem.script.operut import Operut
|
|
17
|
+
from PySDDP.dessem.script.ptoper import Ptoper
|
|
18
|
+
from PySDDP.dessem.script.rampas import Rampas
|
|
19
|
+
from PySDDP.dessem.script.respot import Respot
|
|
20
|
+
from PySDDP.dessem.script.respotele import Respotele
|
|
21
|
+
from PySDDP.dessem.script.restseg import Restseg
|
|
22
|
+
from PySDDP.dessem.script.rmpflx import Rmpflx
|
|
23
|
+
from PySDDP.dessem.script.rstlpp import Rstlpp # Não está lendo o nome deste arquivo
|
|
24
|
+
from PySDDP.dessem.script.simul import Simul
|
|
25
|
+
from PySDDP.dessem.script.solar import Solar # Não está lendo o nome deste arquivo
|
|
26
|
+
from PySDDP.dessem.script.tolperd import Tolperd
|
|
27
|
+
from PySDDP.dessem.script.dadger import Dadger
|
|
28
|
+
from PySDDP.dessem.script.dados_eletricos import DadosEletricos
|
|
29
|
+
from PySDDP.dessem.script.dessopc import Dessopc
|
|
30
|
+
from PySDDP.dessem.script.ilibs import ILibs
|
|
31
|
+
from PySDDP.dessem.script.vazao_lateral import VazaoLateral
|
|
32
|
+
from PySDDP.dessem.script.polinjus import PolinJus
|
|
33
|
+
|
|
34
|
+
class Dessem(object):
|
|
35
|
+
|
|
36
|
+
path_ = "/Users/andremarcato/Dropbox/Projeto ReadDessem/DS_CCEE_082020_SEMREDE_RV0D01"
|
|
37
|
+
file_ = "dessem.arq"
|
|
38
|
+
arquivos = None
|
|
39
|
+
|
|
40
|
+
def __init__(self, caminho, nome):
|
|
41
|
+
|
|
42
|
+
nao_lidos = list()
|
|
43
|
+
|
|
44
|
+
self.path_ = caminho
|
|
45
|
+
self.file_ = nome
|
|
46
|
+
self.arquivos = Arquivos()
|
|
47
|
+
self.arquivos.ler(os.path.join(self.path_, self.file_))
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
file_areacont = self.arquivos.areacont
|
|
51
|
+
self.areacont = Areacont()
|
|
52
|
+
self.areacont.ler(os.path.join(self.path_, file_areacont))
|
|
53
|
+
except Exception as err:
|
|
54
|
+
nao_lidos.append(['areacont', err])
|
|
55
|
+
|
|
56
|
+
try:
|
|
57
|
+
file_cadterm = self.arquivos.cadterm
|
|
58
|
+
self.cadterm = CadTerm()
|
|
59
|
+
self.cadterm.ler(os.path.join(self.path_, file_cadterm))
|
|
60
|
+
except Exception as err:
|
|
61
|
+
nao_lidos.append(['cadterm', err])
|
|
62
|
+
|
|
63
|
+
try:
|
|
64
|
+
file_hidr = self.arquivos.cadusih
|
|
65
|
+
self.hidr = Hidr()
|
|
66
|
+
self.hidr.ler(os.path.join(self.path_, file_hidr))
|
|
67
|
+
except Exception as err:
|
|
68
|
+
nao_lidos.append(['cadusih', err])
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
file_dadvaz = self.arquivos.vazoes
|
|
72
|
+
self.dadvaz = DadVaz()
|
|
73
|
+
self.dadvaz.ler(os.path.join(self.path_, file_dadvaz))
|
|
74
|
+
except Exception as err:
|
|
75
|
+
nao_lidos.append(['vazoes', err])
|
|
76
|
+
|
|
77
|
+
try:
|
|
78
|
+
file_deflant = self.arquivos.deflant
|
|
79
|
+
self.deflant = DeflAnt()
|
|
80
|
+
self.deflant.ler(os.path.join(self.path_, file_deflant))
|
|
81
|
+
except Exception as err:
|
|
82
|
+
nao_lidos.append(['deflant', err])
|
|
83
|
+
|
|
84
|
+
try:
|
|
85
|
+
file_eolica = self.arquivos.eolica
|
|
86
|
+
self.eolica = Eolica()
|
|
87
|
+
self.eolica.ler(os.path.join(self.path_, file_eolica))
|
|
88
|
+
except Exception as err:
|
|
89
|
+
nao_lidos.append(['eolica', err])
|
|
90
|
+
|
|
91
|
+
try:
|
|
92
|
+
file_ilstri = self.arquivos.ilstri
|
|
93
|
+
self.ilstri = Ilstri()
|
|
94
|
+
self.ilstri.ler(os.path.join(self.path_, file_ilstri))
|
|
95
|
+
except Exception as err:
|
|
96
|
+
nao_lidos.append(['ilstri', err])
|
|
97
|
+
|
|
98
|
+
try:
|
|
99
|
+
file_infofcf = self.arquivos.infofcf
|
|
100
|
+
self.infofcf = Infofcf()
|
|
101
|
+
self.infofcf.ler(os.path.join(self.path_, file_infofcf))
|
|
102
|
+
except Exception as err:
|
|
103
|
+
nao_lidos.append(['infofcf', err])
|
|
104
|
+
|
|
105
|
+
try:
|
|
106
|
+
file_operuh = self.arquivos.operuh
|
|
107
|
+
self.operuh = Operuh()
|
|
108
|
+
self.operuh.ler(os.path.join(self.path_, file_operuh))
|
|
109
|
+
except Exception as err:
|
|
110
|
+
nao_lidos.append(['operuh', err])
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
file_operut = self.arquivos.operut
|
|
114
|
+
self.operut = Operut()
|
|
115
|
+
self.operut.ler(os.path.join(self.path_, file_operut))
|
|
116
|
+
except Exception as err:
|
|
117
|
+
nao_lidos.append(['operut', err])
|
|
118
|
+
|
|
119
|
+
try:
|
|
120
|
+
file_ptoper = self.arquivos.ptoper
|
|
121
|
+
self.ptoper = Ptoper()
|
|
122
|
+
self.ptoper.ler(os.path.join(self.path_, file_ptoper))
|
|
123
|
+
except Exception as err:
|
|
124
|
+
nao_lidos.append(['ptoper', err])
|
|
125
|
+
|
|
126
|
+
try:
|
|
127
|
+
file_rampas = self.arquivos.rampas
|
|
128
|
+
self.rampas = Rampas()
|
|
129
|
+
self.rampas.ler(os.path.join(self.path_, file_rampas))
|
|
130
|
+
except Exception as err:
|
|
131
|
+
nao_lidos.append(['rampas', err])
|
|
132
|
+
|
|
133
|
+
try:
|
|
134
|
+
file_respot = self.arquivos.respot
|
|
135
|
+
self.respot = Respot()
|
|
136
|
+
self.respot.ler(os.path.join(self.path_, file_respot))
|
|
137
|
+
except Exception as err:
|
|
138
|
+
nao_lidos.append(['respot', err])
|
|
139
|
+
|
|
140
|
+
try:
|
|
141
|
+
file_respotele = self.arquivos.respotele
|
|
142
|
+
self.respotele = Respotele()
|
|
143
|
+
self.respotele.ler(os.path.join(self.path_, file_respotele))
|
|
144
|
+
except Exception as err:
|
|
145
|
+
nao_lidos.append(['respotele', err])
|
|
146
|
+
|
|
147
|
+
try:
|
|
148
|
+
file_restseg = self.arquivos.restseg
|
|
149
|
+
self.restseg = Restseg()
|
|
150
|
+
self.restseg.ler(os.path.join(self.path_, file_restseg))
|
|
151
|
+
except Exception as err:
|
|
152
|
+
nao_lidos.append(['restseg', err])
|
|
153
|
+
|
|
154
|
+
try:
|
|
155
|
+
file_dadger = self.arquivos.dadger
|
|
156
|
+
self.dadger = Dadger()
|
|
157
|
+
self.dadger.ler(os.path.join(self.path_, file_dadger))
|
|
158
|
+
except Exception as err:
|
|
159
|
+
nao_lidos.append(['dadger', err])
|
|
160
|
+
|
|
161
|
+
try:
|
|
162
|
+
file_rstlpp = self.arquivos.rstlpp
|
|
163
|
+
self.rstlpp = Rstlpp()
|
|
164
|
+
self.rstlpp.ler(os.path.join(self.path_, file_rstlpp))
|
|
165
|
+
except Exception as err:
|
|
166
|
+
nao_lidos.append(['rstlpp', err])
|
|
167
|
+
|
|
168
|
+
try:
|
|
169
|
+
file_cotasr11 = self.arquivos.cotasr11
|
|
170
|
+
self.cotasr11 = Cotasr11()
|
|
171
|
+
self.cotasr11.ler(os.path.join(self.path_, file_cotasr11))
|
|
172
|
+
except Exception as err:
|
|
173
|
+
nao_lidos.append(['cotasr11', err])
|
|
174
|
+
|
|
175
|
+
try:
|
|
176
|
+
file_curvatviag = self.arquivos.curvtviag
|
|
177
|
+
self.curvatviag = Curvtviag()
|
|
178
|
+
self.curvatviag.ler(os.path.join(self.path_, file_curvatviag))
|
|
179
|
+
except Exception as err:
|
|
180
|
+
nao_lidos.append(['curvtviag', err])
|
|
181
|
+
|
|
182
|
+
try:
|
|
183
|
+
file_dessopc = self.arquivos.dessopc
|
|
184
|
+
self.dessopc = Dessopc()
|
|
185
|
+
self.dessopc.ler(os.path.join(self.path_, file_dessopc))
|
|
186
|
+
except Exception as err:
|
|
187
|
+
nao_lidos.append(['dessopc', err])
|
|
188
|
+
|
|
189
|
+
try:
|
|
190
|
+
file_ilibs = self.arquivos.ilibs
|
|
191
|
+
self.ilibs = ILibs()
|
|
192
|
+
self.ilibs.ler(os.path.join(self.path_, file_ilibs))
|
|
193
|
+
|
|
194
|
+
except Exception as err:
|
|
195
|
+
nao_lidos.append(['ilibs', err])
|
|
196
|
+
|
|
197
|
+
# Leitura dos arquivos das funcionalidades libs:
|
|
198
|
+
for idx, value in self.ilibs.bloco_indice["df"].iterrows():
|
|
199
|
+
|
|
200
|
+
# Leitura do arquivo vazaolateral.csv:
|
|
201
|
+
if value["identificador"] == "HIDRELETRICA-CADASTRO-RESERVATORIO":
|
|
202
|
+
|
|
203
|
+
try:
|
|
204
|
+
file_vazao_lateral = value["arquivo"]
|
|
205
|
+
self.vazao_lateral = VazaoLateral()
|
|
206
|
+
self.vazao_lateral.ler(os.path.join(self.path_, file_vazao_lateral))
|
|
207
|
+
except Exception as err:
|
|
208
|
+
nao_lidos.append(['vazao_lateral', err])
|
|
209
|
+
|
|
210
|
+
# Leitura do arquivo polinjus.csv:
|
|
211
|
+
elif value["identificador"] == "HIDRELETRICA-CADASTRO-RESERVATORIO-CURVAJUSANTE":
|
|
212
|
+
|
|
213
|
+
try:
|
|
214
|
+
file_polinjus = value["arquivo"]
|
|
215
|
+
self.polinjus = PolinJus()
|
|
216
|
+
self.polinjus.ler(os.path.join(self.path_, file_polinjus))
|
|
217
|
+
except Exception as err:
|
|
218
|
+
nao_lidos.append(['polinjus', err])
|
|
219
|
+
|
|
220
|
+
else:
|
|
221
|
+
pass
|
|
222
|
+
|
|
223
|
+
try:
|
|
224
|
+
file_bateria = self.arquivos.bateria
|
|
225
|
+
self.bateria = Bateria()
|
|
226
|
+
self.bateria.ler(os.path.join(self.path_, file_bateria))
|
|
227
|
+
except Exception as err:
|
|
228
|
+
nao_lidos.append(['bateria', err])
|
|
229
|
+
|
|
230
|
+
try:
|
|
231
|
+
file_rmpflx = self.arquivos.rmpflx
|
|
232
|
+
self.rmpflx = Rmpflx()
|
|
233
|
+
self.rmpflx.ler(os.path.join(self.path_, file_rmpflx))
|
|
234
|
+
except Exception as err:
|
|
235
|
+
nao_lidos.append(['rmpflx', err])
|
|
236
|
+
|
|
237
|
+
try:
|
|
238
|
+
file_simul = self.arquivos.simul
|
|
239
|
+
self.simul = Simul()
|
|
240
|
+
self.simul.ler(os.path.join(self.path_, file_simul))
|
|
241
|
+
except Exception as err:
|
|
242
|
+
nao_lidos.append(['simul', err])
|
|
243
|
+
|
|
244
|
+
try:
|
|
245
|
+
file_tolperd = self.arquivos.tolperd
|
|
246
|
+
self.tolperd = Tolperd()
|
|
247
|
+
self.tolperd.ler(os.path.join(self.path_, file_tolperd))
|
|
248
|
+
except Exception as err:
|
|
249
|
+
nao_lidos.append(['tolperd', err])
|
|
250
|
+
|
|
251
|
+
try:
|
|
252
|
+
file_solar = self.arquivos.solar
|
|
253
|
+
self.solar = Solar()
|
|
254
|
+
self.solar.ler(os.path.join(self.path_, file_solar))
|
|
255
|
+
except Exception as err:
|
|
256
|
+
nao_lidos.append(['solar', err])
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
try:
|
|
260
|
+
file_desselet = self.arquivos.indelet
|
|
261
|
+
self.indelet = Indelet()
|
|
262
|
+
self.indelet.ler(os.path.join(self.path_, file_desselet))
|
|
263
|
+
|
|
264
|
+
# Dicionários para armazenar os arquivos:
|
|
265
|
+
self.arquivos_de_casos_bases = dict()
|
|
266
|
+
self.arquivos_de_modificacao_casos_bases = dict()
|
|
267
|
+
|
|
268
|
+
#
|
|
269
|
+
# LEITURA DOS ARQUIVOS DE CASOS BASES
|
|
270
|
+
#
|
|
271
|
+
|
|
272
|
+
# Foi utilizado o nome do arquivo e não o padrão (leve, média e pesada), pois foi verificado que em alguns
|
|
273
|
+
# decks estes nomes estavam distintos.
|
|
274
|
+
for idx, value in self.indelet.bloco_base['df'].iterrows():
|
|
275
|
+
chave = value['nome'].replace(' ', '')
|
|
276
|
+
self.arquivos_de_casos_bases[f"{chave}"] = DadosEletricos()
|
|
277
|
+
file_caso_base = value['local'].replace(' ', '')
|
|
278
|
+
try:
|
|
279
|
+
self.arquivos_de_casos_bases[f"{chave}"].ler(os.path.join(self.path_, file_caso_base))
|
|
280
|
+
except Exception as err:
|
|
281
|
+
nao_lidos.append([file_caso_base, err])
|
|
282
|
+
|
|
283
|
+
#
|
|
284
|
+
# LEITURA DOS ARQUIVOS DE MODIFICAÇÕES DOS CASOS BASES
|
|
285
|
+
#
|
|
286
|
+
for idx, value in self.indelet.bloco_periodo['df'].iterrows():
|
|
287
|
+
chave = value['nome'].replace(' ', '')
|
|
288
|
+
self.arquivos_de_modificacao_casos_bases[f"{chave}"] = DadosEletricos(caso_base=False)
|
|
289
|
+
file_modif_caso_base = value['local'].replace(' ', '')
|
|
290
|
+
try:
|
|
291
|
+
self.arquivos_de_modificacao_casos_bases[f"{chave}"].ler(os.path.join(self.path_,
|
|
292
|
+
file_modif_caso_base))
|
|
293
|
+
except Exception as err:
|
|
294
|
+
nao_lidos.append([file_modif_caso_base, err])
|
|
295
|
+
|
|
296
|
+
except Exception as err:
|
|
297
|
+
nao_lidos.append(['indelet', err])
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
if len(nao_lidos) > 0:
|
|
301
|
+
print("Lista de Arquivos Não Lidos:")
|
|
302
|
+
print("----- -- -------- --- ------")
|
|
303
|
+
for arquivo in nao_lidos:
|
|
304
|
+
print("ATENÇÃO! A leitura do arquivo", arquivo[0], "não foi realizada.")
|
PySDDP/Pen.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from PySDDP.newave.script.caso import Caso
|
|
3
|
+
from PySDDP.newave.script.arquivos import Arquivos
|
|
4
|
+
from PySDDP.newave.script.hidr import Hidr
|
|
5
|
+
from PySDDP.newave.script.vazoes import Vazoes
|
|
6
|
+
from PySDDP.newave.script.confhd import Confhd
|
|
7
|
+
from PySDDP.newave.script.dger import Dger
|
|
8
|
+
from PySDDP.newave.script.modif import Modif
|
|
9
|
+
from PySDDP.newave.script.exph import Exph
|
|
10
|
+
from PySDDP.newave.script.ree import Ree
|
|
11
|
+
from PySDDP.newave.script.term import Term
|
|
12
|
+
from PySDDP.newave.script.sistema import Sistema
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Newave(object):
|
|
16
|
+
|
|
17
|
+
path_ = "/Users/andremarcato/Dropbox/Projeto ReadDessem/Deck_Newave"
|
|
18
|
+
file_ = "CASO.DAT"
|
|
19
|
+
caso = None
|
|
20
|
+
arquivos = None
|
|
21
|
+
hidr = None
|
|
22
|
+
|
|
23
|
+
def __init__(self, caminho):
|
|
24
|
+
self.path_ = caminho
|
|
25
|
+
# Realiza Leitura do CASO.DAT
|
|
26
|
+
self.caso = Caso()
|
|
27
|
+
self.caso.ler(os.path.join(self.path_, self.file_))
|
|
28
|
+
# Realiza a Leitura dos Nomes dos Arquivos de Entrada
|
|
29
|
+
self.arquivos = Arquivos()
|
|
30
|
+
self.arquivos.ler(os.path.join(self.path_, self.caso.nome_arquivos))
|
|
31
|
+
# Realiza a Leitura do DGER.DAT
|
|
32
|
+
self.dger = Dger()
|
|
33
|
+
self.dger.ler(os.path.join(self.path_, self.arquivos.dger))
|
|
34
|
+
# Realiza a Leitura do HIDR.DAT
|
|
35
|
+
self.hidr = Hidr()
|
|
36
|
+
self.hidr.ler(os.path.join(self.path_, 'HIDR.DAT'))
|
|
37
|
+
# Realiza a Leitura do VAZOES.DAT
|
|
38
|
+
self.vazoes = Vazoes()
|
|
39
|
+
self.vazoes.ler(os.path.join(self.path_, 'VAZOES.DAT'), self.hidr.nr_usinas)
|
|
40
|
+
# Realiza a Leitura do MODIF.DAT
|
|
41
|
+
self.modif = Modif()
|
|
42
|
+
self.modif.ler(os.path.join(self.path_, self.arquivos.modif))
|
|
43
|
+
# Realiza a Leitura do EXPH.DAT
|
|
44
|
+
self.exph = Exph()
|
|
45
|
+
self.exph.ler(os.path.join(self.path_, self.arquivos.exph))
|
|
46
|
+
# Realiza a Leitura do CONFHD.DAT
|
|
47
|
+
self.confhd = Confhd()
|
|
48
|
+
self.confhd.ler(os.path.join(self.path_, self.arquivos.confhd), self.hidr, self.vazoes, self.dger,
|
|
49
|
+
self.modif, self.exph)
|
|
50
|
+
# Realiza a Leitura do REE.DAT
|
|
51
|
+
self.ree = Ree()
|
|
52
|
+
self.ree.ler(os.path.join(self.path_, self.arquivos.ree), self.confhd)
|
|
53
|
+
# Realiza a Leitura do SISTEMA.DAT
|
|
54
|
+
self.sistema = Sistema()
|
|
55
|
+
self.sistema.ler(os.path.join(self.path_, self.arquivos.sistema), self.dger)
|
|
56
|
+
self.term = Term()
|
|
57
|
+
self.term.ler(os.path.join(self.path_, self.arquivos.term))
|
|
58
|
+
def escrever(self, caminho):
|
|
59
|
+
self.caso.escrever(os.path.join(caminho, 'CASO.DAT'))
|
|
60
|
+
self.arquivos.escrever(os.path.join(caminho, self.caso.nome_arquivos))
|
|
61
|
+
self.dger.escrever(os.path.join(caminho, self.arquivos.dger))
|
|
62
|
+
self.hidr.escrever(os.path.join(caminho, 'HIDR.DAT'))
|
|
63
|
+
self.vazoes.escrever(os.path.join(caminho, 'VAZOES.DAT'))
|
|
64
|
+
self.modif.escrever(os.path.join(caminho, self.arquivos.modif))
|
|
65
|
+
self.exph.escrever(os.path.join(caminho, self.arquivos.exph))
|
|
66
|
+
self.confhd.escrever(os.path.join(caminho, self.arquivos.confhd))
|
|
67
|
+
self.ree.escrever(os.path.join(caminho, self.arquivos.ree))
|
|
68
|
+
self.sistema.escrever((os.path.join(caminho, self.arquivos.sistema)),self.dger)
|
PySDDP/Pmo.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from PySDDP.decomp.script.caso import Caso
|
|
3
|
+
from PySDDP.decomp.script.indice import Indice
|
|
4
|
+
from PySDDP.decomp.script.hidr import Hidr
|
|
5
|
+
from PySDDP.decomp.script.perdas import Perdas
|
|
6
|
+
from PySDDP.decomp.script.dadgnl import DadGnl
|
|
7
|
+
from PySDDP.decomp.script.polinjus import PolinJus
|
|
8
|
+
from PySDDP.decomp.script.vazoes import Vazoes
|
|
9
|
+
|
|
10
|
+
class Decomp(object):
|
|
11
|
+
|
|
12
|
+
def __init__(self, caminho):
|
|
13
|
+
|
|
14
|
+
nao_lidos = list()
|
|
15
|
+
|
|
16
|
+
self.path = caminho
|
|
17
|
+
|
|
18
|
+
# Define revisao default:
|
|
19
|
+
self.rev = "rv0"
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
file_caso = 'caso.dat'
|
|
23
|
+
self.caso = Caso()
|
|
24
|
+
self.caso.ler(os.path.join(self.path, file_caso))
|
|
25
|
+
self.rev = self.caso.bloco_caso["df"]["nome_arq_ind"][0].strip()
|
|
26
|
+
print("OK! Leitura do caso.dat realizada com sucesso.")
|
|
27
|
+
except Exception as err:
|
|
28
|
+
nao_lidos.append(['caso', err])
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
file_dadgnl = f"dadgnl.{self.rev}"
|
|
32
|
+
self.dadgnl = DadGnl()
|
|
33
|
+
self.dadgnl.ler(os.path.join(self.path, file_dadgnl))
|
|
34
|
+
print(f"OK! Leitura do dadgnl.{self.rev} realizada com sucesso.")
|
|
35
|
+
except Exception as err:
|
|
36
|
+
nao_lidos.append(['dadgnl', err])
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
file_hidr = "hidr.dat"
|
|
40
|
+
self.hidr = Hidr()
|
|
41
|
+
self.hidr.ler(os.path.join(self.path, file_hidr))
|
|
42
|
+
except Exception as err:
|
|
43
|
+
nao_lidos.append(['hidr', err])
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
file_perdas = "perdas.dat"
|
|
47
|
+
self.perdas = Perdas()
|
|
48
|
+
self.perdas.ler(os.path.join(self.path, file_perdas))
|
|
49
|
+
print("OK! Leitura do perdas.dat realizada com sucesso.")
|
|
50
|
+
except Exception as err:
|
|
51
|
+
nao_lidos.append(['perdas', err])
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
file_polinjus = "polinjus.dat"
|
|
55
|
+
self.polinjus = PolinJus()
|
|
56
|
+
self.polinjus.ler(os.path.join(self.path, file_polinjus))
|
|
57
|
+
print("OK! Leitura do polinjus.dat realizada com sucesso.")
|
|
58
|
+
except Exception as err:
|
|
59
|
+
nao_lidos.append(['polinjus', err])
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
file_vazoes = f"vazoes.{self.rev}"
|
|
63
|
+
self.vazoes = Vazoes(nreg=320)
|
|
64
|
+
self.vazoes.ler(os.path.join(self.path, file_vazoes))
|
|
65
|
+
print(f"OK! Leitura do vazoes.{self.rev} realizada com sucesso.")
|
|
66
|
+
except Exception as err:
|
|
67
|
+
nao_lidos.append(['vazoes', err])
|
|
68
|
+
|
|
69
|
+
if len(nao_lidos) > 0:
|
|
70
|
+
print("Lista de Arquivos Não Lidos:")
|
|
71
|
+
print("----- -- -------- --- ------")
|
|
72
|
+
for arquivo in nao_lidos:
|
|
73
|
+
print("ATENÇÃO! A leitura do arquivo", arquivo[0], "não foi realizada.")
|