设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8123|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
' ]! y# a& f8 z; L/ P& L
0 w9 T9 u/ A$ [5 d底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
& x0 F8 {7 `. G$ O. [$ x. x0 q: n/ k% _6 X" Z: x6 C6 W
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!6 T9 g' i. ]( j3 ?7 T
  P, U+ z5 \: _5 D# K2 z6 Z
--------------------------------------------) d% {2 n' u3 y& M, K
begin P_something arriving
! S8 z) f3 T" |$ i% G/ a   move into Q_wait
$ j0 k+ r$ y( i   move into nextof(Q_mA,Q_mB,Q_mC)
- \" O( b* ?( J5 l. ?) O   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min' v9 I+ L, {. [: T8 E1 A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# m( U$ w3 m" Q; ^   send to die
* ?$ `9 {! \; send
  b& Q2 H; Q' ~7 U- i
- p% F: j! O# e, _5 \! z
begin P_mA_down arriving6 J" g  d" ]' `8 R' s- N
   while 1=1 do
$ r/ p9 r. }0 O& N# e' C5 x  h$ ]. o   begin* j+ q: ?9 u$ W, T' u
   wait for e 110 min
" \5 v& W6 p/ w# h2 V   take down R_mA
. j' I8 i! M; B, M) {8 p   wait for e 5 min. V% }" W- y6 P8 t8 T( |! |
   bring up R_mA. c1 G  v0 r0 P: a: @5 @" n
   end: G1 S; g3 I  o5 M. o
end
& m) {, z  Y9 H& y& a
- N! W1 i2 D6 E# U& _* Y
begin P_mB_down arriving
0 I  I7 I- t* i& P4 _8 l   while 1=1 do$ m/ V2 u6 w& f' [. ^( e
   begin
7 p. @" g2 X* A- z( ^   wait for e 170 min% C* [3 z3 o+ E' Q/ L, P
   take down R_mB, A. M7 c  g  z2 E8 {6 E1 f" L! g& i
   wait for e 10 min
) e; [0 h! k* B$ v4 S   bring up R_mB
2 [& Z* [; U. Q, V7 [/ o   end
/ a( {6 g" v) Wend

/ J8 x+ u+ O& Q! T& ~: d- R0 {1 ~
+ J6 \, a1 U2 C# a2 ubegin P_mC_down arriving7 f$ \& i% c0 s7 \% v
   while 1=1 do 5 k4 R5 S4 s, h- I) x" ?
   begin
: F$ l3 }) O; S9 E   wait for e 230 min7 K( }0 y2 u6 W# E: W( B7 r- N
   take down R_mC
2 i; a4 q/ `: y# m+ q3 S   wait for e 10 min, `# M( q9 _% G$ B4 e* |
   bring up R_mC1 L: a4 \0 }/ F1 ?4 t9 e
   end* l; Z: @: J4 ]
end

7 X5 s9 ^8 I. l7 x( K- y' }0 q
4 t, o5 }  K; M4 M9 y9 obegin P_mA_clean arriving
. `9 w, [& u" L   while 1=1 do
2 y( I, ^& {% ?! L+ R   begin
! j2 }: E4 c& l) l- }6 W* a   wait for 90 min
, i/ x0 v. G2 \! d+ B& k6 J! I4 ?   take down R_mA4 F' e% m4 s$ u" B
   wait for 5 min9 X0 l( i# Y3 q- e7 J8 P5 f8 f+ D
   bring up R_mA. T% y; w. @1 m1 i8 S( Z1 W* H, U6 h
   end
2 a! b0 I8 f( \3 W$ [8 @end

. O+ I9 K1 v, m- W( s
. o; ]. a" i2 E" ubegin P_mB_clean arriving
6 ~( d' Q( E9 ^( d8 y   while 1=1 do) w6 A' t1 k0 m
   begin
0 j% y0 r$ W  U1 V- t   wait for 90 min5 J8 d% u+ c% q: N7 w+ f* H% T2 z. Z
   take down R_mB( Z3 J  |- f  O! T: o, u, k
   wait for 5 min) h4 S: h" }% N4 |1 m  |
   bring up R_mB
  z; k' A' X8 K' m+ N   end7 j5 d. A. l6 k- p. w9 v6 [
end

% B2 q% x4 F. M1 ]
6 B" S) G% M( o1 K# `0 Lbegin P_mC_clean arriving
' {; Z+ e  E. v# C& }# l   while 1=1 do
4 V% {3 |, N. R2 v+ {% Y2 t- s2 q   begin2 x% [' s) g/ ^
   wait for 90 min" r" m0 o, G, w, x( ?4 B
   take down R_mC5 q" F) r) x2 G
   wait for 10 min
' L0 ?& {4 x+ J3 k. F   bring up R_mC
* f5 C, n6 Q/ V, [& K+ k3 i   end
8 Q- n0 }* y# _% |# T* `# Zend
1 T. A8 I7 W# J7 P
----------------------------------------5 q6 a" L# k# {

  F6 g2 N+ @7 Y* rExercise 5.9) `0 w% p; e) T" _9 |7 R: D7 i

6 `6 s: o+ ^9 G: J( q) e0 g8 T5 \5 `: Q6 a0 j2 s
Create a new model to simulate the following system:; E; i% I  M. g: h, G
Loads are created with an interarrival time that is exponentially $ o  A" @* z- V- X5 h" X
distributed with a mean of 20 minutes. Loads wait in an infinite-
2 q$ j/ f' Y% }# ~: U& rcapacity queue to be processed by one of three single-capacity, # y) g- C5 p) K* e# X% R1 [
arrayed machines. Each machine has its own single-capacity queue * |1 K% q" z* {9 @2 T7 ~/ c: [) a
where loads are processed. Waiting loads move into one of the three 3 o, [3 ?  R3 S4 s3 J
queues in round-robin order. Each machine has a normally
! D( R& p6 _( i5 j$ fdistributed processing time with a mean of 48 minutes and a standard
/ Z& A: F3 }. j& E( {& Q* Hdeviation of 5 minutes.) d5 Q' J+ ?4 K& |
The three machines were purchased at different times and have - H7 E0 G. I0 B% d7 l
different failure rates. The failure and repair times are exponentially
: y) [% B* m) m. Z* w1 U  bdistributed with means as shown in the following table:
/ c( d' k) t+ o0 e9 `  JNote The solution for this assignment is required to complete
. o: n# ^+ S" x( S; d+ _( |exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
9 _+ N) |: K8 N& W) l" d6 X/ }your model. + L( B$ W7 S2 M- y

, ]; m# x( {9 IMachineMean time to failMean time to repair
% G9 j' ~/ k+ ~: k2 dA110 minutes      5 minutes, e% T6 ]6 l  }. |$ n" h
B 170 minutes     10 minutes% ~' Q# W* c$ v
C230 minutes      10 minutes. K  ^  h2 U$ e3 T$ T5 H

' p0 |) c7 w& b. hThe machines also must be cleaned according to the following * p; i4 O' \3 o0 R
schedule. All times are constant:
3 ~- |) U0 z+ J) P( q
6 i# I' m6 D5 e" L6 P8 V6 gMachineTime between cleanings Time to clean" H6 ]- n1 M3 {5 U( g
A90 minutes        5 minutes2 g1 p) B" _2 J- t" F
B 90 minutes       5 minutes! X  [1 T; F& l: S9 T! u7 M7 S  \
C90 minutes        10 minutes( S6 l; ^8 E, G. C) b. N( p
, b2 _. d, J2 E. W; a& v, ]5 X
Place the graphics for the queues and the resources. : D$ m% s/ r$ R, q. J! i% v
Run the simulation for 100 days.1 N9 x/ M5 J$ d6 s0 }
Define all failure and cleaning times using logic (rather than resource 9 z9 `" o5 }& i
cycles). Answer the following questions:
& t# |( l, x, ^/ F/ ^  h& ]9 I( ia.What was the average number of loads in the waiting queue?
& p2 k- N/ W1 E# B2 Y5 Qb.What were the current and average number of loads in Space?
+ A% {8 D- [0 H# Z6 C% V- L- k/ B0 UHow do you explain these values?
* I' _/ p. E& X; c# O5 ~

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉' R7 f1 a. }2 n! t6 v
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 H8 J$ U3 [. F/ A- T' w) }% \* O
这行好像也不太对,各位先进觉得如何呢?* y# x4 @+ `! M
. h8 q/ L& D9 I7 ?2 X0 O
begin P_something arriving3 |+ l0 u2 z( j- z3 s2 V
   move into Q_wait
8 X& _  c" Y, U   move into nextof(Q_mA,Q_mB,Q_mC) 3 X- e3 g2 Q& Q. L! p
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min0 F6 B4 b$ k. _) d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ! @' V0 J/ Y- m' I' G, h' v" N( Y
end
: U7 S" [4 T8 w- f0 p, _! S0 `/ a$ L, p! |/ w7 O+ i
begin P_mA_down arriving1 i1 }& S& O0 `' ~& s
   wait for e 110 min
) E/ a$ R( E1 t' `* V) }$ b   take down R_mA& T/ G3 b  e) C( d
   wait for e 5 min
  V" `2 I: S7 O0 p/ J   bring up R_mA6 j" r8 ]& @0 @3 }  c
