{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Dispatch with Energy Storage" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case, we will show the usage of energy storage included dispatch.\n", "\n", "In AMS, ``ESD1`` is an dispatch model for energy storage, which has a corresponding\n", "dynamic model ``ESD1`` in ANDES." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "import ams\n", "\n", "import datetime" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Last run time: 2025-01-27 06:04:56\n", "ams:1.0.1.post0.dev0+g26601dec\n" ] } ], "source": [ "print(\"Last run time:\", datetime.datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\"))\n", "\n", "print(f'ams:{ams.__version__}')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "ams.config_logger(stream_level=20)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A small-size PJM 5-bus case with ESD1 is used in this example." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Parsing input file \"/Users/jinningwang/work/ams/ams/cases/5bus/pjm5bus_uced_esd1.xlsx\"...\n", "Input file parsed in 0.0641 seconds.\n", "Zero line rates detacted in rate_b, rate_c, adjusted to 999.\n", "System set up in 0.0017 seconds.\n" ] } ], "source": [ "sp = ams.load(ams.get_case('5bus/pjm5bus_uced_esd1.xlsx'),\n", " setup=True,\n", " no_output=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The model information can be inspected as follow." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | idx | \n", "u | \n", "name | \n", "bus | \n", "gen | \n", "Sn | \n", "gammap | \n", "gammaq | \n", "SOCmin | \n", "SOCmax | \n", "SOCinit | \n", "En | \n", "EtaC | \n", "EtaD | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| uid | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
| 0 | \n", "ESD1_1 | \n", "1.0 | \n", "ESD1_1 | \n", "1 | \n", "PV_2 | \n", "100.0 | \n", "1.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "0.2 | \n", "100.0 | \n", "1.0 | \n", "1.0 | \n", "