Package for Helping Swarm Intelligence Modeling
Project description
rmk_swarm
rmk_swarm is a python package containing tools and functions to make your implementation of Swarm Intelligence Method easier.
Installation and updating
Use the package manager pip to install rmk_swarm like below. Rerun this command to check for and install updates .
pip install rmk_swarm
Usage
Features:
- swarmtools.init_pop --> generator to genarate a swarm population consist of n individuals
- swarmtools.eval_pop --> function to evaluate given objective function for each individual in a population
- swarmtools.print_pop --> function to print for each individual in a population | Format -> [ ID , X , fitness ]
- swarmtools.sort_pop --> function to sort individual in a population based on its objective function
- swarmtools.eval_pop --> function to find best individual in a population
Demo of some of the features:
# How to Import
from rmk_swarm import swarmtools
# Domains of each x in X = { x1,x2,x3 }
rn = [ [0,1] , [2,2] , [1,10] ]
# Objective function Example
def f(X):
return X[0] + X[1] + X[2]
# Parameters
n_populasi = 10 # number of individuals in Population
# Generate n number of individuals
populasi = swarmtools.init_pop(n_populasi , rn )
# Evaluate Each individuals Objective Functions
populasi = swarmtools.eval_pop(populasi,f)
# Print all individuals in population
swarmtools.print_pop(populasi)
# Sort the individuals in Population
swarmtools.sort_pop(populasi)
# Find best individuals. Note: Sort First then return best individual
swarmtools.find_best(populasi)
Contributing
Please Contact me at riksameidy@gmail.com if you want to contribute to this package. Thank you :)
License
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
rmk_swarm-0.0.2.tar.gz
(3.4 kB
view details)
File details
Details for the file rmk_swarm-0.0.2.tar.gz.
File metadata
- Download URL: rmk_swarm-0.0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaab6ef4be02fe51ae929e31ecd56eafda2cb4a0cd08fbe075b0bfc189deca71
|
|
| MD5 |
d43109f1ef8cb8c620339fc424441008
|
|
| BLAKE2b-256 |
ed745afa6edd6bdfcb48666cbf386a1978e779e63c091322635841d32a1e95dc
|