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.4.tar.gz (11.4 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.4-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lokky-0.0.4.tar.gz
  • Upload date:
  • Size: 11.4 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.4.tar.gz
Algorithm Hash digest
SHA256 00cf09787f5ff6f2f9bffa84cdc4df05f042ec23c62205bce42c16100d9d7622
MD5 4050c143918db267a793c4e01a463053
BLAKE2b-256 db3ad30d5a2ff510023914d61cec4d5af2bf26b2c4a2c780535ba95379088101

See more details on using hashes here.

Provenance

The following attestation bundles were made for lokky-0.0.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: lokky-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 92bf667e59d29636c07673742c74eec023b573ca816c8fa68703be3114d1ee34
MD5 d28e083f4cfaadede7dc57bd6fead902
BLAKE2b-256 e31b59f07557b52d120f7db48bd97baf735a829643500c2522f909cfabe46fdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for lokky-0.0.4-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