Skip to content

Commit

Permalink
Merge pull request #660 from gisce/bugfix/61101_redo_B9_calculations_…
Browse files Browse the repository at this point in the history
…5_G_8_n_9

FIX Calculo conceptos 5_G_8 y 5_G_9 del B9
  • Loading branch information
ecarreras authored Jul 11, 2024
2 parents a11d292 + a31f0f8 commit 64f0fab
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions libcnmc/cir_8_2021/FB9.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ def consumer(self):
resumen['5_G_6'] += df['29'].sum()
resumen['5_G_7'] += df['31'].sum()

names_at_prefix = []
for name in names['giscedata.at.tram']:
names_at_prefix.append('{}{}'.format(self.prefix_AT, name))
df_5_g_10 = df[df['0'].isin(names_at_prefix)]
resumen['5_G_9'] = df_5_g_10['27'].sum()

# # FINANCIADO 0% # #
df_f0 = df[df['28'] == 0]

Expand Down Expand Up @@ -182,12 +176,6 @@ def consumer(self):
resumen['5_G_6'] += df['29'].sum()
resumen['5_G_7'] += df['31'].sum()

names_bt_prefix = []
for name in names['giscedata.bt.element']:
names_bt_prefix.append('{}{}'.format(self.prefix_BT, name))
df_5_g_10 = df[df['0'].isin(names_bt_prefix)]
resumen['5_G_9'] += df_5_g_10['27'].sum()

# # FINANCIADO 0% # #
df_f0 = df[df['28'] == 0]

Expand Down Expand Up @@ -266,10 +254,6 @@ def consumer(self):
resumen['5_G_6'] += df['20'].sum()
resumen['5_G_7'] += df['22'].sum()

pos_names = names['giscedata.cts.subestacions.posicio']
df_5_g_10 = df[df['0'].isin(pos_names)]
resumen['5_G_9'] += df_5_g_10['18'].sum()

# # FINANCIADO 0% # #
df_f0 = df[df['24'] == 0]

Expand Down Expand Up @@ -419,10 +403,6 @@ def consumer(self):
resumen['5_G_6'] += df['23'].sum()
resumen['5_G_7'] += df['25'].sum()

cella_names = names['giscedata.celles.cella']
df_5_g_10 = df[df['0'].isin(cella_names)]
resumen['5_G_9'] += df_5_g_10['26'].sum()

# # FINANCIADO 0% # #
df_f0 = df[df['27'] == 0]

Expand Down Expand Up @@ -499,10 +479,6 @@ def consumer(self):
resumen['5_G_6'] += df['27'].sum()
resumen['5_G_7'] += df['29'].sum()

ct_names = names['giscedata.cts']
df_5_g_10 = df[df['0'].isin(ct_names)]
resumen['5_G_9'] += df_5_g_10['30'].sum()

# # FINANCIADO 0% # #
df_f0 = df[df['31'] == 0]

Expand Down Expand Up @@ -1112,14 +1088,20 @@ def consumer(self):
resumen['5_G_5'] = inv['1_O_25'] + inv['2_O_25'] + inv['3_G_25']

# INVERSIÓN INSTALACIONES FINANCIADAS
resumen['5_G_8'] = inv['3_G_25'] + inv['2_O_25'] - resumen['5_G_9']
# Parcialmente por terceros
resumen['5_G_8'] = inv['2_O_25'] + desp['2A_F_18']
# Totalmente por terceros
resumen['5_G_9'] = inv['3_G_25']

# INVERSIÓN EQUIPOS MEDIDA
resumen['5_G_10'] = equipos['1A_E_17']

# INVERSIÓN NETA TOTAL
resumen['5_G_11'] = resumen['5_G_5'] - resumen['5_G_6'] - resumen['5_G_7'] - resumen['5_G_8'] \
- resumen['5_G_9'] - resumen['5_G_10']
resumen['5_G_11'] = (
resumen['5_G_5'] - resumen['5_G_6']
- resumen['5_G_7'] - resumen['5_G_8']
- resumen['5_G_9'] - resumen['5_G_10']
)

# INGRESOS PERCIBIDOS
resumen['5_G_12'] = 0
Expand Down

0 comments on commit 64f0fab

Please sign in to comment.