SE 3M04 T1 2003
Project (Oct. 04 version)

Introduction

This year's project will be to build a small 'discrete time' producer-consumer simulation. This could model, for example, a simple power grid, or a supply-chain of parts and components from many suppliers to many manufacturers. Minor modifications in terminology could also transform these models into models of communications protocols. There will be no realistic physics underlying the models, mainly to keep matters simple. However, the class of models being used is real in that it embodies all the concepts of realistic models.

It is worthwhile to remember that the point of this project is to go through the process of software development, rather than programming per se, or developing a particular application.

Overview

For the purposes of this project, assume that the simulation is actually of a power grid, and that the project is being sponsored jointly by the for-profit owner of several of the power generating stations, a consumer group and a regulator. All of them are interested in seeing various things about the current grid: its stability, its capacity to furnish enough power for all demand conditions, its capacity to furnish enough power in case of rapid demand increases, its resilience to outtage, etc, etc.

Various outputs of many variables and statistics about the grid and its components will likely be required, and each stakeholder will require (somewhat) different ones. These are likely to change over time. However, all stakeholders have agreed that they definitely want to see graphical plots of various data over time.

Details

The data consists of producers and consumers, which produce/consume power, at a certain rate per time unit. A producer's power production at the next time step only conditions at the current time step. Consumer demand may depend on conditions at the current and past time steps.

The simulation consists of some initial data for all 5 producers and all 15 consumers, and a time-period over which the time-evolution of production and demand (for all 20) should be tracked and possibly analyzed.

Note that the regulator has imposed certain requirements on the software to be written: there should exist a single Producer module that abstracts away from the details of all the producers. Similarly, there should be a single Consumer module. The varying (extra) data for each consumer should be abstracted into a single argument of arbitrary type 'a (which will usually be a tuple), as well as an argument of type ('a-> int). These are meant to encapsulate the extra data and the computations to perform on them. It is furthermore assumed that there will be one simulation module which 'runs' the simulation (makes the clock tick, passes information around, etc).

Updated producer/consumer data

You can download an updated executable with the same data as with assignment 2, but with various clarifications built-in.


Back to main page