|
10 | 10 | from swolfpy_inputdata import LF_Input |
11 | 11 | import ast |
12 | 12 | from pathlib import Path |
| 13 | +from copy import deepcopy |
13 | 14 |
|
14 | 15 | class LF(ProcessModel): |
15 | 16 | Process_Type = 'Treatment' |
@@ -396,13 +397,13 @@ def report(self): |
396 | 397 | # Check the electricity production |
397 | 398 | if LCI_DF['Electricity_production'].values.sum() > 0: |
398 | 399 | LCI_DF['Electricity_production'] = ( |
399 | | - LCI_DF['Electricity_production'] |
400 | | - - LCI_DF['Electricity_consumption']) |
| 400 | + LCI_DF['Electricity_production'].values |
| 401 | + - LCI_DF['Electricity_consumption'].values) |
401 | 402 | LCI_DF['Electricity_consumption'] = 0 |
402 | 403 | else: |
403 | 404 | LCI_DF['Electricity_consumption'] = ( |
404 | | - LCI_DF['Electricity_consumption'] |
405 | | - - LCI_DF['Electricity_production']) |
| 405 | + LCI_DF['Electricity_consumption'].values |
| 406 | + - LCI_DF['Electricity_production'].values) |
406 | 407 | LCI_DF['Electricity_production'] = 0 |
407 | 408 |
|
408 | 409 | for y in self.Index: |
@@ -466,7 +467,13 @@ def add(self,name,flow): |
466 | 467 | self.LCI[:,self.ColDict[name]]+=flow |
467 | 468 |
|
468 | 469 | def report(self): |
469 | | - return(pd.DataFrame(self.LCI[:,:len(self.ColDict)],columns=list(self.ColDict.keys()),index=self.Index)) |
| 470 | + LCI = deepcopy(self.LCI) |
| 471 | + return pd.DataFrame(LCI[:,:len(self.ColDict)], |
| 472 | + columns=list(self.ColDict.keys()), |
| 473 | + index=self.Index) |
470 | 474 |
|
471 | 475 | def report_T(self): |
472 | | - return(pd.DataFrame(self.LCI[:,:len(self.ColDict)].transpose(),index=list(self.ColDict.keys()),columns=self.Index)) |
| 476 | + LCI = deepcopy(self.LCI) |
| 477 | + return pd.DataFrame(LCI[:,:len(self.ColDict)].transpose(), |
| 478 | + index=list(self.ColDict.keys()), |
| 479 | + columns=self.Index) |
0 commit comments