Skip to main content

This package contains swarm algorithms

Project description

lokky-analyze plot

lokky

Swarm algorithms module

Installation

Base install

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

Install with visualisation

pip install "lokky[plotting]"

Examples

import numpy as np
from lokky.pionmath import SSolver
n_points = 1
params = {
    "kp": np.ones((n_points, 6)),
    "ki": np.zeros((n_points, 6)),
    "kd": np.ones((n_points, 6)) * 0,
    "attraction_weight": 1.0,
    "cohesion_weight": 1.0,
    "alignment_weight": 1.0,
    "repulsion_weight": 1.0,
    "unstable_weight": 1.0,
    "noise_weight": 1.0,
    "current_velocity_weight": 0.0,
    "safety_radius": 1.0,
    "max_acceleration": 1.0,
    "max_speed": 1.0,
    "unstable_radius": 2,
}
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_for_all(state_matrix, target_matrix, 0.1)

Testing script

After installation (lokky[plotting]) run scripts:

lokky-analyze --n 10

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.10.tar.gz (13.2 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.10-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lokky-0.0.10.tar.gz
  • Upload date:
  • Size: 13.2 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.10.tar.gz
Algorithm Hash digest
SHA256 2709d6201e2cf532149fe474b0140f87a34d73fd9decbab21bfb4f0bb14ca541
MD5 4f23e59a2ba5173fbc3243b2a4ca5b51
BLAKE2b-256 bdf2b003741822497c9038f53e66f7d801d7eabbf8ebb952d388b0132755dbc4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: lokky-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 13.9 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0a6eb9ecfcdb4be6f6ccda8ce537754c4ac6fa9d0715ba43b609bcf78be92595
MD5 ff16cc84028db1f34662bdbbb6104108
BLAKE2b-256 720bc209d6cb12b985ccd4ce92baf7546523e48f021ca2431cb456fb84a83401

See more details on using hashes here.

Provenance

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