Sustainable Urban Development on the NetBeans Platform
The main calculation before the energy assessment is the shadow calculation. Each wall has a matrix of dimensions for each hour of the day of each day of the year. So, if we have a big urbanization with lots of buildings, we can imagine a large amount of data that we need to handle. After the shadow calculation, we have a percentage of shadow that a wall receives each day of the year. Then is the time for energy calculation, first with heating and then with refrigeration. URSOS enables some optimized calculations by letting the user change the value of a variable through a range and then recalculating each iteration, showing at the end the best and the most efficient value of the variable in energy demand terms. Finally, we can obtain some area calculations, as well.
The application is called URSOS due to the combination of the Spanish words “URbanismo SOStenible”. A future derivation of the application will be called URSUS (Sustainable Urbanism), which will include some different features, such as energy indicators and other variables, and the language of the application will be English. But, for the moment, URSOS is the focus of my development work.
We chose the NetBeans Platform for the structure. The idea of having an explorer window with a tree where we can view the urbanization components (plots, streets, and buildings in the plots) was very useful for us. And the main editor, where we can design the urbanization, using a bit of the Visual Library and a bit of Java2D.
Very useful too is the Properties window, but we only use this window to show (not edit) properties, we don’t want to let the user modify properties in that window because we have the editor windows for each wall, each kind of building, and other similar windows. When we select a building with the mouse in the editor, the node of the building is selected in the tree of the explorer and we can view its properties in the Properties window, thanks to the Lookup system.
Finally, we use the Component Palette, where we put types of buildings, enabling the user to drag and drop a building type onto the editor. There, inside the perimeter of the urbanization, a new instance of the building is created and located at that specific point.
It is presumable that the NetBeans Platform has more mechanisms that could perhaps be very useful to integrate into URSOS, and surely a lot of Swing work would be eliminated, but I have only had a little of bit of help of other programmers for two hours a day during the past months, and the rest was done by myself on my own. And my boss wanted results continuosly so I didn’t have the time to investigate thoroughly everything that the NetBeans Platform offers.
So, for me, the most important features in NetBeans Platform are the window structure, the Lookup mechanism, the Component Palette, the Properties window, explorer window, and the editor area in the application.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)