diff --git a/src/topupopt/problems/esipp/network.py b/src/topupopt/problems/esipp/network.py index 5e12053e74d96231b39831107d71a0f2dcfb43ea..0b257e6b22df89ff3bc35c07e69d469399e8c388 100644 --- a/src/topupopt/problems/esipp/network.py +++ b/src/topupopt/problems/esipp/network.py @@ -633,11 +633,19 @@ class Network(nx.MultiDiGraph): self.identify_node_types() # declare variables for the nodes without directed arc limitations + if network_type not in self.NET_TYPES: + raise ValueError('Unknown network type.') self.network_type = network_type self.nodes_w_in_dir_arc_limitations = dict() self.nodes_w_out_dir_arc_limitations = dict() + + # set up initial nodes if the network is not hybrid + if self.network_type != self.NET_TYPE_HYBRID: + for node_key in self.nodes(): + self._set_up_node(node_key) + # ************************************************************************* # *************************************************************************