Python library for Route Optimization Constrained
Project description
Route Optimization Constrained
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
- Clustering with Capacity and Size Constraints: A Deterministic Approach
- Deterministic Annealing, Clustering and Optimization
- Deterministic Annealing, Constrained Clustering, and Opthiieation
- Shrinkage Clustering
- Clustering with size constraints
- Data Clustering with Cluster Size Constraints Using a Modified k-means Algorithm
- KMeans Constrained Clustering Inspired by Minimum Cost Flow Problem
- Same Size Kmeans Heuristics Methods
- Google's Operations Research tools's
SimpleMinCostFlow
- Cluster KMeans Constrained
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
Hashes for route_optimization_constrained-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 250dd15a35d764f38dc4d3cb6713bdd5ae575a596ffe9d5e64284c783cd95fa4 |
|
MD5 | 41c604e99fd984f940cd69b517259c9f |
|
BLAKE2b-256 | 54789b4e579b5668c2ebf4d73e249b13ed804fb2ab1c15b6b65ccfdadc342a6b |
Hashes for route_optimization_constrained-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 193905ed3edcc1916dfa3f8f114afff05b8f01cae039f101c2b9023ec6ab7d59 |
|
MD5 | 93d01db6d66da31486e933ec3a77792f |
|
BLAKE2b-256 | 21d655f51c1b563a4c2e0530d40f15655b708404def7f04fcc8456177d8dcaf6 |