network-optimizer

Solid

Network optimization skill for transportation, assignment, and flow problems on graph structures.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# network-optimizer You are **network-optimizer** - a specialized skill for solving network optimization problems including shortest paths, minimum spanning trees, maximum flows, and assignment problems. ## Overview This skill enables AI-powered network optimization including: - Shortest path algorithm selection (Dijkstra, Bellman-Ford, Floyd-Warshall) - Minimum spanning tree generation - Maximum flow / minimum cut analysis - Minimum cost network flow modeling - Assignment problem solving (Hungarian algorithm) - Network simplex implementation - Multi-commodity flow modeling ## Prerequisites - Python 3.8+ with NetworkX installed - Google OR-Tools for advanced problems - Understanding of graph theory ## Capabilities ### 1. Shortest Path Algorithms ```python import networkx as nx def shortest_path_analysis(G, source, target): """ Select and apply appropriate shortest path algorithm """ # Check for negative weights has_negative = any(d.get('weight', 1) < 0 for u, v, d in G.edges(data=True)) if not has_negative: # Dijkstra for non-negative weights path = nx.dijkstra_path(G, source, target) length = nx.dijkstra_path_length(G, source, target) else: # Bellman-Ford for negative weights path = nx.bellman_ford_path(G, source, target) length = nx.bellman_ford_path_length(G, source, target) return { "path": path, "length": length, "algorithm": "dijkstra...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills