Coder Social home page Coder Social logo

xjtu-rl / msn-flocking-formation-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paul-shuvo/msn-flocking-formation-control

0.0 0.0 0.0 1.5 MB

:flying_saucer: An implementation of multi-agent flocking formation control with specific formations that can follow a target without collision and can avoid obstacles.

License: MIT License

Python 100.00%

msn-flocking-formation-control's Introduction

MSN Flocking Formation Control

This is an implementation of the MSN Flocking Formation Control presented in the paper Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory.

Getting started

$ git clone
$ cd 
$ pip install

Run the python files for each of the five cases explained below.

$ python src/msn_1.py

Project parameters:

  • Number of sensor nodes: n =100.
  • Space dimensions: m = 2.
  • Desired distance among sensor node: d = 15.
  • Scaling factor: k = 1.2 and interaction range r = k*d.
  • Epsilon = 0.1 and Delta_t = 0.009 (These two parameters are optional and you can change them).

Variable names

For easier understanding the variables are named similar to the equations described below.

For example, is denoted as C1_ALPHA (all capital as it's a constant), is denoted as p_i_k, and so on.

Cases

Case 1 - MSN Fragmentation

Filename: msn_1.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Plots the initial deployment of the MSN of 100 nodes.
  • Links the neighboringing nodes together by a line.

Plots

  • Plots the fragmentation of the nodes.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.

Algorithm 1:





Result


Case 2 - Implements MSN Quasi-Lattice Formation with static target

Filename: msn_2.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Sets up a target (gamma agent) as static point with its coordinate (x = 150, y =150).
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 2:


Plots

  • Plots the flocking of the nodes.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.

Result


Case 3 - Implements MSN Quasi-Lattice Formation with dynamic target (Sine wave trajectory)

Filename: msn_3.py

  • Randomly generates a connected network of 100 nodes in the area of 150x150.
  • Sets up a target (gamma agent) moving in a sine wave trajectory.
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 3:


Plots

  • Plots the flocking of the nodes following the target (Sine wave trajectory).
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


Case 4 - Implements MSN Quasi-Lattice Formation with dynamic target (Circular trajectory)

Filename: msn_4.py

  • Randomly generates a connected network of 100 nodes in the area of 150x150. In this case you
  • Sets up a target (gamma agent) moving in a circular trajectory.
  • Implements flocking behavior of the MSN.

Algorithm 2 for Case 3 (Same equation, change the values to make it a circular trajectory):


Plots

  • Plots the flocking of the nodes following the target (Circular trajectory).
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


Case 5 - Implements MSN Quasi-Lattice Formation with obstacle avoidance

Filename: msn_5.py

  • Randomly generates a connected network of 100 nodes in the area of 50x50.
  • Sets up a target (gamma agent) at the location of (200, 25).
  • Sets up an obstacle, circular in shape with a radius of 15 and its center location at (100,25).
  • Implements flocking behavior of the MSN avoiding obstacles.

Algorithm 3:




Plots

  • Plots the flocking of the nodes following the target, avoiding obstacles.
  • Plots the velocity.
  • Plots the connectivity.
  • Plots the trajectory.
  • Plots the center of mass and target trajectory.

Result


msn-flocking-formation-control's People

Contributors

paul-shuvo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.