Edited README file.

This commit is contained in:
Kenneth Jao 2021-09-19 02:55:49 -04:00
parent b70e260ecd
commit f910d579f7

View File

@ -30,7 +30,7 @@ The 'domain' section defines the basic setup. The `n_objects` parameter represen
```json ```jsonc
{ {
"domain": { "domain": {
"n_objects": 15, "n_objects": 15,
@ -44,7 +44,7 @@ The 'domain' section defines the basic setup. The `n_objects` parameter represen
[1,3], [2,4], [3,5], [3,6], [5,7] [1,3], [2,4], [3,5], [3,6], [5,7]
] ]
}, },
... //...
} }
``` ```
@ -56,24 +56,24 @@ There are currently three simulation modes, and the configuration changes slight
#### Flow #### Flow
This mode simulates the relaxing of the objects to its equilibrium. The threshold is the sufficient condition where the gradient is sufficiently close to zero. Specifically, the simulation stops when the L1 norm of the gradient divided by the number of objects is less than the threshold. The `step-size` parameter only represents the *initial* step size. This is because adaptive step size is employed. This mode simulates the relaxing of the objects to its equilibrium. The threshold is the sufficient condition where the gradient is sufficiently close to zero. Specifically, the simulation stops when the L1 norm of the gradient divided by the number of objects is less than the threshold. The `step-size` parameter only represents the *initial* step size. This is because adaptive step size is employed.
```json ```jsonc
{ {
... //...
"simulation": { "simulation": {
"mode": "flow", "mode": "flow",
"step_size": 0.05, "step_size": 0.05,
"threshold": 0.0001 "threshold": 0.0001
}, },
... //...
} }
``` ```
#### Search #### Search
This mode searches for equilibrium until `eq_stop_count` equilibria are found. Additionally, if the nullity of the Hessian at the equilibrium is greater than 2. (This is due to periodicity, as any translation is another equilibrium.) In this case, the `manifold_step_size` parameter is used to traverse along it. This mode searches for equilibrium until `eq_stop_count` equilibria are found. Additionally, if the nullity of the Hessian at the equilibrium is greater than 2. (This is due to periodicity, as any translation is another equilibrium.) In this case, the `manifold_step_size` parameter is used to traverse along it.
```json ```jsonc
{ {
... //...
"simulation": { "simulation": {
"mode": "search", "mode": "search",
"step_size": 0.05, "step_size": 0.05,
@ -81,15 +81,15 @@ This mode searches for equilibrium until `eq_stop_count` equilibria are found. A
"eq_stop_count": 100, "eq_stop_count": 100,
"manifold_step_size": 0.1 "manifold_step_size": 0.1
}, },
... //...
} }
``` ```
#### Shrink #### Shrink
This mode simulates the the change in the equilibrium as the width is decreased. Both the `width_change` and `width_stop` parameters should be set as a percentage of the width. This mode simulates the the change in the equilibrium as the width is decreased. Both the `width_change` and `width_stop` parameters should be set as a percentage of the width.
```json ```jsonc
{ {
... //...
"simulation": { "simulation": {
"mode": "shrink", "mode": "shrink",
"step_size": 0.05, "step_size": 0.05,
@ -97,22 +97,22 @@ This mode simulates the the change in the equilibrium as the width is decreased.
"width_change": 1, "width_change": 1,
"width_stop": 0.3 "width_stop": 0.3
}, },
... //...
} }
``` ```
Additionally, a filename is automatically generated by default, but it's also possible to provide it with the `name` parameter. The `save_sim` parameter determines whether or not the `.sim` file is saved. This allows simulations to be loaded again at a later time, if other processing is desired. Setting points is also possible, with the `points` parameter. Additionally, a filename is automatically generated by default, but it's also possible to provide it with the `name` parameter. The `save_sim` parameter determines whether or not the `.sim` file is saved. This allows simulations to be loaded again at a later time, if other processing is desired. Setting points is also possible, with the `points` parameter.
```json ```jsonc
{ {
... //...
"simulation": { "simulation": {
... //...
"name": "my_awesome_simulation", // Optional "name": "my_awesome_simulation", // Optional
"save_sim": true "save_sim": true
... //...
} }
... //...
} }
``` ```
@ -121,9 +121,8 @@ It's also possible to visualize the data, but this section is optional. It's pos
While it's possible to customize the figures that are drawn and outputted, there are already a few preset modes: `animate`, `energy`, `stats`, and `eigs`, which outputs the simulation steps as a video, a video with the graph of energy, compiled statistics, and the eigenvalues, respectively. While it's possible to customize the figures that are drawn and outputted, there are already a few preset modes: `animate`, `energy`, `stats`, and `eigs`, which outputs the simulation steps as a video, a video with the graph of energy, compiled statistics, and the eigenvalues, respectively.
```json ```jsonc
{ {
...
"diagram": { "diagram": {
"filetype": "mp4", "filetype": "mp4",
"figures": "animate", "figures": "animate",
@ -133,7 +132,7 @@ While it's possible to customize the figures that are drawn and outputted, there
Now with, all that configuration nonsense out of the way, to run, simply type Now with, all that configuration nonsense out of the way, to run, simply type
```bash ```bash
foo@bar:/path/to/packsim: python3 packsim my_sim.json foo@bar:/path/to/packsim: python3 packsim.py my_sim.json
``` ```
where `my_sim.json` is your configuration file. where `my_sim.json` is your configuration file.