Skip to main content

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

MIT

Metadata

Release files for rmk-swarm 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rmk-swarm 0.0.2
File Size Uploaded
rmk_swarm-0.0.2.tar.gz 3.4 kB Details

Release files / rmk_swarm-0.0.2.tar.gz

Download URL rmk_swarm-0.0.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eaab6ef4be02fe51ae929e31ecd56eafda2cb4a0cd08fbe075b0bfc189deca71
BLAKE2b-256 checksum
How to use checksums
ed745afa6edd6bdfcb48666cbf386a1978e779e63c091322635841d32a1e95dc
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page