Tuesday, April 27, 2010

Simulation Brainstorm

In addition to testing the code that we currently have. I am investigating the possible ways of improving the simulation of the power usage in a dorm. Currently we only have weekday vs. weekend and time of day as variables in generating a power usage value. Some other information that I could incorporate to make the data more realistic are:

- day of week (Sunday, Monday, etc.)
- day of year (holidays)
- temperature (use more air conditioning when it is hot)
- energy literacy
- number of students in floor/dorm
- individual floors
- multiple dorms

So far the ones that jump out to me as being useful to put into a simulation would be the day of week, day of year, and temperature. Hopefully adding these extra variables will allow us to test the our sensors and meters will very realistic data.

Tuesday, April 20, 2010

Code Cleanup

Since the milestone, we have had a lot of cleanup that we needed to do with our code. This included fixing things with checkstyle, pmd, and findbugs. Our code was not undergoing these checks until very late in the milestone so we haven't been keeping up with getting our code up to the level that it should be at. Now our code is much more readable and follows all the conventions. Being that our code is on Google Project Hosting, I feel much better about the code that is being presented to the public.

I have also implemented some tests for the simulation java files. We didn't have any testing before and I will continue to add more tests as we continue development. We ran into some bugs that took us a while to figure out. At that time testing was not implemented. Had some tests been written, it would have saved us a lot of time in making sure our code was doing what it was supposed to.

Tuesday, April 13, 2010

Dorm Energy Simulation Milestone

This week marks the end of the milestone for the Dorm Simulation Group. Joining a group already in progress has presented some difficulties. Alan and Edwin have already been working on this project for the entire semester so they had a good understanding of the system. Being that the interaction between all of the different parts between the meters and sensors and WattDepot is complicated, it took me a few times to actually figure out how all of the pieces fit together.

Working together to create this system has been just as complicated. We separated out the parts with Alan working on the meter simulation, Alan working on the sensors, and me and Bao working on the dorm simulation. The way we were working was we each worked on our own parts and then put them together. We ran into many issues with data types and multiple conversions required to make them work with the requirements of the libraries we were using. It didn't help that we only integrated svn in the final week of the project. This resulted in many checkstyle and pmd errors which needed to be fixed at the end.



The postponing of all of these essential software engineering practices has made it much more work in the last week of the project. It has been clear as to why these sytems should be in place in the very beginning and the benefits of doing so have become painfully clear while working on this project.

Tuesday, April 6, 2010

Effective Dorm Power Simulation Ideas

The idea of creating an effective simulation for power readings for an entire dorm is both interesting and a challenge. When this project was described it was something that I knew that I could become interested in. I began brainstorming ways in which a realistic simulation could be designed.

The obvious way was to create a large array which stored different data points based off of some research. This was is obviously undesirable since it is much less useful for testing. The next easiest way would be to get random variables between a pair of limits. This is actually being used right now for basic testing, but this still isn't a realistic simulation of a dorm's power usage.

The way that we have decided to go with is to store data of a average day for each day of the week, since the energy use can vary greatly depending on the day. Next, we would have a skew value, probably are 10%, which would be used to get a random value between the end points. This way seems to be a way which could produce realistic data which could be used to dependably test other code. After this is implemented, we will be able to tell if my hopes hold true and if we need to make adjustments to the algorithm.