You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-15Lines changed: 35 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
<!-- badges: end -->
9
9
10
10
11
-
`Shepherd` is a Rust implementation of an algorithm solving the "random population control problem",
11
+
`Shepherd` is an implementation of an algorithm solving the "random population control problem",
12
12
as presented in <https://arxiv.org/abs/2411.15181>.
13
13
14
14
Starting from a non-deterministic finite automaton (nfa),
@@ -38,26 +38,53 @@ and displays the answer in the terminal, including a winning strategy for positi
38
38
39
39
Check the file ```examples.pdf``` at the root which gives an overview of all available examples.
40
40
41
+
## Installation
41
42
42
-
## Usage
43
+
You can build an optimized binary (will be placed in `target/release/shepherd`) using the following command.
44
+
45
+
```
46
+
cargo build --release
47
+
```
48
+
49
+
To install the binary for later use this:
50
+
```
51
+
cargo install --path . # to install the `shepherd` binary to your $PATH
52
+
```
53
+
This will move the binary into to your cargo path, usually `~/.cargo/bin`, make sure to include this in your `$PATH`.
54
+
55
+
To run tests:
56
+
```
57
+
cargo test
58
+
```
59
+
60
+
To generate html docs to `target/doc/shepherd/index.html`
61
+
```
62
+
cargo doc
63
+
```
64
+
65
+
## Command-line Usage
43
66
44
67
```
45
68
Usage: shepherd [OPTIONS] <AUTOMATON_FILE>
46
69
47
70
Arguments:
48
-
<AUTOMATON_FILE> path to the input
71
+
<AUTOMATON_FILE> Path to the input
49
72
50
73
Options:
51
74
-f, --from <INPUT_FORMAT>
52
75
The input format [default: tikz] [possible values: dot, tikz]
76
+
-v, --verbose...
77
+
Increase verbosity level
78
+
-l, --log-output <LOG_FILE>
79
+
Optional path to the log file. Defaults to stdout if not specified.
53
80
-t, --to <OUTPUT_FORMAT>
54
81
The output format [default: plain] [possible values: plain, tex, csv]
55
82
-o, --output <OUTPUT_FILE>
56
-
where to write the strategy; defaults to stdout.
83
+
Where to write the strategy; defaults to stdout.
57
84
-s, --state-ordering <STATE_ORDERING>
58
-
The state reordering type: preserves input order, sorts alphabetically or topologically. [default: input] [possible values: input, alphabetical, topological]
85
+
The state reordering type. [default: input] [possible values: input, alphabetical, topological]
59
86
--solver-output <SOLVER_OUTPUT>
60
-
The solver output. Either yes/no and a winning strategy (the faster). Or the full maximal winning strategy. [default: strategy] [possible values: yes-no, strategy]
0 commit comments