inewave 1.10.4__py3-none-any.whl → 1.11.1__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.
inewave/__init__.py CHANGED
@@ -6,7 +6,7 @@ inewave é um módulo em Python para manipulação dos arquivos de entrada
6
6
  e saída do NEWAVE.
7
7
  """
8
8
 
9
- __version__ = "1.10.4"
9
+ __version__ = "1.11.1"
10
10
 
11
11
  from . import newave # noqa
12
12
  from . import nwlistcf # noqa
@@ -20,15 +20,20 @@ from .clasgas import Clasgas # noqa
20
20
  from .clast import Clast # noqa
21
21
  from .confhd import Confhd # noqa
22
22
  from .conft import Conft # noqa
23
+ from .cortes import Cortes # noqa
24
+ from .cortesh import Cortesh # noqa
23
25
  from .curva import Curva # noqa
24
26
  from .cvar import Cvar # noqa
25
27
  from .dger import Dger # noqa
26
28
  from .dsvagua import Dsvagua # noqa
27
29
  from .eafpast import Eafpast # noqa
30
+ from .eliminacao_cortes import EliminacaoCortes # noqa
28
31
  from .elnino import ElNino # noqa
29
32
  from .ensoaux import ENSOAux # noqa
30
33
  from .exph import Exph # noqa
31
34
  from .expt import Expt # noqa
35
+ from .forward import Forward # noqa
36
+ from .forwarh import Forwarh # noqa
32
37
  from .gee import GEE # noqa
33
38
  from .ghmin import Ghmin # noqa
34
39
  from .gtminpat import Gtminpat # noqa
@@ -554,3 +554,25 @@ class Arquivos(SectionFile):
554
554
  @cortesh_pos_estudo.setter
555
555
  def cortesh_pos_estudo(self, arq: str):
556
556
  self.__atualiza_nome_por_indice(43, arq)
557
+
558
+ @property
559
+ def volume_referencia_sazonal(self) -> Optional[str]:
560
+ """
561
+ Nome do arquivo com os volumes de referência sazonais.
562
+ """
563
+ return self.__le_nome_por_indice(44)
564
+
565
+ @volume_referencia_sazonal.setter
566
+ def volume_referencia_sazonal(self, arq: str):
567
+ self.__atualiza_nome_por_indice(44, arq)
568
+
569
+ @property
570
+ def eliminacao_cortes(self) -> Optional[str]:
571
+ """
572
+ Nome do arquivo com parâmetros para eliminação de cortes.
573
+ """
574
+ return self.__le_nome_por_indice(45)
575
+
576
+ @eliminacao_cortes.setter
577
+ def eliminacao_cortes(self, arq: str):
578
+ self.__atualiza_nome_por_indice(45, arq)
inewave/newave/dger.py CHANGED
@@ -1,113 +1,113 @@
1
+ from typing import List, Optional, TypeVar
2
+
1
3
  from cfinterface.files.sectionfile import SectionFile
2
- from typing import TypeVar, Optional, List
3
-
4
-
5
- from inewave.newave.modelos.dger import BlocoMesInicioEstudo, BlocoNomeCaso
6
- from inewave.newave.modelos.dger import BlocoTipoExecucao
7
- from inewave.newave.modelos.dger import BlocoDuracaoPeriodo
8
- from inewave.newave.modelos.dger import BlocoNumAnosEstudo
9
- from inewave.newave.modelos.dger import BlocoMesInicioPreEstudo
10
- from inewave.newave.modelos.dger import BlocoAnoInicioEstudo
11
- from inewave.newave.modelos.dger import BlocoNumAnosPreEstudo
12
- from inewave.newave.modelos.dger import BlocoNumAnosPosEstudo
13
- from inewave.newave.modelos.dger import BlocoNumAnosPosEstudoSimFinal
14
- from inewave.newave.modelos.dger import BlocoImprimeDados
15
- from inewave.newave.modelos.dger import BlocoImprimeMercados
16
- from inewave.newave.modelos.dger import BlocoImprimeEnergias
17
- from inewave.newave.modelos.dger import BlocoImprimeModeloEstocastico
18
- from inewave.newave.modelos.dger import BlocoImprimeSubsistema
19
- from inewave.newave.modelos.dger import BlocoNumMaxIteracoes
20
- from inewave.newave.modelos.dger import BlocoNumForwards
21
- from inewave.newave.modelos.dger import BlocoNumAberturas
22
- from inewave.newave.modelos.dger import BlocoNumSeriesSinteticas
23
- from inewave.newave.modelos.dger import BlocoOrdemMaximaPARp
24
- from inewave.newave.modelos.dger import BlocoAnoInicialHistorico
25
- from inewave.newave.modelos.dger import BlocoCalculaVolInicial
26
- from inewave.newave.modelos.dger import BlocoVolInicialSubsistema
27
- from inewave.newave.modelos.dger import BlocoTolerancia
28
- from inewave.newave.modelos.dger import BlocoTaxaDesconto
29
- from inewave.newave.modelos.dger import BlocoTipoSimFinal
30
- from inewave.newave.modelos.dger import BlocoImpressaoOperacao
31
- from inewave.newave.modelos.dger import BlocoImpressaoConvergencia
32
- from inewave.newave.modelos.dger import BlocoIntervaloGravar
33
- from inewave.newave.modelos.dger import BlocoMinIteracoes
34
- from inewave.newave.modelos.dger import BlocoRacionamentoPreventivo
35
- from inewave.newave.modelos.dger import BlocoNumAnosManutUTE
36
- from inewave.newave.modelos.dger import BlocoTendenciaHidrologica
37
- from inewave.newave.modelos.dger import BlocoRestricaoItaipu
38
- from inewave.newave.modelos.dger import BlocoBid
39
- from inewave.newave.modelos.dger import BlocoPerdasTransmissao
40
- from inewave.newave.modelos.dger import BlocoElNino
41
- from inewave.newave.modelos.dger import BlocoEnso
42
- from inewave.newave.modelos.dger import BlocoDuracaoPorPatamar
43
- from inewave.newave.modelos.dger import BlocoOutrosUsosAgua
44
- from inewave.newave.modelos.dger import BlocoCorrecaoDesvio
45
- from inewave.newave.modelos.dger import BlocoCurvaAversao
46
- from inewave.newave.modelos.dger import BlocoTipoGeracaoENA
47
- from inewave.newave.modelos.dger import BlocoRiscoDeficit
48
- from inewave.newave.modelos.dger import BlocoIteracaoParaSimFinal
49
- from inewave.newave.modelos.dger import BlocoAgrupamentoLivre
50
- from inewave.newave.modelos.dger import BlocoEqualizacaoPenalInt
51
- from inewave.newave.modelos.dger import BlocoRepresentacaoSubmot
52
- from inewave.newave.modelos.dger import BlocoOrdenacaoAutomatica
53
- from inewave.newave.modelos.dger import BlocoConsideraCargaAdicional
54
- from inewave.newave.modelos.dger import BlocoDeltaZSUP
55
- from inewave.newave.modelos.dger import BlocoDeltaZINF
56
- from inewave.newave.modelos.dger import BlocoDeltasConsecutivos
57
- from inewave.newave.modelos.dger import BlocoDespachoAntecipadoGNL
58
- from inewave.newave.modelos.dger import BlocoModifAutomaticaAdTerm
59
- from inewave.newave.modelos.dger import BlocoGeracaoHidraulicaMin
60
- from inewave.newave.modelos.dger import BlocoSimFinalComData
61
- from inewave.newave.modelos.dger import BlocoGerenciamentoPLs
62
- from inewave.newave.modelos.dger import BlocoSAR
63
- from inewave.newave.modelos.dger import BlocoCVAR
64
- from inewave.newave.modelos.dger import BlocoZSUPMinConvergencia
65
- from inewave.newave.modelos.dger import BlocoDesconsideraVazaoMinima
66
- from inewave.newave.modelos.dger import BlocoRestricoesEletricas
67
- from inewave.newave.modelos.dger import BlocoSelecaoCortes
68
- from inewave.newave.modelos.dger import BlocoJanelaCortes
69
- from inewave.newave.modelos.dger import BlocoReamostragemCenarios
70
- from inewave.newave.modelos.dger import BlocoConvergeNoZero
71
- from inewave.newave.modelos.dger import BlocoConsultaFCF
72
- from inewave.newave.modelos.dger import BlocoImpressaoENA
73
- from inewave.newave.modelos.dger import BlocoImpressaoCortesAtivosSimFinal
74
- from inewave.newave.modelos.dger import BlocoRepresentacaoAgregacao
75
- from inewave.newave.modelos.dger import BlocoMatrizCorrelacaoEspacial
76
- from inewave.newave.modelos.dger import BlocoDesconsideraConvEstatistica
77
- from inewave.newave.modelos.dger import BlocoMomentoReamostragem
78
- from inewave.newave.modelos.dger import BlocoMantemArquivosEnergias
79
- from inewave.newave.modelos.dger import BlocoInicioTesteConvergencia
80
- from inewave.newave.modelos.dger import BlocoSazonalizarVminT
81
- from inewave.newave.modelos.dger import BlocoSazonalizarVmaxT
82
- from inewave.newave.modelos.dger import BlocoSazonalizarVminP
83
- from inewave.newave.modelos.dger import BlocoSazonalizarCfugaCmont
84
- from inewave.newave.modelos.dger import BlocoRestricoesEmissaoGEE
85
- from inewave.newave.modelos.dger import BlocoAfluenciaAnualPARp
86
- from inewave.newave.modelos.dger import BlocoRestricoesFornecGas
87
- from inewave.newave.modelos.dger import BlocoMemCalculoCortes
88
- from inewave.newave.modelos.dger import BlocoGeracaoEolica
89
4
 
90
5
  # from inewave.newave.modelos.dger import BlocoCompensacaoCorrelacaoCruzada
91
6
  from inewave.newave.modelos.dger import (
7
+ BlocoAfluenciaAnualPARp,
8
+ BlocoAgrupamentoLivre,
9
+ BlocoAnoInicialHistorico,
10
+ BlocoAnoInicioEstudo,
11
+ BlocoAproveitamentoBasePLsBackward,
12
+ BlocoBid,
13
+ BlocoCalculaVolInicial,
14
+ BlocoCanalDesvio,
15
+ BlocoConsideracaoDefluenciaMaxima,
92
16
  BlocoConsideracaoTurbinamentoMinimoMaximo,
17
+ BlocoConsideraCargaAdicional,
18
+ BlocoConsultaFCF,
19
+ BlocoConvergeNoZero,
20
+ BlocoCorrecaoDesvio,
21
+ BlocoCurvaAversao,
22
+ BlocoCVAR,
23
+ BlocoDeltasConsecutivos,
24
+ BlocoDeltaZINF,
25
+ BlocoDeltaZSUP,
26
+ BlocoDesconsideraConvEstatistica,
27
+ BlocoDesconsideraVazaoMinima,
28
+ BlocoDespachoAntecipadoGNL,
29
+ BlocoDuracaoPeriodo,
30
+ BlocoDuracaoPorPatamar,
31
+ BlocoElNino,
32
+ BlocoEnso,
33
+ BlocoEqualizacaoPenalInt,
34
+ BlocoEstacoesBombeamento,
35
+ BlocoFCFPosEstudo,
36
+ BlocoFuncaoProducaoUHE,
37
+ BlocoGeracaoEolica,
38
+ BlocoGeracaoHidraulicaMin,
39
+ BlocoGerenciamentoPLs,
40
+ BlocoImpressaoConvergencia,
41
+ BlocoImpressaoCortesAtivosSimFinal,
42
+ BlocoImpressaoENA,
43
+ BlocoImpressaoEstadosGeracaoCortes,
44
+ BlocoImpressaoOperacao,
45
+ BlocoImprimeDados,
46
+ BlocoImprimeEnergias,
47
+ BlocoImprimeMercados,
48
+ BlocoImprimeModeloEstocastico,
49
+ BlocoImprimeSubsistema,
50
+ BlocoInicioTesteConvergencia,
51
+ BlocoIntervaloGravar,
52
+ BlocoIteracaoParaSimFinal,
53
+ BlocoJanelaCortes,
54
+ BlocoMantemArquivosEnergias,
55
+ BlocoMatrizCorrelacaoEspacial,
56
+ BlocoMemCalculoCortes,
57
+ BlocoMesInicioEstudo,
58
+ BlocoMesInicioPreEstudo,
59
+ BlocoMinIteracoes,
60
+ BlocoModifAutomaticaAdTerm,
61
+ BlocoMomentoReamostragem,
62
+ BlocoNomeCaso,
63
+ BlocoNumAberturas,
64
+ BlocoNumAnosEstudo,
65
+ BlocoNumAnosManutUTE,
66
+ BlocoNumAnosPosEstudo,
67
+ BlocoNumAnosPosEstudoSimFinal,
68
+ BlocoNumAnosPreEstudo,
69
+ BlocoNumForwards,
70
+ BlocoNumMaxIteracoes,
71
+ BlocoNumSeriesSinteticas,
72
+ BlocoOrdemMaximaPARp,
73
+ BlocoOrdenacaoAutomatica,
74
+ BlocoOutrosUsosAgua,
75
+ BlocoPerdasTransmissao,
76
+ BlocoRacionamentoPreventivo,
77
+ BlocoReamostragemCenarios,
78
+ BlocoRepresentacaoAgregacao,
79
+ BlocoRepresentacaoSubmot,
80
+ BlocoRestricaoItaipu,
81
+ BlocoRestricaoLPPDefluenciaMaximaREE,
82
+ BlocoRestricaoLPPDefluenciaMaximaUHE,
83
+ BlocoRestricaoLPPTurbinamentoMaximoREE,
84
+ BlocoRestricaoLPPTurbinamentoMaximoUHE,
85
+ BlocoRestricoesEletricas,
86
+ BlocoRestricoesEletricasEspeciais,
87
+ BlocoRestricoesEmissaoGEE,
88
+ BlocoRestricoesFornecGas,
89
+ BlocoRHQ,
90
+ BlocoRHV,
91
+ BlocoRiscoDeficit,
92
+ BlocoSAR,
93
+ BlocoSazonalizarCfugaCmont,
94
+ BlocoSazonalizarVmaxT,
95
+ BlocoSazonalizarVminP,
96
+ BlocoSazonalizarVminT,
97
+ BlocoSelecaoCortes,
98
+ BlocoSementeBackward,
99
+ BlocoSementeForward,
100
+ BlocoSimFinalComData,
101
+ BlocoTaxaDesconto,
102
+ BlocoTendenciaHidrologica,
103
+ BlocoTipoExecucao,
104
+ BlocoTipoGeracaoENA,
105
+ BlocoTipoSimFinal,
106
+ BlocoTolerancia,
107
+ BlocoTratamentoCortes,
108
+ BlocoVolInicialSubsistema,
109
+ BlocoZSUPMinConvergencia,
93
110
  )
94
- from inewave.newave.modelos.dger import BlocoConsideracaoDefluenciaMaxima
95
- from inewave.newave.modelos.dger import BlocoAproveitamentoBasePLsBackward
96
- from inewave.newave.modelos.dger import BlocoImpressaoEstadosGeracaoCortes
97
- from inewave.newave.modelos.dger import BlocoSementeForward
98
- from inewave.newave.modelos.dger import BlocoSementeBackward
99
- from inewave.newave.modelos.dger import BlocoRestricaoLPPTurbinamentoMaximoREE
100
- from inewave.newave.modelos.dger import BlocoRestricaoLPPDefluenciaMaximaREE
101
- from inewave.newave.modelos.dger import BlocoRestricaoLPPTurbinamentoMaximoUHE
102
- from inewave.newave.modelos.dger import BlocoRestricaoLPPDefluenciaMaximaUHE
103
- from inewave.newave.modelos.dger import BlocoRestricoesEletricasEspeciais
104
- from inewave.newave.modelos.dger import BlocoFuncaoProducaoUHE
105
- from inewave.newave.modelos.dger import BlocoFCFPosEstudo
106
- from inewave.newave.modelos.dger import BlocoEstacoesBombeamento
107
- from inewave.newave.modelos.dger import BlocoCanalDesvio
108
- from inewave.newave.modelos.dger import BlocoRHQ
109
- from inewave.newave.modelos.dger import BlocoRHV
110
- from inewave.newave.modelos.dger import BlocoTratamentoCortes
111
111
 
112
112
 
113
113
  class Dger(SectionFile):
@@ -567,6 +567,25 @@ class Dger(SectionFile):
567
567
  if isinstance(b, BlocoNumAberturas):
568
568
  b.valor = dado
569
569
 
570
+ @property
571
+ def aberturas_variaveis(self) -> Optional[int]:
572
+ """
573
+ Configuração da linha número 18 do arquivo `dger.dat`.
574
+
575
+ :return: O valor do campo
576
+ :rtype: int
577
+ """
578
+ b = self.data.get_sections_of_type(BlocoNumAberturas)
579
+ if isinstance(b, BlocoNumAberturas):
580
+ return b.variaveis
581
+ return None
582
+
583
+ @aberturas_variaveis.setter
584
+ def aberturas_variaveis(self, dado: int):
585
+ b = self.data.get_sections_of_type(BlocoNumAberturas)
586
+ if isinstance(b, BlocoNumAberturas):
587
+ b.variaveis = dado
588
+
570
589
  @property
571
590
  def num_series_sinteticas(self) -> Optional[int]:
572
591
  """
