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
Metadata
Release files for route-optimization-constrained 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| route_optimization_constrained-0.1.3.tar.gz | 3.5 kB | Without provenance | Details for route_optimization_constrained-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| route_optimization_constrained-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for route_optimization_constrained-0.1.3-py3-none-any.whl |
Total release size: 7.0 kB
Release files / route_optimization_constrained-0.1.3.tar.gz
| Download URL | route_optimization_constrained-0.1.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5374fd722d3ac7767a61c3d2ec8b6ae4f82c022003a410133a2005d88a339071
|
|
BLAKE2b-256 checksum How to use checksums |
a3d88ec1fc8b16d819aeae43eeb8bfb6987d9f36584205277ac837973261f81e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / route_optimization_constrained-0.1.3-py3-none-any.whl
| Download URL | route_optimization_constrained-0.1.3-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8423dc937238e216500746e0c1968c8bb33374218853ac2aa9eecdd0fe63732
|
|
BLAKE2b-256 checksum How to use checksums |
aeb1b56dea86bccc64aa7cdf15c1145483c1291d99a34b42260487318b97ebb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for route-optimization-constrained 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.