end
( L, f8 j2 H' I5 n
7 j$ w2 M$ A& j# z. o3 ~# F& R: kbegin P_mB_down arriving) Y. f2 Y2 C0 b
   wait for e 170 min" k. N+ Z4 }0 A+ t) Y% Q2 S$ P
   take down R_mB$ C  R; l/ i$ ?* ]9 W: D
   wait for e 10 min6 Y2 K9 _, ~- J9 X+ T
   bring up R_mB
  {. w/ Q. v; f! t9 l% ~* D, aend  i8 q6 G- Q" G" x
; o2 w; ]) ?9 t2 s; G+ }2 H
begin P_mC_down arriving# l( {( C- H* [( H1 \& g! A' b
   wait for e 230 min( }- }( G; ~. Y3 x( X) X
   take down R_mC
# }9 S4 |% P0 E' ^- W6 e3 f   wait for e 10 min
3 w( U/ K/ O0 c: j- a   bring up R_mC  m$ t; X6 K( @) S3 T+ b0 N
end
, t: ]7 O0 b- j( a, c8 ^  Z4 Z- O
2 D3 B) Q" ~0 F2 r( Abegin P_mA_clean arriving
5 I$ V' _3 ]7 x  ?) Z9 D   wait for 90 min& a1 t% u$ Q' Y
   take down R_mA
/ U, l# `' q* _- M   wait for 5 min
; R5 [7 \5 B; B5 x* w- R   bring up R_mA) X2 y  F) u+ j: H& ?) R3 {
end) q5 D! |, q, m' c

