Arnaud Vergnet cb1151c77f improve build process | 3 years ago | |
---|---|---|
.github/workflows | 3 years ago | |
.vscode | 3 years ago | |
circulation_input_graphs | 3 years ago | |
graphs | 3 years ago | |
src | 3 years ago | |
.gitignore | 3 years ago | |
.merlin | 3 years ago | |
Makefile | 3 years ago | |
README.md | 3 years ago | |
_tags | 3 years ago |
Ocaml project on Ford-Fulkerson. This project contains some simple configuration files to facilitate editing Ocaml in VSCode.
This project can compile 2 executables:
ftest.native
, the base FF algorithm implementationcirculationtest.native
, a circulation-demand problem solved by the use of the FF algorithm. The problem can be found on Wikipedia.To use in VSCode, you should install the OCaml
extension in VSCode. Other extensions might work as well but make sure there is only one installed.
Then open VSCode in the root directory of this repository.
This project uses the Graphviz library to render svg graphs. To install it, simply type :
sudo apt install graphviz
A makefile provides some useful commands:
make build
to compile the base ff algorithm. This creates an ftest.native executablemake test
to run the ftest
program with only the infile (executes tests on it) and generate svg files for each tests. This uses the graph1
in the graphs
folder and outputs in the test
folder.make demo
to run the ftest
program with some arguments and generate the final svg file. This uses graphs in the graphs
folder and outputs in the run
folder.make build_circulation
to compile the circulation-demand problem resolution. This creates a circulationtest.native executablemake demo_circulation
to run the circulationtest
program with some arguments and generate the final svg file. This uses graphs in the circulation_input_graphs
folder and outputs in the run
folder.make format
to indent the entire projectmake clean
to remove build artifactsIn case of trouble with the VSCode extension (e.g. the project does not build, there are strange mistakes), a common workaround is to (1) close vscode, (2) make clean
, (3) make build
and (4) reopen vscode.