设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7190|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ c- x% D. N8 c+ B- Q6 p; Q, U6 v. D' _9 v5 I: l( v3 C
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去( M9 u( p6 K/ A7 ]% `
4 v) q2 {2 p, O
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!7 f1 d9 R- L. O, L& s1 R
5 o: T* ^& n5 t, `0 X6 b' |6 q
--------------------------------------------
# y2 \9 Q5 h% Z. J1 |' d2 sbegin P_something arriving( s- e# J0 ?6 |2 d( E( w
   move into Q_wait
0 x' U% X/ e. W   move into nextof(Q_mA,Q_mB,Q_mC)
6 ~, ^4 `& S/ S% v& i   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min& F& D0 ]) H4 s
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), }, s7 \' Z# W  |
   send to die, j: c! v: V2 w
end
! r5 C" x' X0 ^! o+ t6 o
, f. x. d; {1 M/ d
begin P_mA_down arriving
+ e: b1 w1 [9 z  R3 v* w4 R   while 1=1 do
+ W% j* U6 p3 P  N7 R   begin
% O, |! ~! T8 h% r# I6 D   wait for e 110 min7 [: @( h. X% o1 j1 v0 L- W
   take down R_mA6 Y: P! Q- \9 g* G2 M4 u3 O/ [
   wait for e 5 min
- x7 Z' ^! U" K, D3 x   bring up R_mA- ^+ y2 M- D& m9 m1 e6 S# N/ |
   end
: h" r  k# B4 G5 eend

0 S( d$ Q4 w2 B5 y2 m. V# Q + u: B0 F! D" [/ n* `8 T
begin P_mB_down arriving1 Y  B: E+ d+ V+ l. _! E+ {- u; Q
   while 1=1 do4 o9 s0 ?# K, o" \, X) j
   begin5 p  M+ t5 i. E* w2 ~5 Y
   wait for e 170 min8 H: p! y/ C+ w8 v
   take down R_mB* O, @8 m9 ^- P! m6 B" Q
   wait for e 10 min4 g% E& Q0 Q0 ^4 I0 z+ i6 O! X
   bring up R_mB
# V8 d! e7 Z9 b( c7 {   end; v9 A# q% j' d( O/ C* f' i
end
; b. I! t9 A9 v, g

0 @5 @, Z2 l8 n2 p$ D4 v3 Cbegin P_mC_down arriving
. D4 q) _* w2 W   while 1=1 do - `! _4 V5 H$ w. F( J# F  ~: f
   begin% S; M9 q; ?! r! F& I& t/ K
   wait for e 230 min
3 l- z5 b' Q5 [, `9 k   take down R_mC
/ E9 R# N# U6 R4 F! i   wait for e 10 min
! j. o5 o$ z  O" V2 k& H+ u! O   bring up R_mC8 M3 `8 X$ t$ \5 [2 K/ h2 e5 J
   end
: B. t4 X* m% L/ [- B( G' Xend
! p* C+ s1 a4 q8 j8 N$ t9 b
, I. y% B* G6 C. L
begin P_mA_clean arriving& Q. K2 O$ y! G& J3 ^
   while 1=1 do: I# y! v# P0 i/ t% Z2 k" z4 d
   begin
; B5 b( e7 M: u. n+ O! y' |7 W& @+ i. H   wait for 90 min' v! z" s  f$ t$ V
   take down R_mA
% X7 Q5 H& f, s* d5 x8 X9 p- T  A5 a   wait for 5 min
, Y1 x! \2 M% A- G% i# N8 h   bring up R_mA5 a' H' i( r( m$ @! ]
   end
% z( z8 b$ F% Pend
& P9 H3 I- ~: q  R9 S

; ^* e1 r+ Q. b. q% Hbegin P_mB_clean arriving
" W3 A+ B' z. }   while 1=1 do
/ t" y# N  ~8 ]9 }3 j   begin5 l4 c. l( m+ O7 F% }2 \7 D
   wait for 90 min$ h  z* X! x3 d( c3 D  V4 w: W
   take down R_mB* b4 ?# c, v" y! F, [2 J1 V* s
   wait for 5 min9 l  K) R% q0 f2 A9 S& O
   bring up R_mB5 {' l- K" q( Z9 r7 i- n8 ]) p/ Y$ _
   end
& j( M' l7 u& a% B5 y9 s. Tend

. A7 a5 Q# ^9 Z' E( [2 ~ 8 K4 O" s7 \/ T2 R+ ?, d+ p: R' N
begin P_mC_clean arriving
: Y& i; b3 T- P8 S   while 1=1 do
' n& `! F3 M* D   begin
5 F+ s( x' }* u% K# J3 R$ j. ]9 t   wait for 90 min
- B; E/ ~% d# h5 ]- b   take down R_mC$ `0 q% C; R& w# N! A  E
   wait for 10 min
( ]9 r8 E7 a! m& H+ z1 [   bring up R_mC" k1 e& w8 E8 e4 a3 ]
   end
9 y! L" K4 d8 x5 \" X2 Mend
! R+ R# T. v* m: I- C* y6 S! g% y
----------------------------------------
& X- c# y) h4 t! ^
# G7 j, z# ~6 Q. P* ~Exercise 5.9+ f$ `3 I% v* p4 y  I- ^" {8 E1 k' ~

& ^% y! c7 u/ J$ Y. q4 A" ~6 }. e* E& {4 d5 j: {' N: L0 {8 V- o
Create a new model to simulate the following system:  D9 @6 Q3 f6 a
Loads are created with an interarrival time that is exponentially , z8 p1 ~9 p( W% f/ D
distributed with a mean of 20 minutes. Loads wait in an infinite-
& X- B" I3 G* y5 t) k0 Mcapacity queue to be processed by one of three single-capacity, " @# t+ y5 N- s8 `# D  U+ V, r+ d. |
arrayed machines. Each machine has its own single-capacity queue . Q8 O* T6 ]" j. _% p7 X6 o* H
where loads are processed. Waiting loads move into one of the three - ]6 Y; ~: o& |3 a
queues in round-robin order. Each machine has a normally
" ]- ^7 i6 r0 {; z# x& udistributed processing time with a mean of 48 minutes and a standard 3 ^- F: s$ h3 Y$ t1 M
deviation of 5 minutes.# A* S7 Y/ N' a5 W( h: p& p/ r
The three machines were purchased at different times and have : P' o' q$ j" K9 D- ?
different failure rates. The failure and repair times are exponentially
7 b! H2 M2 h! E7 {9 mdistributed with means as shown in the following table:
) o9 i2 [: g8 F6 `1 J! ?2 CNote The solution for this assignment is required to complete
- P6 G: r, i9 ]! u7 g+ |exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
+ _; w% K0 ^) ~your model. + j# r! C; o8 @/ m$ k0 l" E
: w7 f" H, O+ w/ b' i
MachineMean time to failMean time to repair
/ D0 Z7 g6 W  n- r' L& SA110 minutes      5 minutes6 j6 @" N. u9 z$ S" E& r! z% f
B 170 minutes     10 minutes4 G/ k) Q( S5 h* ]; L
C230 minutes      10 minutes0 K. F7 V0 A. V, k
: z' `+ a! [8 `6 b; r; H
The machines also must be cleaned according to the following / s* S6 ~: C  Y9 Q/ X( `* W( |
schedule. All times are constant:
, T% i5 }" I7 X( S/ R/ }
4 v8 V+ o# `9 eMachineTime between cleanings Time to clean
1 J: Q5 A* N0 H, k6 ]; JA90 minutes        5 minutes
; q* Q$ ]6 O! A7 n% ZB 90 minutes       5 minutes4 t3 `5 n) \2 X! O; ^
C90 minutes        10 minutes
% d2 a, C# h1 E% P* _6 H& r# @* F. h7 Q0 |0 L( r% h
Place the graphics for the queues and the resources.
/ a- W4 n6 c1 _" F8 O1 xRun the simulation for 100 days.
+ D% j: }' X, `9 s$ @' zDefine all failure and cleaning times using logic (rather than resource
: K  B9 Q- ?! g5 }% L. fcycles). Answer the following questions:
6 ]  {: `# b- e' q# m6 ha.What was the average number of loads in the waiting queue?0 f. i3 @: t/ b. X
b.What were the current and average number of loads in Space? 3 A5 u  b* x) o$ ?" e& J# y* ^
How do you explain these values?
( E% O1 {- Y- n0 M

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉: s; t' C$ I" u, u$ N
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 X5 B# ~- v* f# x( m' G( C) J  X
这行好像也不太对,各位先进觉得如何呢?+ [$ U6 f: I* r: U7 i

* o5 n5 l7 i& l* b8 I7 i) Mbegin P_something arriving5 x9 D, |( h2 A3 r8 X
   move into Q_wait
% U4 N9 a  E6 r9 t& G0 z   move into nextof(Q_mA,Q_mB,Q_mC)
+ ?" \8 Z( G' L& }5 u; k! ^6 r% ^   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
2 R) }' R9 }# Q$ w8 {" w   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
* J% f  V. ?% O: ?4 w5 Send
! w1 _, V) U9 A0 v& f& `! ?5 D; y( T
begin P_mA_down arriving8 f5 s) I7 n: {1 _6 A6 ^/ h6 Y
   wait for e 110 min
; H; S! g( P- q$ r" d9 n   take down R_mA
# P9 `: ]3 I- ]- o   wait for e 5 min
6 X1 N# i  i' a; M9 A1 n+ {2 d   bring up R_mA6 f* D' I0 X, G) G' P& \
end* n9 t5 R  X2 b) {
2 u* T  r5 \( W* B. z# d
begin P_mB_down arriving9 q: Q6 I3 y. Q9 Y# `: ^
   wait for e 170 min
3 f' P" h; Y7 O% I   take down R_mB
3 |9 g3 G7 @0 h   wait for e 10 min3 T! A2 g1 d% U4 A, F
   bring up R_mB" l6 T- K9 X! I, f( s5 i3 [) g
end
8 x% e" {: L, X% n! @. h  I
) E; V7 l* K6 X; v2 r- Pbegin P_mC_down arriving
6 t2 f2 Z+ G! h) ^! o- f) n, f   wait for e 230 min
, _; z* y1 f. R) ]. w; B   take down R_mC; c4 w* F' ?6 S  H0 c; R
   wait for e 10 min6 p) {) t. R' u& v  Q; v
   bring up R_mC# @* p: C* t$ o8 O8 ]
end
( `+ g8 W5 n9 t) X  j) `% _  C( C; U6 _0 O8 P2 f4 Q: P
begin P_mA_clean arriving% c! r" r: T9 q- a% v
   wait for 90 min/ B: b, q; P: M6 q% Q
   take down R_mA
5 N4 y, \/ q6 K, X0 l% Z$ A: G3 \   wait for 5 min
; ]. v/ }# `. ?- e6 O: e1 O; t   bring up R_mA6 `( ]* w8 k3 D0 o# V
end  i  v/ F4 V% I& k$ `) a  p

1 Q+ c. v$ j2 W$ H5 Abegin P_mB_clean arriving
1 D  F3 i9 z* H  U* V   wait for 90 min* s, Z# J- g4 |8 o2 S8 N
   take down R_mB
4 [3 ^4 V: C. y2 M   wait for 5 min
* r: v: P; ~  H5 |7 M  |) h4 U   bring up R_mB
& a! ?! ~4 F" }* tend  P0 Z# e. P* g
! E9 r0 W) u; Z1 Z" W) z* Y
begin P_mC_clean arriving
+ h0 h9 h6 |9 Y   wait for 90 min5 b1 D' @; P$ A  ?6 b; Z5 h
   take down R_mC
' l! U2 _7 p8 q. c3 w2 P   wait for 10 min$ E3 o0 c5 c$ p8 e1 T
   bring up R_mC" E+ H" [, G/ z1 G
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving9 p- K6 j  Z2 `  s2 C) H' @
   move into Q_wait# p& n2 s5 V- `# B3 L- h1 C
   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ q! U3 o, Y9 d; f) W, \$ W
   move into A_w
0 x! [3 M( a- Q& ^$ K- P   if A_w=Q_m1 then use R_m1 for u 48,5 min
+ J! h/ T6 J8 j0 H) M   else if .....then use ....for u 48,5 min
& \, p6 A0 K2 d2 a   else if .....then use ....for u 48,5 min  
! a0 m+ b% u" q) Q+ V   send to die
8 f' g/ h0 U3 Uend
, z  q$ @% _4 y3 M/ k* s2 {2 U3 ~7 B1 I2 Z8 C5 c
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2025-11-13 09:47 , Processed in 0.023677 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表