Skip to main content

A solver based on Local Search

Project description

Local Search Solver (Python)

A solver based on local search.

This is the Python3 version of the C++ package fontanf/localsearchsolver.

Description

The goal of this repository is to provide a simple framework to quickly implement algorithms based on local search.

Solving a problem only requires a couple hundred lines of code (see examples).

Algorithms:

  • Restarting Local Search restarting_local_search
  • Iterated Local Search iterated_local_search

Examples

Travelling Salesman Problem

Knapsack Problem

Usage, running examples from command line

Install

pip3 install localsearchsolverpy

Running an example:

mkdir -p data/travellingsalesman/instance
python3 -m examples.travellingsalesman -a generator -i data/travellingsalesman/instance
python3 -m examples.travellingsalesman -a restarting_local_search -i data/travellingsalesman/instance_50.json
python3 -m examples.travellingsalesman -a iterated_local_search -i data/travellingsalesman/instance_50.json

Update:

pip3 install --upgrade localsearchsolverpy

Usage, Python library

See examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localsearchsolverpy-0.0.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localsearchsolverpy-0.0.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file localsearchsolverpy-0.0.3.tar.gz.

File metadata

  • Download URL: localsearchsolverpy-0.0.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for localsearchsolverpy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2dec82e20ad4f9d79d09bb5608b455211018ee90b3dbb8012622c13f55f656f5
MD5 1e63647da0c814c429ac97351619a1c6
BLAKE2b-256 cf577bdceac641f2587b5b230bb13906ee22d422668b910d05f6c9ee65a94016

See more details on using hashes here.

File details

Details for the file localsearchsolverpy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: localsearchsolverpy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for localsearchsolverpy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f27eda312023830d8352bd81cd412b7c0f96ea15c77c78a7d001cbe046a6db0f
MD5 cb1290a333be67dd8ba9c9ec1ca952a2
BLAKE2b-256 98c831e396a1d85b862fe655e1cd78d6677c6fc1835f2ecea9b892941d204523

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page