here<\/a>, but that did not help me all to much, mainly because I don’t know too much about formatting .csv files. (I know it is comma separated \ud83d\ude42 ) What I did find out eventually was that if I just simply use a one column csv format Homer would recognize it and put all my data in the right spot. So this was what i did, i simply created a single .csv file containing all the hourly load data, and from this data Homer accepted it and added it to the respective dates with no problems whatsoever.<\/p>\n\n\n\nNot sure how well you can use my matlab code for this project, but I will put it up here just in case. I have the script placed in main folder, and “jan”,”feb”…etc. are all subfolders containing the downloaded time series from Norlys. When I refer to the 3rd column, it is simply because this is the place of the load data in the downloaded file, the tweaking must be up to you guys \ud83d\ude09<\/p>\n\n\n\n
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% Matlab Script\n% Creating suitable time series load profile for Homer Pro Grid Software\n%\n% Created by Esben Uth\n% \n% Energy Department\n% Aalborg University Esbjerg\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%clean up\nclear\nclc\n%output script start to command line\ndisp('Conversion started');\n%create empty matrix to hold all load data\nM = zeros(1,1);\n%run through all subfolders\nsf = {'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'};\nfor k = 1:12\n %define folder\n myDir = sf{k}; %gets directory\n % count number of files in folder\n myFiles = dir(fullfile(myDir,'*.csv')); %gets all csv files in subfolder\n n_files=size(myFiles,1);\n % start the for loop, extracting data from all the files in the folder.\n for i = 1:length(myFiles)\n %construct file name\n baseFileName = myFiles(i).name;\n fullFileName = fullfile(myDir, baseFileName);\n %read file and move data from .csv file to the T variable\n T = readtable(fullFileName, 'Delimiter', ';', 'PreserveVariableNames', true);\n %convert table to cell\n T = T{:,:};\n %read data from the file\n load_data = T(1:24,3);\n date_data = T(1:24,1);\n %trim data before appending them to the matrix\n load_data = strrep(load_data,',', '.');\n load_data = str2double(load_data);\n date_data = strrep(date_data,'-', '\/');\n date_data = str2double(date_data);\n %create temporary matrix\n temp_data = [load_data];\n %append new data to the matrix\n M = [M;temp_data];\n %output part done to command line\n disp(fprintf('File %d of %.0f in %s converted.', i, n_files, sf{k}));\n end\nend\n%delete first row of matrix\nM(1,:) = [];\n%write load data into .csv file\nwritematrix(M,'Homer_time_series_load_profile.csv'); \n%output script end to command line\ndisp('Conversion complete');<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"For our P2 project we are currently working towards a goal of obtaining the most efficient household setup of PV solar, hybrid inverter and storage batteries. This setup is of course connected to the grid. Using the Homer software to run simulations is very useful in obtaining our main goals in the project, but it […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[27,36,29,35],"tags":[39,2,3,40,37,30,38],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/posts\/98"}],"collection":[{"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=98"}],"version-history":[{"count":1,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":99,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions\/99"}],"wp:attachment":[{"href":"http:\/\/esbenuth.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/esbenuth.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}