Giter Club home page Giter Club logo

pso_cndp's Introduction

Particle Swarm Optimization for Critical Node Detection Problem (CNDP)

This repository is part of a research project focused on solving the Critical Node Detection Problem (CNDP) using Particle Swarm Optimization (PSO). The project employs a star topology and a custom dynamic topology for the PSO approach. Additionally, the project implements existing greedy and Variable Neighborhood Search (VNS) solutions for comparative analysis.

Project Structure

  • main_pso_star.py: Entry point for running the PSO algorithm with a star topology.
  • main_pso_dynamic.py: Entry point for running the PSO algorithm with a dynamic topology.
  • main_greedy.py: Entry point for running the greedy algorithm solution.
  • main_vns.py: Entry point for running the VNS solution.
  • pso/: Contains the implementation of the PSO algorithm.
  • greedy_CNDP.py: Contains the implementation of the greedy solution.
  • vns.py: Contains the implementation of the VNS solution.
  • graphDataSet/: Directory containing data sets used in the algorithms. Dataset proposed by Mario Ventresca accessible in [https://engineering.purdue.edu/~mventresca/index.php?cnd]
  • GraphTest.py: Contains tests for graph functionalities used in algorithms.
  • Results/: Directory containing the results of the running the algorithms on graphDataSet graphs as described in the the thesis.

Getting Started

Prerequisites

Ensure you have Python installed on your machine (Python 3.x is recommended).

Installation

  1. Clone the repository:
git clone https://github.com/abdelmoujibMegzari/pso_cndp.git
  1. Navigate to the cloned directory:
cd pso_cndp

Usage

To run any of the solutions, use one of the following commands: each command will guide you and ask for input data set to run the algorithm.

  • For PSO with star topology:
python main_pso_star.py
  • For PSO with dynamic topology:
python main_pso_dynamic.py
  • For the greedy solution:
python main_greedy.py
  • For the VNS solution:
python main_vns.py

License

This project is licensed under the GPL-3.0 license - see the LICENSE file for details.

pso_cndp's People

Contributors

abdelmoujibmegzari avatar

Stargazers

 avatar

Watchers

 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.