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
>**TODO:** The previous description from Urbansim it outdated. Add description of DEMOS, aligning with the code (paper).
6
5
7
6
## Usage
8
7
### Docker Container
@@ -13,7 +12,7 @@ For running the `docker-compose` workflow:
13
12
DEMOS_CONFIG_PATH=<path-to-config> DEMOS_DATA_DIR=<path-to-data-dir> docker-compose up
14
13
```
15
14
16
-
By default `DEMOS_CONFIG_PATH` is set to `./demos_config.toml` and `DEMOS_DATA_DIR` is set to `./data`, so if `data` and `demos_config.toml` are part of the cuurent directory, no additional input is needed.
15
+
By default `DEMOS_CONFIG_PATH` is set to `./demos_config.toml` and `DEMOS_DATA_DIR` is set to `./data`, so if `data` and `demos_config.toml` are part of the current directory, no additional input is needed.
17
16
18
17
Alternatively,
19
18
```bash
@@ -28,79 +27,54 @@ Docker imposes a global limit on how much RAM containers can allocate. DEMOS eas
Alternatively, create a `python 3.10` environment and install dependencies
52
45
```
53
-
pip install -r requirements.txt
46
+
conda create -n demos-env python=3.10
47
+
conda activate demos-env
48
+
pip install .
54
49
```
55
50
56
-
5. Download input data [data_nrel.zip](https://app.box.com/s/tox2nflumia2g4n6rk2i0navca9pskep). You may also refer to the data description [here](https://cloud.urbansim.com/docs/general/documentation/urbansim%20block%20model%20data.html)
51
+
## Running DEMOS
57
52
58
-
6. Put all files of input data into `DEMOS_NREL/demos/data`
53
+
DEMOS requires a series of input tables. Example tables are provided [here](https://app.box.com/s/tox2nflumia2g4n6rk2i0navca9pskep) for internal NREL use. It is recommended to store all the input values in the folder `data` in root of the project, but absolute values can be used by specifying them in the configuration file. You may also refer to the data description [here](https://cloud.urbansim.com/docs/general/documentation/urbansim%20block%20model%20data.html)
59
54
60
-
7. Run DEMOS. First, enter into `DEMOS_NREL/demos`, then run:
name of the calibration folder to read configs from
74
-
-sg, --segmented run with segmented lcms
75
-
-l, --all_local no cloud access whatsoever
76
-
-i input_year, --input_year input_year
77
-
input data (base) year
78
-
-f freq_interval, --freq_interval freq_interval
79
-
intra-simulation frequency interval
80
-
-o output_fname, --output_fname output_fname
81
-
output file name
82
-
-ss skim_source, --skim_source skim_source
83
-
skims format, e.g. "beam", "polaris"
84
-
-rm, --random_matching random matching in the single to x model to
85
-
reduce computational time due to
86
-
the matchmaking process
87
-
-s --random_seed random seed settng
88
-
```
89
61
90
-
8. simulation results
91
-
the demos simulation will produce the following sets of data and results:
92
-
- a synthetic population file showing the evolution of the synthetic population throughout the simulation years. the file should be named `model_data_<scenario_name_output_year>.h5` in directory `DEMOS_NREL/demos/data`.
93
-
- series of aggregated statistics for the population size, number of households, household size distribution, gender distribution, number of births, number of mortalities, number of student enrollments, number of total marriages, number of total divorces, the age distribution of the synthetic population, and income distribution for each simulation year. The files are located at `DEMOS_NREL/demos/outputs/simulation`
62
+
A default configuration file is provided in `configuration/demos_config.toml`. The `[[tables]]` entries outline tables to be loaded. For example, we can load the `persons` and `households` table from an H5 source:
94
63
95
-
### ii. project structure
96
-
>**TODO:** this part still need to be complemented
the main folder of this repository contains several python scripts that contain the different steps necessary to import, process, and run the demos framework. the following is a description of the different folder and scripts used to run the demos simulation
1. the `configs\` directory: this folder contains the different `.yaml` configuration files to run each of the demos and urbansim models. the configuration files for each region are located in subdirectories with the name of the region
101
-
2. the `data\` directory: contains all the data needed to run the simulation
102
-
3.`variables.py`: this script defines all the temporary variables needed to run the models. each variable is created as an orca column.
103
-
4.`datasources.py`: this script imports all the necessary data for the specified simulation region and create simulation output folders, if needed.
104
-
5.`models.py`: this script defines all the models as orca steps and defines all pre-processing and post-processing steps needed for each of the models.
105
-
6.`simulate.py`: this script defines all the simulation parameters and runs the rest of the scripts desribed above.
106
-
7. the `outputs\` directory: contains the different results produced by the simulation. simulation results for each region are stored in their respective subdirectories.
80
+
>**TODO:** The previous description from Urbansim it outdated. Add description of DEMOS, aligning with the code (paper).
0 commit comments