Machine Problem 5, due Apr 18

Part of the homework for CS:2820, Fall 2015
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Write a Java class SimulationOutput, in file SimulationOutput.java that can create an appropriate output for the neuron network.

This file will be incorporated into the solution for MP4, after the following changes are made to that solution:

Your new class must have a static method called SetOutput(sc). This method should:

Your new class should implement a logical process that outputs the summary of neuron activity periodically, and it should control the termination of the simultion.

Here is an example neuron network description (an extended version of the format used for MP4). This simple neuron network contains a clock that ticks periodically until a second neuron (responsible for counting the ticks) turns off the clock, causing activity in the network to terminate.

neuron CLOCK 10.0 11.0
synapse TICK CLOCK CLOCK 1.0 11.0

neuron COUNT 10.0 0.0
synapse - CLOCK COUNT 0.5 7.0
synapse - COUNT TICK  0.4 -0.6

output 15 100

Given this input, the output might look something like this:

 CLOCK COUNT
   |=    |
   |-    |-
   |=    |-

In this output format, each neuron is allocated a 6 character column. The names are truncated to 5 characters so that at least one blank space separates names. After the heading line, the output for each neuron reports whether the neuron fired during the current interval:

This output format approximates the kind of strip-chart or oscilloscope display of neural activity that neurophysiologists were accustomed to in the 1950s and 1960s. When computers with graphics display screens came into use in the mid 1960s, every effort was made to continue using the same display format, and this format continues to be used in modern scientific publications about biological neuron networks.

Grading Criteria: As usual, your code will be graded on style and clarity as well as function. Comments must be effective and adequate. Ideally, a reader familiar with Java should not be able to tell what code you wrote without looking at comments indicating authorship.

Submission: Your solution should consist of a single file containing class SimulationOutput.

To submit your solution, make sure it is in a file called SimulationOutput.java

[HawkID@serv16 ~/project]$ submit SimulationOutput.java
Course (22C:016 would be c_016): CS2820
Possible submit directories for /group/submit/CS2820 are:

The dialogue continues as in MP1, except that the submit directory for this assignment will be named mp5 instead of mp1