You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"PowNet: Generator names cannot repeat across different types."
380
+
)
381
+
self.all_generators=set_generators
382
+
363
383
#################
364
384
# Transmission
365
385
#################
@@ -571,25 +591,10 @@ def check_data(self):
571
591
f"PowNet: The number of edges in the node_edge dictionary must be equal to the number of edges. {sum(len(v) forvinself.node_edge.values())} != {2*len(self.edges)}"
572
592
)
573
593
574
-
##################################
575
-
# Generator names cannot repeat across different generator types and slack units (demand nodes)
576
-
##################################
577
-
generators= (
578
-
set(self.thermal_units)
579
-
|set(self.hydro_units)
580
-
|set(self.solar_units)
581
-
|set(self.wind_units)
582
-
|set(self.import_units)
583
-
)
584
-
iflen(generators) !=number_of_generators:
585
-
raiseValueError(
586
-
"PowNet: Generator names cannot repeat across different types."
587
-
)
588
-
589
594
##################################
590
595
# Generator names cannot be the same as the name of demand nodes
0 commit comments