Copier Paper Path Simulator - Release 2

This second release of the generic copier paperpath simulator project is aimed at making the simulator capable of handling a wider variety of copier configurations, handle more complex jobs and providing better debugging support.

Additional Copier Configurations

The support for additional copier configurations includes:

You should be able to support at least three configurations: the configuration from phase 1, and the two configurations shown below. The configuration is selected via a command line argument when the program is started.

Configuration 2

New Components

Configuration 3

This configuration has all three types of feeders.  It also includes two new components, the 2-way Stapler and the Binder. 

New Components

Generalization of Job Construct

This phase generalizes the concept of a job.  A job consists of one or more sets, and these may either be bound together or not.  Each set consists of several sheets, which may or may be stapled together.  The input may also contain definitions of sets, which are stored and may be used as part of future jobs.

Job Language Grammar

Below is an example set of productions describing the grammar for the input protocol.

Input :== SetDefinition Input | Job Input | Job
SetDefinition :== DEFINESET Setname Set ENDDEFINESET
Setname :== string
Job :== BEGINJOB BIND SetSequence ENDJOB | BEGINJOB SetSequence ENDJOB
SetSequence :== Set SetSequence | Set
Set :== STAPLE SheetSet | STAPLE-2 SheetSet | SheetSet | SET Setname
SheetSet :== Sheet SheetSet | Sheet
Sheet :== SHEET Type | SHEET Type Side1 | SHEET Type Side1 Side2
Type :== LEGAL | LETTER | DIVIDER
Side1 :== string
Side2 :== string

Debug Report

The third feature to be added in this release is some debugging support for the application software.  The support to be provided is the ability to display the machine status at any given time, and the ability for applications to modify simulator behavior (to simulate faults etc), without modifying the simulator itself.

The machine status is displayed through a “SHOWSTATUS” command, which takes a time value as an argument.  These commands must be issued before the beginning of job execution – for simplicity, you can read them from standard input for your application, prior to the job input.  (Realistically, these commands would be part of a simulation control interface, either standard input, command line parameters or a simulation control GUI, whereas the jobs would probably be read from a file).

SHOWSTATUS causes each component in the system to print its current status:

Example input and output

SHOWSTATUS 400
DEFINESET sectionSeparator
SHEET DIVIDER
SHEET LETTER ThisPageIntentionallyLeftBlank
END DEFINESET
BEGINJOB BIND
STAPLE 2-way
SHEET LETTER section1page1
SHEET LETTER section1page2
SET sectionSeparator
STAPLE
SHEET LEGAL section2page1 section2 page2
SET sectionSeparator
SHEET LETTER section3 page1 section3 page2
SHEET LETTER
ENDJOB

The output would include the following:

  1. The description of the final job.  The structure of your output should show the structure of the job – as bound, consisting of 5 sets, with one or two sheets in each set.
  2. Each item (sheet, set, bound set) should display its event trace.
  3. At t=400, each component should print out its status.  At that time, the binder might contain 2 or 3 sets, the stapler might have 1 or 2 sheets, and there might be a sheet in another component e.g. Duplexor2.  Duplexor2 should print out the position of the sheet e.g “20cm after input” or “45cm after VerticalPart”.  Each component should print out its current consumable holding.

Summary

To summarize, the features desired are the ability to handle multiple copier configurations, job hierarchies, job store-and-recall, and displaying component status.  Note that you do not have to do any fault or exception handling, and it is OK to assume that only jobs that are valid for that configuration will be input.

All three configurations can process a series of jobs and stack them on the TopTray and/or OutputBin.  All components in every configuration are capable of printing out status information.  The initial state of consumables is as follows:

As before, you need not handle reloading of consumables.  If a consumable runs out, trigger the appropriate sensor, and then halt execution if a subsequent operation needs the consumable.

Future Extensibility

This release provides generality in terms of configurations and jobs, as well as better debugging and fault injection support.  Hopefully with this base, it would be easy to generalize the simulator to support any configuration, perhaps even read the configuration as an input.

One additional feature that is usually found on high end copiers is the ability to process multiple sheets of paper concurrently.  It can be extremely difficult to support concurrency, both in terms of copier control software and in terms of the simulator, which has to be able to keep track of all the different sheets and move them along realistically.

Analyze your design to identify what you would need to do to support concurrent paper movement.  Describe an approach for how this feature could be implemented in your system.  You do not need to work out all design details or implement the approach. You will provide a one or two paragraph description of your suggested approach in your final design document. If you think a diagram will help explain the idea you can include that also.

Metric Data

