GraphModels: A package containing algorithms for pathfinding, scheduling, and maximum flow problems
Project description
GraphModels
GraphModels is a Python package providing implementations of optimization algorithms for networks, including pathfinding problem and scheduling problem like Project management.
Why GraphModels?
GraphModels is designed to offer efficient and easy-to-use implementations of essential optimization algorithms for network-related problems. Whether you need to find the shortest path in a graph or manage project schedules effectively, GraphModels provides robust solutions.
GraphModels offers several compelling reasons to use it:
-
Optimization Algorithms: Provides implementations of optimization algorithms for networks, including pathfinding algorithms like Dijkstra's algorithm.
-
Scheduling Solutions: Includes algorithms for scheduling problems such as Pert algorithm, useful in project management.
-
Ease of Use: Designed for simplicity with "batteries included," while still allowing easy customization of key methods.
-
JSON Serialization: Models can be serialized to JSON, enabling caching and efficient storage of results.
-
Pure Python Implementation: Relies only on pure-Python libraries, minimizing external dependencies.
-
Python Compatibility: Tested on Python versions 3.7, 3.8, 3.9, and 3.10, ensuring compatibility across recent Python releases.
By leveraging these features, GraphModels provides a robust framework for solving network optimization and scheduling problems with ease and efficiency.
Installation
To install GraphModels, simply use pip:
pip install GraphModels
## Basic Usage
### Dijkstra algorithm
```python
from GraphModels import DijkstraAlgorithm
# Create an instance of Dijkstra's algorithm
dijkstra = DijkstraAlgorithm()
# Example usage: find the shortest path in a graph
shortest_path = dijkstra.final_solution()
print("Shortest path:", shortest_path)
# For the visualization of the solution
print(dijkstra.visualization())
Bellman algorithm
from GraphModels import BellmanAlgorithm
# Create an instance of Dijkstra's algorithm
bellman = BellmanAlgorithm()
# Example usage: find the shortest path in a graph
shortest_path = bellman.final_solution()
print("Shortest path:", shortest_path)
# For the visualization of the solution
print(bellman.visualization())
Pert algorithm
from GraphModels import PertAlgorithm
# Create an instance of Pert algorithm
pert = PertAlgorithm()
# Example usage: manage project schedules
earliest_dates = pert.date_au_plutot()
latest_dates = pert.date_au_plus_tard()
critical_path = pert.chemin_critique()
print("Earliest dates:", earliest_dates)
print("Critical path:", critical_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphmodels-0.1.0.tar.gz.
File metadata
- Download URL: graphmodels-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe86b7555ba25b2b93f9dcde2702f2014a374888084b9f6cadad6fe0c3e3afd
|
|
| MD5 |
b425a96076dd115ab0fb38a4aa74f12b
|
|
| BLAKE2b-256 |
07171683112ccce9e454d6ad1309f925fe68e130d22827080d8f9c119998e7d8
|
File details
Details for the file GraphModels-0.1.0-py3-none-any.whl.
File metadata
- Download URL: GraphModels-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb07b0134f62bf7503659e53f8f6e003e1eaca61d03bfd57a54688baf9b070f
|
|
| MD5 |
8c3f2afd7fc5813fcac2db68382da535
|
|
| BLAKE2b-256 |
f80153a900afc0966d62aa73f0f05a6537cd87ed77ab10952a2427b09fb6f73e
|