From bb0898cdbda5702bfa00ce0ef3882e8c4eab619b Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Tue, 6 Dec 2016 17:05:13 +0100 Subject: [PATCH] Add sample configuration to README --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/README.md b/README.md index fa925e3..22ad91c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,72 @@ Files are matched on extension: - Data: `.dzn` - Configuration: `.json`, `.toml`, `.yml` (viper extensions) +## Installation + +`go get -u github.com/jjdekker/chronozinc` + +## Sample Configuration + +The following configuration can be used to time a model using `flatzinc`, +`fzn-gcode` and `fzn-or-tools`. Running is as easy as: `chronozinc config.toml +model.mzn data1.dzn data2.dzn`. + +Tip: Remove the parameters line and place it in +`$HOME/.config/chronozinc/settings.toml` or `/etc/chronozinc/settings.toml`. You +can now make project specific settings files while using the solvers settings as +declared in this file. + +```toml +parameters = ["time", "time_ms", "solvetime", "solvetime_ms", "status"] + +[solvers.flatzinc] + binary = "flatzinc" + +[solvers.gecode] + binary = "fzn-gecode" + globals = "gecode" + override_flags = "-s" + [solvers.gecode.extractors] + time = "runtime:\\s*(?P\\d+.\\d+)\\s" + solvetime = "solvetime:\\s*(?P\\d+.\\d+)\\s" + solutions = "solutions:\\s*(?P\\d+)" + variables = "variables:\\s*(?P\\d+)" + propagators = "propagators:\\s*(?P\\d+)" + propagations = "propagations:\\s*(?P\\d+)" + nodes = "nodes:\\s*(?P\\d+)" + failures = "failures:\\s*(?P\\d+)" + restarts = "restarts:\\s*(?P\\d+)" + peak_depth = "peak depth:\\s*(?P\\d+)" + +[solvers.or_tools] + binary = "fzn-or-tools" + globals = "or_tools_cp" + [solvers.or_tools.extractors] + time_ms = "total runtime:\\s*(?P\\d+)\\s" + buildtime_ms = "build time:\\s*(?P\\d+)\\s" + solvetime_ms = "solve time:\\s*(?P\\d+)\\s" + solutions = "solutions:\\s*(?P\\d+)" + constraints = "constraints:\\s*(?P\\d+)" + propagations = "normal propagations:\\s*(?P\\d+)" + delayed_propagations = "delayed propagations:\\s*(?P\\d+)" + branches = "branches:\\s*(?P\\d+)" + failures = "failures:\\s*(?P\\d+)" + memory = "memory:\\s*(?P\\d+.\\d+)\\s" # in MB + + +[extractors] + time = "overall time\\s*(?P\\d+\\.\\d+)\\s*s" + +[matchers.status] + COMPLETE = "==========" + UNSAT = "=====UNSATISFIABLE=====" + TIMEOUT = "TIMEOUT" + UNKNOWN = "=====UNKNOWN=====" + SAT = "----------" +``` + ## TODO - Remove all usage of `viper` from parsing and runtime packages - Provide separate the `run` and `parse` commands +- Internal data transformation - MORE DOCUMENTATION!!!