Skip to content

boyuan276/NYgrid-python

Repository files navigation

NYgrid-python

Latest Release latest release latest release
Build Status documentation build status python-package codeql
License license

A python version of the NYgrid model.

It contains the following components:

  • Optimal power flow (OPF) model
  • Renewable integration
  • Building electrification
  • Battery storage
  • Electric vehicle (EV) charging

Documentation

Full documentation can be found at readthedocs.

Installation

Install using pip

The nygrid package can be installed using PIP.

pip install nygrid

Install from the source

  1. Install Anaconda.

  2. Install Git.

  3. Clone the repository:

git clone https://github.com/boyuan276/NYgrid-python.git
  1. Create a conda environment:
conda env create -f NYgrid-python.yml
  1. Activate the environment:
conda activate NYgrid-python
  1. Install the package:
pip install -e .

Usage

  1. Activate the environment:
conda activate NYgrid-python
  1. Run the model:

    • Go to the examples folder.

    • Run the base year 2018 case:

      python 01_opf_2018NewParams_daily.py
    • Run the future year 2030 with policy scenarios:

      # 1) 2030BaselineCase
      python 02_opf_2030BaselineCase_daily.py
      
      # 2) 2030ContractCase
      python 03_opf_2030ContractCase_daily.py
      
      # 3) 2030StateScenario
      python 04_opf_2030StateScenario_daily.py
    • Note: Generation and load properties and profiles need to be prepared before running these cases.

Data

  1. Generation data: See examples/write_gen_prop_profiles_{case_name}.ipynb.

  2. Load data: See examples/write_load_profiles_{case_name}.ipynb.

License

MIT license.

See also