Skip to content

Commit 392412c

Browse files
committed
readme updates
1 parent 843dbc6 commit 392412c

File tree

2 files changed

+46
-38
lines changed

2 files changed

+46
-38
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Demographic Microsimulator (DEMOS)
22

3-
[![Docs](https://github.com/NREL/DEMOS_NREL/actions/workflows/docs.yml/badge.svg)](https://nrel.github.io/DEMOS/)
3+
[![Docs](https://github.com/NREL/DEMOS/actions/workflows/docs.yml/badge.svg)](https://nrel.github.io/DEMOS/)
44

55
## Overview
66
The Demographic Microsimulator (DEMOS) is an agent-based simulation framework used to model the evolution of population demographic characteristics and lifecycle events, such as education attainment, marital status, and other key transitions. DEMOS modules are designed to capture the interdependencies between short-term and long-term lifecycle events, which are often influential in downstream transportation and land-use modeling.
@@ -28,7 +28,7 @@ cd demos
2828
# Create the configuration folder and retrieve an example configuration
2929
mkdir configuration
3030
cd configuration
31-
curl -L -o demos_config_sfbay.toml https://raw.githubusercontent.com/nrel/DEMOS/main/configuration/demos_config_sfbay.toml
31+
curl -L -o demos_config.toml https://raw.githubusercontent.com/nrel/DEMOS/main/configuration/demos_config_sfbay.toml
3232

3333
# Create the data folder for the output to be stored
3434
cd ..

docs/source/pages/intro.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Get Started
22

3-
DEMOS is a modular demographic microsimulator. It operates on tabular data representing agents or entities (primarily persons and households), and is configured via a simple TOML file. DEMOS can be run from source or using Docker for reproducibility.
3+
## Overview
4+
The Demographic Microsimulator (DEMOS) is an agent-based simulation framework used to model the evolution of population demographic characteristics and lifecycle events, such as education attainment, marital status, and other key transitions. DEMOS modules are designed to capture the interdependencies between short-term and long-term lifecycle events, which are often influential in downstream transportation and land-use modeling.
5+
6+
A key feature of DEMOS is its ability to track changes in an agent’s demographic status from year *t* to year *t + 1*. This structure allows the model to evolve populations over any user-defined time horizon. As a result, DEMOS is well suited for analyzing medium- and long-term transportation-related decisions, including household vehicle transactions (e.g., purchasing, selling, or replacing vehicles) and work location choices.
7+
Core features of DEMOS include the modeling of more than ten lifecycle events, behaviorally realistic patterns informed by long-running panel data, explicit representation of interdependencies among lifecycle processes, and a flexible, modular simulation architecture.
8+
9+
A technical memorandum describing DEMOS is available [here](https://github.com/NREL/DEMOS/blob/main/DEMOS_Technical_Memo.pdf). The memorandum provides an overview of the framework’s functionality, model structure, input and output data, and its applications in transportation planning and broader policy analysis contexts. Interested readers are also encouraged to consult the paper listed below for additional details on the DEMOS methodology.
10+
11+
---
12+
13+
DEMOS operates on tabular data representing agents or entities (primarily persons and households), and is configured via a simple TOML file. DEMOS can be run from source or using Docker for reproducibility.
414

515
This document summarizes instructions to install, configure and run DEMOS. Sections 1-4 will help you correctly organize the data and configuration file, so we recommend reading them once before attempting to run DEMOS.
616

@@ -15,50 +25,56 @@ This document summarizes instructions to install, configure and run DEMOS. Secti
1525

1626
## 1. Installation
1727

18-
### Using Docker (Recommended)
28+
### Docker Compose (recommended)
29+
The latest docker image for demos is stored in `ghcr.io/nrel/demos:latest`. The input data and configuration file are fed to the container through volumes. Alternatively, we provide a `docker-compose` workflow that can be used.
30+
31+
#### Prepare the configuration file and data folder
1932

33+
```bash
34+
# Create a directory where to run DEMOS from
35+
mkdir demos
36+
cd demos
37+
38+
# Create the configuration folder and retrieve an example configuration
39+
mkdir configuration
40+
cd configuration
41+
curl -L -o demos_config.toml https://raw.githubusercontent.com/nrel/DEMOS/main/configuration/demos_config_sfbay.toml
42+
43+
# Create the data folder for the output to be stored
44+
cd ..
45+
mkdir data
46+
# Populate the data folder
47+
48+
# Finally, retrieve the docker-compose.yml file
49+
curl -L -o docker-compose.yml https://raw.githubusercontent.com/nrel/DEMOS/main/docker-compose.yml
50+
```
51+
52+
Now you can run docker as follows:
53+
```bash
54+
docker compose up
55+
```
2056
> **Note:**
2157
> Make sure the Docker Daemon is running. This changes from system to system but Docker Desktop should have a status flag indicating if the daemon is live, if Desktop is available
2258
2359
<!-- **Important Note:**
2460
> While the pipeline to build a docker image is implemented, there is no public docker image available, please execute [from source](#From-Source) -->
2561

26-
1. **Clone the repository**:
27-
```bash
28-
git clone https://github.com/NREL/DEMOS_NREL.git
29-
cd DEMOS_NREL
30-
```
31-
32-
**Build Docker Image** *(Development only)*
33-
> NOTE: Ideally, our DEMOS Docker image is hosted in a public image registry so users will not need to build it themselves
34-
```bash
35-
docker build -t demos:0.0.1 --platform=linux/amd64 -f Dockerfile .
36-
```
3762

38-
1. **Run with Docker Compose**:
39-
```bash
40-
docker compose up
41-
```
42-
43-
By default, this assumes that your config file is located in `./configuration/demos_config.toml` and the data folder is `./data`, with `./` being the root of the project (See the [file stucture section](#file-tree-structure-for-data-and-configuration) for details on how to organize the input data).
44-
If you need to specify a different location for them, you can run:
4563

46-
```bash
47-
DEMOS_CONFIG_PATH=<path-to-config> DEMOS_DATA_DIR=<path-to-data-dir> docker compose up
48-
```
64+
By default, this assumes that your config file is located in `./configuration/demos_config.toml` and the data folder is `./data`, with `./` being the root of the project (See the [file stucture section](#file-tree-structure-for-data-and-configuration) for details on how to organize the input data).
65+
If you need to specify a different location for them, you can run:
4966

50-
<!-- 1. **Or run with Docker directly**:
51-
```bash
52-
docker run --volume <path-to-config>:/demos/config.toml:ro --volume <path-to-data-dir>:/demos/data --platform=linux/amd64 demos
53-
``` -->
67+
```bash
68+
DEMOS_CONFIG_PATH=<path-to-config> DEMOS_DATA_DIR=<path-to-data-dir> docker compose up
69+
```
5470

5571
> **Note for MacOS/Windows:**
5672
> Increase Docker's memory allocation to at least 16–20 GB via Docker Desktop:
5773
> `Preferences → Resources → Memory`.
5874
5975
---
6076

61-
### From Source
77+
### From Source (is you are not using Docker)
6278

6379
1. **Clone the repository**:
6480
```bash
@@ -79,14 +95,6 @@ This document summarizes instructions to install, configure and run DEMOS. Secti
7995
python simulate.py -cfg ../configuration/demos_config.toml
8096
```
8197

82-
### Compiling documentation (Optional but recommended)
83-
From the root of the project:
84-
```bash
85-
cd docs
86-
make html
87-
open build/html/index.html
88-
```
89-
9098

9199
## 2. Preparing Your Configuration
92100

0 commit comments

Comments
 (0)