Skip to content

Latest commit

 

History

History
73 lines (61 loc) · 3.58 KB

File metadata and controls

73 lines (61 loc) · 3.58 KB

Operations Research Codes

[IMPORTANT]: The codes in this repository are written in spanish.


Developers


Mamey

📖

Fussita

📖

Alfredo Fung

📖

Daniel Borot

📖

Description

This repository contains Python code implementations for solving optimization problems in Operations Research. The codes are divided into two parts:

  1. Hungarian Algorithm.
  2. Revised Simplex Method.

Requirements

  • Python 3.11+
  • Pandas
  • Tabulate
  • Numpy
  • Poetry (Optional)

Installation

a. If using Poetry:

  1. pip install poetry
  2. poetry lock
  3. poetry install
  4. Add the venv/lock as the project's interpreter.
  5. Run the code.

b. If not using Poetry:

  1. Open the pyproject.toml file.
  2. In the terminal, write pip install <dependency name> for each dependency listed under the [tool.poetry.dependencies] tag in the file from the previous step.
  3. Run the code.

Execution

Hungarian Algorithm

  1. Adapt rest with your matrix and f_o with your function ("min" or "max")
    rest = [
        [6, 2, 8, 5, 3, 0, 0],
        [5, 3, 9, 4, 2, 0, 0],
        [2, 3, 8, 4, 3, 0, 0],
        [4, 2, 6, 6, 5, 0, 0],
        [6, 1, 7, 6, 4, 0, 0],
        [0, 0, 0, 0, 0, -100, -100],
        [0, 0, 0, 0, 0, -100, -100],
    ]
    f_o = "max"  # min or max
  1. Run the code.

Revised Simplex Method

  1. Run the code.
  2. The code will ask you for the number of variables, restrictions and matrix.

Contributing

This repository is no longer maintained. However, if you want to contribute, you can fork the repository and make a pull request.