Skip to main content

Reoptimization Algorithms

Latest Version https://github.com/mek97/reoptimization-algorithms/workflows/Unit%20tests/badge.svg https://codecov.io/gh/mek97/reoptimization-algorithms/branch/master/graph/badge.svg https://img.shields.io/badge/License-MIT-blue.svg

Package implementing some well known Reoptimization algorithms

https://mek97.github.io/reoptimization-algorithms/_images/header.png

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

  1. Having a graph data structure utility

  2. 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 :)

Metadata

Release files for reoptimization-algorithms 0.1.3

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

Source distribution (sdist)

Source distribution for reoptimization-algorithms 0.1.3
File Size Uploaded
reoptimization-algorithms-0.1.3.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reoptimization-algorithms 0.1.3
File Interpreter ABI Platform
reoptimization_algorithms-0.1.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 30.3 kB

Release files / reoptimization-algorithms-0.1.3.tar.gz

Download URL reoptimization-algorithms-0.1.3.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6aa70236992eb7d171fae16f6cf94fcbcc9c81f65b97a789ba0432c26da6821a
BLAKE2b-256 checksum
How to use checksums
0cc4c4906deff1274b0362ea1e50b11c94d0e3533cd4fe06ccc371ca2da9b642
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / reoptimization_algorithms-0.1.3-py2.py3-none-any.whl

Download URL reoptimization_algorithms-0.1.3-py2.py3-none-any.whl
Size 15.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0bda4e919f42eb3a76df032822964c2a73ff2421cc4bddd962e74a62e06c744e
BLAKE2b-256 checksum
How to use checksums
9c176ff2479b4290097ab7c3231da6ec71c662901ee13f6c35c7d4d2724e8a59
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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