Giter VIP home page Giter VIP logo

assignment_problem's Introduction

Assignment Problem

Implementation of the Hungarian O(n^3) Algorithm in Python. Linearization method for the quadratic problem.

Prerequisites

  • python >= 3.10
  • poetry >= 1.7

Install & Run

This is a poetry project. Poetry is used to install dependencies. So far, tests are done by editing main.py. The exec() function with parameter 0 tests the assing files and with any other parameter it tests the assingp files. The results are saved in the output.txt and output_big.txt files respectively.

git clone https://github.com/FWsantos/assignment_problem.git
cd assignment_problem
poetry shell
poetry install --no-root
python src/main.py

Files

  • hungarian_n3.py: Contains the implementation of the Hungarian O(n^3) Algorithm in Python.
  • main.py: This is the main file where the algorithm is executed. It imports the hungarian_n3 module and calls the necessary functions to solve the assignment problem.
  • controller.py: This file contains the execution flow (read data sets ant run algorithm function)
  • general.py: This file contains general utility functions that are used by the algorithm and the test cases.

Running the Code

To run the code, follow these steps:

  1. Clone the repository:
    git clone https://github.com/FWsantos/assignment_problem.git
    cd assignment_problem
    
  2. Activate the virtual environment:
    poetry shell
    
  3. Install the dependencies:
    poetry install --no-root
    
  4. Run the algorithm:
    python src/main.py
    

assignment_problem's People

Contributors

fwsantos 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.