The report is located at bohacek_frantisek_report.pdf, it has been generated from report.md Rust has been used to write the library and tsp problem solution along with Cargo for managing the dependencies. # How to run To run the tsp, go into the tsp_hw01 folder, ie. `cd tsp_hw01`, then use `cargo run --release -- `, where instance can be any of the instances that's located in `tsp_hw01/instances`. Supported aglorithms are: ``` ea ls ea_binary ``` So for example: `cargo run --release -- eil51 ls` # Solutions The solution is then saved to `tsp_hw01/solutions/`, a png with the route is saved and a csv file with evaluations of best candidates at a given time (time is measured by number of evaluations). # Plotting The solutions might be plotted by using `tsp_plotter` program. `cd tsp_plotter` and then `cargo run --release -- `, where feature is one of: ``` ``` The features are hardcoded in the code and used in the report, they say what algorithms and instances should be used in a given plot. They are taken from the `tsp_hw01` folder. # 'Reproducing' the plots in the report To obtain the graphs in the report, use the following sequence of commands: 1. `compute.sh` to compute all the algorithms on all instances, 10 times for each instance. 2. Generate the plots, go to `tsp_plotter` folder, and run ``` cargo build --release ../target/release/tsp_plotter algorithms_fitness_eil76.json ../target/release/tsp_plotter algorithms_probability_all.json ../target/release/tsp_plotter crossovers_probability_all.json ../target/release/tsp_plotter heuristics_probability_all.json ../target/release/tsp_plotter perturbations_fitness_eil76.json ../target/release/tsp_plotter perturbations_probability_all.json ../target/release/tsp_plotter representations_probability_all.json ../target/release/tsp_plotter representations_fitness_eil76.json ``` Now all the csv solutions are in `tsp_hw01/solutions` and all the plots are in `tsp_plotter/plots` The graphs won't be 1:1, because randomness is involved and the seeds haven't been captured and aren't configurable.