CE705 Assignment: Analysing Solar Panel Data

If you look at the roofs of houses in Colchester and Wivenhoe, you will see that some of them are fitted with photovoltaic panels which generate electricity from incident sunlight. The amount of electricity generated per day obviously depends on the length of the day but also on factors such as the weather: cloud and rain reduce the amount of sunlight, the ambient temperature affects the mobility of electrons, and so on. Some people who have solar panels take a reading each day, so that they are able to work out how much electricity they have generated.

The task

You are asked to write a program that reads in a file of such daily readings which is given on the command line. Your program should take precisely one command-line argument, the name of this file. An example file, generation.dat, is provided, taken from a real solar panel installation, so a typical invocation of your program would be

python3 solar.py generation.dat
Each line of generation.dat normally contains two numbers: the first denotes the day and is an integer starting from zero, while the second is the reading of the generation meter at the end of that day. Hence, to determine the amount of electricity generated in day N, one would subtract the reading for day N - 1 from that of day N. Note that there is not a reading for every day in the file (because the person recording the data forgot or was away), so you need to do something sensible to handle such events. Some lines in the file start with # and are to be interpreted as comments. When the data have been read in, you should make your solar.py:


You should present your code in accordance with the assessment criteria that will be used for marking it. Your program must run under Linux on the computers in CSEE Lab4 and must be invoked as described above. You may make use of any routines you have already written during CE705 sessions; if they reside in a file other than solar.py, you need to upload that file as part of your submission. (Any such files need to be presented in accordance with the assessment criteria too.) You do not need to submit the graph because your program will be executed as part of the marking process.

Submission deadline: Friday 16th December at 11:59:59
What to submit: the source code of your program
any ancillary source files it needs to run
Feedback returned: at the start of the spring term
Assessment criteria: see the detailed description of the criteria

Remember to identify your work with your registration number only.  The coursework system allows you to upload your work as often as you like, so do keep uploading your files as you develop them.

Last updated on 2015-10-21 10:19:06 Web pages maintained by Adrian F. Clark [contact]