Metadata-Version: 2.4
Name: lokky
Version: 0.0.2
Summary: This package contains swarm algorithms
Author-email: Michael <onisoris@yandex.ru>
Maintainer-email: Michael <onisoris@yandex.ru>
License-Expression: MIT
Project-URL: Homepage, https://github.com/OnisOris/lokky
Project-URL: Documentation, https://onisoris.github.io/lokky
Project-URL: Repository, https://github.com/OnisOris/lokky.git
Project-URL: Issues, https://github.com/OnisOris/lokky/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.0.2
Dynamic: license-file

# lokky
Swarm algorithms module

# Installation

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

```
pip install lokky
```

# Example

```python
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)
```
