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

idf.run() does a saveas("in.idf") - is this needed ? #398

Closed
santoshphilip opened this issue Nov 25, 2022 · 3 comments
Closed

idf.run() does a saveas("in.idf") - is this needed ? #398

santoshphilip opened this issue Nov 25, 2022 · 3 comments
Assignees

Comments

@santoshphilip
Copy link
Owner

idf.run() does a saveas("in.idf") - is this needed ?

older versions of E+ would simulate the file in.idf
This is not true in the newer versions of E+

Should the saveas("in.idf") be removed ?
It is causing problems in zeppy pyenergyplus/zeppy#20

@santoshphilip santoshphilip self-assigned this Nov 25, 2022
@santoshphilip
Copy link
Owner Author

Observations:

  • idf.run() will do a idf.saveas("in.idf") before simulation
  • This will change idf.idfname to "in.idf"
  • idf.run() does not restore it to it's original name
  • not restoring the original name is not what the user would expect

This has not caused users any problems yet, since there have been no issues opened on this. So ignore it for the moment.

Is there a purpose to doing idf.saveas("in.idf") before the run?

  • there is a good reason for doing the idf.saveas("in.idf")
  • The IDF may have ben created entirely in memory and may not exist on the disk
  • changes may have been made to the IDF in memory, but do not exist on the disk.
  • But E+ will not run a simulation unless the file is on the disk
  • so idf.saveas("in.idf") saves the file to disk and allows the simulation to proceed

Is there a problem with idf.saveas("in.idf"), apart from not restoring the not restoring the original name:

  • the idf.saveas("in.idf") creates a problem in distributed systems like zeppy
  • zeppy will run two independant simulations - idf1.run() and idf2.run()
  • both of them will do a idf.saveas("in.idf")
  • this can happen simultaneously or in very close timing
  • one in.idf can overwrite the other

Possible solution to the zeppy issue:

  • instead of in.idf, generate a long random name sdfejas34.idf
  • that will be different for each simulation

@santoshphilip
Copy link
Owner Author

Holding off on taking any steps based on the above comment

It would still be useful to have the following functions:

  • idf.runfile() -> identical to idf.run(), except that it runs on a file on disk
  • eppy.runner.run_functions.runIDFfiles() -> identical to eppy.runner.run_functions.runIDFs(), except that it runs on a file on disk

This has been largely coded and it allows zeppy to work correctly. Open a new issue on this and implement

@santoshphilip
Copy link
Owner Author

fixing issue #401 fixed this issue

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

No branches or pull requests

1 participant