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) 2021 Tri Basuki Kurniawan. Released under the MIT License.
Third-party copyright in this distribution is noted where applicable.
Reference
- Shrinkage Clustering
- Deterministic Annealing, Clustering and Optimization
- 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
- Clustering with Capacity and Size Constraints: A Deterministic Approach
- Same Size Kmeans Heuristics Methods
- Cluster KMeans Constrained
- Deterministic Annealing, Constrained Clustering, and Opthiieation
- Google's Operations Research tools's SimpleMinCostFlow
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
Close
Hashes for route_optimization_constrained-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5374fd722d3ac7767a61c3d2ec8b6ae4f82c022003a410133a2005d88a339071 |
|
MD5 | 074b9e2d995cf6ac2e7a0def022863a3 |
|
BLAKE2b-256 | a3d88ec1fc8b16d819aeae43eeb8bfb6987d9f36584205277ac837973261f81e |
Close
Hashes for route_optimization_constrained-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8423dc937238e216500746e0c1968c8bb33374218853ac2aa9eecdd0fe63732 |
|
MD5 | be60060391a13a198a4a561733cfb90b |
|
BLAKE2b-256 | aeb1b56dea86bccc64aa7cdf15c1145483c1291d99a34b42260487318b97ebb9 |