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) 2020 Jing Wang. 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.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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