@@ -2260,18 +2279,14 @@ class Dger(SectionFile):
2260
2279
  :return: O valor do campo
2261
2280
  :rtype: int | None
2262
2281
  """
2263
- b = self.data.get_sections_of_type(
2264
- BlocoRestricaoLPPDefluenciaMaximaREE
2265
- )
2282
+ b = self.data.get_sections_of_type(BlocoRestricaoLPPDefluenciaMaximaREE)
2266
2283
  if isinstance(b, BlocoRestricaoLPPDefluenciaMaximaREE):
2267
2284
  return b.valor
2268
2285
  return None
2269
2286
 
2270
2287
  @restricao_lpp_defluencia_maxima_ree.setter
2271
2288
  def restricao_lpp_defluencia_maxima_ree(self, dado: int):
2272
- b = self.data.get_sections_of_type(
2273
- BlocoRestricaoLPPDefluenciaMaximaREE
2274
- )
2289
+ b = self.data.get_sections_of_type(BlocoRestricaoLPPDefluenciaMaximaREE)
2275
2290
  if isinstance(b, BlocoRestricaoLPPDefluenciaMaximaREE):
2276
2291
  b.valor = dado
2277
2292
 
@@ -2306,18 +2321,14 @@ class Dger(SectionFile):
2306
2321
  :return: O valor do campo
2307
2322
  :rtype: int | None
2308
2323
  """
