mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-10-14 09:49:19 +00:00
又改回来了
This commit is contained in:
parent
0f856dc1e8
commit
da5743e27a
@ -13,7 +13,6 @@ class NetworkOptimizer:
|
||||
G = nx.Graph()
|
||||
for device in devices:
|
||||
G.add_node(device['ip'], type=device['type'])
|
||||
# 添加连接关系(示例)
|
||||
G.add_edge('192.168.1.1', '192.168.1.2', bandwidth=1000)
|
||||
return G
|
||||
|
||||
@ -25,7 +24,6 @@ class NetworkOptimizer:
|
||||
"""带宽优化模型"""
|
||||
|
||||
def objective(x):
|
||||
# 最小化最大链路利用率
|
||||
return max(x)
|
||||
|
||||
constraints = (
|
||||
|
@ -4,7 +4,6 @@ from pathlib import Path
|
||||
from typing import List, Dict
|
||||
from ..utils.logger import logger
|
||||
|
||||
|
||||
class NetworkScanner:
|
||||
def __init__(self, cache_path: str = "switch_devices.json"):
|
||||
self.cache_path = Path(cache_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user