1
0
Ответвление 0
ocaml project semester7
Найти файл
2020-12-12 19:17:29 +01:00
.github/workflows Add github actions workflow 2020-11-02 18:01:44 +01:00
.vscode Enable auto-indent on file save 2019-11-06 14:25:19 +01:00
graphs capacities + comments 2020-12-12 18:57:15 +01:00
src capacities + comments 2020-12-12 18:57:15 +01:00
.gitignore Add gitignore 2020-11-02 12:52:43 +01:00
.merlin Add merlin configuration 2019-11-06 13:49:12 +01:00
_tags makefile&co 2020-12-06 13:58:21 +01:00
Makefile biais 2020-12-11 13:34:04 +01:00
README.md update readme 2020-12-12 19:17:29 +01:00

Better project for Ocaml project on Ford-Fulkerson. The min-cost max-flow algorithm implemented is the Busacker-Gowen algorithm.

This branch features 2 versions of the project :

  • The basic version to test the algorithm with any graph having a cost and a capacity for every edge.
    The input file's format is almost the same as the one for the acceptable project (see gfile.ml and graphs/graph1).

  • The advanced version to test bipartite matching problems from a certain input file's format (see BPgfile.ml and graphs/graph2).

A makefile provides some useful commands:

  • make build to compile an algorithm which will accept an advanced file entry. This creates an ftest_advanced.native executable.
  • make advanced to compile an algorithm which will accept an advanced file entry. This creates an ftest_advanced.native executable.
  • make basic to compile an algorithm which will accept a basic file entry. This creates an ftest_basic.native executable.
  • make demo_advanced to run the ftest_advanced program with some arguments
  • make demo_basic to run the ftest_basic program with some arguments
  • make format to indent the entire project
  • make edit to open the project in VSCode
  • make clean to remove build artifacts on the ftest_advanced.native file
  • make clean_advanced to remove build artifacts on the ftest_advanced.native file
  • make clean_basic to remove build artifacts on the ftest_basic.native file

You can also test the 2 versions individually with any graph of your choice as long as the file you use follows the appropriate format :

  • The command to test the basic version is "./ftest_basic.native [path_input_file] [path_output_file] [source] [sink]"
  • The command to test the advanced version is "./ftest_advanced.native [path_input_file] [path_output_file]"
    [path_input_file] is the path of your file containing the graph's data.
    [path_output_file] is the file's path where the results will be stored after the algorithm is executed. It does not have to exist prior to running the command.
    [source] is the id of the source in your graph (a number)
    [sink] is the id of the sink in your graph (a number)