2309
- b = self.data.get_sections_of_type(
2310
- BlocoRestricaoLPPDefluenciaMaximaUHE
2311
- )
2324
+ b = self.data.get_sections_of_type(BlocoRestricaoLPPDefluenciaMaximaUHE)
2312
2325
  if isinstance(b, BlocoRestricaoLPPDefluenciaMaximaUHE):
2313
2326
  return b.valor
2314
2327
  return None
2315
2328
 
2316
2329
  @restricao_lpp_defluencia_maxima_uhe.setter
2317
2330
  def restricao_lpp_defluencia_maxima_uhe(self, dado: int):
2318
- b = self.data.get_sections_of_type(
2319
- BlocoRestricaoLPPDefluenciaMaximaUHE
2320
- )
2331
+ b = self.data.get_sections_of_type(BlocoRestricaoLPPDefluenciaMaximaUHE)
2321
2332
  if isinstance(b, BlocoRestricaoLPPDefluenciaMaximaUHE):
2322
2333
  b.valor = dado
2323
2334
 
@@ -0,0 +1,188 @@
1
+ from inewave.newave.modelos.eliminacao_cortes import BlocoParametrosEliminacaoCortes
2
+
3
+ from cfinterface.files.sectionfile import SectionFile
4
+ from typing import TypeVar, Optional, List
5
+
6
+
7
+ class EliminacaoCortes(SectionFile):
8
+ """
9
+ Armazena os dados de entrada do NEWAVE referentes aos parâmetros
10
+ utilizados na eliminação de cortes de Benders.
11
+
12
+ Esta classe lida com informações de entrada do NEWAVE que definem
13
+ como o algoritmo de eliminação de cortes deve ser executado,
14
+ incluindo configurações para diferentes algoritmos (Paralelo,
15
+ Análise por Pares, Shapiro Modificado).
16
+
17
+ """
18
+
19
+ T = TypeVar("T")
20
+
21
+ SECTIONS = [BlocoParametrosEliminacaoCortes]
22
+
23
+ @property
24
+ def _parametros(self) -> Optional[List[List]]:
25
+ b = self.data.get_sections_of_type(BlocoParametrosEliminacaoCortes)
26
+ if isinstance(b, BlocoParametrosEliminacaoCortes) and isinstance(b.data, list) and len(b.data) > 0:
27
+ return b.data
28
+ return None
29
+
30
+ def _get_parametro_por_indice(self, indice: int, coluna: int) -> Optional[int]:
31
+ params = self._parametros
32
+ if params and len(params) > indice and len(params[indice]) > coluna:
33
+ return params[indice][coluna]
34
+ return None
35
+
36
+ @property
37
+ def algoritmo_avaliacao_paralelo(self) -> Optional[int]:
38
+ """
39
+ Habilita ou não o algoritmo para eliminação de cortes Paralelo.
40
+
41
+ :return: O valor do parâmetro
42
+ :rtype: int | None
43
+ """
44
+ valor = self._get_parametro_por_indice(0, 0)
45
+ return int(valor) if valor is not None else None
46
+
47
+ @property
48
+ def algoritmo_avaliacao_pares(self) -> Optional[int]:
49
+ """
50
+ Habilita ou não o algoritmo para eliminação de cortes por Análise por Pares.
51
+
52
+ :return: O valor do parâmetro
53
+ :rtype: int | None
54
+ """
55
+ valor = self._get_parametro_por_indice(0, 1)
56
+ return int(valor) if valor is not None else None
57
+
58
+ @property
59
+ def algoritmo_avaliacao_shapiro(self) -> Optional[int]:
60
+ """
61
+ Habilita ou não o algoritmo para eliminação de cortes Shapiro Modificado.
62
+
63
+ :return: O valor do parâmetro
64
+ :rtype: int | None
65
+ """
66
+ valor = self._get_parametro_por_indice(0, 2)
67
+ return int(valor) if valor is not None else None
68
+
69
+ @property
70
+ def iteracao_inicial_paralelo(self) -> Optional[int]:
71
+ """
72
+ Iteração inicial para aplicação da eliminação de cortes (Paralelo).
73
+
74
+ :return: O valor do parâmetro
75
+ :rtype: int | None
76
+ """
77
+ valor = self._get_parametro_por_indice(1, 0)
78
+ return int(valor) if valor is not None else None
79
+
80
+ @property
81
+ def iteracao_inicial_pares(self) -> Optional[int]:
82
+ """
83
+ Iteração inicial para aplicação da eliminação de cortes (Análise por Pares).
84
+
85
+ :return: O valor do parâmetro
86
+ :rtype: int | None
87
+ """
88
+ valor = self._get_parametro_por_indice(1, 1)
89
+ return int(valor) if valor is not None else None
90
+
91
+ @property
92
+ def iteracao_inicial_shapiro(self) -> Optional[int]:
93
+ """
94
+ Iteração inicial para aplicação da eliminação de cortes (Shapiro Modificado).
95
+
96
+ :return: O valor do parâmetro
97
+ :rtype: int | None
98
+ """
99
+ valor = self._get_parametro_por_indice(1, 2)
100
+ return int(valor) if valor is not None else None
101
+
102
+ @property
103
+ def passo_aplicacao_paralelo(self) -> Optional[int]:
104
+ """
105
+ Passo para aplicação da eliminação de cortes (Paralelo).
106
+
107
+ :return: O valor do parâmetro
108
+ :rtype: int | None
109
+ """
110
+ valor = self._get_parametro_por_indice(2, 0)
111
+ return int(valor) if valor is not None else None
112
+
113
+ @property
114
+ def passo_aplicacao_pares(self) -> Optional[int]:
115
+ """
116
+ Passo para aplicação da eliminação de cortes (Análise por Pares).
117
+
118
+ :return: O valor do parâmetro
119
+ :rtype: int | None
120
+ """
121
+ valor = self._get_parametro_por_indice(2, 1)
122
+ return int(valor) if valor is not None else None
123
+
124
+ @property
125
+ def passo_aplicacao_shapiro(self) -> Optional[int]:
126
+ """
127
+ Passo para aplicação da eliminação de cortes (Shapiro Modificado).
128
+
129
+ :return: O valor do parâmetro
130
+ :rtype: int | None
131
+ """
132
+ valor = self._get_parametro_por_indice(2, 2)
133
+ return int(valor) if valor is not None else None
134
+
135
+ @property
136
+ def janela_iteracoes_pares(self) -> Optional[int]:
137
+ """
138
+ Janela de iterações de construção dos cortes a serem avaliados (Análise por Pares).
139
+
140
+ :return: O valor do parâmetro
141
+ :rtype: int | None
142
+ """
143
+ valor = self._get_parametro_por_indice(3, 1)
144
+ return int(valor) if valor is not None else None
145
+
146
+ @property
147
+ def janela_iteracoes_shapiro(self) -> Optional[int]:
148
+ """
149
+ Janela de iterações de construção dos cortes a serem avaliados (Shapiro Modificado).
150
+
151
+ :return: O valor do parâmetro
152
+ :rtype: int | None
153
+ """
154
+ valor = self._get_parametro_por_indice(3, 2)
155
+ return int(valor) if valor is not None else None
156
+
157
+ @property
158
+ def fator_limites_afluencias(self) -> Optional[float]:
159
+ """
160
+ Fator aplicado aos limites das afluências passadas (%).
161
+
162
+ :return: O valor do parâmetro
163
+ :rtype: float | None
164
+ """
165
+ valor = self._get_parametro_por_indice(4, 0)
166
+ return float(valor) if valor is not None else None
167
+
168
+ @property
169
+ def afluencias_sim_final_calculo_limites(self) -> Optional[int]:
170
+ """
171
+ Afluências da simulação final no cálculo dos limites.
172
+
173
+ :return: O valor do parâmetro
174
+ :rtype: int | None
175
+ """
176
+ valor = self._get_parametro_por_indice(5, 0)
177
+ return int(valor) if valor is not None else None
178
+
179
+ @property
180
+ def impressao_relatorios(self) -> Optional[int]:
181
+ """
182
+ Impressão de relatórios da eliminação de cortes.
183
+
184
+ :return: O valor do parâmetro (0=NÃO, 1=SIM)
185
+ :rtype: int | None
186
+ """
187
+ valor = self._get_parametro_por_indice(6, 0)
188
+ return int(valor) if valor is not None else None
@@ -787,7 +787,11 @@ class BlocoNumAberturas(Section):
787
787
 
