- Posts: 3
Tips on entering energy market revenue data
- rsgiglio
- Topic Author
Less
More
12 Aug 2020 15:18 #8551
by rsgiglio
Tips on entering energy market revenue data was created 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
Less
More
- Posts: 5423
12 Aug 2020 17: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:
To use the script:
Best regards,
Paul.
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:
Code:
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:
- 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.)
- On the File menu, click New Script.
- Copy and paste the script above into the script editor.
- Modify the values of the daily_price_schedule and daily_cleared_capacity_schedule arrays in the script to your 24 data points.
- Click Run in the script editor window.
- 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.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman