cost completed
This commit is contained in:
parent
ea666afb02
commit
7548441c82
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: cerc-costs
|
||||
Version: 0.1.0.0
|
||||
Version: 0.1.0.2
|
||||
Summary: CERC costs contains the basic cost calculation per CERC-Hub building
|
||||
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
|
||||
Classifier: Programming Language :: Python
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
README.md
|
||||
pyproject.toml
|
||||
requirements.txt
|
||||
setup.py
|
||||
|
@ -14,6 +15,7 @@ costs/constants.py
|
|||
costs/cost.py
|
||||
costs/cost_base.py
|
||||
costs/end_of_life_costs.py
|
||||
costs/peak_load.py
|
||||
costs/total_maintenance_costs.py
|
||||
costs/total_operational_costs.py
|
||||
costs/total_operational_incomes.py
|
||||
|
|
|
@ -81,8 +81,7 @@ class CapitalCosts(CostBase):
|
|||
capital_cost_other_hvac_ahu = 0
|
||||
capital_cost_lighting = 0
|
||||
|
||||
for internal_zone in self._building.internal_zones:
|
||||
for thermal_zone in internal_zone.thermal_zones:
|
||||
for thermal_zone in self._building.thermal_zones:
|
||||
for thermal_boundary in thermal_zone.thermal_boundaries:
|
||||
if thermal_boundary.type == 'Ground':
|
||||
surface_ground += thermal_boundary.opaque_area
|
||||
|
|
|
@ -94,8 +94,6 @@ class Cost:
|
|||
|
||||
df_end_of_life_costs = global_end_of_life_costs['End_of_life_costs']
|
||||
df_operational_costs = (
|
||||
global_operational_costs['Fixed_costs_electricity_peak'] +
|
||||
global_operational_costs['Fixed_costs_electricity_monthly'] +
|
||||
global_operational_costs['Fixed_costs_electricity_peak'] +
|
||||
global_operational_costs['Fixed_costs_electricity_monthly'] +
|
||||
global_operational_costs['Variable_costs_electricity'] +
|
||||
|
|
|
@ -19,8 +19,7 @@ class CostBase:
|
|||
self._building = building
|
||||
self._configuration = configuration
|
||||
self._total_floor_area = 0
|
||||
for internal_zone in building.internal_zones:
|
||||
for thermal_zone in internal_zone.thermal_zones:
|
||||
for thermal_zone in building.thermal_zones:
|
||||
self._total_floor_area += thermal_zone.total_floor_area
|
||||
self._archetype = None
|
||||
self._capital_costs_chapter = None
|
||||
|
|
|
@ -34,19 +34,8 @@ class PeakLoad:
|
|||
if demand_type == cte.COOLING:
|
||||
cooling = 1
|
||||
if cte.MONTH in self._building.heating_peak_load.keys() and cte.MONTH in self._building.cooling_peak_load.keys():
|
||||
peak_lighting = 0
|
||||
peak_appliances = 0
|
||||
for thermal_zone in self._building.internal_zones[0].thermal_zones:
|
||||
lighting = thermal_zone.lighting
|
||||
for schedule in lighting.schedules:
|
||||
peak = max(schedule.values) * lighting.density * thermal_zone.total_floor_area
|
||||
if peak > peak_lighting:
|
||||
peak_lighting = peak
|
||||
appliances = thermal_zone.appliances
|
||||
for schedule in appliances.schedules:
|
||||
peak = max(schedule.values) * appliances.density * thermal_zone.total_floor_area
|
||||
if peak > peak_appliances:
|
||||
peak_appliances = peak
|
||||
peak_lighting = self._building.lighting_peak_load[cte.YEAR][0]
|
||||
peak_appliances = self._building.appliances_peak_load[cte.YEAR][0]
|
||||
monthly_electricity_peak = [0.9 * peak_lighting + 0.7 * peak_appliances] * 12
|
||||
conditioning_peak = []
|
||||
for i, value in enumerate(self._building.heating_peak_load[cte.MONTH]):
|
||||
|
@ -57,9 +46,8 @@ class PeakLoad:
|
|||
monthly_electricity_peak[i] += 0.8 * conditioning_peak[i]
|
||||
electricity_peak_load_results = pd.DataFrame(
|
||||
monthly_electricity_peak,
|
||||
columns=[f'{self._building.name} electricity peak load W']
|
||||
columns=[f'electricity peak load W']
|
||||
)
|
||||
else:
|
||||
electricity_peak_load_results = pd.DataFrame(array, columns=[f'{self._building.name} electricity peak load W'])
|
||||
|
||||
electricity_peak_load_results = pd.DataFrame(array, columns=[f'electricity peak load W'])
|
||||
return electricity_peak_load_results
|
||||
|
|
|
@ -85,8 +85,12 @@ class TotalOperationalCosts(CostBase):
|
|||
self._yearly_operational_costs.at[year, 'Fixed_costs_electricity_monthly'] = (
|
||||
monthly_electricity_cost_year_0 * price_increase_peak_electricity
|
||||
)
|
||||
if not isinstance(variable_electricity_cost_year_0, pd.DataFrame):
|
||||
variable_costs_electricity = variable_electricity_cost_year_0 * price_increase_electricity
|
||||
else:
|
||||
variable_costs_electricity = float(variable_electricity_cost_year_0.iloc[0] * price_increase_electricity)
|
||||
self._yearly_operational_costs.at[year, 'Variable_costs_electricity'] = (
|
||||
float(variable_electricity_cost_year_0.iloc[0] * price_increase_electricity)
|
||||
variable_costs_electricity
|
||||
)
|
||||
self._yearly_operational_costs.at[year, 'Fixed_costs_gas'] = fixed_gas_cost_year_0 * price_increase_gas
|
||||
self._yearly_operational_costs.at[year, 'Variable_costs_gas'] = (
|
||||
|
|
BIN
dist/cerc-costs-0.1.0.0.tar.gz
vendored
BIN
dist/cerc-costs-0.1.0.0.tar.gz
vendored
Binary file not shown.
BIN
dist/cerc_costs-0.1.0.0-py3-none-any.whl
vendored
BIN
dist/cerc_costs-0.1.0.0-py3-none-any.whl
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user