{"id":342288,"name":"dGen","description":"Forecast PV adoption based on user specified configurations like electricity rate prices, electricity load growth, solar resource factors, and much more.","url":"https://github.com/natlabrockies/dgen","last_synced_at":"2026-04-07T13:00:30.670Z","repository":{"id":48056659,"uuid":"255965543","full_name":"NatLabRockies/dgen","owner":"NatLabRockies","description":"The Distributed Generation Market Demand (dGen) model simulates customer adoption of distributed energy resources (DERs) for residential, commercial, and industrial entities in the United States and other countries.","archived":false,"fork":false,"pushed_at":"2026-02-17T20:32:57.000Z","size":260978,"stargazers_count":73,"open_issues_count":29,"forks_count":170,"subscribers_count":15,"default_branch":"master","last_synced_at":"2026-03-22T17:46:38.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLabRockies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.html","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-15T15:51:02.000Z","updated_at":"2026-02-17T20:33:48.000Z","dependencies_parsed_at":"2025-03-01T09:02:56.804Z","dependency_job_id":"616bdc21-924f-4b6b-9cfb-7854d02865aa","html_url":"https://github.com/NatLabRockies/dgen","commit_stats":{"total_commits":111,"total_committers":7,"mean_commits":"15.857142857142858","dds":"0.46846846846846846","last_synced_commit":"4498d2a22e5ac498ab656114c105f1411aa64aa6"},"previous_names":["natlabrockies/dgen"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/NatLabRockies/dgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLabRockies","download_url":"https://codeload.github.com/NatLabRockies/dgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31088829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-28T02:23:35.801Z","status":"ssl_error","status_checked_at":"2026-03-28T02:23:32.528Z","response_time":79,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"NatLabRockies","name":"National Laboratory of the Rockies","uuid":"1906800","kind":"organization","description":"","email":null,"website":"http://www.nrel.gov","location":"Golden, CO","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/1906800?v=4","repositories_count":599,"last_synced_at":"2026-01-22T09:57:55.744Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/NatLabRockies","funding_links":[],"total_stars":9633,"followers":1309,"following":0,"created_at":"2022-11-02T20:42:15.539Z","updated_at":"2026-01-22T09:57:55.745Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLabRockies","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLabRockies/repositories"},"packages":[],"commits":{"id":11615144,"full_name":"natlabrockies/dgen","default_branch":"master","total_commits":266,"total_committers":12,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":22.166666666666668,"dds":0.7481203007518797,"past_year_total_commits":92,"past_year_total_committers":4,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":23.0,"past_year_dds":0.5869565217391304,"last_synced_at":"2026-04-05T12:03:37.998Z","last_synced_commit":"beb0df188607e8dd52eccc85d7c5e832c0c5e9e5","created_at":"2026-01-22T00:01:04.895Z","updated_at":"2026-04-05T12:01:41.266Z","committers":[{"name":"David Whiteside","email":"david.whiteside@nrel.gov","login":"thedavidwhiteside","count":67},{"name":"tstanley","email":"Trevor.Stanley@nrel.gov","login":null,"count":59},{"name":"michaelavs","email":"michaela.sizemore@gmail.com","login":"michaelavs","count":58},{"name":"Joshi","email":"pjoshi@nrel.gov","login":null,"count":39},{"name":"ashoksekar7","email":"52252553+ashoksekar7","login":"ashoksekar7","count":17},{"name":"Trevor Stanley","email":"38226475+T-Man-Stan","login":"T-Man-Stan","count":9},{"name":"Paritosh Das","email":"paritosh.das@nrel.gov","login":"paritoshdas","count":7},{"name":"Ben Sigrin","email":"Benjamin.Sigrin@NREL.gov","login":"bsigrin","count":4},{"name":"Prateek Joshi","email":"96447878+prateek-joshi-31","login":"prateek-joshi-31","count":3},{"name":"Kseniya Husak","email":"55197229+khusakuofm","login":"khusakuofm","count":1},{"name":"Elizabeth Willard","email":"57194659+elizabethwillard","login":"elizabethwillard","count":1},{"name":"Lockshin","email":"jlockshi@nrel.gov","login":null,"count":1}],"past_year_committers":[{"name":"Joshi","email":"pjoshi@nrel.gov","login":null,"count":38},{"name":"David Whiteside","email":"david.whiteside@nrel.gov","login":"thedavidwhiteside","count":29},{"name":"michaelavs","email":"michaela.sizemore@gmail.com","login":"michaelavs","count":24},{"name":"ashoksekar7","email":"52252553+ashoksekar7","login":"ashoksekar7","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/natlabrockies%2Fdgen/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-07T00:00:11.408Z","repositories_count":6211357,"commits_count":918202048,"contributors_count":35614605,"owners_count":1142620,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"NatLabRockies/dgen","html_url":"https://github.com/NatLabRockies/dgen","last_synced_at":"2026-02-17T23:13:22.212Z","status":null,"issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2026-02-17T23:00:12.647Z","updated_at":"2026-02-17T23:13:22.212Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLabRockies%2Fdgen/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{},"pull_request_author_associations_count":{},"issue_authors":{},"pull_request_authors":{},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-16T00:00:25.224Z","repositories_count":13751537,"issues_count":34659728,"pull_requests_count":113065795,"authors_count":11204955,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[],"active_maintainers":[]},"events":{"total":{"IssuesEvent":1,"PushEvent":1},"last_year":{"IssuesEvent":1,"PushEvent":1}},"keywords":[],"dependencies":[{"ecosystem":"pypi","filepath":"dgen_os/python/requirements.txt","sha":null,"kind":"manifest","created_at":"2022-08-12T17:40:26.160Z","updated_at":"2022-08-12T17:40:26.160Z","repository_link":"https://github.com/NatLabRockies/dgen/blob/master/dgen_os/python/requirements.txt","dependencies":[{"id":1357971196,"package_name":"colorama","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971197,"package_name":"colorlog","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971198,"package_name":"matplotlib","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971199,"package_name":"numpy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971200,"package_name":"openpyxl","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971201,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971202,"package_name":"psutil","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971203,"package_name":"psycopg2","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":1357971204,"package_name":"sqlalchemy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/ci.yml","sha":null,"kind":"manifest","created_at":"2024-12-12T18:41:53.106Z","updated_at":"2024-12-12T18:41:53.106Z","repository_link":"https://github.com/NatLabRockies/dgen/blob/master/.github/workflows/ci.yml","dependencies":[{"id":21138918233,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":21138918234,"package_name":"conda-incubator/setup-miniconda","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":21138918457,"package_name":"mamba-org/setup-micromamba","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"pypi","filepath":"build_envs/environment.yml","sha":null,"kind":"manifest","created_at":"2025-03-01T09:02:54.333Z","updated_at":"2025-03-01T09:02:54.333Z","repository_link":"https://github.com/NatLabRockies/dgen/blob/master/build_envs/environment.yml","dependencies":[]}],"score":7.1098794630722715,"created_at":"2026-01-22T00:01:03.839Z","updated_at":"2026-04-07T13:00:30.672Z","avatar_url":"https://github.com/NatLabRockies.png","language":"Jupyter Notebook","category":"Renewable Energy","sub_category":"Photovoltaics and Solar Energy","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"﻿| CI           |  [![GitHub Workflow Status][github-ci-badge]][github-ci-link] [![GitHub Workflow Status][github-docker-badge]][github-docker-link] |\n| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| **Docs**     |                                                                    [![Documentation Status][rtd-badge]][rtd-link]                                                                    |\n| **Version**  |                            [![Version][version-badge]][version-link] |\n\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://github.com/NREL/dgen/blob/master/docs/figs/dGen-logo-lrg.png\" /\u003e\n\u003c/p\u003e\n\nThe Distributed Generation Market Demand (dGen) Model\n=====================================================\n\n\n## Documentation\n- [Webinar and Setup Tutorial](https://youtu.be/-Te5_KKZR8o)\n- [Official dGen Documentation](https://nrel.github.io/dgen/) \n- [Wiki](https://github.com/NREL/dgen/wiki)\n- [dGen Docker Usage Guide (Containers)](./docker/README.md)\n- [dGen Cloud Usage Guide (AWS)](./cloud/README.md)\n\n\n## Get Your Tools\nInstall Docker for [(Mac)](https://docs.docker.com/docker-for-mac/install/) or [(Windows)](https://docs.docker.com/docker-for-windows/install/)\n\n- Important: In Docker, go into Docker \u003e Settings (\"Gear\" icon in top-right corner of application) \u003e Resources and up the allocation for disk size image for Docker. 16 GB is recommended for smaller (state level) databasese. 32 GB is recommended for ISO specific databases. 70+GB is required for restoring the national level database. If you get a memory issue then you'll need to up the memory allocation and or will need to prune past failed images/volumes. Running the below docker commands will clear these out and let you start fresh:\n```\n   $ docker system prune -a \n   $ docker volume prune -f\n``` \n- Please refer to Docker’s [documentation](https://docs.docker.com/reference/) for more details.\n\n- Install [Anaconda for Python 3.7](https://www.anaconda.com/download/success). Users with VPNs may need to turn their VPNs off while installing or updating Anaconda.\n\n- Install [PgAdmin](https://www.pgadmin.org/download/). Download pgAdmin 4 based on your operating system (i.e., macOS, Windows, etc.). If prompted, ignore all of the options for installing docker, python, os host, etc.\n\n- Install Git: If you don't already have git installed, then navigate [here](https://www.atlassian.com/git/tutorials/install-git) to install it for your operating system.\n\nWindows users: \n- We recommend using Powershell.\n- If you don't have UNIX commands enabled for command prompt/powershell then you'll need to install Cygwin or QEMU to run a UNIX terminal.\n\n## Download Code \nUsers need to fork a copy of the dGen repo to their own private github account. \n\nNext, clone the forked repository to your local machine by running the following in a terminal/powershell/command prompt:\n```$ git clone https://github.com/\u003cgithub_username\u003e/dgen.git```\n\n\n# Running and Configuring dGen\n\n### A. Create Environment\nAfter cloning this repository and installing (and running) Docker as well as Anaconda, we'll create our environment and container:\n\n1. Depending on directory you cloned this repo into, navigate in terminal to the python directory (/../dgen/dgen_os/python) and run the following command:\n\n```$ conda env create -f dg3n.yml```\n\n- This will create the conda environment needed to run the dgen model.\n- The dgen model is optimized for Python v3 and above. Run ```$ conda list ``` to verify you have this version.\n\n2. This command will create a container with PostgreSQL initialized.\n\n```$ docker run --name postgis_1 -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d mdillon/postgis```\n\n- Alternatively, if having issues connecting to the postgres server in pgAdmin, run:\n\n```$ docker run --name postgis_1 -p 5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d mdillon/postgis```\n\n- This will allow the docker container to select a different port to forward to 5432.\n\nTo setup another docker container with a different database you can run:\n```$ docker run --name postgis_2 -p 7000:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d mdillon/postgis``` where ```7000``` can be any port number not already in use. \n\n\n3. Connect to our postgresql DB. In the command line run the following:\n\n```\n   $ docker exec -it \u003ccontainer id\u003e psql -U postgres\n   $ postgres=# CREATE DATABASE dgen_db;\n```\n\nNotes:\n- Use the alpha-numeric container id rather than the container name.\n- The container id can be gotten by running ```$ docker container ls```. If this doesn't display anything try running ```$ docker container ps```.\n- If you get the error ``` psql: FATAL:  the database system is starting up ``` try rerunning the docker exec command again after a minute or so because docker can take some time to initialize everything.\n- ```CREATE DATABASE``` will be printed when the database is created. ```\\l``` will display the databases in your server.\n\n\n### B. Download data (agents and database):\nDownload data by navigating to https://data.openei.org/submissions/1931 and clicking the 'View Data Lake' for the 'dGen Model Inputs' entry. Make sure to unzip any zipped files once downloaded. Note, the 13.5 GB dgen_db.sql.zip file contains all of the data for national level runs. We recommend starting with the database specific to the state or ISO region you're interested in. \n\nFor example, if you want to simulate only California then navigate to the 'ca_final_db' folder and download the dgen_db.sql file. \n\nYou will also need to download and unzip the agent files \"OS_dGen_Agents.zip\", making sure the use the correct agent file corresponding to the scenario you'd like to run (e.g. commercial agents for California).\n\n#### Windows Users\n\nWe recommend using Powershell. If you don't have UNIX commands enabled for command prompt/powershell then you'll need to install Cygwin or QEMU to run a UNIX terminal.\n\nIn Powershell run the following (replace 'path_to_where_you_saved_database_file' below with the actual path where you saved your database file):\n\n```\n   $ docker cp /path_to_where_you_saved_data/dgen_db.sql \u003ccontainer id\u003e:/dgen_db.sql\n   $ docker exec -i \u003ccontainer id\u003e psql -U postgres -d dgen_db -f dgen_db.sql\n```\n\n#### Mac Users\n\nIn a new terminal widnow run the following (make sure to replace 'path_to_where_you_saved_database_file' below with the actual path where you saved your database file): \n\n```$ cat /path_to_where_you_saved_data/dgen_db.sql | docker exec -i \u003ccontainer id\u003e psql -U postgres -d dgen_db```\n\nNotes:\n- Backing up state/ISO databases will likely take 5-15 minutes. The national database will likely take 45-60 minutes.\n- Don't close docker at any point while running dGen.\n- The container can be \"paused\" by running ```$ docker stop \u003ccontainer id\u003e``` and \"started\" by running ```$ docker start \u003ccontainer id\u003e```\n- The container must be started/running to restore and or access the database (including during model run time).\n\nTroublshooting Container/Database Issues:\n- Make sure the disk size for Docker has been properly allocated (make sure at least 16GB has been allocated for state level databases, at least 32 GB for ISO level databases, and at least 70 GB for the national database). You'll need to restart docker after changing the disk size in Docker's system preferences and will need to make a new container/start from scratch.\n- If making a new container first run ```docker system prune -a``` and ```docker volume prune -f```.\n- Make sure you've specificed the right path to the .sql file and make sure the .sql file is unzipped.\n- Make sure the use the container's alpha-numeric ID rather than the container name. \n- If on a VPN try turning the VPN off when making the container and restoring the database.\n- Try googling errors.\n\n### C. Create Local Server:\nOnce the database is restored (it will take some time), open PgAdmin and create a new server. To do this, right-click on \"Servers\" (located in top-left corner of application), and then click on Register --\u003e Server. In the \"General\" tab, name this whatever you want (e.g., \"dgen_db\"). In the \"Connection\" tab, input \"localhost\" (or 127.0.0.1) in the \"Host name/address\" cell and \"postgres\" in both the \"Username\" and \"Password\" cells. \"Port\" is defaulted to `5432`, but if you used a different port number while setting up the database, update this to match that port number. Next, click the \"Save\" button in the bottom-right corner of the dialogue box. Finally, right-click \"Servers\" and then the \"Refresh\" option. Upon refreshing this and opening the database dropdown, you should be able to see your database. \n\nNote: the system might prompt you to install the \"hstore\" extension for sql in PgAdmin if needed. \n\n### D: Activate Environment \nActivate the dg3n environment and launch spyder by opening a new terminal window and run the following command:\n\n```\n   $ conda activate dg3n\n   $ (dg3n) spyder\n```\n\n- In spyder, open the ```dgen_model.py``` file. This is what we will run once everything is configured.\n\nNotes:\n- Sometimes Spyder can have issues accessing files. It may be helpful to set the working directory by right clicking the white folder icon in the upper righthand corner and navigating to ```/path_to_where_you_cloned_dgen/dgen_os```.\n- Spyder's kernel can sometimes have issues/stop unexpectedly. Refreshing the kernel might help if you're encountering issues running dgen_model.py.\n- Spyder isn't necessary to use. If you'd rather run dGen by launching python from the dg3n environment then by all means do so.\n\n### E: Configure Scenario\n1. Open the blank input sheet located in ```dgen_os/excel/input_sheet_v_beta.xlsm ``` (don't forget to enable macros!). This file defines most of the settings for a scenario. Configure it depending on the desired model run and save a copy in the input_scenarios folder, i.e. ```dgen_os/input_scenarios/my_scenario.xlsm```. \n\nSee the Input Sheet [Wiki page](https://github.com/NREL/dgen/wiki) for more details on customizing scenarios. \n\n\n2. In the python folder, open ```pg_params_connect.json``` and configure it to your local database. If you didn't change your username or password settings while setting up the docker container, this file should look like the below example:\n\n```\n   {\t\n\t\"dbname\": \"\u003cinsert_database_name\u003e\",\n \t\"host\": \"localhost\",\n\t\"port\": \"5432\",\n\t\"user\": \"postgres\",\n\t\"password\": \"postgres\"\n   }\n```\n\n- dbname will likely just be \"dgen_db\" unless you changed the name of this database in postgres\n- Localhost could also be set as \"127.0.0.1\"\n- Save this file\n- Make sure the role is set as \"postgres\" in ```config.py``` (it is set as \"postgres\" already by default)\n\nThe cloned repository will have already initialized the default values for the following important parameters:\n\n* ``` start_year = 2014 ``` ( in /../dgen/python/config.py)                    --\u003e start year the model will begin at\n* ``` pg_procs = 2 ``` ( in /../dgen/python/config.py)                              --\u003e number of parallel processes the model will run with\n* ``` cores = 2 ``` ( in /../dgen/python/config.py)                                        --\u003e number of cores the model will run with\n* ``` role = \"postgres\" ``` ( in /../dgen/python/config.py)                                    --\u003e set role of the restored database\n\n\n### F: Run the Model\n\nOpen ```dgen_model.py``` in the Spyder IDE and hit the large green arrow \"play button\" near the upper left to run the model.\n\nOr, launch python from within the dg3n environment and run:\n```$ python dgen_model.py```\n\nNotes:\n- Only one agent file can be put in the input_agents directory.\n- Results from the model run will be placed in a SQL table called \"agent_outputs\" within a newly created schema in the connected database. \n- The database and results will be preserved in the docker container if you stop the container and or close docker. Simply start the container to access the database again.\n- The database will not persist once a docker container is terminated. Results will need to be saved locally by downloading the agent_outputs table from the schema run of interest or by dumping the entire database to a .sql file (see below).\n\n## Saving Results:\n1. To backup the whole database, including the results from the completed run, please run the following command in terminal after changing the save path and database name:\n\n```$ docker exec \u003ccontainer_id\u003e pg_dumpall -U postgres \u003e /../path_to_save_directory/dgen_db.sql```\n\n- this .sql file can be restored in the same way as was detailed above. \n\n2. To export just the \"agent_outputs\" table, simply right click on this table and select the \"Import/Export\" option and configure how you want the data to be saved. Note, if a save directory isn't specified this will likely save in the home directory.\n\n\n## Notes:\n- The \"load_path\" variable in config.py from the beta release has been removed for the final release. The load data is now integrated into each database. Load data and meta data for the agents is still accessible via the OEDI data submission.\n\n[github-ci-badge]: https://img.shields.io/github/actions/workflow/status/NREL/dgen/ci.yml?branch=master\u0026style=for-the-badge\u0026label=CI\n[github-ci-link]: https://github.com/NREL/dgen/actions/workflows/ci.yml\n[github-docker-badge]: https://img.shields.io/github/actions/workflow/status/NREL/dgen/docker_ci.yml?branch=master\u0026style=for-the-badge\u0026label=Docker\n[github-docker-link]:https://github.com/NREL/dgen/actions/workflows/docker_ci.yml\n[rtd-badge]: https://img.shields.io/badge/docs-ready-blue.svg\n[rtd-link]: https://nrel.github.io/dgen/\n[version-link]: https://github.com/NREL/dgen/releases/latest\n[version-badge]: https://img.shields.io/github/v/release/NREL/dgen","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/342288","html_url":"https://ost.ecosyste.ms/projects/342288"}