You are on page 1of 8

System Analysis of Operation Subsystem Procedure to Easy Conversion to Program

Order
Qty
Operational Subsystem I (0) Draw a system chart of the subject
Order in
Process
Order in
Process
Order in
Process
Order
Qty 0 if I=0
Order
or Not
Order
or Not
(1) Consider time delay
I3 I2 I1 1 if I<>0
I H H
T=T+1
(2) Remove arrows
Carried
Date
Over Qty

(3) Remove state variables
T
Delivered
(4) Remove boundary
On
Qty

C=A+B Hand
C (5) Rearrangement the rests in order of Operation
Sold
E=
Min (C,D)
Qty
E Inventory Inventory
(6) Organize and put these in sequence
G=C-E G G
Demand

Demand

(7) Reversing an order if necessary
F=D-E
Shortage Shortage (8) Put initial conditions and cycle
F F

[Day]
(9) Convert to program statements
G=50 -1- -2-

From Operation Subsystem to Program (1) From Operation Subsystem to Program (2)
Order Order
(1) Consider time delay Qty (2) Remove arrows Qty
I I
Operational Subsystem Operational Subsystem
Order in I3=I2 Order in I2=I1 Order in I1=I Order Order Order Order in I3=I2 Order in I2=I1 Order in I1=I Order Order Order
Process Process Process Qty 0 if I=0 or Not or Not Process Process Process Qty 0 if I=0 or Not or Not
I3 I2 I1 1 if I<>0 I3 I2 I1 1 if I<>0
T=T+1 I H H T=T+1 I H H

Carried Carried
Over Qty Over Qty
Date A Date A
B= I3 A=G B= I3 A=G
T T
Delivered On Delivered On
Qty Hand Qty Hand
C=A+B C=A+B
B C B C
Sold Sold
E= E=
Qty Qty
Min (C,D) Min (C,D)
E Inventory Inventory E Inventory Inventory
G=C-E G G G=C-E G G
Demand Demand Demand Demand
D D D D
Shortage Shortage Shortage Shortage
F=D-E F F F=D-E F F

[Day] [Day]

G=50 -3- G=50 -4-


From Operation Subsystem to Program (3) From Operation Subsystem to Program (4)
Order Order
(3) Remove state variables Qty (4) Remove boundary Qty
I I
Operational Subsystem
I3=I2 I2=I1 I1=I Order I3=I2 I2=I1 I1=I Order
0 if I=0 or Not 0 if I=0 or Not
1 if I<>0 1 if I<>0
T=T+1 H T=T+1 H

Date Date
B= I3 A=G B= I3 A=G
T T

C=A+B C=A+B

E= E=
Min (C,D) Min (C,D)
Inventory Inventory
G=C-E G G=C-E G
Demand Demand
D D
Shortage Shortage
F=D-E F F=D-E F

[Day]

G=50 -5- G=50 -6-

From Operation Subsystem to Program (5) From Operation Subsystem to Program (6&7)
(6) Organize and put these in sequence (7) Reversing an order if necessary
T=T+1 G=50 (5) Rearrangement the rests in
I1=I B= I3
order of Operation
Date
I2=I1 I3=I2
T
I1=I I3=I2 I2=I1

B= I3 I1=I
I2=I1
A=G A=G
I3=I2
C=A+B C=A+B
B= I3 A=G
D D
C=A+B Demand E = Min (C,D) E = Min (C,D)

Order F=D-E F=D-E
Qty E = Min (C,D) G=C-E G=C-E

G F G F
H=0 (I=0) 1 ( I<>0) G=C-E F=D-E
I I
Order
Inventory Shortage H=0 (I=0) 1 ( I<>0) H=0 (I=0) 1 ( I<>0)
or Not
H G F
H H
-7- -8-
Effect of Operation Reversing From Operation Subsystem to Program (8)
(8) Put initial conditions and cycle
Example : Order quantity=20
G=50

T=T+1
Operation 1st 2nd 3rd 4th 5th
I1=I T
I1=I 0 20 0 0 0
I2=I1 I2=I1 0 20 0 0 0 B= I3
I3=I2 I3=I2 0 20 0 0 0
I3=I2 C=A+B
B=I3 0 20 0 0 0
B=I3 D
Input I 20 0 0 0 0 I2=I1

