diff --git a/README.md b/README.md index d236477..2ecade0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ To run the program in IntelliJ, you can - Select `Run Main.main()`. It should complain that some arguments are missing. - Give it the expected command line arguments : `Run > Edit Configuration`, then fill in the `Program arguments` text box. - ## Working on the command line (Gradle) Compilation instructions are given for Linux. On Windows you can use the `gradlew.bat` script (but you are on your own). @@ -44,72 +43,8 @@ This is especially useful if you want to run it on another machine. ❯ java -jar build/libs/JSP.jar --solver basic --instance ft06 ``` -The command line above indicates that we want to solve the instance named`ft06` with the `basic` solver. It should give an output like the following : -``` - basic -instance size best runtime makespan ecart -ft06 6x6 55 1 60 9.1 -AVG - - 1.0 - 9.1 -``` -Fields in the result view are the following : -- `instance`: name of the instance -- `size`: size of the instance `{num-jobs}x{num-tasks}` -- `best`: best known resultfor this instance -- `runtime`: time taken by the solver in milliseconds (rounded) -- `makespan`: makespan of the solution -- `ecart`: normalized distance to the best result: `100 * (makespan - best) / best` +## Documentation -One can also specify multiple solvers (below `basic` and `random`) and instances (below `ft06`, `ft10` and `ft20`) for simultaneous testing: +Documentation for this project is available here : [https://insa-4ir-meta-heuristiques.github.io/doc/](https://insa-4ir-meta-heuristiques.github.io/doc/) -``` -❯ java -jar build/libs/JSP.jar --solver basic random --instance ft06 ft10 ft20 - - basic random -instance size best runtime makespan ecart runtime makespan ecart -ft06 6x6 55 1 60 9.1 999 55 0.0 -ft10 10x10 930 0 1319 41.8 999 1209 30.0 -ft20 20x5 1165 0 1672 43.5 999 1529 31.2 -AVG - - 0.3 - 31.5 999.0 - 20.4 -``` -Here the last line give the average `runtime` and `ecart` for each solver. - -``` -sage: jsp-solver [-h] [-t TIMEOUT] --solver SOLVER [SOLVER ...] - --instance INSTANCE [INSTANCE ...] - -Solves jobshop problems. - -named arguments: - -h, --help show this help message and exit - -t TIMEOUT, --timeout TIMEOUT - Solver timeout in seconds for each instance. - (default: 1) - --solver SOLVER [SOLVER ...] - Solver(s) to use (space separated if more than - one) - --instance INSTANCE [INSTANCE ...] - Instance(s) to solve (space separated if more - than one). All instances starting with the given - String will be selected. (e.g. "ft" will select - the instances ft06, ft10 and ft20. -``` - - -## IDE Support - -Most IDEs should provide support for importing gradle projects. However, our experience has been best with IntelliJ so far and we would recommend it. - -#### IntelliJ - -IntelliJ has worked best, with out of the box support for the import of gradle projets: -https://www.jetbrains.com/help/idea/gradle.html#gradle_import_project_start - - -#### Eclipse - -Most technical problems have been related to the use of Eclipse so we don't recommend using it unless you have a good reason to. -We have however configured gradle to allow generating an eclipse configuration like so : -``` -./gradlew eclipseClean eclipse -``` \ No newline at end of file diff --git a/doc/src/SUMMARY.md b/doc/src/SUMMARY.md index c475e8c..3259ad9 100644 --- a/doc/src/SUMMARY.md +++ b/doc/src/SUMMARY.md @@ -1,5 +1,7 @@ # Summary +- [Welcome](./prelude.md) - [Instances](./instances.md) - [Encodings](./encodings.md) - [Solvers](./solvers.md) +- [Entry Points](./entry-points.md) diff --git a/doc/src/entry-points.md b/doc/src/entry-points.md new file mode 100644 index 0000000..1d8a1b4 --- /dev/null +++ b/doc/src/entry-points.md @@ -0,0 +1,74 @@ +# Entry Points + + +## `jobshop.MainTest` + +This is a java main class that you can use to run some small tests. It comes with some initial code to get you started when exploring the encodings. + +## `jobshop.Main` + +This is the principal entry point that aims at helping you running many solvers on many instances and comparing the results. +It expects several command line arguments to specify which solvers to run and which instance to solve. + + +``` +Usage: jsp-solver [-h] [-t TIMEOUT] --solver SOLVER [SOLVER ...] + --instance INSTANCE [INSTANCE ...] + +Solves jobshop problems. + +named arguments: + -h, --help show this help message and exit + -t TIMEOUT, --timeout TIMEOUT + Solver timeout in seconds for each instance. + (default: 1) + --solver SOLVER [SOLVER ...] + Solver(s) to use (space separated if more than + one) + --instance INSTANCE [INSTANCE ...] + Instance(s) to solve (space separated if more + than one). All instances starting with the given + String will be selected. (e.g. "ft" will select + the instances ft06, ft10 and ft20. +``` + + +### Example usage + +```shell +# Running the Main program with gradle +❯ ./gradlew run --args="--solver basic --instance ft06" +``` + +The command line above indicates that we want to solve the instance named`ft06` with the `basic` solver. It should give an output like the following : +``` + basic +instance size best runtime makespan ecart +ft06 6x6 55 1 60 9.1 +AVG - - 1.0 - 9.1 +``` + +Fields in the result view are the following : +- `instance`: name of the instance +- `size`: size of the instance `{num-jobs}x{num-tasks}` +- `best`: best known resultfor this instance +- `runtime`: time taken by the solver in milliseconds (rounded) +- `makespan`: makespan of the solution +- `ecart`: normalized distance to the best result: `100 * (makespan - best) / best` + +One can also specify multiple solvers (below `basic` and `random`) and instances (below `ft06`, `ft10` and `ft20`) for simultaneous testing: + +```shell +❯ ./gradlew run --args="--solver basic random --instance ft06 ft10 ft20" + + basic random +instance size best runtime makespan ecart runtime makespan ecart +ft06 6x6 55 1 60 9.1 999 55 0.0 +ft10 10x10 930 0 1319 41.8 999 1209 30.0 +ft20 20x5 1165 0 1672 43.5 999 1529 31.2 +AVG - - 0.3 - 31.5 999.0 - 20.4 +``` +Here the last line give the average `runtime` and `ecart` for each solver. + + +**Tip:** When selecting instance to solve, you can only provide a prefix to instance name. All instances that start with this prefix will be selected. \ No newline at end of file diff --git a/doc/src/prelude.md b/doc/src/prelude.md new file mode 100644 index 0000000..f82f58e --- /dev/null +++ b/doc/src/prelude.md @@ -0,0 +1 @@ +# Welcome diff --git a/doc/src/solvers.md b/doc/src/solvers.md index 8c4dd34..425967f 100644 --- a/doc/src/solvers.md +++ b/doc/src/solvers.md @@ -24,4 +24,9 @@ It repeats this process until the deadline to produce a result is met and finall The greddy solver is not implemented yet. Its constructor accepts a parameter that specifies the priority that should be used to produce solutions. -## Descent Solver \ No newline at end of file +## Descent Solver + + +### Neighborhoods + +TODO \ No newline at end of file