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
- Host: GitHub
- URL: https://github.com/ophiase/algorithmic-project-ifeby270
- Owner: Ophiase
- License: apache-2.0
- Created: 2024-02-07T20:19:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-03T13:49:12.000Z (about 1 year ago)
- Last Synced: 2025-01-19T08:32:36.363Z (4 months ago)
- Topics: algorithms, linear-programming
- Language: Python
- Homepage: https://ophiase.github.io/Algorithmic-Project-IFEBY270/
- Size: 945 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 sumVisit : [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
```