I1=I E = Min (C,D)


Reversing
an order operation A=G F=D-E

G=C-E
Operation 1st 2nd 3rd 4th 5th
B=I3
B=I3 0 0 0 0 20 G F
I3=I2 I3=I2 0 0 0 20 0

I2=I1 I2=I1 0 0 20 0 0
H=0 (I=0) 1 ( I<>0)
I1=I 0 20 0 0 0
I1=I
Input I 20 0 0 0 0 H

-9- -10-

From Operation Subsystem to Program (9) From Operation Subsystem to Program (10)
(9) Convert to program statements (10) Convert from Basic to Excel-VBA
Dim A, B, C, D, E, F, G, H, I, I1, I2, I3, T As Integer
G=50
Sub Initial( )
G=50 G=50 C=A+B C=A+B G = 50
T=T+1 End Sub
T=T+1 T=T+1 D INPUT D PRINT T; “th day” Sub NextDay( )
B=I3 T=T+1
T PRINT T E = Min (C,D) If C < D Then E = C Else E = D Cells(T + 1, 1) = T
I3=I2
B = I3
B= I3 F=D-E F=D-E I2=I1 I3 = I2
B=I3
I1=I I2 = I1
I3=I2 G=C-E G=C-E I1 = I
I3=I2 A=G A=G
I2=I1 I2=I1 G F PRINT G , F C=A+B C=A+B
INPUT “ Demand” ;D D = Val(InputBox("Demand "))
I1=I I1=I I INPUT I Cells(T + 1, 2) = D
If C < D Then E = C Else E = D If C < D Then E = C Else E = D
A=G H=0 (I=0) 1 ( I<>0) F=D-E F=D-E
A=G IF I=0 THEN H=0 ELSE H=1
G=C-E
G=C-E Cells(T + 1, 3) = F
H PRINT H PRINT ”Shortage=”;F,”Inventory=”;G Cells(T + 1, 4) = G
INPUT “Order Quantity”;I I = Val(InputBox("Order Quantity "))
Cells(T + 1, 5) = I
[NextDay] IF I=0 THEN H=0 ELSE H=1 If I = 0 Then H = 0 Else H = 1
PRINT “Order or Not=”;H Cells(T + 1, 6) = H
-11- End Sub -12-
What is Input and Output in Operation Subsystem ? What is State Variables in Operation Subsystem ?
Order Order
Input Qty Qty
Operational Subsystem I Output Operational Subsystem I
Order in Order in Order in Order Order
Order in Order in Order in Order Order Order Process Process Process Order
0 if I=0 Qty 0 if I=0 or Not
Process Process Process Qty or Not or Not I3 I2 I1 or Not
I3 I2 I1 1 if I<>0 I 1 if I<>0 H
T=T+1 I H H T=T+1 H
Carried
Carried
Over Qty
Over Qty A
Date A Date
T T
Delivered
Delivered On Qty Demand
Qty Hand D
C=A+B B C=A+B
B C Output Sold
Sold
E= E= Qty
Qty
Input Min (C,D)
Inventory Inventory
Min (C,D) E Inventory
Inventory
E G
G=C-E G G 需要数 G=C-E G
Demand Demand Demand

D D D
Shortage
Shortage Shortage Shortage
F=D-E F=D-E F
F F F

[Day] Output [Day]

-13- -14-

System Analysis of Accounting Subsystem System Analysis of Accounting Subsystem


using a System Charting Method using a System Charting Method
Carried Delivered Sold Cum. Order or Order
Date On Hand Demand Shortage Inventory
over Qty Quantity Quantity Inventory Not Quantity
A=G(-1) B=I(-4) C=A+B D(2-12) E=Min(C,D) F=D-E G=C-E ΣG H(0or1) I
1 0 50 50
2
3
0
0
Accounting Subsystem
4 0
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 Cumula-
What wanted to know
Total tive cost
Is Cost
X10 X1 X50

Total cost + + +=
state variable Cumula-
tive cost

