changed units to new item in dictionaries in to_dictionary methods

This commit is contained in:
Pilar Monsalvete 2023-07-13 17:06:42 -04:00
parent 24620d485e
commit 2af993630a
2 changed files with 8 additions and 4 deletions

View File

@ -61,7 +61,8 @@ class Fuel:
content = {'Fuel': {'fuel type': self.type,
'fixed operational costs [currency/month]': self.fixed_monthly,
'fixed operational costs depending on the peak power consumed [currency/month W]': self.fixed_power,
f'variable costs [{self.variable[1]}]': self.variable[0]
'variable operational costs': self.variable[0],
'units': self.variable[1]
}
}

View File

@ -73,9 +73,12 @@ class ItemDescription:
def to_dictionary(self):
"""Class content to dictionary"""
content = {'Item': {'type': self.type,
f'initial investment [{self.initial_investment[1]}]': self.initial_investment[0],
f'refurbishment [{self.refurbishment[1]}]': self.refurbishment[0],
f'reposition [{self.reposition[1]}]': self.reposition[0],
'initial investment': self.initial_investment[0],
'initial investment units': self.initial_investment[1],
'refurbishment': self.refurbishment[0],
'refurbishment units': self.refurbishment[1],
'reposition': self.reposition[0],
'reposition units': self.reposition[1],
'life time [years]': self.lifetime
}
}