Skip to content

Commit

Permalink
Implementação de mudanças na leitura da BDGD, criação do módulo PVsys…
Browse files Browse the repository at this point in the history
…tem e modificações em outros trechos de código (#33)

As principais modificações são: 
Implementação da função columns no método gpd.read_file, diminuindo a
quantidade de memória utilizada na leitura dos dados da BDGD;
Aumento da velocidade de leitura dos dados através do uso da engine
pyogrio e pyarrow;
Criação do módulo PVsystem;
Criação de um dicionário para associar as tensões das cargas e PVsystem
às tensões de secundários dos seus respectivos transformadores de média
tensão;
Criação de um dicionário para associar os nós dos PVsystems aos nós das
cargas aos quais eles estão associados.
  • Loading branch information
PauloRadatz authored Aug 16, 2024
2 parents c08739f + 7f76a65 commit e505294
Show file tree
Hide file tree
Showing 491 changed files with 993 additions and 178,972 deletions.
217 changes: 167 additions & 50 deletions bdgd2dss.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@
"arquivo": "Transformador_MTBT",
"static": {
},
"direct_mapping": {
"bus1": "PAC_1",
"bus2": "PAC_2",
"bus3": "PAC_3",
"transformer": "COD_ID",
"kvas": "POT_NOM",
"tap": "TAP",
"feeder": "CTMT",
"MRT": "MRT"
},
"indirect_mapping": {
"phases": [
"LIG_FAS_P",
Expand Down Expand Up @@ -301,6 +291,17 @@
"convert_tfascon_conn"
]
},
"direct_mapping": {
"bus1": "PAC_1",
"bus2": "PAC_2",
"bus3": "PAC_3",
"transformer": "COD_ID",
"kvas": "POT_NOM",
"tap": "TAP",
"feeder": "CTMT",
"MRT": "MRT",
"Tip_Lig": "TIP_TRAFO"
},
"calculated": {
"loadloss": [
"(","PER_TOT","-",
Expand Down Expand Up @@ -372,10 +373,13 @@
"conn_s": [
"LIG_FAS_S",
"convert_tfascon_conn"
],
"ptratio": [
"REL_TP",
"convert_ptratio"
]
},
"calculated": {
"ptratio": ["TEN_REG", "*100"],
"loadloss": [
"(","PER_TOT","-",
"PER_FER",")","/",
Expand Down Expand Up @@ -416,7 +420,6 @@
"energia_10": "ENE_10",
"energia_11": "ENE_11",
"energia_12": "ENE_12"

},
"indirect_mapping": {
"phases": [
Expand All @@ -429,7 +432,7 @@
],
"bus_nodes": [
"FAS_CON",
"convert_tfascon_bus"
"convert_tfascon_bus_prim"
],
"kv": [
"TEN_FORN",
Expand All @@ -451,12 +454,32 @@
"vmaxpu": 1.50,
"status": "variable"
},
"indirect_mapping": {
"phases": [
"FAS_CON",
"convert_tfascon_phases_load"
],
"conn": [
"FAS_CON",
"convert_tfascon_conn"
],
"bus_nodes": [
"FAS_CON",
"convert_tfascon_bus"
],
"kv": [
"TEN_FORN",
"convert_tten"
]
},
"direct_mapping": {
"bus1": "PAC",
"load": "RAMAL",
"data_con": "DAT_CON",
"daily": "TIP_CC",
"feeder": "CTMT",
"GD_setter": "CEG_GD",
"Trafo": "UNI_TR_MT",
"energia_01": "ENE_01",
"energia_02": "ENE_02",
"energia_03": "ENE_03",
Expand All @@ -470,6 +493,21 @@
"energia_11": "ENE_11",
"energia_12": "ENE_12"
},
"calculated": {
},
"interactive": {
"tip_dias": ["DU", "SA", "DO"]
}

},
"PIP": {
"arquivo": "Cargas_IP",
"static": {
"pf": 0.92,
"vminpu": 0.93,
"Vmaxpu": 1.50,
"status": "variable"
},
"indirect_mapping": {
"phases": [
"FAS_CON",
Expand All @@ -488,26 +526,12 @@
"convert_tten"
]
},
"calculated": {
},
"interactive": {
"tip_dias": ["DU", "SA", "DO"]
}

},
"PIP": {
"arquivo": "Cargas_IP",
"static": {
"pf": 0.92,
"vminpu": 0.93,
"Vmaxpu": 1.50,
"status": "variable"
},
"direct_mapping": {
"bus1": "PAC",
"load": "COD_ID",
"daily": "TIP_CC",
"feeder": "CTMT",
"Trafo": "UNI_TR_MT",
"energia_01": "ENE_01",
"energia_02": "ENE_02",
"energia_03": "ENE_03",
Expand All @@ -521,24 +545,6 @@
"energia_11": "ENE_11",
"energia_12": "ENE_12"
},
"indirect_mapping": {
"phases": [
"FAS_CON",
"convert_tfascon_phases_load"
],
"conn": [
"FAS_CON",
"convert_tfascon_conn"
],
"bus_nodes": [
"FAS_CON",
"convert_tfascon_bus"
],
"kv": [
"TEN_FORN",
"convert_tten"
]
},
"calculated": {
},
"interactive": {
Expand All @@ -558,6 +564,79 @@
"calculated": {
}
}
},
"PVsystem": {
"UGBT_tab": {
"arquivo": "GD_BT",
"static":{
"irradiance": 1.0,
"pf": 0.92
},
"indirect_mapping":{
"phases":[
"FAS_CON",
"convert_tfascon_phases"
],
"conn":[
"FAS_CON",
"convert_tfascon_conn"
],
"bus_nodes":[
"FAS_CON",
"convert_tfascon_bus"
],
"kv":[
"TEN_CON",
"convert_tten"
]
},
"direct_mapping":{
"feeder":"CTMT",
"PVsys": "CEG_GD",
"Trafo": "UNI_TR_MT",
"bus1": "PAC",
"pmpp": "POT_INST"
},
"calculated":{

},
"interactive":{

}
},
"UGMT_tab": {
"arquivo": "GD_MT",
"static":{
"irradiance": 1.0,
"pf": 0.92
},
"direct_mapping":{
"feeder":"CTMT",
"PVsys_MT": "CEG_GD",
"bus1": "PAC",
"pmpp": "POT_INST"
},
"indirect_mapping":{
"phases":[
"FAS_CON",
"convert_tfascon_phases"
],
"conn":[
"FAS_CON",
"convert_tfascon_conn"
],
"bus_nodes":[
"FAS_CON",
"convert_tfascon_bus"
],
"kv":[
"TEN_CON",
"convert_tten"
]
},
"calculated":{},
"interactive":{}
}
}
},
"configuration": {
Expand Down Expand Up @@ -739,7 +818,8 @@
"PER_TOT",
"XHL",
"TEN_REG",
"UN_RE"
"UN_RE",
"REL_TP"
],
"type": {
"COD_ID": "category",
Expand Down Expand Up @@ -818,6 +898,8 @@
"FAS_CON",
"TEN_FORN",
"TIP_CC",
"CEG_GD",
"UNI_TR_MT",
"ENE_01",
"ENE_02",
"ENE_03",
Expand All @@ -840,12 +922,14 @@
"TEN_FORN": "category"
},
"ignore_geometry": "False"
}, "PIP": {
},
"PIP": {
"columns": [
"PAC",
"FAS_CON",
"TEN_FORN",
"TIP_CC",
"UNI_TR_MT",
"ENE_01",
"ENE_02",
"ENE_03",
Expand All @@ -866,9 +950,42 @@
"TEN_FORN": "category"
},
"ignore_geometry": "False"
},
"UGBT_tab": {
"columns":[
"CTMT",
"CEG_GD",
"PAC",
"POT_INST",
"FAS_CON",
"TEN_CON"
],
"type":{
"CEG_GD":"category",
"FAS_CON":"category",
"TEN_CON":"category",
"CTMT":"category"
},
"ignore_geometry": "False"
},
"UGMT_tab": {
"columns":[
"CTMT",
"CEG_GD",
"UNI_TR_MT",
"PAC",
"POT_INST",
"FAS_CON",
"TEN_CON"
],
"type":{
"CEG_GD":"category",
"FAS_CON":"category",
"TEN_CON":"category",
"CTMT":"category"
},
"ignore_geometry": "False"
}
}

}
}

3 changes: 3 additions & 0 deletions bdgd_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
from bdgd_tools.model.RegControl import *
from bdgd_tools.model.LoadShape import *
from bdgd_tools.model.Load import *
from bdgd_tools.model.PVsystem import *
from bdgd_tools.model.Case import *
from bdgd_tools.core.Core import *
from bdgd_tools.gui.GUI import *
from bdgd_tools.model.BusCoords import *



Loading

0 comments on commit e505294

Please sign in to comment.