Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
5

How to collect more data from SQL from JEPLUS-EA runs (output files)

asked 2015-04-23 01:43:59 -0600

Xandrika's avatar

updated 2015-11-07 13:50:15 -0600

I have run a model with JEPLUS-EA and would like to get a AllCombinedResults.csv like when i run JEPlus. But I get only the datatabel for the best solutions. But I would like to have it for all solution. However, the table view of all solutions in JEPLUS-EA 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 output files. If so, could you share a simple script with me as an examples. (I am not an experienced programmer).

I did some trials with Run Readvars using my original RVI file 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:\...\Simulation\JEPLUS\__jEPlus_v1.5.1\nu​ll is not accessible.
edit retag flag offensive close merge delete

Comments

@Xandrika - is it possible for you to share with me a set of example files that runs on the "jEPlus+EA_v1.7.6_beta" version or any other version that you have had success with? I am just starting with jePlus+EA for a project and am experiencing similar errors as you have been in your posts. My contact information can be found on my profile. Thank you.

https://www.linkedin.com/in/amir-reza...

Amir Rezaei's avatar Amir Rezaei  ( 2016-04-26 19:10:06 -0600 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2015-04-24 08:05:41 -0600

Ivan Korolija's avatar

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').

image description

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.

edit flag offensive delete link more

Comments

Thanks a lot for your detailed answer, @Ivan Korolija. Unfortunately I am no able to run my JEPLUS+EA with the RVX file. So I cannot define the user variables:-( Even the RVX example "example_2-rvx_E+v8.1" is not running on my PC:-( It only gives the error of not finding the objective function in the rvi. Please, could you have a look at my coding and give some comment here

Thanks a lot.

Xandrika's avatar Xandrika  ( 2015-08-13 09:32:34 -0600 )edit
3

answered 2015-04-24 01:52:18 -0600

updated 2015-04-24 01:54:35 -0600

The complexity of extracting (useful) data from SQL file depends highly on what data you're trying to get :could be a simple SQL query or a complicated one, could require post-processing or not.

It also depends which version of E+ you're using. I found out the hard way, when trying to write a Python script to collect information from the SQL file, that in E+ 8.2 update 1 there's a bug that tends to complicate things, the "VIEW" tables are somewhat broken, at least the TabularDataWithStrings (see my answer here).

Good news is that it was fixed in 8.3.

I kinda stopped there, thinking I'll get back to it once I fully move to 8.3 and once I need it, but I have the start of a Python script to load SQL data into a Pandas dataframe, if anyone is interested in collaborating on it, let me know. With the view tables being fixed, it should be pretty simple to make it work, I just didn't have that much time.

Otherwise, I don't know if you have an .eso file being generated as well, but Daren Thomas at ETH Zurich has created a utility called esoreader to load it into dictionaries. I haven't been able to make it work with v8.2 though, not sure why or if it's a version problem.

edit flag offensive delete link more

Comments

Julien, I would be very interested in this (Python script to gather SQL data and load it into a dedicated framework). Have you made any progress on that since last year?

Andrea

andrea.botti's avatar andrea.botti  ( 2016-04-18 11:02:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2015-04-23 01:43:59 -0600

Seen: 694 times

Last updated: Apr 24 '15