Giter VIP home page Giter VIP logo

csp-algorithms-for-rlfap's Introduction

RLFAP-csp-solver

About

This project implements various constraint satisfaction problem algorithms. The algorithms are then used to solve the radio link frequency assignment problem (rlfap) and are compared on different input instances of the problem. The implementation is based on the Python code found in: https://github.com/aimacode/aima-python/blob/master/csp.py

File structure

  • In folder /data/ : Input instances of the rlfa problem. Files with prefix var define the instance's variables, with prefix dom define the domains of the variables of the instance and prefix ctr define the constraints of the instance.
  • /src/main-rlfa.py : The implementation of the algorithms and the main functionality.

RLFA problem definition

We are given a finite set of radio links (variables), a finite set of frequencies for each radio link (variable domains) and binary non linear constraints of the form |x_i-y_i| > k_i , where x_i, y_i are radio links - variables and k_i is a positive number. The problem wants to assign a frequency (positive number) to each of the radio link variables, so that all constraints are satisfied. More details about the problem can be found here: https://miat.inrae.fr/schiex/rlfap.shtml. Our algorithms focus on the satisfiability-version of the problem and not the the optimization version (both NP-hard).

Algorithms implemented

  • Forward Checking (FC)
  • MAC (maintain arc consistency)
  • Forward Checking with back jumping (FC-CBJ)
  • Min Conflicts (local search / stochastic hill climbing type of algorithm)

We also use dynamic variable ordering, by implementing the dom/wdeg heuristic: http://www.frontiersinai.com/ecai/ecai2004/ecai04/pdf/p0146.pdf.
For value assignment on the variables we use the least constraining value heuristic (lcv).

Execution

$ python src/main-rlfa.py <method>
Where method is 1 for FC, 2 for MAC, 3 for FC-CBJ, 4 for Min-Conflicts.

csp-algorithms-for-rlfap's People

Contributors

super-m-a-n 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.