pysddp 0.0.70__tar.gz

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.
Files changed (136) hide show
  1. pysddp-0.0.70/LICENSE.txt +21 -0
  2. pysddp-0.0.70/MANIFEST.in +0 -0
  3. pysddp-0.0.70/PKG-INFO +79 -0
  4. pysddp-0.0.70/PySDDP/Pde.py +304 -0
  5. pysddp-0.0.70/PySDDP/Pen.py +68 -0
  6. pysddp-0.0.70/PySDDP/Pmo.py +73 -0
  7. pysddp-0.0.70/PySDDP/PowerSystem.py +2852 -0
  8. pysddp-0.0.70/PySDDP/__init__.py +0 -0
  9. pysddp-0.0.70/PySDDP/dadosgerais.py +20 -0
  10. pysddp-0.0.70/PySDDP/decomp/__init__.py +0 -0
  11. pysddp-0.0.70/PySDDP/decomp/script/__init__.py +0 -0
  12. pysddp-0.0.70/PySDDP/decomp/script/caso.py +71 -0
  13. pysddp-0.0.70/PySDDP/decomp/script/dadgnl.py +249 -0
  14. pysddp-0.0.70/PySDDP/decomp/script/hidr.py +230 -0
  15. pysddp-0.0.70/PySDDP/decomp/script/indice.py +74 -0
  16. pysddp-0.0.70/PySDDP/decomp/script/perdas.py +267 -0
  17. pysddp-0.0.70/PySDDP/decomp/script/polinjus.py +156 -0
  18. pysddp-0.0.70/PySDDP/decomp/script/templates/__init__.py +0 -0
  19. pysddp-0.0.70/PySDDP/decomp/script/templates/arquivo_entrada.py +61 -0
  20. pysddp-0.0.70/PySDDP/decomp/script/templates/caso.py +41 -0
  21. pysddp-0.0.70/PySDDP/decomp/script/templates/dadgnl.py +87 -0
  22. pysddp-0.0.70/PySDDP/decomp/script/templates/hidr.py +266 -0
  23. pysddp-0.0.70/PySDDP/decomp/script/templates/indice.py +44 -0
  24. pysddp-0.0.70/PySDDP/decomp/script/templates/perdas.py +76 -0
  25. pysddp-0.0.70/PySDDP/decomp/script/templates/polinjus.py +80 -0
  26. pysddp-0.0.70/PySDDP/decomp/script/templates/vazoes.py +62 -0
  27. pysddp-0.0.70/PySDDP/decomp/script/vazoes.py +125 -0
  28. pysddp-0.0.70/PySDDP/dessem/__init__.py +0 -0
  29. pysddp-0.0.70/PySDDP/dessem/script/__init__.py +0 -0
  30. pysddp-0.0.70/PySDDP/dessem/script/areacont.py +146 -0
  31. pysddp-0.0.70/PySDDP/dessem/script/arquivos.py +126 -0
  32. pysddp-0.0.70/PySDDP/dessem/script/bateria.py +93 -0
  33. pysddp-0.0.70/PySDDP/dessem/script/cadterm.py +277 -0
  34. pysddp-0.0.70/PySDDP/dessem/script/cotasr11.py +84 -0
  35. pysddp-0.0.70/PySDDP/dessem/script/curvtviag.py +121 -0
  36. pysddp-0.0.70/PySDDP/dessem/script/dadger.py +1777 -0
  37. pysddp-0.0.70/PySDDP/dessem/script/dados_eletricos.py +527 -0
  38. pysddp-0.0.70/PySDDP/dessem/script/dadvaz.py +178 -0
  39. pysddp-0.0.70/PySDDP/dessem/script/deflant.py +126 -0
  40. pysddp-0.0.70/PySDDP/dessem/script/dessopc.py +203 -0
  41. pysddp-0.0.70/PySDDP/dessem/script/eolica.py +129 -0
  42. pysddp-0.0.70/PySDDP/dessem/script/hidr.py +224 -0
  43. pysddp-0.0.70/PySDDP/dessem/script/ilibs.py +73 -0
  44. pysddp-0.0.70/PySDDP/dessem/script/ilstri.py +86 -0
  45. pysddp-0.0.70/PySDDP/dessem/script/indelet.py +120 -0
  46. pysddp-0.0.70/PySDDP/dessem/script/infofcf.py +256 -0
  47. pysddp-0.0.70/PySDDP/dessem/script/operuh.py +270 -0
  48. pysddp-0.0.70/PySDDP/dessem/script/operut.py +221 -0
  49. pysddp-0.0.70/PySDDP/dessem/script/polinjus.py +212 -0
  50. pysddp-0.0.70/PySDDP/dessem/script/ptoper.py +118 -0
  51. pysddp-0.0.70/PySDDP/dessem/script/rampas.py +148 -0
  52. pysddp-0.0.70/PySDDP/dessem/script/respot.py +128 -0
  53. pysddp-0.0.70/PySDDP/dessem/script/respotele.py +123 -0
  54. pysddp-0.0.70/PySDDP/dessem/script/restseg.py +258 -0
  55. pysddp-0.0.70/PySDDP/dessem/script/rmpflx.py +172 -0
  56. pysddp-0.0.70/PySDDP/dessem/script/rstlpp.py +297 -0
  57. pysddp-0.0.70/PySDDP/dessem/script/simul.py +149 -0
  58. pysddp-0.0.70/PySDDP/dessem/script/solar.py +131 -0
  59. pysddp-0.0.70/PySDDP/dessem/script/templates/__init__.py +0 -0
  60. pysddp-0.0.70/PySDDP/dessem/script/templates/areacont.py +53 -0
  61. pysddp-0.0.70/PySDDP/dessem/script/templates/arquivo_entrada.py +65 -0
  62. pysddp-0.0.70/PySDDP/dessem/script/templates/arquivos.py +271 -0
  63. pysddp-0.0.70/PySDDP/dessem/script/templates/bateria.py +51 -0
  64. pysddp-0.0.70/PySDDP/dessem/script/templates/cadterm.py +105 -0
  65. pysddp-0.0.70/PySDDP/dessem/script/templates/cotasr11.py +46 -0
  66. pysddp-0.0.70/PySDDP/dessem/script/templates/curvtviag.py +67 -0
  67. pysddp-0.0.70/PySDDP/dessem/script/templates/dadger.py +429 -0
  68. pysddp-0.0.70/PySDDP/dessem/script/templates/dados_eletricos.py +136 -0
  69. pysddp-0.0.70/PySDDP/dessem/script/templates/dadvaz.py +81 -0
  70. pysddp-0.0.70/PySDDP/dessem/script/templates/deflant.py +53 -0
  71. pysddp-0.0.70/PySDDP/dessem/script/templates/dessopc.py +197 -0
  72. pysddp-0.0.70/PySDDP/dessem/script/templates/eolica.py +89 -0
  73. pysddp-0.0.70/PySDDP/dessem/script/templates/hidr.py +242 -0
  74. pysddp-0.0.70/PySDDP/dessem/script/templates/ilibs.py +45 -0
  75. pysddp-0.0.70/PySDDP/dessem/script/templates/ilstri.py +41 -0
  76. pysddp-0.0.70/PySDDP/dessem/script/templates/indelet.py +52 -0
  77. pysddp-0.0.70/PySDDP/dessem/script/templates/infofcf.py +111 -0
  78. pysddp-0.0.70/PySDDP/dessem/script/templates/operuh.py +93 -0
  79. pysddp-0.0.70/PySDDP/dessem/script/templates/operut.py +73 -0
  80. pysddp-0.0.70/PySDDP/dessem/script/templates/polinjus.py +79 -0
  81. pysddp-0.0.70/PySDDP/dessem/script/templates/ptoper.py +68 -0
  82. pysddp-0.0.70/PySDDP/dessem/script/templates/rampas.py +51 -0
  83. pysddp-0.0.70/PySDDP/dessem/script/templates/respot.py +65 -0
  84. pysddp-0.0.70/PySDDP/dessem/script/templates/respotele.py +49 -0
  85. pysddp-0.0.70/PySDDP/dessem/script/templates/restseg.py +108 -0
  86. pysddp-0.0.70/PySDDP/dessem/script/templates/rmpflx.py +58 -0
  87. pysddp-0.0.70/PySDDP/dessem/script/templates/rstlpp.py +93 -0
  88. pysddp-0.0.70/PySDDP/dessem/script/templates/simul.py +69 -0
  89. pysddp-0.0.70/PySDDP/dessem/script/templates/solar.py +89 -0
  90. pysddp-0.0.70/PySDDP/dessem/script/templates/tolperd.py +88 -0
  91. pysddp-0.0.70/PySDDP/dessem/script/templates/vazao_lateral.py +67 -0
  92. pysddp-0.0.70/PySDDP/dessem/script/tolperd.py +169 -0
  93. pysddp-0.0.70/PySDDP/dessem/script/vazao_lateral.py +131 -0
  94. pysddp-0.0.70/PySDDP/fcf.py +35 -0
  95. pysddp-0.0.70/PySDDP/hidr.py +1202 -0
  96. pysddp-0.0.70/PySDDP/interc.py +14 -0
  97. pysddp-0.0.70/PySDDP/mixins.py +16 -0
  98. pysddp-0.0.70/PySDDP/newave/__init__.py +0 -0
  99. pysddp-0.0.70/PySDDP/newave/script/__init__.py +0 -0
  100. pysddp-0.0.70/PySDDP/newave/script/arquivos.py +99 -0
  101. pysddp-0.0.70/PySDDP/newave/script/caso.py +71 -0
  102. pysddp-0.0.70/PySDDP/newave/script/confhd.py +1710 -0
  103. pysddp-0.0.70/PySDDP/newave/script/dger.py +1106 -0
  104. pysddp-0.0.70/PySDDP/newave/script/exph.py +231 -0
  105. pysddp-0.0.70/PySDDP/newave/script/hidr.py +397 -0
  106. pysddp-0.0.70/PySDDP/newave/script/modif.py +289 -0
  107. pysddp-0.0.70/PySDDP/newave/script/ree.py +440 -0
  108. pysddp-0.0.70/PySDDP/newave/script/sistema.py +837 -0
  109. pysddp-0.0.70/PySDDP/newave/script/templates/__init__.py +0 -0
  110. pysddp-0.0.70/PySDDP/newave/script/templates/arquivo_entrada.py +66 -0
  111. pysddp-0.0.70/PySDDP/newave/script/templates/arquivos.py +415 -0
  112. pysddp-0.0.70/PySDDP/newave/script/templates/caso.py +41 -0
  113. pysddp-0.0.70/PySDDP/newave/script/templates/confhd.py +444 -0
  114. pysddp-0.0.70/PySDDP/newave/script/templates/dger.py +827 -0
  115. pysddp-0.0.70/PySDDP/newave/script/templates/exph.py +42 -0
  116. pysddp-0.0.70/PySDDP/newave/script/templates/hidr.py +245 -0
  117. pysddp-0.0.70/PySDDP/newave/script/templates/modif.py +43 -0
  118. pysddp-0.0.70/PySDDP/newave/script/templates/ree.py +49 -0
  119. pysddp-0.0.70/PySDDP/newave/script/templates/sistema.py +64 -0
  120. pysddp-0.0.70/PySDDP/newave/script/templates/term.py +99 -0
  121. pysddp-0.0.70/PySDDP/newave/script/templates/vazoes.py +41 -0
  122. pysddp-0.0.70/PySDDP/newave/script/term.py +167 -0
  123. pysddp-0.0.70/PySDDP/newave/script/vazoes.py +76 -0
  124. pysddp-0.0.70/PySDDP/planerg.py +100 -0
  125. pysddp-0.0.70/PySDDP/pmo_old.py +852 -0
  126. pysddp-0.0.70/PySDDP/resequiv.py +171 -0
  127. pysddp-0.0.70/PySDDP/submercado.py +207 -0
  128. pysddp-0.0.70/PySDDP/term.py +23 -0
  129. pysddp-0.0.70/README.rst +54 -0
  130. pysddp-0.0.70/pysddp.egg-info/PKG-INFO +79 -0
  131. pysddp-0.0.70/pysddp.egg-info/SOURCES.txt +134 -0
  132. pysddp-0.0.70/pysddp.egg-info/dependency_links.txt +1 -0
  133. pysddp-0.0.70/pysddp.egg-info/requires.txt +7 -0
  134. pysddp-0.0.70/pysddp.egg-info/top_level.txt +1 -0
  135. pysddp-0.0.70/setup.cfg +4 -0
  136. pysddp-0.0.70/setup.py +72 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2020] [Eduardo Sousa]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