-15- [Day] -16-
System Analysis of Accounting Subsystem System Analysis of Accounting Subsystem
Shortage Carrying Ordering
cost/unit cost/unit cost/order
SC IC PC
Accounting Subsystem Accounting Subsystem
Ordering
cost/order
PC Ordering
K = PC*H cost
Order Order K
or Not or Not
H H

Carrying
cost/unit
IC Carrying Daily
L = IC*G cost N = K+L+M cost
L N
Inventory Inventory
G G

Cumula- Shortage Cumula- Cumula-


tive cost cost/unit P = P<-1>+N tive cost tive cost
P SC P P
Shortage
M = SC*F cost Cumula-
M tive cost
Shortage Shortage P<-1>
F F
[Day] [Day]

From Accounting Subsystem to Program (1) From Accounting Subsystem to Program (2)
Shortage Carrying Ordering Shortage Carrying Ordering
cost/unit cost/unit cost/order (1) Consider time delay cost/unit cost/unit cost/order (2) Remove arrows
SC IC PC SC IC PC
Accounting Subsystem Accounting Subsystem
Ordering Ordering
cost/order cost/order
PC Ordering
PC Ordering
K = PC*H cost K = PC*H cost
Order Order K Order Order K
or Not or Not or Not or Not
H H H H

Carrying Carrying
cost/unit cost/unit
IC Carrying Daily
IC Carrying Daily
L = IC*G cost N = K+L+M cost L = IC*G cost N = K+L+M cost
L N L N
Inventory Inventory Inventory Inventory
G G G G

Shortage Cumula- Cumula- Shortage Cumula- Cumula-


cost/unit P = P<-1>+N tive cost tive cost cost/unit P = P<-1>+N tive cost tive cost
SC P P SC P P
Shortage Shortage
M = SC*F cost Cumula- M = SC*F cost Cumula-
M tive cost M tive cost
Shortage Shortage P<-1> Shortage Shortage P<-1>
P<-1> = P P<-1> = P
F F F F
[Day] [Day]
From Accounting Subsystem to Program (3) From Accounting Subsystem to Program (4)
Shortage Carrying Ordering Shortage Carrying Ordering
cost/unit cost/unit cost/order (3) Remove state variables cost/unit cost/unit cost/order (4) Remove boundary
SC IC PC SC IC PC
Accounting Subsystem

K = PC*H K = PC*H
Order Order
or Not or Not
H H

L = IC*G N = K+L+M L = IC*G N = K+L+M


Inventory Inventory
G G

Cumula- Cumula-
P = P<-1>+N tive cost P = P<-1>+N tive cost
P P
M = SC*F M = SC*F
Shortage Shortage
P<-1> = P P<-1> = P
F F
[Day]

From Accounting Subsystem to Program (5&6) From Accounting Subsystem to Program (9)
(9) Convert to program statements
Shortage Carrying Ordering
(5) Rearrangement the rests in order of Operation Shortage Carrying Ordering
cost/unit cost/unit cost/order (6) Organize and put these in sequence cost/unit cost/unit cost/order PC = 50 : IC = 1 : SC = 10
SC IC PC SC IC PC
(7) Reversing an order if necessary H=Val(InputBox(”Order or Not”))
Order Order
Inventory Shortage (8) Put initial conditions and cycle Inventory Shortage
or Not or Not G=Val(InputBox(”Inventory”))
H G F H G F
F=Val(InputBox(”Shortage”))

K = PC*H K = PC*H K = PC*H

L = IC*G L = IC*G L = IC*G

M = SC*F M = SC*F M = SC*F

N = K+L+M N = K+L+M N = K+L+M

P = P<-1>+N P = P<-1>+N P = P<-1>+N


P = P+N
P<-1> = P P<-1> = P P<-1> = P

