feat: shortest_path_tools and relative demo #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Key Features
min_cost_flowalgorithm for efficient shortest path computation.Core Components
Shortest Path Algorithm Module (
shortest_path.py):min_cost_flow.Agent Configuration (
shortest_path_demo.py):Technology Stack
Data Model
The system processes network topology data containing fields like city names, start and end nodes, distances, and optional costs.
Implementation Details
Shortest Path Algorithm and Visualization:
min_cost_flowfor precise shortest path computation.shortest_path.pyserves as a tool file registered in OxyGent for use as an agent tool.Agent Configuration:
shortest_path_agentfor path calculations,excel_agentfor Excel file operations, andmaster_agentfor coordinating other agents.Example
Running the application with
python shortest_path_demo.pyuses a USnet topology, allowing users to query the shortest path between nodes and visualize the results.Summary
OxyGent, combined with JoyCode, offers efficient development possibilities for large model applications. The
shortest_path_demoprovides a simple application scenario, demonstrating how large models can aid in reducing problem complexity and operational learning costs.