Skip to content

NREL/CORAL

Repository files navigation

CORAL

Concurrent ORBIT for shared Resource Analysis Library

Authors:Sophie Bredenkamp, Jake Nunemaker, Matt Shields

Development Setup

Environment

A couple of notes before you get started:
  • It is assumed that you will be using the terminal on MacOS/Linux or the Anaconda Prompt on Windows. The instructions refer to both as the "terminal", and unless otherwise noted the commands will be the same.
  • To verify git is installed, run git --version in the terminal. If an error occurs, install git using these directions.
  • The listed installation process is intended to be the easiest for any OS to get started. An alternative setup that doesn't rely on Anaconda for setting up an environment can be followed here.

Instructions

  1. Download the latest version of Miniconda for the appropriate OS. Follow the remaining steps for the appropriate OS version.

  2. From the terminal, install pip by running: conda install -c anaconda pip

  3. Next, create a new environment for the project with the following.

    conda create -n <environment_name> python=3.7 --no-default-packages

    To activate/deactivate the environment, use the following commands.

    conda activate <environment_name>
    conda deactivate <environment_name>
  4. Clone the repository: git clone https://github.com/NREL/CORAL.git

  5. Install ORBIT wherever you would like (in coral path works: <path-to-CORAL>/) using the following command.

    pip install orbit-nrel

Dependencies

  • Python 3.7+
  • marmot-agents
  • NumPy
  • SciPy
  • Matplotlib
  • OpenMDAO (>=3.2)

Development Specific

  • black
  • isort
  • pre-commit
  • pytest
  • sphinx
  • sphinx-rtd-theme

Recommended packages for easy iteration and running of code:

  • jupyterlab
  • pandas

Setting Up a Run

See coral_example_setup.ipynb for detailed explanation on running the model and understanding outputs.

You may also run CORAL using the 'run_coral.py' script. The command for this is: 'python run_coral.py result_folder_name scenario_1 scenario_2 ...'. The results dataframe for each run completed this way will be store in a folder with the name provided by results_folder_name in the postprocessing/results folder.

To easily create a set of analysis plots, run the 'coral_postproc.py' command using this format: 'python coral_postproc.py results_folder_name' and a powerpoint will be added to the folder named results_folder_name with a set of plots of each individual run and comparing all runs in the folder.