|Design Fest Solution For The French Fry Processing Control System|
This Activity Was Part Of The
Oriented Programming Topics Course
|knows current order's weight||Administrator|
|notify end of order|
|knows order id||Administrator|
|knows order weight|
|knows order customer|
|knows potatoes average size|
|knows order defect tolerance|
|asks machines data||Tegra and ADR|
|resets machines data|
|keeps configuration history and its justifications|
|receives end of order notification||Scale|
|receives report request||human operator|
|changes order specifications||Configurator|
|keeps an order's FIFO||Configurator|
|generates orders||human operator|
|chooses statistical model||StatisticalModel|
|generates new configuration|
|sends new configuration||Tegra and ADR|
|knows machines specifications|
After establishing the basic ideas for the class model through
the role-playing using the CRC cards as a responsability guide
we created the following UML class diagram:
One of the applicability of this pattern is when the construction process must allow different representations for the object that's constructed. In our design it was used to generate different types of reports.
This pattern is used when an object should be able to notify other objects without making assumptions about who these objects are. We used this pattern to notify events from SCALE to ADMINISTRATOR.
Strategy is useful when you need different variants of an algorithm that uses data that clients shouldn't know about. In our design, this pattern was used to present several statistical models.
Statistically equivalent incoming stream of potatoes. PID loop maintains thresholds so that spec is met.
When statistically similar potato shippings are used, the StatisticalAnalysis returns similar results. When the configuration reaches the quality level desired, there are no machines reconfigurations.
The past couple of days have been spent processing potatoes that were recently harvested. The control system has made only minor fluctuating adjustments to keep the sort "in grade." Today though, they began processing potatoes stored over the winter. These potatoes are turning into fries that are signifigantly more defect ridden. The control system notes the sudden spike in the trend data gathered from the Tegra and ADR. Tegra is adjusted to sort more stringently (i.e. the defect threshold are lowered). The ADR is instructed to shred fries more readily (to just keep trying to remove the increased load of defects, would result in a change in the histogram of output fry length).
The control system notes the sudden spike in the data and the StatisticalAnalysis estimate trends that stricts the machines' configurations. Tegra rejects potatoes more strictly and ADR shreds fries more readily.
The plant has been sorting fries for MuckRonalds for the last hour. MuckRonalds specifies, among other things, that they want their fries to be a very tight distribution centering around 10.5 cm. A new order to process fries for BellyAcher Queen comes in. Said vendor wants fries that are loosely centered around 13cm fries. New length histogramming bins are set. The control system analyzes past history data, decides on new minimum and maximum thresholds for Tegra and ADR and sets them. The system then begins to iteratively control these thresholds to achieve new length distributions.
The control system uses the StatisticalAnalysis and the order specs to reconfigurate the machines, relaxing the size thresholds, until an appropriate configuration is determined.
The current fry customer decides that to gain a competitive advantage, they need to reduce all of their allowable defect percentages by 1%. The new spec is generated. The system begins trying to adjust the size thresholds to maintain the new defect specs.
To reconfigurate an Order, the user gives the Order's identification and the new configurations. The Administrator receives these data and reconfigurates the Order even if this is the one that is being produced. If this Order is in the orderQueue it's reconfigurated with no effects in the production.
A ppt version of our slide presentation can be downloaded here.
Although already familiar with the Gof Design Patterns, during the fest we were able to identify parts of the class model where such patterns would simplify and enhance our design.
The usage of CRC cards was usefull during the initial modeling stage for defining the basic necessary classes. After this period, we found it very usefull to role play the execution flow. This "enactment" brought up a few other interaction details that hadn't been identified during the CRC phase allowing us to fully understand the system requirements.