Skip to main content
Version: 0.5.0

OpenDSS Exporter

Background

The Hosting Capacity Module relies on OpenDSS models to perform the Power Flow studies that underpin its analysis, as detailed in the How it works section.

Typically, OpenDSS models are generated, executed, analysed, and then discarded during standard operations. However, for testing and debugging purposes, you may want to access these OpenDSS models. To support this, we provide a tool that enables you to export an OpenDSS model for a specific Scenario, Year, and Feeder (SYF), using the same configuration file as the Hosting Capacity Module to ensure compatibility.

Usage Warning - OPENDSS MODELS ARE NOT SUPPORTED

We provide this tool to extract the OpenDSS models typically used in the Hosting Capacity Module to assist with testing and debugging. They are not intended for stand alone use. This tool is only intended for advanced users who are familiar with OpenDSS and the Hosting Capacity Module. Zepben does NOT provide support for OpenDSS models or the OpenDSS software itself. See the OpenDSS documentation for more information on how to use OpenDSS.

How to use the OpenDSS Exporter

To use this tool, you will need to have Python installed and properly configured. Please contact your System Administrator for assistance with this.

  1. Clone the repo 'ewb-sdk-examples-python'

  2. As per the readme, install the required dependencies by running the command pip install -e .. If you encounter any issues with installing the dependencies, please talk to your System Administrator for assistance.

  3. Open the file export_open_dss_model.py in your IDE of choice and modify the parameters to match your needs (see below)

  4. Run the file, which will send off the command to generate that file on the server. Depending on the size of the feeder, this could take up to several minutes. Once complete, the OpenDSS model downloads into the home directory of the repo in a zip file.

Configuration

There are several parameters you will need to change to set up the OpenDSS Exporter to generate the OpenDSS model you want.

Take the sample_config.json file and rename it to config.json. Then edit the parameters in the config.json file to match your needs.

  • The host parameter should be the URL of your EAS instance, for example: ABC.zb.energy.

  • The rpc_port should be the port number of your EAS instance, typically 443.

  • The access_token should be a valid personal access token for your EAS instance. The Role should be either SUPER_ADMIN or MODELLER. You can create a personal access token in the EAS UI under your user profile settings.

Reminder

Remember that these tokens expire every 30 days, so you will need to update it periodically.

Under the section called OpenDSSConfig, you will need to set the following parameters:

  • Update the scenario, year, and feeder parameters to match the scenario you want to export.
  • The model_name should be a unique name for the model you are exporting.
  • The is_public parameter should be set to True if you want the model to be accessible to others in your organisation, or False if you want it to be private.

The entire generator_config can be copy-pasted from the Hosting Capacity Module's OpenDSS model generator config, as they use exactly the same format. This is used to ensure that the OpenDSS model is generated with the same settings as the Hosting Capacity Module.

You can run the OpenDSS exporter for a time range or a single time period:

  • To specify a time range, set the LoadTime parameter to the desired period. This must correspond to a valid time range in your EAS instance and should be either exactly one day or one year. Keep the FixedTime example commented out in this case.
  • For a fixed time, comment out the LoadTime parameter and set FixedTime to the specific time you want to use. Ensure this time is available in your EAS instance.