jiangpy
A swarm intelligence optimization library with 120+ algorithms and a pluggable strategy system.
Design: Algorithm = Base Optimizer + Pluggable Strategies
Installation
pip install jiangpy
For visualization support:
pip install jiangpy[visualize]
Quick Start
import numpy as np
from jiangpy import FloatVar, PSO, HillClimbing, LatinHypercube
def objective(x):
return np.sum(x ** 2)
problem = {
"bounds": FloatVar(lb=-10.0, ub=10.0, n_dims=30),
"minmax": "min",
"obj_func": objective,
}
model = PSO(pop_size=50, epoch=500)
model.with_init(LatinHypercube())
model.with_local_search(HillClimbing(step_size=0.01))
result = model.solve(problem)
print(f"Best fitness: {result.target.fitness}")
Features
- 120+ optimization algorithms across swarm, evolutionary, physics, math, bio, and human-inspired categories
- Pluggable strategies for initialization, selection, crossover, mutation, local search, and replacement
- Parallel evaluation support (single / thread / process)
- Multi-objective optimization via weighted sum
- Benchmark functions including classical and CEC benchmarks
- Hyperparameter tuning via grid search
Documentation
Run the examples:
python -m jiangpy.examples_usage
Requirements
- Python >= 3.8
- numpy >= 1.20.0
- matplotlib >= 3.3.0 (optional, for visualization)
License
MIT
Metadata
Release files for jiangpy 0.1.0
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 |
|---|---|---|---|---|
| jiangpy-0.1.0.tar.gz | 12.3 MB | Without provenance | Details for jiangpy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jiangpy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jiangpy-0.1.0-py3-none-any.whl |
Total release size: 25.4 MB
Release files / jiangpy-0.1.0.tar.gz
| Download URL | jiangpy-0.1.0.tar.gz |
|---|---|
| Size | 12.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0458b7c526b19f289e7dc21b2aa3ce6a8569ea679c64f129c4d6fdccf5b39d7
|
|
BLAKE2b-256 checksum How to use checksums |
ca078f0c9530e1e44972f52880cc70aa21bcd7030f0dd65749fa4eac66178cd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / jiangpy-0.1.0-py3-none-any.whl
| Download URL | jiangpy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9529192943a12f86bb58c46db22fbd3063050c2e0a77780f6ace73d9e2c5183
|
|
BLAKE2b-256 checksum How to use checksums |
3e05a1914e0595c15a217cdeebde46a7b1a408c4f1843add06e06652cc80c05a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for jiangpy 0.1.0
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.