File without changes
pysddp-0.0.70/PKG-INFO ADDED
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.1
2
+ Name: pysddp
3
+ Version: 0.0.70
4
+ Summary: PySDDP package
5
+ Home-page: https://github.com/AndreMarcato/PySDDP
6
+ Author: Andre Marcato
7
+ Author-email: andre.marcato@ufjf.edu.br
8
+ License: MIT
9
+ Keywords: pysddp
10
+ Platform: UNKNOWN
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Education
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Requires-Python: >=3
21
+ Description-Content-Type: text/x-rst
22
+ License-File: LICENSE.txt
23
+
24
+ PySDDP
25
+ ###################
26
+ Python package applied to the planning of the operation of energy systems in the medium term horizon. This package also has classes applied to rain-to-flow
27
+
28
+ USAGE
29
+ ###################
30
+
31
+ from PySDDP import sistema
32
+
33
+ EXAMPLE
34
+ ###################
35
+
36
+ from PySDDP import sistema
37
+
38
+ q = sistema.PySDDP('pmo/')
39
+
40
+ Classroom
41
+ ###################
42
+ from PySDDP import sistema
43
+
44
+ q = sistema.Classroom()
45
+
46
+ q.sistema["DGer"]["Nr_Disc"] = 41
47
+
48
+ resultado_pdd41 = q.pdd(0, imprime=False)
49
+
50
+ resultado_plu = q.pl_unico(0, imprime=False)
51
+
52
+ resultado_pddd = q.pddd(0, imprime=False)
53
+
54
+ DEPLOY SCRIPT
55
+ ###################
56
+
57
+ Para publicar uma nova versão do pacote, você pode usar o script de deploy localizado em ``deploy.sh``.
58
+
59
+ No PowerShell, execute:
60
+
61
+ .. code-block:: powershell
62
+
63
+ .\deploy.ps1 0.0.66 "Release 0.0.66"
64
+
65
+ O script:
66
+
67
+ - atualiza a versão em ``setup.py``;
68
+ - cria um commit;
69
+ - faz push para o repositório remoto;
70
+ - cria e envia a tag com o mesmo número da versão;
71
+ - dispara o fluxo de deploy no CircleCI.
72
+
73
+ Se você quiser que o script pergunte a versão, execute:
74
+
75
+ .. code-block:: powershell
76
+
77
+ bash ./deploy.sh
78
+
79
+
@@ -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.")
@@ -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)
@@ -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.")