Skip to main content

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)

Metadata

Release files for GraphModels 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GraphModels 0.1.0
File Size Uploaded Provenance Actions
graphmodels-0.1.0.tar.gz 7.3 kB Without provenance Details for graphmodels-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GraphModels 0.1.0
File Interpreter ABI Platform Actions
GraphModels-0.1.0-py3-none-any.whl Python 3 none any Details for GraphModels-0.1.0-py3-none-any.whl

Total release size: 16.4 kB

Release files / graphmodels-0.1.0.tar.gz

Download URL graphmodels-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4fe86b7555ba25b2b93f9dcde2702f2014a374888084b9f6cadad6fe0c3e3afd
BLAKE2b-256 checksum
How to use checksums
07171683112ccce9e454d6ad1309f925fe68e130d22827080d8f9c119998e7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.5

Release files / GraphModels-0.1.0-py3-none-any.whl

Download URL GraphModels-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fb07b0134f62bf7503659e53f8f6e003e1eaca61d03bfd57a54688baf9b070f
BLAKE2b-256 checksum
How to use checksums
f80153a900afc0966d62aa73f0f05a6537cd87ed77ab10952a2427b09fb6f73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.5

Security for GraphModels 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page