Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I just output the successful run results in param runing? #24

Closed
yatingchen opened this issue Dec 11, 2018 · 8 comments
Closed

Can I just output the successful run results in param runing? #24

yatingchen opened this issue Dec 11, 2018 · 8 comments
Labels
Milestone

Comments

@yatingchen
Copy link

yatingchen commented Dec 11, 2018

elec0 <- param$report_data(name = "Electricity:Facility")
Error: Some of jobs completed unsuccessfully:
2|UNSUCCESSFUL --> [IDF]set_parameters_2.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
4|UNSUCCESSFUL --> [IDF]set_parameters_4.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
7|UNSUCCESSFUL --> [IDF]set_parameters_7.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
8|UNSUCCESSFUL --> [IDF]set_parameters_8.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw

How can I get the other successful running models' results? Or are there any way to export which pairs unsuccessful?

Thanks

@hongyuanjia hongyuanjia added this to the 0.9.5 milestone Dec 11, 2018
@hongyuanjia
Copy link
Owner

hongyuanjia commented Dec 11, 2018

How can I get the other successful running models' results?

Yes, you can specify which job(s) you would like to export data from.
For details, please see the documention of ParametricJob.

elec0$report_data(which = c(1,3,5,6), name = "Electricity:Facility")

Or are there any way to export which pairs unsuccessful?

Currently, there is no method in ParametricJob class to do this. I am considering to add a method to export detailed job info in ParametricJob class in next release.

If you want to know which model and weather pairs failed to complete, you may manually extract the job data called m_job stored in the private environment of the ParametricJob object using function eplusr:::._get_private():

eplusr:::._get_private(elec0)$m_job

Basically, m_job is a data.table returned from run_multi() which is called when running parametric models. You can find if the model is successfully simulated or not by the value of the exit_status column.

So if you want to get the info for failed models, you can do:

m_job[exit_status != 0L]

However, this is not the recommended way. I would suggest to first check the .err file for those bad models.

ele0$errors(c(2,4,7,8))

After knowing the problem, you can modify your measure accordingly.

@hongyuanjia hongyuanjia removed this from the 0.9.5 milestone Dec 11, 2018
@hongyuanjia hongyuanjia added this to the 0.9.5 milestone Dec 11, 2018
@yatingchen
Copy link
Author

Thanks for your response!

I tested the suggestion you listed and decided to use:
eplusr:::._get_private(param)$m_job[exit_status != 0L]
to extract the unsuccessful runs.

But when I tried the
param$errors(c(2,4,7,8))

but it only showed:

Error: Some of jobs completed unsuccessfully:
2|UNSUCCESSFUL --> [IDF]set_parameters_2.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
4|UNSUCCESSFUL --> [IDF]set_parameters_4.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
7|UNSUCCESSFUL --> [IDF]set_parameters_7.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw
8|UNSUCCESSFUL --> [IDF]set_parameters_8.idf + [EPW]IA_DES-MOINES-IAP_725460_10.epw

I cannot see the details of errors.

@hongyuanjia
Copy link
Owner

It turns out that if EnergyPlus returns a non-zero, it means that the simulation cannot even start. So that’s why I decided to stop extracting any info from the err file when I designed the feature.

I would suggest to use elec0$output_dir(open=TRUE) to open the output folder and check each err file to find out the real problem.

Please tell me if the err file explains the problem. If so, I will consider to continue to parse the err file even EnergyPlus ended unsuccessfully.

@yatingchen
Copy link
Author

Error in param$output_dir(open = TRUE) : unused argument (open = TRUE)

it shows this.

@hongyuanjia
Copy link
Owner

Sorry, there should be no open argument. Please try directly go to the output dir and check the err file of each model that failed to run.

@yatingchen
Copy link
Author

Yes, it shows the problem as the normal err files.

Thanks for your help.

@hongyuanjia
Copy link
Owner

Thanks for this info!

Then this means that I should change the logic of determining when to stop parsing err files. I will work on that tomorrow.

Besides, I think currently ParametricJob class is not so friendly to use. Any suggestions for improving will be much appreciated.

@hongyuanjia
Copy link
Owner

@yatingchen, please check out the develop version. Now $errors() should work for unsuccessful jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants