A simple program that runs a Metropolis Monte Carlo algorithm with or without simulated annealing on Ackley's function. It optionally generates an output csv file and different plots.
cargo run <param file name> [options]
cargo run -- --aex
// run pure Ackley examples
Build and run optimized artifacts (e.g. for external benchmarking):
cargo build -r
target/release/ackley_mc <param file name> [options]
Running unit tests: cargo test
Running benchmarks: cargo bench
Each line in the parameter file consists of a name (type string) and value separated by a whitespace. They are listed in the following:
- ini_temp, final_temp (float): initial and final temperature. same for no simulated annealing
- n_step (integer): number of steps
- x_ini (comma-separated list of floats): initial x value for each dimension
- x_delta (float): (initial) step size
- seed (integer) random number seed for reproducibility
- foutname (string): the name of output file(s)
All numeric values need to be positive.
An example parameter file can be found in examples/params
.
gnuplot
for the benchmarking libraryopenssl
developer tools- Helpful:
rustup
Based on an assignment by Prof. A. Torda from the Biomolecular Modeling Group at the ZBH, UHH