Sunday, May 03, 2009

Rapid Application Development

An itch showed up, I needed (wanted) a simple, or so I thought, application to edit or create a definition file for the Energy Plus building simulation suite. Energy Plus is a US department of energy sponsored project. You need to define the building quite specifically. There are applications available for windows, or for purchase. So I decided that the best way to learn the rather complex structure was to write some code to fool with it.

I started with Ruby, but when I needed some gui stuff, found the bindings not up to date. PyQt is up to date and well supported, so I started writing. First was to parse the definition dictionary provided in the suite to build python classes representing each needed description. The classes would know how to read, write, edit and draw the particular element. Or would once I wrote it. Then read some example definition files, and work on the edit code. So far, so good. There is still a ways to go, but I'm seriously impressed how quickly one can bang out a working application for a specific purpose. This isn't trivial; the definition files are complex, long and involved. I have some widgets to write, some careful parsing through the results to check for accuracy, and some code to draw a few elements onto a graphics scene to represent the building outline. I suspect another 40 or so hours on top of the 40 or so I have into it already to get something useful.

Very impressed so far. PyQt is well documented and works, python works well and is reasonably quick. Qt is of course very nice to work with. It is so quick to build something useful.

The project is at http://code.google.com/p/energyplus-frontend. You need python, and pyqt. And the energy plus suite mentioned above, which is free. Get both the linux and windows one, it runs in wine. The windows package has the dictionary files required to build the classes. I'm working with the v3.1 stuff, and eventually may test with earlier versions.

The prerequisite screenshot. Note the empty space in the middle. A graphics scene ready for one's imagination.


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]