资源简介

Electricity Load and Price Forecasting with MATLAB® Step 1: Access Historical Data Interactively import, visualize and explore data Auto-generate MATLAB codeStep 2: Select & Calibrate Model Leverage numerous built-in functions Focus on modeling not programming Capture as-you-go and automate the processStep3: Run Model Live Royalty-free deployment Point-and-clickworkflow

资源截图

代码片段和文件信息

%% Automate the Data Import Process
% This script imports data from the Zonal hourly spreadsheets provided by
% ISO New England (www.iso-ne.com). The folder containing these
% spreadsheets should be specified below. By default it is assumed to be a
% folder called “Data“ in the same folder as this script. The data that is
% read in is saved as a MAT-file in the same folder.

folder = ‘Data‘;
% Example: folder = ‘C:\Temp\Data‘;

% By default the sheet name is ISONE CA. However it can easily be changed
% to ME CT VT NH RI SEMASS WCMASS or NEMASSBOST to extract zonal data
sheetname = ‘ISONE CA‘;

% Import data for 2004
if strcmp(sheetname ‘ISONE CA‘)
    NEData = dataset(‘XLSFile‘ sprintf(‘%s\\2004_smd_hourly.xls‘folderyr) ‘Sheet‘ ‘NEPOOL‘);
else
    NEData = dataset(‘XLSFile‘ sprintf(‘%s\\2004_smd_hourly.xls‘folderyr) ‘Sheet‘ sheetname);
end
% Add a column ‘Year‘
NEData.Year = 2004 * ones(length(NEData)1);
    
% Import data for other years
for yr = 2005:2009

    % Read in data into a dataset array
x = dataset(‘XLSFile‘ sprintf(‘%s\\%d_smd_hourly.xls‘folderyr) ‘Sheet‘ sheetname);
    
    % Add a column ‘Year‘
    x.Year = yr*ones(length(x)1);
    
    % Concatenate the datasets together
    NEData = [NEData; x];
end

% Calculate numeric date
NEData.NumDate = datenum(NEData.Date ‘mm/dd/yyyy‘) + (NEData.Hour-1)/24;

save([folder ‘\‘ genvarname(sheetname) ‘_Data.mat‘] ‘NEData‘);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-05-06 15:05  Electricity Load & Price Forecasting\
     目录           0  2011-05-06 15:05  Electricity Load & Price Forecasting\Data\
     文件       28160  2010-03-29 15:40  Electricity Load & Price Forecasting\Data\Holidays.xls
     文件         464  2010-11-11 20:13  Electricity Load & Price Forecasting\Data\Where to get data.txt
     文件        1465  2010-11-11 20:12  Electricity Load & Price Forecasting\importData.m
     文件      693503  2010-11-11 20:56  Electricity Load & Price Forecasting\Introduction to Load & Price Forecasting Case Study.pdf
     目录           0  2011-05-06 15:05  Electricity Load & Price Forecasting\Load\
     目录           0  2011-05-06 15:05  Electricity Load & Price Forecasting\Load\Data\
     文件      300125  2011-05-06 15:23  Electricity Load & Price Forecasting\Load\Data\DBLoadData.mat
     文件      123058  2010-11-11 20:29  Electricity Load & Price Forecasting\Load\Data\testSet.mat
     文件      437685  2010-09-10 14:24  Electricity Load & Price Forecasting\Load\Data\trainSet.mat
     文件        1370  2011-05-06 15:22  Electricity Load & Price Forecasting\Load\fetchDBLoadData.m
     文件         844  2010-06-09 12:00  Electricity Load & Price Forecasting\Load\fitPlot.m.lnk
     文件       51399  2010-11-11 20:38  Electricity Load & Price Forecasting\Load\Forecaster.prj
     文件       17706  2010-11-11 20:42  Electricity Load & Price Forecasting\Load\Forecaster.xlsx
     文件        2582  2010-09-09 20:16  Electricity Load & Price Forecasting\Load\genPredictors.m
     目录           0  2011-05-06 15:05  Electricity Load & Price Forecasting\Load\html\
     文件       14277  2010-09-07 18:38  Electricity Load & Price Forecasting\Load\html\CalibrationReport.html
     文件       19468  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN.html
     文件        3610  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN.png
     文件       15322  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_01.png
     文件        8138  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_02.png
     文件        9688  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_03.png
     文件        7847  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_04.png
     文件        8663  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_05.png
     文件       14609  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_06.png
     文件       14465  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_07.png
     文件       14500  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_08.png
     文件       14642  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_09.png
     文件       14389  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_10.png
     文件       14421  2010-09-10 14:40  Electricity Load & Price Forecasting\Load\html\LoadscriptNN_11.png
............此处省略119个文件信息

评论

共有 条评论