Skip to content

Agent model data

Adrian D'Alessandro edited this page May 22, 2023 · 10 revisions

Description of Agent model data

The Agent-based demand simulator produces two types of data:

  • Baseline - the pre-computed baseline demand profile for a particular scenario (in the future, they hope to move towards 'computing' the baseline once requested).
  • STEPXX - data that results from a DSR request.

Currently, a lot of the actual modelling functionality is suppressed to enable second-level speed of computation. This is something they plan to modify so they can achieve the original/intended modelling capabilities while retaining the current speed of computation.

The code is available here

Energy Demand Simulator APIs

Baseline

The Baseline data can be pulled from the Simulator API by making the following call:

http://143.198.239.72/GRIDLINGTON/BASELINEv9?Scenario=1&User=IDLES&Password=IDLES_2022&toFTP=TRUE - (Query parameters used here as example)

Options can be set using query parameters, as detailed in this table:

Attributes Permissible values Meaning
Scenario int value 1-4 Indicates which different baseline scenario to output (more details below).
User IDLES
Password IDLES_2022  
reportDetail FALSE (Default), TRUE If TRUE, extra data is reported (see Output section).
toFTP FALSE (Default), TRUE If TRUE, exports data as .zip file to FTP server. If FALSE, output is .json file.

 

The 4 scenarios that can be specified for the Scenario parameter are as follows:

  • 1: ca. 3800 EVs, batter state 50%
  • 2: ca. 1200 EVs, batter state 50%
  • 3: ca. 550 EVs, batter state 50%
  • 4: ca. 1200 EVs, batter state is random (uniformly)

DSR

A DSR request can be made using the following API call:

http://143.198.239.72/GRIDLINGTON/DSRv9?User=IDLES&Password=IDLES_2022&input=Baseline&startDSR=100&endDSR=150&reportStart=1&reportEnd=1440&amount_ind=4&DSR_price_inc=0.01&DSR_price_red=0.01&DSR_resid_factor=4&spreadDSR=180&stepName=STEP1&reportDetail=FALSE&toFTP=TRUE - (Query parameters used here as example)

Options can be set using query parameters, as detailed in this table:

Attributes Permissible values Meaning
User IDLES
Password IDLES_2022  
input Baseline_1 (Scenario 1), Baseline_2 (Scenario 2), Baseline_3 (Scenario 3), Baseline (Default: Scenario 3) Input state of the system. If Baseline, no parameter is specified. Otherwise, name provided for stepName in previous iteration should be provided to begin from that state.
startDSR int value 1-1440 DSR start time of day. 1 = 04:00.
endDSR int value 1-1440, but must be > startDSR DSR end time of day. 1 = 04:00.
reportStart NULL (Default: 1), int value 1-1440 Start time of day for which results will be reported.
reportEnd NULL (Default: 1440), int value 1-1440, but must be > reportStart End time of day for which results will be reported.
amount_ind int value 1-11 (See below for details)
DSR_price_inc float value >0 (Default: £0.01) Unit price per increase in the demand per kWh.
DSR_price_red float value >0 (Default: £0.01) Unit price per reduction in the demand per kWh.
DSR_resid_factor int value >0 The multiplier on DSR_price_inc that guides unit cost of residential DSR (DSR_resid? Not sure where this value is).
spreadDSR int value >1 Time (in minutes) over which the DSR demand amount is spread.
stepName str value Name of the output state file, to be used as input in subsequent iterations.
cleanMemory FALSE (Default), TRUE If TRUE, removes all 'state' files from the server (except the baseline).
reportDetail FALSE (Default), TRUE If TRUE, extra data is reported (see Output section).
toFTP FALSE (Default), TRUE If TRUE, exports data as .zip file to FTP server. If FALSE, output is .json file.

 

The 11 scenarios that can be specified for the amount_ind parameter are as follows:

  • 1: Increase by 1.0 MW
  • 2: Increase by 0.5 MW
  • 3: No change
  • 4: Reduce by 0.5 MW
  • 5: Reduce by 1.0 MW
  • 6: Reduce by 1.5 MW
  • 7: Reduce by 2.0 MW
  • 8: Reduce by 2.5 MW
  • 9: Reduce by 3.0 MW
  • 10: Reduce by 3.5 MW
  • 11: Reduce by 4.0 MW

Output

If the toFTP parameter is set to TRUE for either a baseline or DSR API call, the data output is exported to the FTP server as a .zip file containing 16 separate .csv files (one for each data point). Each .csv file contains a table of data for that specific ,category.

If the toFTP parameter is set to FALSE, the data is instead outputted as a .json file structured to contain all of the data.

Below is a table detailing the different data points exported:

Content name Format Meaning Notes
DSR_Amount Vector [13 x 1] Permissible DSR requests (in Watt)  
DSR_Cost Matrix [1440 x 13] Associated DSR cost, for each time of day (rows) and amount (column, as per DSR_Amount)  
DSR_kWh_Cost Vector [2 x 1] Unit DSR cost: kWh DSR. First element is unit cost per increase in demand. Second element is unit cost per reduction in demand  
Activities Matrix [1440 x 7] Number of households engaged at each time of day (row) in specific activities (column – column number indicates activity types as in Activity_types). These are home-based activities. Note that a single household can report multiple activities at the same time, meaning individuals taking place in different activities.
Activities_outside_home Matrix [1440 x 7] Number of households engaged at each time of day (row) in specific activities (column – column number indicates activity types as in Activity_types). These are non-home-based activities. Note that a single household can report multiple activities at the same time, meaning individuals taking place in different activities.
Activity_types Vector [7 x 1] Activity types, position  
EV_ID_Matrix Matrix [1440 x 4329] Matrix of some data on EVs Not reported if reportDetail=FALSE
EV_DT Matrix [1440 x 2] Mapping between real time of day (column 1) and index for time of day (column 2), as used in DSR  
EV_Locations Matrix [1440 x 4329] Matrix of data containing locations of EVs Not reported if reportDetail=FALSE
EV_Battery Matrix [1440 x 4329] Battery state of EVs Not reported if reportDetail=FALSE
EV_State Matrix [1440 x 4329] Matrix for state of the EV. Positive values mean charging (demand for electricity), negative mean consuming (travelling). 0 means idle – parked, not charging.  
EV_Mask Matrix[1440x4329] Boolean matrix indicating if certain EV is allowed to charge at certain time of day (depending on location and DSR) Not reported if reportDetail=FALSE
Baseline_EV Vector [1440 x 1] Baseline demand from EV, in Watt  
Baseline_NonEV Vector [1440 x 1] Baseline demand from residential, in Watt  
Actual_EV Vector [1440 x 1] Actual demand from EV, in Watt (for Baseline, this equals Baseline_EV)  
Actual_Non_EV Vector [1440 x 1] Actual demand from residential, in Watt (for Baseline, this equals Baseline_NonEV)  
NAME String Name of the step Not reported if reportDetail=FALSE
WARN String Warnings produced during the computation. Not included if no warnings reported.

 

Workflow with Opal data model

There are three steps to this:

  • Receiving an initialisation command to get the Baseline data - This may be sent by the vis system controller.
  • Receiving a DSR Request - this component of the interaction will be sent directly from the system running the Opal-RT modelhttps://github.com/ImperialCollegeLondon/gridlington-datahub/
  • Sending output data to the FTP server - This will be replaced with sending the data to the Gridington DataHub via an API request.

Clarification from Jacek:

  1. Receiving initialisation to get the Baseline
  2. Sending baseline output to the FTP server
  3. Receiving DSR request
  4. Sending DSR output to the FTP server
  5. …3 and 4 repeated