name: flow-network-builder description: 将优化问题建模为网络流问题 allowed-tools:
- 读取
- 写入
- 搜索
- 全局匹配
流网络构建器技能
目的
将优化问题建模为网络流问题,构建合适的流网络并选择最优算法。
能力
- 识别最大流/最小割建模机会
- 根据问题描述构建流网络
- 选择最优流算法
- 处理最小成本流变体
- 二分图匹配归约
- 循环流问题
目标流程
- 高级图算法
- 图建模
- 优化问题
流问题类型
- 最大流:寻找从源点到汇点的最大流量
- 最小割:最小化割容量的划分
- 二分图匹配:通过流实现最大匹配
- 最小成本最大流:成本最低的最大流
- 循环流:具有下界的流
归约模式
- 分配问题 -> 二分图匹配
- 调度问题 -> 带约束的流
- 路径覆盖 -> 流归约
- 边不相交路径 -> 单位容量流
输入模式
{
"type": "object",
"properties": {
"problemDescription": { "type": "string" },
"problemType": {
"type": "string",
"enum": ["maxFlow", "minCut", "matching", "minCostFlow", "circulation"]
},
"constraints": { "type": "object" }
},
"required": ["problemDescription"]
}
输出模式
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"networkDescription": { "type": "string" },
"nodes": { "type": "array" },
"edges": { "type": "array" },
"source": { "type": "string" },
"sink": { "type": "string" },
"algorithm": { "type": "string" },
"reduction": { "type": "string" }
},
"required": ["success"]
}