Skip to content

Commit

Permalink
Add missing property
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed May 1, 2024
1 parent 6711770 commit 69c65a0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions reV/bespoke/place_turbines.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ def avg_sl_dist_to_center_m(self):
"""This is the final avg straight line distance to center (m)"""
return self._avg_sl_dist_to_cent(self.turbine_x, self.turbine_y)

@property
@none_until_optimized
def avg_sl_dist_to_medoid_m(self):
"""This is the final avg straight line distance to turb medoid (m)"""
return self._avg_sl_dist_to_med(self.turbine_x, self.turbine_y)

@property
@none_until_optimized
def nturbs(self):
Expand Down Expand Up @@ -529,6 +535,7 @@ def capital_cost(self):
system_capacity = self.capacity
aep = self.aep
avg_sl_dist_to_center_m = self.avg_sl_dist_to_center_m
avg_sl_dist_to_medoid_m = self.avg_sl_dist_to_medoid_m
mult = self.wind_plant.sam_sys_inputs.get(
'capital_cost_multiplier', 1)
return eval(self.capital_cost_function, globals(), locals()) * mult
Expand All @@ -544,6 +551,7 @@ def fixed_operating_cost(self):
system_capacity = self.capacity
aep = self.aep
avg_sl_dist_to_center_m = self.avg_sl_dist_to_center_m
avg_sl_dist_to_medoid_m = self.avg_sl_dist_to_medoid_m
mult = self.wind_plant.sam_sys_inputs.get(
'fixed_operating_cost_multiplier', 1)
return eval(self.fixed_operating_cost_function,
Expand All @@ -560,6 +568,7 @@ def variable_operating_cost(self):
system_capacity = self.capacity
aep = self.aep
avg_sl_dist_to_center_m = self.avg_sl_dist_to_center_m
avg_sl_dist_to_medoid_m = self.avg_sl_dist_to_medoid_m
mult = self.wind_plant.sam_sys_inputs.get(
'variable_operating_cost_multiplier', 1)
return eval(self.variable_operating_cost_function,
Expand All @@ -574,6 +583,7 @@ def balance_of_system_cost(self):
system_capacity = self.capacity
aep = self.aep
avg_sl_dist_to_center_m = self.avg_sl_dist_to_center_m
avg_sl_dist_to_medoid_m = self.avg_sl_dist_to_medoid_m
mult = self.wind_plant.sam_sys_inputs.get(
'balance_of_system_cost_multiplier', 1)
return eval(self.balance_of_system_cost_function,
Expand All @@ -593,6 +603,7 @@ def objective(self):
variable_operating_cost = self.variable_operating_cost
balance_of_system_cost = self.balance_of_system_cost
avg_sl_dist_to_center_m = self.avg_sl_dist_to_center_m
avg_sl_dist_to_medoid_m = self.avg_sl_dist_to_medoid_m
return eval(self.objective_function, globals(), locals())


Expand Down

0 comments on commit 69c65a0

Please sign in to comment.