+ \) X/ A5 K* b' Zbegin P_mB_clean arriving+ t' q* C4 X- T
   wait for 90 min5 J9 R: J$ \2 b5 T! S  f
   take down R_mB% z& }; W7 t( G( T; N/ h; l1 F8 k3 }4 f
   wait for 5 min4 B0 @% q+ z' [, V0 C% z% v
   bring up R_mB
4 C- c: m, c) I' b) E! f# {end
1 e1 k3 y+ Z- T! V4 U
0 r6 Q  x+ ^8 D6 w% Tbegin P_mC_clean arriving+ o2 D) ~7 \" p+ k& }$ w; P8 g0 A
   wait for 90 min! e: F3 ?, @! y$ [# {3 t
   take down R_mC2 [5 U2 t/ O0 Q6 j% g
   wait for 10 min
$ r- |1 E* n0 Y9 S7 K9 f9 C   bring up R_mC
* G" `2 g5 y2 b5 Z, W$ Mend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
. C; C# j8 A/ Z$ a* R$ l   move into Q_wait
9 T' B5 o/ W2 r3 l% _- _" S# @   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 ^3 R2 U( l, H* _- o/ e( Z   move into A_w7 ?( g8 d: \  P
   if A_w=Q_m1 then use R_m1 for u 48,5 min& o, ~. i8 |% U& E  T
   else if .....then use ....for u 48,5 min6 O; i! C3 H& y' W/ k; ]
   else if .....then use ....for u 48,5 min  ' ^" q( J) ^) }# S$ S
   send to die# z6 I1 K$ Y, z7 h
end
4 A  C' H+ N: o+ E9 l  }' ?1 x5 j7 e) n5 U. X' I- A7 r
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-13 11:32 , Processed in 0.014481 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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