-
Notifications
You must be signed in to change notification settings - Fork 393
20160202 ChicagoArea
February 2-4, 2016 - Des Plaines, IL (near Chicago)
Edwin, Kyle, Mark, Mike, Brent, Rich, Rongpeng, Jason, Amir
The two goals of the meeting were to:
a) Establish a methodology to refactor plant component models to be more object oriented
b) Actually refactor as many plant component models as possible in a team coding environment to refine the methodology
Edwin led the initial discussion with a presentation titled "Welcome to the EnergyPlus H4ck47h0n" which was pretty good. It established high level objectives:
- Learn some object oriented code
- Understand simple inheritance from a virtual base class
- Understand simple “pointer as reference” use
- Understand/normalize some patterns in the code
- Discuss how these patterns can be used to inform a new “module developer’s guide”
And low level objectives:
- Refactor plant components
- Other. Let’s see how far we get…
Edwin had already created a simple PlantComponent base class which was discussed and modified during the meeting. Each plant model class would inherit from that base class. A pointer would be used to access the members of each plant model class. A simulate function and a factory function would replace the specific SimXYZ class and the get inputs and returning a pointer.
As an example Edwin implemented the Pipe:* objects. A special repository was used for all development during the meeting.
Edwin provided a list of 64 plant component models to refactor as well as a level of expected difficulty with assignments to the people attending the meeting.
During the remainder of the meeting up until the final morning, individual attendees to the meeting worked on refactoring the plant component models. Of the 64 plant component models, 30 were refactored and pull requests added to the special repository during or shortly after the meeting with another 9 plant component models in progress. The programming effort during this time was very collaborative with questions being asked and help being provided by the group or other individuals. At times, as the methodology was being applied to different plant components, changes in that methodology were made after discussions with the rest of the group. For many attendees, the programming effort went beyond the meeting itself and lasted until late in the evenings.
The last morning of the meeting, the approach to refactoring the plant components was refined based on the experience learned by the individual programmers and the following document was collaboratively written:
Approach for Refactoring Plant Components
In addition, Kyle showed code that he had been working on for a plant component (HeatPumpWaterHeaterParameterEstimateHeating) that was further refactored using private functions in the class and vector containers.