Pre-conference version. (6 pages full - yay!)
This commit is contained in:
31
code/README.md
Normal file
31
code/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# How to run
|
||||
## Linux & MacOS
|
||||
Have python3 installed and install the necessary packages with (must be in the same working directory)
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
and now run the main script:
|
||||
```bash
|
||||
python ./main.py
|
||||
```
|
||||
|
||||
## Windows
|
||||
`main.py` uses a packages that doesn't work on Windows. Therefore I created `Dockerfile` to run it in a docker container. These are the commands used to run it.
|
||||
``` bash
|
||||
docker build --tag bool-sim .
|
||||
docker run -it bool-sim
|
||||
```
|
||||
|
||||
Note that if you want to write to a file, you have to manually copy it out of the container (path: `/app/output.txt`).
|
||||
|
||||
# How to use
|
||||
Running `main.py` leads to a menu in which you are able to navigate using arrow keys, accept using `ENTER`, go back/quit using `q`, `ESCAPE` or by selecting the last option in the menu.
|
||||
Stable distribution is available for probabilistic and asynchronous-random only. Furthermore it doesn't check if there are multiple eigenvalues which can cause wrong computations/weird output.
|
||||
On input requests, you can put whatever (BE CAREFUL: this uses python's `eval()` function. Any python code inserted here can and will be executed!). On invalid inputs an error will be printed above the menu and the input field remains open. To abort changing a value in the input fields, leave it empty and press `ENTER`. It should say `Cancelled` above the menu.
|
||||
|
||||
Onto the menu in general. You first have the choice to setup a Boolean network from scratch, or use a preconfigured network.
|
||||
Eitherway, next is the Boolean Network menu - here you can set the number of nodes, set the state, change update schemes, change update functions and simulate the network. The current state is always shown in the title (`Boolean Network: <time-step> | <state>`).
|
||||
Updating can be done in single steps or multiple at once. Multiple steps can write the output to a file in the current working directory. This file will always be named `output.txt` and overwrites this file if it exists.
|
||||
The simulated steps are also shown in the console (up to 999 steps if writing to file is enabled).
|
||||
|
||||
Have fun!
|
||||
Reference in New Issue
Block a user