设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6763|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
* u6 a6 M' Z. a* V0 n
3 I' p! I' L/ s8 d7 o底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去9 m5 S7 g+ F1 w* x
* z" \; Z8 H  s2 k5 y  [* m9 U9 Y
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!' y" \  B3 J7 u: D

  c. j" @' q8 c! A( \
--------------------------------------------
' ~9 |7 f: ^+ i$ ]- vbegin P_something arriving% F; W, F( r' B
   move into Q_wait  }* N& M; o- g( Y5 K
   move into nextof(Q_mA,Q_mB,Q_mC)& L5 S! d& ?2 M; f8 B0 i
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
* v2 ^7 R; _: r& [; t   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). e* U- e9 K6 {
   send to die4 F# T) j( E7 {" Z/ [
end
. z! Q+ a5 r" b% g! u# o9 e, q
8 g/ u, B# }( E8 ~9 p0 v' n2 x; X
begin P_mA_down arriving
; q: k7 R  n: ~   while 1=1 do
0 X7 a2 j# y, B" n4 S1 n+ U   begin
& ?2 \8 X6 |8 a6 Y3 R   wait for e 110 min5 T- z$ m2 s& L& ]
   take down R_mA% V4 G) H; g; ~' I2 [& y; G
   wait for e 5 min! k' [0 z' O2 P& F
   bring up R_mA6 q( d8 C. t# v5 m5 s' }
   end
. ?6 h6 n6 ]5 R; y0 |  oend
( x. n* r. L: z* @  ~

" C6 Z6 N7 G5 b( U; t  Dbegin P_mB_down arriving7 q# J5 n. _" h2 o' L
   while 1=1 do: v+ G) Y/ z; g, G# D
   begin
) h! a. {3 t: Z7 v   wait for e 170 min( K1 ^5 d/ S% D  n" _. `5 o
   take down R_mB2 n( g9 I8 @* y8 ]
   wait for e 10 min
. b- X$ X- m) U0 m   bring up R_mB* e1 A* E& k3 W
   end
4 V1 L1 `2 j, }- U3 e+ mend
! |0 N6 ^  B% c" @2 ^
* n, ?0 B. j6 C7 i
begin P_mC_down arriving
1 v& \# C4 k2 }' J% R   while 1=1 do
* m( L+ M; ^; A9 C$ b   begin6 y; k3 U& Y  p$ j
   wait for e 230 min  }; R9 V1 Q! {8 n* o! S" F8 U
   take down R_mC
4 J( C# b/ J! Q0 p# y   wait for e 10 min1 J+ m/ h  A# R! z$ M7 v: B( a
   bring up R_mC+ A4 B5 R' d* ]* o" w
   end
, b; P8 _% N1 U% M1 \. bend

3 ]. W: L2 R! c% J2 f# D5 ?1 N
  O7 W% @7 z/ x& m3 u7 C9 Dbegin P_mA_clean arriving1 V3 c$ i) b  z( t5 X2 X
   while 1=1 do
' y- E% m' O6 N   begin
) R& g$ P4 ?: Q- b   wait for 90 min
/ `/ T- `" a( ?# G- l2 q   take down R_mA
& z% d6 |& f  Y  M   wait for 5 min$ }" O$ z) w* d0 z& C) M4 @/ V, d
   bring up R_mA6 P+ U! ^* E  a4 Z
   end
) p( n5 L  x; L: E4 A$ [/ R; zend

. F% ?) g- l1 [( h, N3 E/ ]  o" ]0 j0 ^
3 a( V- k" ~. _6 J! C) nbegin P_mB_clean arriving% c. j  R( r$ H4 g
   while 1=1 do
! D' g  m* r- }1 |   begin! }. \# {' G' W  C
   wait for 90 min
* r+ {' p' B1 v1 o3 B/ g2 s   take down R_mB
4 _3 w2 Q0 n+ ~4 n* o4 z   wait for 5 min9 ?7 v6 d8 C8 _2 K) g
   bring up R_mB; Z% t4 _* s. q- b4 K! D
   end# K% r2 t7 t9 R2 f% G$ b  v2 y
end
6 s. J9 Y% q7 S7 E) j

; z9 X5 W( ?! n+ @begin P_mC_clean arriving
6 f3 [+ j: w/ V' z6 K" n   while 1=1 do
' l' a/ Z! Y" `/ s   begin
) |1 j& c0 _; t, D. y7 X; w   wait for 90 min) j% s1 L8 z- m8 d0 ~3 T
   take down R_mC. a4 y4 a3 V* B5 i) L
   wait for 10 min