Cumula- Cumula-
tive cost tive cost Print ”Cumulative cost=”;P
P P
From Accounting Subsystem to Program (10) What is Input and Output in Accounting Subsystem ?
Dim F, G, H, T As Integer Shortage Carrying Ordering
(10) Convert from Basic to Excel-VBA Dim K, L, M, N, P, PC, IC, SC As Integer cost/unit cost/unit cost/order (Initial) Input
SC IC PC
Sub Initial() Accounting Subsystem
PC = 50 : IC = 1 : SC = 10 PC = 50 : IC = 1 : SC = 10
End Sub Ordering
cost/order
PC
Sub NextDay( ) Input Ordering
cost
K = PC*H
T=T+1 Order Order K
Cells(T + 1, 1) = T or Not or Not
H=Val(InputBox(”Order or Not”)) H H
G=Val(InputBox(”Inventory”)) H=Val(InputBox(”Order or Not”))
G=Val(InputBox(”Inventory”)) Carrying
F=Val(InputBox(”Shortage”)) cost/unit
F=Val(InputBox(”Shortage”)) IC Carrying
Input L = IC*G cost N = K+L+M
Daily
K = PC*H cost
K = PC * H L N
L = IC*G L = IC * G Inventory Inventory
M = SC*F M = SC * F G G Output
N = K+L+M N=K+L+M
P=P+N Shortage Cumula- Cumula-
P = P+N cost/unit P = P<-1>+N tive cost tive cost
SC P P
Cells(T + 1, 7) = N Input Shortage
cost Cumula-
Print ” Cumulative cost =”;P Cells(T + 1, 8) = P M = SC*F
M tive cost
End Sub Shortage Shortage P<-1>
F F
[Day]

Connection of Subsystems Operational and Accounting Subsystems


Order Shortage Carrying Ordering Order Shortage Carrying Ordering
Qty cost/unit cost/unit cost/order Qty cost/unit cost/unit cost/order
I SC IC PC I SC IC PC

Operational Subsystem Accounting Subsystem


Order Order Order
or Not or Not
I3 I2 I1 I H or Not
H Ordering I3 I2 I1 I H Ordering
H cost K cost K
Ordering Ordering
cost/order cost/order
A PC A PC
Inventory
C G G Inventory
C Inventory
G Carrying Daily G Carrying Daily
B E cost cost
B E cost cost
Carrying L N Carrying L N
Shortage cost/unit費 cost/unit費
D F F IC D IC
Cumula- Cumula- Cumula- Cumula-
tive cost tive cost tive cost tive cost
Shortage Shortage
F P P F P P
Shortage Cumula- Shortage Cumula-
Demand cost tive cost Demand cost tive cost
D Shortage M P<-1> D Shortage M P<-1>
cost/unit cost/unit
SC SC

Operational and accounting subsystems


What Happens by Connection ? From Accounting Subsystem to Program (11)
(11) Add statements to operational subsystem
Shortage Carrying Ordering
cost/unit cost/unit cost/order PC = 50 : IC = 1 : SC = 10
SC IC PC
Order H=Val(InputBox(”Order or Not”))
Inventory Shortage
or Not G=Val(InputBox(”Inventory”))
Input for accounting subsystem G F
H F=Val(InputBox(”Shortage”))
are not necessary
K = PC*H K = PC*H
Order
Inventory Shortage
Connection or Not
G F
L = IC*G L = IC*G

M = SC*F M = SC*F
H=Val(InputBox(”Order or Not”))
G=Val(InputBox(”Inventory”))
N = K+L+M N = K+L+M
F=Val(InputBox(”Shortage”)) P = P<-1>+N
P = P+N
P<-1> = P

Cumula-
tive cost Cells(T + 1, 7) = N
P Cells(T + 1, 8) = P Print ”Cumulative cost =”;P

Input and Output for Operational and Accounting Subsystems


(Initial) Input
Order Shortage Carrying Ordering
cost/unit cost/unit cost/order
Qty Input SC IC PC

Order
or Not
I3 I2 I1 I H Ordering
cost K
Ordering
cost/order
A PC
C Inventory
G Carrying Daily
B E
Carrying
cost
L
cost
N
Out

cost/unit費 put
IC
Cumula- Cumula-
tive cost tive cost
Shortage
F P P
Shortage Cumula-
Demand cost tive cost

D Input Shortage M P<-1>
cost/unit
SC

Operational and accounting subsystems

You might also like