788
788
  def __init__(self, previous=None, next=None, data=None) -> None:
789
789
  super().__init__(previous, next, data)
790
- self.__linha = Line([LiteralField(24, 0), IntegerField(4, 21)])
790
+ self.__linha = Line([
791
+ LiteralField(24, 0),
792
+ IntegerField(4, 21),
793
+ IntegerField(4, 26),
794
+ ])
791
795
 
792
796
  def __eq__(self, o: object) -> bool:
793
797
  if not isinstance(o, BlocoNumAberturas):
@@ -821,6 +825,20 @@ class BlocoNumAberturas(Section):
821
825
  def valor(self, v: int):
822
826
  self.data[1] = v
823
827
 
828
+ @property
829
+ def variaveis(self) -> Optional[int]:
830
+ """
831
+ A consideração ou não de aberturas variáveis
832
+
833
+ :return: A consideração ou não de aberturas variáveis
834
+ :rtype: int
835
+ """
836
+ return self.data[2]
837
+
838
+ @variaveis.setter
839
+ def variaveis(self, v: int):
840
+ self.data[2] = v
841
+
824
842
 
825
843
  class BlocoNumSeriesSinteticas(Section):
826
844
  """
@@ -0,0 +1,79 @@
1
+ from cfinterface.components.section import Section
2
+ from cfinterface.components.line import Line
3
+ from cfinterface.components.literalfield import LiteralField
4
+ from cfinterface.components.integerfield import IntegerField
5
+ from cfinterface.components.floatfield import FloatField
6
+ from typing import IO, List
7
+
8
+
9
+ class BlocoParametrosEliminacaoCortes(Section):
10
+ """
11
+ Bloco com os parâmetros para eliminação de cortes de Benders
12
+ utilizados pelo NEWAVE, extraído do arquivo `eliminacao_cortes.dat`.
13
+ """
14
+
15
+ __slots__ = ["__linha", "__cabecalhos", "__comentarios", "data"]
16
+
17
+ def __init__(self, previous=None, next=None, data=None) -> None:
18
+ super().__init__(previous, next, data)
19
+ self.__linha = Line(
20
+ [
21
+ LiteralField(60, 0), # Descrição do parâmetro
22
+ FloatField(6, 61, 2), # Valor PARAL (coluna 1)
23
+ IntegerField(6, 68), # Valor A.P.P (coluna 2)
24
+ IntegerField(6, 75), # Valor S.M. (coluna 3)
25
+ ]
26
+ )
27
+ self.__cabecalhos: List[str] = []
28
+ self.__comentarios: List[str] = []
29
+
30
+ def __eq__(self, o: object) -> bool:
31
+ if not isinstance(o, BlocoParametrosEliminacaoCortes):
32
+ return False
33
+ bloco: BlocoParametrosEliminacaoCortes = o
34
+ if not all(
35
+ [
36
+ isinstance(self.data, list),
37
+ isinstance(o.data, list),
38
+ ]
39
+ ):
40
+ return False
41
+ else:
42
+ return self.data == bloco.data
43
+
44
+ # Override
45
+ def read(self, file: IO, *args, **kwargs):
46
+ # Salta as linhas de cabeçalhos
47
+ for _ in range(2):
48
+ self.__cabecalhos.append(file.readline())
49
+
50
+ # Lê as linhas de parâmetros
51
+ self.data: List[List] = []
52
+
53
+ for _ in range(4):
54
+ linha = file.readline()
55
+ if not linha:
56
+ break
57
+ dados = self.__linha.read(linha)
58
+
59
+ self.__comentarios.append(dados[0].strip())
60
+ self.data.append(dados[1:])
61
+
62
+ for _ in range(3):
63
+ linha = file.readline()
64
+ if not linha:
65
+ break
66
+ dados = self.__linha.read(linha)
67
+
68
+ self.__comentarios.append(dados[0].strip())
69
+ self.data.append([dados[1]])
70
+
71
+ # Override
72
+ def write(self, file: IO, *args, **kwargs):
73
+ for linha in self.__cabecalhos:
74
+ file.write(linha)
75
+ if not isinstance(self.data, list):
76
+ raise ValueError("Dados do eliminacao_cortes.dat não foram lidos com sucesso")
77
+
78
+ for c, s in zip(self.__comentarios, self.data):
79
+ file.write(self.__linha.write([c] + s))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inewave
3
- Version: 1.10.4
3
+ Version: 1.11.1
4
4
  Summary: inewave
5
5
  Project-URL: Documentation, https://rjmalves.github.io/inewave/
6
6
  Project-URL: Repository, https://github.com/rjmalves/inewave/
@@ -1,4 +1,4 @@
1
- inewave/__init__.py,sha256=4vDxRppIcVG0MZ_cacv6ciAvU2OoLZDCLVF5gPVlI6c,236
1
+ inewave/__init__.py,sha256=2IHp2QxtuVc-ienGQzsUaQ9pk72FXBIjOlMrwP6e1lc,236
2
2
  inewave/config.py,sha256=fMgG2sqE_PNz30QCNxkgfPf78SEOAVfV07kGtO1bREE,1106
3
3
  inewave/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  inewave/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -11,11 +11,11 @@ inewave/libs/modelos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
11
11
  inewave/libs/modelos/eolica.py,sha256=0bKVjGBYBJ5RuddyE72kbFjOxlrGvNC7Yj6Et9PHpjk,14151
12
12
  inewave/libs/modelos/restricoes.py,sha256=-9wye8gEj83efSrxqibNRuGpMWgb1T5ukmmr-0rI0Qg,19606
13
13
  inewave/libs/modelos/usinas_hidreletricas.py,sha256=4-fWBqlWj2GKKj5qm8zd0NbZb7sRZq-yHLVzQ99UZKU,19927
14
- inewave/newave/__init__.py,sha256=9b_fJulbMzAlfsUh2w_19e6AS2OSA_Vj3M5GJtcj31s,2618
14
+ inewave/newave/__init__.py,sha256=JQ167G-38iOiYK-sXBC4KBfySRGuvWVch9HRHjuN7_Q,2820
15
15
  inewave/newave/abertura.py,sha256=LdSW9PrMDEG6LXgsRj4awui7R0bQqZLcHiXrfzpwiZs,361
16
16
  inewave/newave/adterm.py,sha256=83DR82nT0uqbMwWJ-hwQmmWb6l02iXQhKNabuod8y-g,1097
17
17
  inewave/newave/agrint.py,sha256=DmZ3ZBTVnaIUBkjrIC5h9ELMbECxJwF3G3Fr_xq7aWQ,2064
18
- inewave/newave/arquivos.py,sha256=faGtzKORL8MJw_p9QcAdqQVU6ZLhViLYsth_9VVSmS0,15168
18
+ inewave/newave/arquivos.py,sha256=Aqw3p4LwV_Q4P7LllwR-GB8XSNHfsfU_PMmPzHaAeng,15839
19
19
  inewave/newave/avl_cortesfpha_nwv.py,sha256=utS3pfQmsclt4PAunmgERtbPUpr-YUo3ycToT_sE44I,1605
20
20
  inewave/newave/avl_desvfpha_s.py,sha256=PUrb6F6WIMyrPXH6_Irxk4_m9HXZ-gNiDSbGSBFyraE,1989
21
21
  inewave/newave/avl_desvfpha_v_q.py,sha256=tMeYRLB9JG9Y-3QlgBwuGK0-ReR9Y0JlPyZBVLxu5LI,2015
@@ -30,10 +30,11 @@ inewave/newave/cortes.py,sha256=X7pi4vZppetafCCq0XU91WtkimK2mvGRZZIW0bR-P-Y,3059
30
30
  inewave/newave/cortesh.py,sha256=gL6z-WvPKKBscFq8KsvQO-ZAQNlVSAFkXx-owT2iKf4,12982
31
31
  inewave/newave/curva.py,sha256=vJYRIuBfn4UeACSxW2zphutmJCyjWNAlE2I_iWWxifQ,6744
32
32
  inewave/newave/cvar.py,sha256=2EHHWBEPin-0T_ArIZYVQJ2U32SkaPow6SP_LWIM4ko,2723
33
- inewave/newave/dger.py,sha256=e7AGNjBm7kZqY5fRcthvYFY_m7vovWbZdAQF-Iyd_Wk,83959
33
+ inewave/newave/dger.py,sha256=y-IrKACUMj4cQJLBMAuk6a4ce479_vv2PWiGdzmxtYQ,80926
34
34
  inewave/newave/dsvagua.py,sha256=e4Kczvaj4kHkxBvBTiKFI69aCHY7MMrO2bCSTjtBJwI,1294
35
35
  inewave/newave/eafpast.py,sha256=uSKf6mWAERHED--eRGYcJTuEcYg-SGzolo5hCFlzLVg,1203
36
36
  inewave/newave/eco_fpha.py,sha256=-HCqfX-zLIBPPPGftLNffyDWBL91sEhA2vJjp5jhuWM,1491
37
+ inewave/newave/eliminacao_cortes.py,sha256=eAIg8ZKIz4KZk3lVJApY2mafAtjZLUFRQzMZnx7Fy7c,6229
37
38
  inewave/newave/elnino.py,sha256=Q8jFu1ZUIhJK7AWrNQ16jniYrcinptFUEQDXpurBSvA,333
38
39
  inewave/newave/enavazb.py,sha256=LuuzYdFun-Ilqff39HtT1H-lIycZ4YuvomQZ7MJnKCY,1443
39
40
  inewave/newave/enavazf.py,sha256=32dyiVQGfpH6oa6pfra0uir3yO19L0zDlQYOgduTx6o,1368
@@ -105,10 +106,11 @@ inewave/newave/modelos/cortes.py,sha256=csy2I9o_TkQx8t4E3ugPndwRJJFIZIwusQiBswa3
105
106
  inewave/newave/modelos/cortesh.py,sha256=ayA-zWiBQ3o77J_wqehgODhl9wjeold84bYsKmKs-6g,31154
106
107
  inewave/newave/modelos/curva.py,sha256=bkxFD8_zhnMe-cBw61C9T4unWLnVfspNnjHTnUG7NVo,13680
107
108
  inewave/newave/modelos/cvar.py,sha256=Wu_qilEvzjT9MCoelMmiDztu9-yTI0eAC2fQMMN2E2M,7489
108
- inewave/newave/modelos/dger.py,sha256=-aUJ-S0j15q1RVbAyq-bWB0F9YfXGoNe1Vsy7hH78Ew,141673
109
+ inewave/newave/modelos/dger.py,sha256=p-4MO-S8YZ7SvVLWrROYzbwEKkMu64QHxAapwFd8ye8,142075
109
110
  inewave/newave/modelos/dsvagua.py,sha256=G_4PKZcQCF_vZMrBqQcnpH54edXhSEyDlHNy4aZoiIk,5592
110
111
  inewave/newave/modelos/eafpast.py,sha256=HFKpsMyoLGwQly95uHhsK2wnrBwL7v8auzaa-UbgP5k,3322
111
112
  inewave/newave/modelos/eco_fpha.py,sha256=q-b-ShvAW-RDpr7xlmhBvM9ixWF9DxqFvhxApA7oGdo,1646
113
+ inewave/newave/modelos/eliminacao_cortes.py,sha256=VXBP4rukg9sIU3aMiAeZ8R6keJbCIMWKIemcM6Cwv6A,2690
112
114
  inewave/newave/modelos/elnino.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
115
  inewave/newave/modelos/enavazb.py,sha256=DfLuRFI9gcSSeZUn-xwYsaWCe618iMw7LUFo9RVI1l0,2966
114
116
  inewave/newave/modelos/enavazf.py,sha256=AgfALMrCmNcnUJzbyDDvpr2i-X3ex6vLHsvdVUemnls,2738
@@ -539,7 +541,7 @@ inewave/nwlistop/modelos/blocos/usina.py,sha256=cQvLVtG1NC8y4lP_to6-YjAKQRGRlaxO
539
541
  inewave/nwlistop/modelos/blocos/valoresclassetermicaseriepatamar.py,sha256=0LV0JMFoiuNEQ3n-XVfG2T0sIq_33bnCt6gmwPOTql8,3283
540
542
  inewave/nwlistop/modelos/blocos/valoresserie.py,sha256=Q88QBoI3zyU7y0AvHBeSqDBEVAkb3rAa3XpxA51NbF8,2143
541
543
  inewave/nwlistop/modelos/blocos/valoresseriepatamar.py,sha256=xnRdor-_2VyR5EbWNSzU_hbABJFtfgKGlznbcRaslGg,2589
542
- inewave-1.10.4.dist-info/METADATA,sha256=hK208dE9CHEbTHkX7bZdlCAuIKFR527ceI7UlhF0hjg,3743
543
- inewave-1.10.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
544
- inewave-1.10.4.dist-info/licenses/LICENSE.md,sha256=0jOBL78mjzscN0-XI-6YtK1IqnODUbG85DaKAMH4XJ8,1070
545
- inewave-1.10.4.dist-info/RECORD,,
544
+ inewave-1.11.1.dist-info/METADATA,sha256=uRk5q7CGAz0JAO7vSybVhMbY3k9FDfO7yr8itjWDXzc,3743
545
+ inewave-1.11.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
546
+ inewave-1.11.1.dist-info/licenses/LICENSE.md,sha256=0jOBL78mjzscN0-XI-6YtK1IqnODUbG85DaKAMH4XJ8,1070
547
+ inewave-1.11.1.dist-info/RECORD,,