Open aaron-boranian opened 6 years ago
@mitchute @nealkruis if this ever becomes a priority note that we now have a Fortran-to-Python conversion system built on the same back end as the Fortran-to-C++ used for EnergyPlus. It is less mature and battle-tested than the C++ generator but it works well. There are interesting choices for performance of larger codes (NumPy vs Numba vs Cython) but for these utilities a pure Python+NumPy approach should be ideal.
As far as the VB code, I'd try the VB to Python conversion tools first and if all of them fall on their faces then the best bet might be to use a VB to C# converter and then manually rewrite in C++.
[Tangentially, all Python utilities should be migrated to Python 3.x.]
Despite the core of E+ being fully transitioned to C++, there are a number of legacy stand-alone projects in E+ that still require developers work in FORTRAN or other languages. The following is a list of all current FORTRAN projects remaining in the E+ project.
Basement CalcSoilSurfTemp ConvertESOMTR ExpandObjects HVAC-Diagram ParametricPreprocessor ReadVars Slab Transition Basement and Slab programs can be eliminated, at some point, and transitioned to the new basement and slab objects incorporated into E+.
CalcSoilSurfTemp can be incorporated into E+. New ground temperature models are already reading the weather file, so adding this code to E+ would be relatively simple. It would also allow an “Autocalculate” option for the KA ground temp model.
ReadVars, HVAC-Diagram, Transition, and possibly others could be converted to a Python based program or eliminated as deemed appropriate.
There are also other VB6 programs included in the E+ project. The following is a list of all VB projects included in E+:
EP-Launch IDFEditor IDFVersionUpdater WeatherConverter Some benefits to pushing everything to C++/Python:
Python can be packaged as an exe using py2exe or some something similar. This exe would give the same functionality to users as the current system and not require a Python installation. Eliminate need to package/ship basic runtime libraries (support for VB6 ended in 2008). There is at least one open issue related to this: (https://github.com/NREL/EnergyPlus/issues/5105) Eliminate the need for FORTRAN compiler and FORTRAN specific build/testing support Makes the project more accessible to outside developers who are likely to be more familiar with OO design, Python, and C++ over FORTRAN and VB. Make utilities cross-platform compatible. Simplifies project setup and testing by simplifying CI machines configuration. Some of these utilities will require an input processor. This could be a shared routine if converted to Python, or if/when E+ goes to JSON input, native Python JSON libraries could be utilized, which eliminates the need to maintain an input processor in Fortran or VB. Ultimately, IMO, this would help push the E+ project to a standard format of C++ code for performance/heavy number crunching-type work, and Python for scripting, utilities, and all other non-core E+ project related work.
Migrated from UserVoice feedback from @mitchute
NOTE: This is related to issue #6552.