Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandengstrom committed May 10, 2024
1 parent 3e98fed commit 8eba841
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ bash setup.sh
The setup.sh script automates the setup of the Road Network Generator by creating a Python virtual environment, installing necessary dependencies, and making the main script executable. It also adds the project directory to your system's PATH, ensuring you can run the tool from anywhere in the terminal.
## Usage
After installing the Road Network Generator, you can run it from anywhere in your system using the rd-gen command followed by various flags to customize your graph generation. Here’s a breakdown of all the flags you can use to customize the road network graph:
- **-s, --size [int]**: Specifies the size of the graph. It should probably be between 1 and 50. By default 13.
- **-S, --seed [int]**: Uses a specified seed for graph generation for reproducible results. If omitted, a random seed is used.
- **-W, --width [int]**: Sets the width of the graph, defining the maximum X coordinate. By default 1200.
- **-H, --height [int]**: Sets the height of the graph, defining the maximum Y coordinate. By default 800.
- **-c, --camera_density [int]**: Determines the density of traffic cameras in the road network. By default 10.
- **-p, --plot**: Plots the graph after generation. By default, the graph is not plotted.
- **-C, --plot_cameras**: If plotting is enabled, this flag will also display cameras on the plot.
- **-f, --file**: Saves the generated graph to a file. Uses an own file format by default.
- **-o, --output [file path]**: Specifies the output file name for saving the graph. Requires -f. If not provided a auto generated filename with timestamp will be used.
- **-j, --json**: Saves the output file in JSON format. Requires -f.
- **-l, --log**: Enables logging of messages during graph generation.
- **-x, --complex**: Generates a more complex and correct network at the expense of increased computational cost.
| Flag | Description | Default Value |
|---------------------------|----------------------------------------------------------------------------------------|------------------------|
| `-s, --size [int]` | Specifies the size of the graph. It should probably be between 1 and 50. | 13 |
| `-S, --seed [int]` | Uses a specified seed for graph generation for reproducible results. With `-l` the seed used will be printed | Random seed |
| `-W, --width [int]` | Sets the width of the graph, defining the maximum X coordinate. | 1200 |
| `-H, --height [int]` | Sets the height of the graph, defining the maximum Y coordinate. | 800 |
| `-c, --camera_density [int]` | Determines the density of traffic cameras in the road network. | 10 |
| `-p, --plot` | Plots the graph after generation. | Disabled |
| `-C, --plot_cameras` | If plotting is enabled, this flag will also display cameras on the plot. | N/A |
| `-f, --file` | Saves the generated graph to a file. Uses an own file format by default. | Disabled |
| `-o, --output [file path]`| Specifies the output file name for saving the graph. Requires `-f`. | Auto-generated filename|
| `-j, --json` | Saves the output file in JSON format. Requires `-f`. | N/A |
| `-l, --log` | Enables logging of messages during graph generation. | N/A |
| `-x, --complex` | Generates a more complex and correct network at the expense of increased computational cost. | N/A |
### Example:
Creates a graph with the dimensions 2000x1000 and saves it in JSON-format to my_graph.json. It will also plot the graph visually.
```
Expand Down

0 comments on commit 8eba841

Please sign in to comment.