You will gather the following product metric data on your unit 2 submission and then again when submitting for unit 3. This data is simple enough that it can be manually collected and computed. Using a spreadsheet for reporting the data may prove helpful. For lines of code (LOC) count you can do this manually, using simple collection routines such as Unix string processing commands or you can also look on the web for programs to analyse C++ program metrics. The LOC metric should not include header files. (Teams should report to the entire class any metrics programs that are found to work well. This can be done in the myCourses discussion area.) The metrics to report are:

  1. Classification of classes in system. Report the number of classes in each category. Classify each class in your program into one of these categories:
    1. Trivial: Basically data containers, hardly any behavior
    2. Manageable: Class that provides a few behaviors, has a limited well-defined responsibility
    3. Complex: Class that has extensive functionality (lots of code), or many methods, or interacts with many other classes
    4. Interfaces: All methods pure virtual
  2. Total size of the whole product in LOC
  3. Average LOC per class
  4. Average number of methods per class
  5. LOC in each method reported as a histogram with bars for 0-5, 6-10, 11-15 LOC, etc. Adjust the numeric bin ranges as you see fit to present what you feel is the clearest picture of your project.
  6. Average coupling for each class: For each class analyze the code for the class and count the number of different classes that are data members within the class, local variables within methods in the class, used as parameters in the class's methods, are called from methods in the class, and the overal coupling as the sum of all four categories. Report the average coupling per class in each of the four categories and the average overall coupling per class.

General Information

Assessment

Component Percent Comments
Presentation 20 Quality of the team's presentation of their product (including prototype demonstration).
Design Quality 50 Quality of the product design, including the degree to which it addresses the functional and non-functional requirements, the appropriate use of patterns, and adherence to proven software engineering design principles.
Design Diagramming 10 Quality of the design diagrams provided in the documentation and presentation. Elements of this grading will be readability of diagrams at 100% zoom and when projected during the presentation, provision of the necessary complement of diagrams (component, class, sequence, collaboration) to understand the design, and correlation between the diagrams and delivered code.
Implementation 20 Quality of the implementation in implementing the functionality of this simulator. An element of this will also be the adherence of the implementation to the design described in the diagrams and presentation, and to C++ coding style standards from previous coursework. Variations to these conventions must be approved by your instructor, and, if approved, must be adhered to by all team members.

Submission Instructions

  1. A zip file named p362-unit3project-SSX.zip where SS is the section number and X is your team letter (lower case), where the zip file contains:
    1. The final design documentation will be submitted as a single Word document, including at a minimum:
      1. Title information, including the name of your team, the name of your product, the date, and a list of all the team members.
      2. A short overview section describing the product and the features included.
      3. A UML class diagrams showing the main classes and interfaces in your design, along with inheritance (generalization), association, aggregation, and composition relationships. Include cardinality and role indicators as you deem appropriate to make the diagram clear. DO NOT include state or method information. You will need several class diagrams at different levels of abstraction and for different subsystems to completely document your design in a way that the reader can physically see and intelligently understand.
      4. Other UML diagrams (e.g., sequence charts, collaboration diagrams) to provide insight into the key dynamic characteristics of your design.
      5. A table summarizing the responsibility(ies) of each major class. A table of the object data defined by the class and the signatures of the methods in the class other than the accessors and mutators.
      6. A narrative outlining how the design reflects a balance among competing criteria such as low coupling, high cohesion, separation of concerns, information hiding, the Law of Demeter, extensibility, reusability, etc. This should include a discussion of the design patterns used to achieve this balance in the context of expected further product development.
      7. Metric data for the system as submitted for unit 2 and when submitted for unit 3. A discussion of this data and any reflections on what it indicates.
      8. A short reflection on the two strongest and the two weakest aspects of your design.
      9. The team's ideas for extending the design for concurrent paper handling.
    2. A copy of the final PowerPoint presentation.
    3. All the C++ source files required to compile, link, and run your project. A Makefile or script file to rebuild the system must be included.
    4. A Testing directory which contains a set of test input files and files with the associated output generated by the system when each test was executed. In this directory place a file place a spreadsheet TestIndex.xls that lists the name of each test input/output file and provides a short description of the test and the results. In TestIndex.xls tests that pass simply need to be labeled as such; if a test fails provide a description of the nature of the failure. Test output files will be annotated. After capturing the output generated by the implementation into a file open the file in an editor. Add annotations, i.e. comments, to the test output that will guide the reader to understand the results being shown. You can consider this annotation to be what you would say in your response to your instructor's question when reviewing test output, "Describe why you think this works/fails."
    5. A file README.txt that includes any other information the team wishes the instructor to know.
  • Upload the zip file to the myCourses site for this course and section, placing it in the Unit 3 Project folder of Collaborative Files. The title of the submission should be "Unit 3 Project for Team SSX", where SS and X are the same as in step (1) above.
  • The zip file must be submitted by the end of the day on which the presentations for this unit are made. Late submissions will not be accepted; teams are advised to submit something early to ensure they receive at least minimal credit.
  • Note: In Windows/XP you can create a zip file simply by creating a new compressed folder.

    Documentation and Presentation Instructions

    You can find general instructions for your documentation and presentation on the Unit Activities page.

    Revision: 1.2, 2005/03/31 06:18:28