又改回来了

This commit is contained in:
Jerry 2025-07-18 11:12:17 +08:00
parent 0f856dc1e8
commit da5743e27a
2 changed files with 0 additions and 3 deletions

View File

@ -13,7 +13,6 @@ class NetworkOptimizer:
G = nx.Graph() G = nx.Graph()
for device in devices: for device in devices:
G.add_node(device['ip'], type=device['type']) G.add_node(device['ip'], type=device['type'])
# 添加连接关系(示例)
G.add_edge('192.168.1.1', '192.168.1.2', bandwidth=1000) G.add_edge('192.168.1.1', '192.168.1.2', bandwidth=1000)
return G return G
@ -25,7 +24,6 @@ class NetworkOptimizer:
"""带宽优化模型""" """带宽优化模型"""
def objective(x): def objective(x):
# 最小化最大链路利用率
return max(x) return max(x)
constraints = ( constraints = (

View File

@ -4,7 +4,6 @@ from pathlib import Path
from typing import List, Dict from typing import List, Dict
from ..utils.logger import logger from ..utils.logger import logger
class NetworkScanner: class NetworkScanner:
def __init__(self, cache_path: str = "switch_devices.json"): def __init__(self, cache_path: str = "switch_devices.json"):
self.cache_path = Path(cache_path) self.cache_path = Path(cache_path)