Skip to main content

This package contains swarm algorithms

Project description

lokky

Swarm algorithms module

Installation

pip install git+https://github.com/OnisOris/lokky
pip install lokky

Example

import numpy as np
from lokky.pionmath import SSolver

params = {
    "kp": np.eye(2, 6),
    "ki": np.zeros((2, 6)),
    "kd": np.eye(2, 6) * 0.1,
    "attraction_weight": 0.1,
    "cohesion_weight": 0.1,
    "alignment_weight": 0.1,
    "repulsion_weight": 5.0,
    "unstable_weight": 0.5,
    "noise_weight": 0.1,
    "safety_radius": 1.5,
    "max_acceleration": 0.3,
    "max_speed": 0.5,
}
solver = SSolver(params)
drone1 = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
drone2 = np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0])
target_matrix = np.array([4.0, 0.0, 0.0, 0.0, 0.0, 0.0])
state_matrix = np.array([drone1, drone2])
new_velocities = solver.solve(state_matrix, target_matrix, 0.1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lokky-0.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lokky-0.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file lokky-0.0.1.tar.gz.

File metadata

  • Download URL: lokky-0.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lokky-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ed2e2d8e25fcd82e0097987665836c52e92465b96b71117d6a0341a410510946
MD5 2436cfe7cc163fab820f1bc3a0b016e0
BLAKE2b-256 c91e6f5e1df5db6dbe40ecd831a109c765bdbb7d77c5d77698ee44289343bc85

See more details on using hashes here.

Provenance

The following attestation bundles were made for lokky-0.0.1.tar.gz:

Publisher: wheels.yml on OnisOris/lokky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lokky-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: lokky-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lokky-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cfc81d541ecf6d6e4b0ec1cacae6226e4b4eb7d9167030f24209bca8b118bf4
MD5 74d1e0709236cf703f4ff45abd4fbad5
BLAKE2b-256 d0ce6030c1a50368d7f334ee316235960f65929f6e37af050fa5d3da24e353ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for lokky-0.0.1-py3-none-any.whl:

Publisher: wheels.yml on OnisOris/lokky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page