Skip to content
adfarth edited this page Aug 30, 2023 · 24 revisions

image

Welcome to the REopt-API-Analysis wiki!

The REopt® model recommends an optimal mix of renewable energy, conventional generation, and energy storage technologies to meet cost savings and energy performance goals, including the hourly optimal operation of the system.

NOTE: The documentation in this wiki is for using the REopt API. For documentation on developing the REopt API please go here. For documentation on using the REopt Julia package, please go here (see the REopt API README for more information about when and how to use the API vs. Julia package). Also note that the REopt Web Tool provides a free interface for interactively setting up input parameters, and can meet most users' needs.

Please use the Discussions page for general usage questions.

Outline of this Wiki:

Using the REopt API (V3+)

  1. Get API key and setup local environment
  2. Run analyses using the API
  3. V3 input and output changes
  4. API endpoints Using the REopt Julia Package
  5. Example scripts to use the REopt Julia Package Deprecated: Using the V1-V2 REopt API
  6. V2 "job" inputs and outputs
  7. V2 endpoints

Running a REopt "job" in the API

The REopt API includes many endpoints. However, the main use case is running an optimization job and getting the results of the job, which is a two-step process.

Step 1: POST a job

First, you POST your REopt Scenario to the job endpoint, i.e. https://developer.nrel.gov/api/reopt/stable/job. POST'ing can be done with many tools. This repository includes python functions to make it easy to POST your jobs to the API.

The job endpoint will return a run_uuid in JSON format, like

{"run_uuid": "288523d9-b3ca-491b-a490-27b10c384ce1"}

Go here for information on all the inputs for a job.

Step 2: GET results

The second step is to GET your results at the results endpoint using your run_uuid. The URL will look like:

https://developer.nrel.gov/api/reopt/stable/job/288523d9-b3ca-491b-a490-27b10c384ce1/results

Note that it can take some time to optimize your Scenario. While the job is running the Scenario.status will be "Optimizing...". Once the job is complete the status will be "optimal" (assuming no problems were encountered).

The API response will contain three top level keys:

  • "inputs": all of the inputs that you provided in addition to all the other default values that were used;
  • "outputs": the optimization results; and
  • "messages": information on input validation as well as errors if they occurred.

Go here for information on all the outputs for a job.

NOTE: The REopt web tool has dropped “Lite” from its name to better reflect its status as a comprehensive techno-economic optimization tool that evaluates the economics of distributed solar, wind, battery storage, combined heat and power, geothermal heat pumps, modeled greenhouse gas reductions, and more. Read about REopt's evolution.