# Y* O7 |" x9 Q8 ^: ?: J+ O* n   bring up R_mC  u  H7 L. O7 J+ H' ?$ f+ m
   end- M2 z3 N# X# V' a. a8 F
end
+ k2 |; j: J2 G
----------------------------------------, D, J$ k  f7 m& {% H

5 F8 C) f. k- |0 u2 yExercise 5.9) |& E. _- C8 d4 D
4 d# N. H- [: u) w# h' b

  p% D; {! O9 I, I6 @( vCreate a new model to simulate the following system:
4 e( b1 {0 d. e  H5 @Loads are created with an interarrival time that is exponentially
  ~# Z* y4 y& D3 Ldistributed with a mean of 20 minutes. Loads wait in an infinite-6 B. A- }- t5 U  l. z
capacity queue to be processed by one of three single-capacity, # p9 j1 |6 E7 R, u! ^# p: ~
arrayed machines. Each machine has its own single-capacity queue & g+ H4 M' |0 v# v  o
where loads are processed. Waiting loads move into one of the three 4 _. m7 l0 o5 ?  h, k$ b
queues in round-robin order. Each machine has a normally
% K$ U2 H' b3 W2 cdistributed processing time with a mean of 48 minutes and a standard
5 p% l, ~* ~) u4 X% Q' ndeviation of 5 minutes.+ u' y$ B" o( A! p; W& `
The three machines were purchased at different times and have - M$ {# X; T& |8 e! R' l+ g/ I
different failure rates. The failure and repair times are exponentially
! W2 i. E9 ?& Q* I1 v* ]) d0 q' f$ ~distributed with means as shown in the following table: : Q. V, G6 p& `. a) ?
Note The solution for this assignment is required to complete
3 D: ^* H) H- R* s; cexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 7 g8 w: ?8 s, k! G9 A/ @. C" Z, V
your model.
, T4 U0 l4 ?8 t3 N& q4 ^* v4 O& z) E( L( D/ Z* n' u. d, o
MachineMean time to failMean time to repair- ~, [/ l1 v* i8 R7 R5 K0 L3 k' Z
A110 minutes      5 minutes" n7 k! [+ g8 E1 {0 s5 h, j1 b
B 170 minutes     10 minutes
3 N% o8 O0 @' g# M  P+ K+ o; mC230 minutes      10 minutes
8 w! {7 x* e- n2 `& j, b& M% @5 `2 k$ W7 x* {
The machines also must be cleaned according to the following # A$ }3 b2 @' h& E) n! G) v
schedule. All times are constant:
6 X7 j4 T9 J& Z7 z& P* h! z% d  H
. ?, i; m# C0 K) _8 |MachineTime between cleanings Time to clean* d7 C5 \' S2 J+ {) F! E
A90 minutes        5 minutes
' m; U7 o. ?! G2 P( CB 90 minutes       5 minutes* B; c2 J& j8 |$ j* q% z  G
C90 minutes        10 minutes
! o# {. @- v2 l$ ~9 A7 y9 r3 U) W+ A" i" V* {
Place the graphics for the queues and the resources. ! v" M6 V* Z# ?- A" Y
Run the simulation for 100 days.( t; s# |  ~' H& u& `, W
Define all failure and cleaning times using logic (rather than resource
4 y, Q7 m( J0 ^: q# o1 Zcycles). Answer the following questions:3 f2 v0 |3 A% Y; a; V- R% I. U
a.What was the average number of loads in the waiting queue?9 b( j4 `# Q% Z, n& q# @7 S% o
b.What were the current and average number of loads in Space? - A0 M2 Z! S7 S2 F% b" ?% ^* W6 s
How do you explain these values?
% X6 \& g# U7 i2 {

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
) A  w0 ]& S2 M0 G& L4 o  gsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); b2 X% |3 T  P. s; [8 {& ^
这行好像也不太对,各位先进觉得如何呢?
9 _& {! \$ ]8 m8 n" Y
" E- `( {. d/ c- tbegin P_something arriving6 k2 N  T! l& G9 R
   move into Q_wait
4 ?9 D6 _2 E/ L9 B; ]   move into nextof(Q_mA,Q_mB,Q_mC)
6 q, L, G6 i  M   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
3 b# T8 P  n4 v   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 6 b  Y' }, I: w/ u* a3 S
end
7 j! k# g6 F; \
3 i1 g% c( {" d" D, o. }begin P_mA_down arriving
: L) ?; A7 G& l: `; l5 A- G   wait for e 110 min, N8 E: p' O6 D6 p* z5 x5 p
   take down R_mA
# y  d# O. u4 s- I1 Q& j   wait for e 5 min
  m- n7 K& [5 m3 }+ Z' b% R   bring up R_mA
' L# y& T( I. j$ Rend3 k7 c; G1 f5 \) m5 H/ Q$ e6 [! w" V; Z

+ m; }" v6 e6 S7 _, Abegin P_mB_down arriving
+ P0 ^0 ~2 b9 M1 q" l   wait for e 170 min" w" P, Y' ?0 y+ E  C8 I
   take down R_mB1 b+ _! R7 j. a' a# `4 j" P1 r; u+ s
   wait for e 10 min, K# |) A, e* f5 X: |
   bring up R_mB2 E: X) G3 D2 u; G  E
end  K/ J" c8 e2 O/ R1 h1 T2 ?

5 _! _6 m6 |  _) f2 o6 S% ibegin P_mC_down arriving
5 `; q* T; H9 D7 n   wait for e 230 min
9 N3 |0 U4 n8 W- V) N" O5 R3 T! k+ O/ @   take down R_mC
: k, L/ M% E+ ]# \3 H* u0 {   wait for e 10 min
. D% s# E2 Q' Q; K/ l   bring up R_mC
! t3 `0 H, y, dend
7 K1 B+ U+ X; Y( F' s2 n5 n: j1 _* _: X1 a1 n3 Y+ R. P
begin P_mA_clean arriving
: b/ K( y0 |& Z* X   wait for 90 min
' y  U# c% ]; A- T   take down R_mA
% T! z- S% |! ]. H   wait for 5 min: O9 K$ B( s1 U
   bring up R_mA5 w& s6 C9 K$ o7 f5 d$ I+ R
end  k8 ~7 x% P& H. a  \/ l

, u7 L3 H; O# e4 ?/ F, pbegin P_mB_clean arriving9 s' ]" Q# I6 D; Z# }, R$ V- _
   wait for 90 min8 d. m. t, c  V7 N
   take down R_mB
& l2 X- s  D. g( b; A   wait for 5 min" ?# ~1 j) q$ z  U) O  z6 s
   bring up R_mB
( |0 i5 W- n/ x& v* E4 Dend2 V! L4 q( w+ W8 d
6 d3 E. _1 T! X/ d4 p5 c
begin P_mC_clean arriving9 p4 y  l6 G4 a: r; ]: u
   wait for 90 min
6 {8 w: V9 N8 q+ U   take down R_mC" R8 I$ X* s0 |0 ?; `- x" L! e* Y& n9 p
   wait for 10 min8 r) z1 F! n' s: g" l% B
   bring up R_mC
/ U" t2 Z, g) m' F) i' wend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving& l' n( T+ J# c' x2 N
   move into Q_wait3 m! {2 o. p( r; I
   set A_q to nextof(Q_m1,Q_m2,Q_m3); _% }* q! E+ d- ?! I8 Y/ G& y" X
   move into A_w3 Y# X5 u+ s" \' A: R0 P' f
   if A_w=Q_m1 then use R_m1 for u 48,5 min
  @2 n* q9 I* S6 \$ z   else if .....then use ....for u 48,5 min+ v& o  R4 C, {' Y& C- r, _
   else if .....then use ....for u 48,5 min  5 N7 R7 I3 x# r% u# a
   send to die
% _: d/ C# ^! Q6 h# ?6 E6 Zend
# s- l* a7 `! k3 B! }
4 L0 I, q5 y! l供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-27 08:48 , Processed in 0.014462 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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