An open API service indexing awesome lists of open source software.

https://github.com/ophiase/algorithmic-project-ifeby270

A Linear Algorithmic Anthology for a University Project
https://github.com/ophiase/algorithmic-project-ifeby270

algorithms linear-programming

Last synced: 3 months ago
JSON representation

A Linear Algorithmic Anthology for a University Project

Awesome Lists containing this project

README

        

# [Algorithmic-Project-IFEBY270](https://ophiase.github.io/Algorithmic-Project-IFEBY270/)

An algorithmic project for a University course.
- Implemented
- Simplex
- Nash Equilibrium
- Knapsack + Reduction basis + Subset sum

Visit : [Web Report](https://ophiase.github.io/Algorithmic-Project-IFEBY270/)

# Installation

Requirements : Numpy, Pulp

```bash
pip install numpy pulp
# or
conda env create -f environment.yml
conda activate algorithmic-project
```

# Execution

Execute tests
```bash
./run_tests # first method
make test_verbose # second method
python3 -m unittest tests. # for specific test
```

Update Gamut tests
```bash
make update_gamut
```

# More Tests

To incorporate additional tests using unittest into `src/algorithm//.py`, modify `tests/.py`.

All methods with a name beginning with `test_will` be executed as tests.

Execute tests with:
```bash
python3 -m unittest tests.
```

## Example

To include another Nash Equilibrium example, edit `tests/nash_equilibrium.py`, and add the following method to the `TestNashEquilibrium` class:

```python
def test_example(self):
self.check_equilibrium(
A = np.array([[3, 2], [1, 4]]),
B = np.array([[2, 1], [3, 2]])
)
```

Execute the test with:
```bash
python3 -m unittest tests.nash_equilibrium
```