Skip to main content

Python library for Route Optimization Constrained

Project description

Route Optimization Constrained

Build Status PyPI version GitHub codecov PyPI - Downloads Codecov

Implementation of Clustering with Constrained Algorithm. Route Optimization Constrained can be treated as an optimization problem.

Installation

Requirement Python >= 3.6, Numpy >= 1.13

  • install from PyPI
pip install route-optimization-constrained

Methods

  • Constrained Clustering Algorithm: Route Optimization Constrained algorithms

Usage:

# setup
from route-optimization-constrained import RouteOptimizationConstraint
if __name__ == "__main__":
    X = []
    n_points = 1000
    random_state = 42
    random.seed(random_state)
    np.random.seed(random_state)
    X = np.random.rand(n_points, 2)
    demands = np.ones((n_points, 1))
    n_clusters = 4
    n_iters = 100
    max_size = [n_points / n_clusters] * n_clusters
    max_size = [0.25, 0.5, 0.1, 0.15]

    roc = RouteOptimizationConstraint(n_clusters, max_size, n_iters)
    roc.fit(X, demands)
    labels = roc.labels_
    centers = roc.cluster_centers_

Copyright

Copyright (c) 2021 Tri Basuki Kurniawan. Released under the MIT License.

Third-party copyright in this distribution is noted where applicable.

Reference

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

route_optimization_constrained-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file route_optimization_constrained-0.1.3.tar.gz.

File metadata

  • Download URL: route_optimization_constrained-0.1.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.4

File hashes

Hashes for route_optimization_constrained-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5374fd722d3ac7767a61c3d2ec8b6ae4f82c022003a410133a2005d88a339071
MD5 074b9e2d995cf6ac2e7a0def022863a3
BLAKE2b-256 a3d88ec1fc8b16d819aeae43eeb8bfb6987d9f36584205277ac837973261f81e

See more details on using hashes here.

File details

Details for the file route_optimization_constrained-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: route_optimization_constrained-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.4

File hashes

Hashes for route_optimization_constrained-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8423dc937238e216500746e0c1968c8bb33374218853ac2aa9eecdd0fe63732
MD5 be60060391a13a198a4a561733cfb90b
BLAKE2b-256 aeb1b56dea86bccc64aa7cdf15c1145483c1291d99a34b42260487318b97ebb9

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