Package implementing some well known Reoptimization algorithms
Project description
Package implementing some well known Reoptimization algorithms
Perterson Graph (Made using GeoGebra)
Introduction
Currently, considerable efforts must be put to find optimal solution for NP-Hard problems. Reoptimisation deals with, If given an optimal solution to a problem instance IO, can we find a good approximated solution to instance IN, where IN is IO with some ‘local’ modifications? The goal in this repository is to expose some well known reoptimization algorithms.
Setup
Requirements
(Recommended) Python versions: >=3.6, <=3.8
Installation
Option 1
To Install the stable latest package from pypi host
pip install reoptimization-algorithms
Option 2
To install directly from this repository execute the following in repository root directory
python setup.py install
Documentation
Toy example
import reoptimization_algorithms as ra
old_graph = (ra.UndirectedGraph().add_vertex("4").add_edge("4", "5").add_edge("40", "50")
.add_vertex("6").add_edge("4", "8").add_vertex("99").delete_vertex("6"))
attached_graph = ra.UndirectedGraph().add_edge("90", "95")
attach_edges = [ra.Edge("4", "90")]
old_solution = {"8"}
solution = ra.UnweightedPVCP.reoptimize_ptas(old_graph, attached_graph, attach_edges,
old_solution, k = 3)
print(solution) # {"4"}
For detailed documentation and usage refer here
Implementation
Implementation basically consists of
Having a graph data structure utility
Implementing the graph algorithms
Algorithms
Algorithms implemented
PTAS for Reoptimization of unweighted k-path vertex cover under constant size graph insertion
Contribution
Want to add or improvise the repository? Check out the Contributing documentation :)
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
File details
Details for the file reoptimization-algorithms-0.1.3.tar.gz
.
File metadata
- Download URL: reoptimization-algorithms-0.1.3.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aa70236992eb7d171fae16f6cf94fcbcc9c81f65b97a789ba0432c26da6821a |
|
MD5 | 7762743e182ab1af6ae137be40db5884 |
|
BLAKE2b-256 | 0cc4c4906deff1274b0362ea1e50b11c94d0e3533cd4fe06ccc371ca2da9b642 |
File details
Details for the file reoptimization_algorithms-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: reoptimization_algorithms-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bda4e919f42eb3a76df032822964c2a73ff2421cc4bddd962e74a62e06c744e |
|
MD5 | bddfff6b6b4516e94fb10e84749a245d |
|
BLAKE2b-256 | 9c176ff2479b4290097ab7c3231da6ec71c662901ee13f6c35c7d4d2724e8a59 |