We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

Tips on entering energy market revenue data

  • rsgiglio
  • Topic Author
More
12 Aug 2020 21:18 #8551 by rsgiglio
I am trying to enter the same daily energy rate schedule for every day of my 30 year analysis. This amounts to 24 x 365 x 30 = 262,800 data point, which is impractical to even copy and paste. Is there an easy way for me to enter just the day schedule (24 data points) and tell SAM to use this daily schedule for all days over the 30 year period?  

Please Log in or Create an account to join the conversation.

  • pgilman
More
12 Aug 2020 23:15 #8554 by pgilman
Replied by pgilman on topic Tips on entering energy market revenue data
Hi Robert,

As you note, SAM's Merchant Plant financial model requires time series data over the entire analysis period as input for energy market revenue prices, and any additional revenue from ancillary services. Depending on the simulation time step, this can be a huge amount of data that is unwieldy to work with,  can cause simulation run times to be long, and display of tables and graphs on the Results page to be glitchy.

Unfortunately, the Mode options in the Edit Lifetime Data window do not include an option for a daily rate schedule that repeats over the analysis period.

One option would be to write an LK script to assign values to the input array. Here's an example of how:
analysis_period = get('analysis_period');
ts_per_day = 24;

// modify these arrays with your data
daily_price_schedule = [ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 ]; // $/MW
daily_cleared_capacity_schedule = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]; // MW

i=0;
for ( y=0; y<analysis_period; y++ )
{
    for ( d=0; d<365; d++ )
    {

        for ( ts=0; ts<ts_per_day; ts++ )
        {
            arr[i][0] = daily_cleared_capacity_schedule[ts];
            arr[i][1] = daily_price_schedule[ts];
            i++;
        }
    }     
}

set('mp_energy_market_revenue',arr);

To use the script:
  1. Start SAM and open or create a file with a Merchant Plant case. (For now, open a case that you don't mind modifying and discarding.)
  2. On the File menu, click New Script.
  3. Copy and paste the script above into the script editor.
  4. Modify the values of the daily_price_schedule and daily_cleared_capacity_schedule arrays in the script to your 24 data points.
  5. Click Run in the script editor window.
  6. Go to the Revenue Page in SAM and click Edit lifetime data under Energy Market Revenue to verify that the values from the script were assigned to the input array.
See merchant-plant-set-market-price-arrays.lk at github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM for a fully commented version of the script that you can download and modify.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum