hey guys
Can I get a little help getting started on this project?
Here is the problem.
-----------------
I am to make a program in ANSI standard C for the following industrial process
For purposes of simplicity, the input to the process can be regarded as a random sequence of units that can be described symbolically as A, B, C and D.
* One unit arrives at the station every time unit.
* At the station is an input selector unit and four manufacturing units. The selector unit operates as follows:
° If the input unit is an A, it passes it to machine 1.
° If the input unit is a B, it passes it to machine 2.
° If the input unit is a C AND the previous unit was a B, then it passes it to machine 2
° If the input unit is a D, it passes it to machine 3.
° If the input unit is a B AND the previous unit was a D, then it passes it to machine 3.
° If the input unit is a C AND the previous unit was a B AND the unit before that was a D, it passes it to machine 3.
° Anything else is passed to machine 4.
* Machine 1 takes 1 time unit to generate an output unit V.
* Machine 2 takes 1 unit to generate an output W if the input was B. If the input was BC, it takes 2 time units and produces an output X.
* Machine 3 takes 3 time units if the input was a D and generates an output Y, but 7 if it was DBC and it produces an output Z.
* Machine 4 takes 5 time units and generates an output T.
* The outputs are queued and an output selector generates a single stream of units. After start-up, there must be one output unit generated every time unit.
-----------------------------
The main issue being how long is each queue to ensure a continuous output?
You may also note that there is no output requirement for DB... I'm guessing thats a mistake in the paper.
Here is my basic idea of how things are gonna work
Diagram of industrial process
My flowchart (its a bit rusty... just a draft)
Let me know if you don't understand something in it.
Where I'm stuck is
1) I need to display/simulate the procedure.
This confuses me... because I cant really display things visually with ANSI standard C right? Unless I just use terminal???
If there is another way to represent whats happening with the program (thats not to difficult to learn), could you please point me in the right direction.
2) The timing system
I'm not really to sure where to start
What should I be looking at to determine the length of each queue to ensure a continuous output?
Any helpful tips would be much appreciated
thanks guys
Can I get a little help getting started on this project?
Here is the problem.
-----------------
I am to make a program in ANSI standard C for the following industrial process
For purposes of simplicity, the input to the process can be regarded as a random sequence of units that can be described symbolically as A, B, C and D.
* One unit arrives at the station every time unit.
* At the station is an input selector unit and four manufacturing units. The selector unit operates as follows:
° If the input unit is an A, it passes it to machine 1.
° If the input unit is a B, it passes it to machine 2.
° If the input unit is a C AND the previous unit was a B, then it passes it to machine 2
° If the input unit is a D, it passes it to machine 3.
° If the input unit is a B AND the previous unit was a D, then it passes it to machine 3.
° If the input unit is a C AND the previous unit was a B AND the unit before that was a D, it passes it to machine 3.
° Anything else is passed to machine 4.
* Machine 1 takes 1 time unit to generate an output unit V.
* Machine 2 takes 1 unit to generate an output W if the input was B. If the input was BC, it takes 2 time units and produces an output X.
* Machine 3 takes 3 time units if the input was a D and generates an output Y, but 7 if it was DBC and it produces an output Z.
* Machine 4 takes 5 time units and generates an output T.
* The outputs are queued and an output selector generates a single stream of units. After start-up, there must be one output unit generated every time unit.
-----------------------------
The main issue being how long is each queue to ensure a continuous output?
You may also note that there is no output requirement for DB... I'm guessing thats a mistake in the paper.
Here is my basic idea of how things are gonna work
Diagram of industrial process
My flowchart (its a bit rusty... just a draft)
Let me know if you don't understand something in it.
Where I'm stuck is
1) I need to display/simulate the procedure.
This confuses me... because I cant really display things visually with ANSI standard C right? Unless I just use terminal???
If there is another way to represent whats happening with the program (thats not to difficult to learn), could you please point me in the right direction.
2) The timing system
I'm not really to sure where to start
What should I be looking at to determine the length of each queue to ensure a continuous output?
Any helpful tips would be much appreciated
thanks guys
Last edited: