Fix demand response row creation
Use settings.get()
Don't concat new generators with dr_rows unless dr_rows exists.
@@ -2357,8 +2357,7 @@ class GeneratorClusters:
else:
logger.warning("No settings parameter for max capacity/spur line file")
- if "demand_response_fn" in self.settings:
- if self.settings["demand_response_fn"] is not None:
+ if self.settings.get("demand_response_fn"):
dr_rows = self.create_demand_response_gen_rows(
scenario=self.settings["demand_response"]
)
