The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.30 (Linux)
|
JEPLUS Utilities - Collecting data from SQL - Printable Version +- jeplus.org forums (http://jeplus.org/mybb) +-- Forum: Building simulation tools (http://jeplus.org/mybb/forumdisplay.php?fid=1) +--- Forum: jEPlus (http://jeplus.org/mybb/forumdisplay.php?fid=2) +--- Thread: JEPLUS Utilities - Collecting data from SQL (/showthread.php?tid=102) |
JEPLUS Utilities - Collecting data from SQL - Susanneb - 04-21-2015 Hi everyone, I have run a model with JEPLUS-EA and would like to get a AllCombinedResults.csv like when i run JEPlus. But the table view only allows me to export a csv with the parameters and optimization objective. Is there any way to use JEPLUS utilities like Python or ReadVars to collect more data from the SQL outpur files. If so, could you share a simple script with me as an examples. (I am not an exeprienced programmer). I did some trials with Run Readvars but it didn't work properly and the following error apears: Cannot extract model template file. Check input string. Cannot extract Weather file. Check input string. File C:\Users\Xandrika\Documents\03_Research\PhD\Simulation\JEPLUS\__jEPlus_v1.5.1\null is not accessible. Thanks a lot. Regards, Susanne RE: JEPLUS Utilities - Collecting data from SQL - ivank - 04-24-2015 Hi Susanne, Sorry for the late reply. I spotted your question on UnmetHours forum and replied there first. I am posting my answer here as well just in case you check this forum before you check UnmetHours. The process of collecting additional outputs is not straightforward. By using rvx outputs definitions you have an option to define user variables where you can include outputs from SQL. These user variables are included in the jEPlus+EA table (v1 and v2 in the image). However, if you already run optimisation project and would like to extract additional outputs not previously specified in rvi/rvx file you have to take the following steps: 1) In the jEPlus+EA table view select 'Parameter value distribution' for 'All' (or 'Best solution' or 'Population'); specify the generation (it should be the last one unless you would like to get outputs from a previous generation); check 'Show parameter values'; check 'Actions' 'In the CSV format'; and 'Export solutions' to a CSV file (let's give it a name 'a.csv'). 2) CSV file has to be slightly adjusted: a) delete all results (objectives, user variables, everything which appears after the last parameter); b) delete the first column (#); c) insert the new column with a weather file index (it should be 0 since the optimisation project uses single weather file) between first column ('Solution') and second column ('T'); d) delete the first row (headings); e) save it as a CSV file again (you can overwrite a.csv file). 3) Open the optimisation project in the jEPlus. a) In the 'Execution' Tab check 'Actions' - 'Job list in file' and select CSV file created in the step 2 (a.csv). b) In the 'Utilities' tab select 'Run ReadVars' tab. Point to the 'Results folder' where the outputs from jEPlus+EA are stored. Select the new rvi file with the extended list of outputs you would like to have in the summary file. Check 'Scan only the jobs defined in the current project' box. c) Specify the 'Export directory' and leave checked only 'Export all results to one table with name' (you can give whichever name you want to the summary file). By clicking on the collect results button you will be able to get all results in one file. However, you will only be able to get results stored in the ESO file. This utility does not collect results from the SQL file. 4) If you need to export results from SQL you have two options. First is to write a Python script as suggested by Julien or to rerun optimisation outputs in jEPlus. In order to rerun optimisation outputs you can repeat previous steps concluding with the 3(a) and launch simulation by clicking on 'Start simulation' button. Please bare in mind that you need to specify new rvi file (which includes sql queries) in the 'Project' tab. Alternative to simulations rerun in jEPlus is to prepare a new rvx file, which includes sql queries and user defined variables, and run optimisation project in jEPlus+EA from beginning. |