设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6730|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 6 z0 f; [* |( \
, F' _& T2 I5 N- ]. e" C" U
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
, B0 s& u0 c( |& O3 N. q1 q" \7 Z& R
: Q5 P( n6 ~# t1 \不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!: ^$ h  R3 g; j: Z

1 S/ B9 \1 G0 Y0 X- @0 q
--------------------------------------------/ E% d7 `' v  R/ m( p, O4 g2 u
begin P_something arriving
$ r/ Z8 I; t; M$ o4 C, M$ E   move into Q_wait" K2 N- U- }5 F9 f, p! M3 f
   move into nextof(Q_mA,Q_mB,Q_mC)
7 ?" V' {+ f. F, A* e) y  a   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 J3 T  R$ O7 M* M9 u" l7 ~
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; O% h. j9 \/ d* h' ~5 u   send to die% F2 P& ]1 ^% b. l5 M' F
end
" }  P+ s7 u& A! C! ~, P- k
4 @+ o/ ?0 I" M& e- u9 A; o. P: i5 Z
begin P_mA_down arriving
5 e  u% L. F& d   while 1=1 do " D$ p* b( u% a4 z( @$ Y+ \
   begin
. D* [4 Z9 v7 _- \0 W2 C   wait for e 110 min4 x% U0 s/ ?, g. C
   take down R_mA
. o9 X( l2 K6 P0 J6 D- P4 p   wait for e 5 min9 O/ F3 z0 @) P( N2 U4 X7 a1 L
   bring up R_mA; b8 [& ?7 @4 h  y7 X' W! ~
   end+ M; {$ h1 @; I' f) I
end
* g3 {% X) X: |, n

  T& t5 ?1 a! W4 i6 v, |begin P_mB_down arriving
+ H8 J$ W5 ^* l: [   while 1=1 do) a7 B" Y& y' q; e* C6 p' W
   begin- b7 W" r7 N) d
   wait for e 170 min
. `: z6 `3 q9 e7 ]7 S# D   take down R_mB
7 B0 U# h& v3 N! k   wait for e 10 min7 K/ e- K" w1 @& {3 c* x/ h
   bring up R_mB7 N) |5 Q$ @& d" Y5 s
   end* M3 _( h  E8 N3 {
end
/ J/ [- B8 Y3 {8 r7 }/ t

2 ?6 W& M; z' u$ F2 \begin P_mC_down arriving( ?. O/ }6 U# ^7 |* ]: p
   while 1=1 do
  f5 G8 b" `6 s- {+ d   begin
5 z: O2 H; v& @9 W" k# \2 B  E   wait for e 230 min& _+ ]- e# j/ b. b2 h
   take down R_mC
5 E1 W% F& @9 x, J& R1 h, @3 H9 m# l   wait for e 10 min- ]7 }  [2 I: o: D9 c
   bring up R_mC
1 P+ O: y4 M4 O7 x2 x   end( O. _3 K2 H3 u  j6 M
end
( K1 A* e3 J, P# ?# h; j

! S: B# e( k3 @4 P7 m0 O. ~begin P_mA_clean arriving
$ |& v2 a2 {4 w; i+ @6 F   while 1=1 do
# t! I. ?3 M$ w1 E   begin3 }* \2 E+ j/ L) p  @5 \- G! w+ n
   wait for 90 min$ p2 t( C' h& I6 D2 L
   take down R_mA
+ x+ _* N' o% M# O   wait for 5 min
& O/ o) X+ \2 R1 A9 I' o   bring up R_mA# S" m7 b( D* R1 E* i+ r8 u
   end+ q! @0 v" V. o5 C9 e
end
* w& P/ w( `( U8 T' L/ E5 z

% H$ ~8 g/ I; Jbegin P_mB_clean arriving
! d2 e9 F5 {* O+ l# N5 i; ], J, K   while 1=1 do5 L: G/ x4 u8 h, p/ x
   begin3 E+ g$ c# Y% T3 w, V/ i
   wait for 90 min
6 L. `1 v6 x; Y1 n7 c( T; R: m   take down R_mB
) g7 y# y8 v. f  P' U5 A3 I   wait for 5 min2 c; A' W0 E( i  q% j
   bring up R_mB
/ E- ~" H4 W% ~5 x5 I   end) g9 H& y" Z3 E% Q, y
end
) S9 s7 H( ?1 Z, E, F

% K. {6 o! R% R9 R9 tbegin P_mC_clean arriving) C8 V& }$ a- m( b( ]
   while 1=1 do
8 D( u" L5 ^3 N: N3 P; w+ f   begin. _. G" P. a. G/ A- ^  i
   wait for 90 min5 w( M" a% @- r: l" `( w
   take down R_mC
' ~: x  L# q. ~9 ^! K& w$ U8 v   wait for 10 min  d) p' x  x% b/ \
   bring up R_mC
& G: A* C; I8 |6 q! h; N   end
( k2 ~5 o+ X+ Z. v% z- B) Hend
; J- o/ R5 m: f! }4 n# Z
----------------------------------------
) Y0 }3 M: Q' a8 Z
$ t( w1 Y1 ^. ]9 {" W' |$ P- _Exercise 5.9. I8 c* N# y% _3 M6 T: m
  ^( t5 D3 i- Y+ d  W; i- w/ K

! ]* J3 _; i- O. s' ^Create a new model to simulate the following system:. G. i( R0 `5 J0 c" T* g  a
Loads are created with an interarrival time that is exponentially 1 d$ s0 ~2 D* R) u3 {# c
distributed with a mean of 20 minutes. Loads wait in an infinite-$ M+ Q. L% }( V1 R9 u' }
capacity queue to be processed by one of three single-capacity,
0 s. N% y7 `/ f% oarrayed machines. Each machine has its own single-capacity queue 0 v3 {0 q7 f- G& ]- i
where loads are processed. Waiting loads move into one of the three
$ t' x5 X. }/ u. S5 K) y. Aqueues in round-robin order. Each machine has a normally
- `3 T! A. w' {8 t" Vdistributed processing time with a mean of 48 minutes and a standard 5 F0 t6 u  L- d& F
deviation of 5 minutes.
' Q2 U' P5 X% C1 }; {. O' u, fThe three machines were purchased at different times and have 1 J: |4 I/ D8 X
different failure rates. The failure and repair times are exponentially
- Q0 X3 S1 {# O" n8 k; Mdistributed with means as shown in the following table: ) {& C% C& ?6 l* k' g
Note The solution for this assignment is required to complete 8 p- g/ n! g5 i( A
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
" F. K! u" }6 x1 o8 u7 {your model.
# h6 u) }8 F; \7 x" e
$ z( i5 L- N+ ^$ O: jMachineMean time to failMean time to repair7 O7 v! a9 l. h# S1 t3 r
A110 minutes      5 minutes
8 Y6 s7 X5 d9 vB 170 minutes     10 minutes1 R6 q, N1 a+ x( A! y/ f
C230 minutes      10 minutes
3 W8 s" w1 _5 E+ h
5 H  X% e2 o7 mThe machines also must be cleaned according to the following / }9 F3 D) n. d* a: H
schedule. All times are constant: ( c0 |# k$ ]% h7 Y) ]9 F$ E
' r. r0 V% h+ I3 }) c0 W
MachineTime between cleanings Time to clean
) X* J/ d# s& \2 LA90 minutes        5 minutes4 n) Y4 _! Q* g
B 90 minutes       5 minutes
. _' }0 \" B& b4 b; L. d2 wC90 minutes        10 minutes
: `  V8 |# G8 \+ g  R# P, `5 L% R' n% M! j) k& \
Place the graphics for the queues and the resources. 2 P) O5 K- y2 r8 X, _, M
Run the simulation for 100 days.) J% s7 z, t$ p' D4 B
Define all failure and cleaning times using logic (rather than resource 5 z2 s& W% O% H! l2 J7 ^: m
cycles). Answer the following questions:* J! K8 L. \6 s& E
a.What was the average number of loads in the waiting queue?
$ X, q# l( e7 V) U4 I, db.What were the current and average number of loads in Space?
8 J0 o; Y  v2 k8 l: s, p: HHow do you explain these values? 5 ?% Y& y( Y: y

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉5 U; a2 @6 ?9 c1 q7 q$ l5 ^
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! x9 E8 D+ i6 e这行好像也不太对,各位先进觉得如何呢?; A# e( r( B; D( t5 i

5 H! S: K( C$ s0 M& [begin P_something arriving
0 u9 P1 D7 a$ V, z  n4 b   move into Q_wait1 F5 {3 _6 Y" q7 p
   move into nextof(Q_mA,Q_mB,Q_mC)
, R" \$ Y- O! c& ?2 o6 }3 e   use nextof(R_mA,R_mB,R_mC) for n 48,5 min% b8 O5 h; e! `
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ e) f! w6 B: M+ W2 r  ^9 a% K
end
' b2 c+ d6 L) Z+ N. R6 t# ~" w6 v3 O) l0 p- B+ s+ [9 d0 \0 @
begin P_mA_down arriving( n& ~" w' p7 y5 e  L7 Q+ q' m
   wait for e 110 min
5 z. h% M& y  i8 v   take down R_mA. J5 }0 g3 ^# Y" ^2 z8 b  I
   wait for e 5 min
9 |: N7 L% f4 ]0 L8 u* @   bring up R_mA
1 Q1 k" `% C9 r1 send
, @. ^: O/ j! c
4 K5 s$ n+ T+ r7 X. k% Y3 ]6 @/ R! Nbegin P_mB_down arriving6 y  z* B6 _7 K. A4 y! T
   wait for e 170 min
7 o. W6 u) I6 M+ H( q$ p   take down R_mB
' o$ k% g. i" }6 \0 c   wait for e 10 min$ V+ W! b! w& h% i' s3 J, T
   bring up R_mB3 M' _9 q! J% D# j
end
7 @/ \9 M! N8 ^/ E  c6 d
3 i3 o" J) Q" N0 _8 z' F7 v/ |8 @begin P_mC_down arriving  |, n. K# s, M% o$ B  o
   wait for e 230 min
3 i/ X* N  s5 m% V- C   take down R_mC
  j1 ~+ t; d& J; r& ~. Z   wait for e 10 min
, z9 G! V# f$ O   bring up R_mC
$ J& m$ x% q3 tend
$ r* L5 o9 Z0 B# G: W3 A4 Y, G
+ _5 P4 |( P, v) ibegin P_mA_clean arriving0 I/ `+ b4 z; B) Y
   wait for 90 min
$ v& d- u0 w* w" M" c$ ?2 l   take down R_mA0 [3 k+ t" O' }
   wait for 5 min* j3 D0 d. F# k1 L! ]( e+ t! H; A
   bring up R_mA* O& K" a( S! j0 E
end, p& F, a: `; [: O
7 F* x5 d1 E. v) d% c/ x* ~
begin P_mB_clean arriving
& z; o% U- L$ w/ t   wait for 90 min0 g- E) q  Y- @' Z
   take down R_mB+ l+ T8 L  T, Y* h
   wait for 5 min0 e9 F0 [, a: W6 N
   bring up R_mB
6 `$ G  j/ g" ^1 Z; J6 p# }9 send
- l( L& C8 F+ y! `# j: O& ]1 ^& Q+ V; f
begin P_mC_clean arriving4 o8 v5 B9 M9 p0 [/ E
   wait for 90 min: s  R. c/ }3 q/ ]0 F
   take down R_mC- o6 ~' e! ^  U4 n% j0 s
   wait for 10 min! J" l2 J: H1 }, d8 Y
   bring up R_mC" A& Y% f/ t+ m4 k( k3 l
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving; o4 V: D2 x2 P; X4 Y/ j0 \1 \0 n
   move into Q_wait
( J3 q% J9 G6 D% q   set A_q to nextof(Q_m1,Q_m2,Q_m3)1 I! P. h3 f( F7 |! ~
   move into A_w
% k5 o3 r5 ~% q   if A_w=Q_m1 then use R_m1 for u 48,5 min/ S" w$ H0 M/ H6 A
   else if .....then use ....for u 48,5 min; f" p  S7 v2 _" i5 p# G& V+ p
   else if .....then use ....for u 48,5 min  4 C8 q7 U1 P2 S' b' @9 M
   send to die
3 N4 V( y+ d( @; R+ R+ m4 k% pend5 y/ c5 P' \7 X0 t
' E7 j; R" d* K# Z2 K. v/ B% b
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-19 03:31 , Processed in 0.011947 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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