def config_nodes(self): create_bottleneck_link(self.net, self.core[0], self.core[1], self.config) for host in self.sources: create_access_link(self.net, self.core[0], host, self.config) for host in self.sinks: create_access_link(self.net, self.core[1], host, self.config) Case.config_nodes(self)
def config_nodes(self): for i in range(self.N - 1): create_bottleneck_link(self.net, self.switch[i], self.switch[i + 1], self.config) for i in range(self.N): create_access_link(self.net, self.switch[i], self.host[i], self.config) for i in range(2): create_access_link(self.net, self.switch[i * (self.N-1)], self.extra_host[i], self.config) Case.config_nodes(self)
def config_nodes(self): for i in range(self.N - 1): create_bottleneck_link(self.net, self.core[i], self.core[i + 1], self.config, bw=self.capacity[i]) for i in range(self.F): create_access_link(self.net, self.core[self.flow[i]['from']], self.host[i]['src'], self.config) create_access_link(self.net, self.core[self.flow[i]['to']], self.host[i]['dst'], self.config) Case.config_nodes(self)
def config_nodes(self): Case.config_nodes(self)