Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Algoritmen voor beslissingsondersteuning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hesselmans,S.C. (Sam)
Algoritmen voor beslissingsondersteuning
Commits
6c5a8100
Commit
6c5a8100
authored
4 years ago
by
Remmers, B.F. (Bart)
Browse files
Options
Downloads
Patches
Plain Diff
Updated README file with installation and usage instructions
parent
a9ded7fd
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+73
-4
73 additions, 4 deletions
README.md
with
73 additions
and
4 deletions
README.md
+
73
−
4
View file @
6c5a8100
# infomads-project
# Cinema Seating problem solver _Team name TODO_
## Manual
Run main.py with the filename of the input relative to the parent folder of main.py as the first argument.
This program aims to efficiently solve the Cinema Seating problem as define
[
in this document
](
./cinema-assignment.pdf
)
.
## Installation
An installation of Python 3.8 is required, which can be downloaded from
[
here
](
https://www.python.org/downloads/
)
.
The two Python libraries Numpy and MIP are used throughout the progam.
These dependencies can be installed using the Python package manager
[
pip
](
https://pip.pypa.io/en/stable/
)
(
Bundled
with Python 3.8).
#####Numpy installation command:
```
bash
pip
install
numpy
```
#####MIP installation command:
```
bash
pip
install
mip
```
Furthermore, the MIP library can run as an independent ILP solver, however, it can also leverage the faster commercial
ILP solver Gurobi, for which an installation guide can be found
[
here
](
https://www.gurobi.com/
)
## Usage
The cli interface of the program is defined as follows:
```
bash
python3 main.py
[
arguments] file-path
arguments:
[
-online
|
-online-comp
]
-> overwrite the default of running offline problems and algorithms
*
online: use online input format and online algorithm
*
online-comp: use offline input, find optimal solution, and
then
run online algorithm to estimate comp-ration
[
-a
<name>] -> algorithm to be used
[
-benchmark
<i> <p> <o>] -> benchmarks
until
problem p, every problem i iterations, results saved
in
results file o
```
By default the program tries to solve the problem in the file given with argument 'file-path' with an offline problem solver.
This can also be set using the '-online' argument to use online algorithms instead.
The available algorithms that can be used are the following:
Offline:
*
branch-bound
*
ilp (default)
*
naive (broken)
Online:
*
greedy
*
least-lost-seats (default)
So running a greedy algorithm can be done with the following command:
```
bash
python3 main.py
-online
-a
greedy TestCases/Online1.txt
```
Running a benchmark over 7 iterations for every test case until Exact10.txt using the ILP can be done with the
following command:
```
bash
python3 main.py
[
-a
ilp]
-benchmark
7 10 ilp-benchmark-7-iterations-until-10
```
The results of the benchmark will be saved to a newly created file in the
``/input``
folder. The name of the csv file
is the name specified in the command with the epoch prepended to the file name.
## License
[
MIT
](
https://choosealicense.com/licenses/mit/
)
For example:
```$ python3 main.py input.txt```
## References
-
Graph Theory
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment