设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8068|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 7 E4 B" y9 m1 N# h( Z( U3 c! f
. A$ ?* F- R& R: c) G
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
1 o1 u  h2 m+ U# Q( r$ r( K6 t0 ?- {) I5 ]
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
8 K2 P: O" E# T0 E+ S9 C2 k- Z! q/ l: R1 z2 G+ |
--------------------------------------------
3 u  j. H5 h$ Z3 D. W$ S+ Zbegin P_something arriving
0 \$ j8 S( J1 S. w: b( r5 K, p   move into Q_wait7 K$ @; K7 v  H' _6 k/ {
   move into nextof(Q_mA,Q_mB,Q_mC)" x- B7 l/ I0 U2 p5 U
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
' I& m% D" U3 o$ [6 U+ w2 R! ]' P- m   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); a! D: S3 t6 Q- b$ |( O, `4 c! f" t5 f
   send to die
, y/ t  G: X  B) I' wend

* B% c" _$ W# k. u# w* M   W) L  R- Z1 h! B
begin P_mA_down arriving8 B1 d1 Z- T: P" r- X
   while 1=1 do
- ^2 B7 _+ N9 P7 S: W; v   begin% W) c( o+ n1 C4 X1 h6 I& k- j9 t+ k
   wait for e 110 min
) e0 d- |3 H. Y- e" V   take down R_mA
0 ^  \9 b/ a: H   wait for e 5 min0 |  k: F# {; a) \5 ~. g
   bring up R_mA
! Z  e5 Y; I* B8 P   end
9 o6 D: ^1 I% Y9 gend

8 _/ K% ]6 L( g" |3 \ 6 O! P7 b; w  L& D$ v" W  U
begin P_mB_down arriving
) L: v1 B2 x' S; Z: z# m   while 1=1 do
. w4 ]' H6 A; @+ _! Q   begin9 b4 L5 N! f4 F' P, I$ @3 @' T6 Z- P
   wait for e 170 min. A$ c# Z5 r5 e  y1 N
   take down R_mB
, R1 t0 Q, }  B   wait for e 10 min
9 o" ?; ?  @4 i   bring up R_mB
2 j1 |# U% c7 A   end) _" |5 q0 S' f$ v
end

  l# d. Z6 Y$ z1 A9 R7 Y
: a' H: B6 x- B/ \1 A. `6 Sbegin P_mC_down arriving
1 v3 e& J- Y3 `  G% L" l   while 1=1 do
2 z" n; f' }! e! r* c   begin
; y: R/ n4 y# d7 `# @* A! U   wait for e 230 min) `  i% B$ D8 P5 C1 q0 S
   take down R_mC
* Q! A! @7 K2 I   wait for e 10 min; T8 O& A  E6 B4 j2 b2 c1 J: e* X6 s* y; W
   bring up R_mC- @+ d7 p, p1 A9 Z! V
   end' ~, k) r5 B7 R: \' b% ~/ z
end

" M- I6 L3 M! h) q0 ]$ f ' j, R+ _$ v# J8 Q8 Q0 q2 r
begin P_mA_clean arriving
1 T3 S% |) {6 `/ _; c: U% Z- K. [   while 1=1 do2 F" Z/ w. t( I4 X) e8 |% j
   begin
- j9 o* h7 _* n   wait for 90 min# D  H% h: p/ s5 l$ U0 _
   take down R_mA
1 }. n( _- {# a) G1 l   wait for 5 min# y/ \5 M, N; L% L3 W: x
   bring up R_mA
' ]/ w1 @5 R3 D1 |5 ~   end1 [0 a0 S) S$ U, Q- |
end
0 ^/ Y" U/ ]( ^
& O# n8 C4 d  u' b1 h7 y8 E
begin P_mB_clean arriving
9 J- p. R  S& \) A' r7 x8 O   while 1=1 do
7 W6 U1 i* G7 T   begin$ f8 a% K% }4 F7 n+ w- j
   wait for 90 min/ K3 N- c" s* m+ y1 t( v
   take down R_mB- Y5 C  ]4 w4 D
   wait for 5 min
  X+ r) l$ p; ?! m. A1 t! W   bring up R_mB! g  V2 }# n  ?, K: w/ _
   end
+ S1 J/ I! _  a* F% _end
" R) w( ]; s! H: ^1 Q6 Z3 {

- {! ^' N% t. [* W  `begin P_mC_clean arriving
) x5 n4 Y& u4 R, E- M$ Q   while 1=1 do
5 k% _$ F& J" ?: k* |" z- d   begin
  q7 G: C& ]1 j% p! `   wait for 90 min8 ]5 K0 V. g/ y/ u0 d! Q% G" J
   take down R_mC
2 {& l; r& z+ s* R1 ?' y7 z5 Y   wait for 10 min0 h/ d$ l, n9 r
   bring up R_mC. K( _$ c' R, O3 q
   end) J1 C& g1 l1 D& x; T# _
end
  H  w. K" [2 o
----------------------------------------* h3 o8 p+ W. a4 H
' j  b' L' A8 q( ]: O' X. Z
Exercise 5.9
0 I; f) h' N; }( I5 e2 \1 e; x
! L7 \) p+ c/ a" j8 ]
) p1 c$ K) O3 \' T) p& Y' qCreate a new model to simulate the following system:
5 d) g6 f  h& K8 U  B5 lLoads are created with an interarrival time that is exponentially
- T6 K; P* W3 f2 V( Tdistributed with a mean of 20 minutes. Loads wait in an infinite-
6 {, W& W; J, [" u, Fcapacity queue to be processed by one of three single-capacity, . ~0 o: R- F6 D
arrayed machines. Each machine has its own single-capacity queue 5 E) S- L: r' K0 R9 w
where loads are processed. Waiting loads move into one of the three
# `" J' i0 ~9 u) |: Dqueues in round-robin order. Each machine has a normally . I( L1 [3 @# F  b: J0 N, s
distributed processing time with a mean of 48 minutes and a standard
. J$ C" U- O) c3 f5 ?5 R7 r% {# h0 ]deviation of 5 minutes.- Q, n, z  u) w" C: u
The three machines were purchased at different times and have - `. Y! W! v1 g- s! I  [9 q! r( ]1 e
different failure rates. The failure and repair times are exponentially
0 k! w. ^4 {2 R+ Y5 I! @distributed with means as shown in the following table: ) w8 a, L  J- f+ E& N9 _; |
Note The solution for this assignment is required to complete 1 }# }6 b! c5 w
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 2 S$ `5 O& `" U1 ?
your model. % g* ^; b" R0 P; {
, ^" M; J/ a" K5 C7 {) @
MachineMean time to failMean time to repair
! X& x$ H6 V) X/ j/ T' `- SA110 minutes      5 minutes9 x" h6 |( m& h9 E
B 170 minutes     10 minutes
! R6 r  O! }5 _. W9 f2 hC230 minutes      10 minutes
1 d6 i% K! P+ N8 d8 _. a6 h4 A4 U$ K. B5 P# E
The machines also must be cleaned according to the following ! q5 F4 r7 Z: l* g
schedule. All times are constant: ( }  T+ h; \+ Y9 s2 s

0 e4 L+ B: q: D' r; n) z# c2 AMachineTime between cleanings Time to clean
$ l8 K+ q2 {5 T# B6 A3 t, dA90 minutes        5 minutes9 K! G- k' Z, R4 X
B 90 minutes       5 minutes
, s) b: r8 b& L; Y+ s7 h/ OC90 minutes        10 minutes* d) D7 {; V7 ]( [+ ?

& @7 Y8 M# D: p  k9 g* C; k1 XPlace the graphics for the queues and the resources. 5 }8 z' P' y% P
Run the simulation for 100 days.1 g* j8 z3 v! R& Z7 r1 Z5 W
Define all failure and cleaning times using logic (rather than resource ) g6 r# w' H2 e& {# A$ @
cycles). Answer the following questions:4 b4 m& ^# k" j4 l8 l0 g1 H3 Q* s
a.What was the average number of loads in the waiting queue?6 ~& Y9 X! I0 }) t* W% i/ x& j- |
b.What were the current and average number of loads in Space? 5 O9 |/ P3 S  S+ e; q  Y. d8 @# u, T
How do you explain these values? : |( Z- H& J# F( R  J# ?4 W

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
# _" ~0 `8 T6 e9 `send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
* ?5 a, j; V6 S  [这行好像也不太对,各位先进觉得如何呢?
* v0 v/ F. J: E) C( Y
5 W' u/ h/ [6 b: [$ lbegin P_something arriving
  J) a, v/ w) m+ N1 X4 ]   move into Q_wait
6 I% z$ x# s( {. ?' O   move into nextof(Q_mA,Q_mB,Q_mC) % ~; C% l7 }1 e4 U
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min% i5 o% i; z. ~. \5 x# ]: m$ s
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & O8 p. E0 }" q5 S1 d' M& H
end
. A- F: N+ R4 D2 _  b7 f$ Z. o. {/ r- P
begin P_mA_down arriving0 t! T' u; X$ d, M
   wait for e 110 min" O8 C$ W: G' Z' ]8 }3 W
   take down R_mA
: j8 Y( s; t2 K   wait for e 5 min
  L1 J' x  Z  P0 q! p   bring up R_mA
( A) f- ^0 `# o7 b7 jend5 Z7 L. C1 t4 V0 i
2 x7 b& d) D" x1 T5 e% Z# Y
begin P_mB_down arriving
" X/ X3 z+ t" |+ {   wait for e 170 min
0 {/ [* q/ ^! {8 V# F# y; {, U   take down R_mB
# m2 c2 N7 }) `9 }   wait for e 10 min
  e$ F3 Z# ^! Z   bring up R_mB8 y% V0 q/ P: T5 _
end% r* S7 K+ L+ i

; b; l4 ^$ i% R! Ubegin P_mC_down arriving
' X7 J9 Q1 R: \& b6 @! y   wait for e 230 min6 Z5 y7 ]: ]" {: a
   take down R_mC
, l7 [! z# {0 H' N# h3 n* o   wait for e 10 min
2 s- h6 D0 ?! J" g0 H   bring up R_mC
% V* g/ O: }" J- I0 i" Aend
# b( w* S. A, [* P. q" s' w% L
" a) U2 R& s; a# ~1 s, m* p% Sbegin P_mA_clean arriving
6 W/ F% X/ `4 C' H/ s4 e   wait for 90 min
2 |- n7 ]; T* U' b   take down R_mA% T, d. P4 O. G- e+ b6 r
   wait for 5 min
6 }$ o, W. _8 K, ^   bring up R_mA' `/ r0 g+ K7 t' w0 I
end; J, A; W% B+ P& c
- y8 S, h/ ?% K7 O0 |
begin P_mB_clean arriving
" o- [; j2 V( Y6 N  H& n& S   wait for 90 min
8 u8 `7 V% N; ^   take down R_mB/ u6 L! Z' o) g' }8 W" f: \
   wait for 5 min; n+ t7 w5 i* S2 ?0 f
   bring up R_mB7 a  D' D; m' b; Q5 w/ ~/ X, B: C
end& K; ~6 S( O2 p+ d

2 K7 M+ n6 P1 G) M3 _begin P_mC_clean arriving
  {5 w& ]9 K, I! _5 B   wait for 90 min
' {" A9 P; u  o  A" ?   take down R_mC+ L" L! S7 j# m
   wait for 10 min
7 h$ y1 f2 H; W' ]! C# Z   bring up R_mC5 G8 j3 g" u2 I8 B
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving7 V, a3 s6 H" \" k9 k: s' @
   move into Q_wait
; Q: d  u, E4 M" d   set A_q to nextof(Q_m1,Q_m2,Q_m3)
. H2 w- R' d& K, O   move into A_w3 z$ E* ]3 }* i0 x- ]* n5 n6 ^
   if A_w=Q_m1 then use R_m1 for u 48,5 min% Q6 X! O8 N6 f; N
   else if .....then use ....for u 48,5 min
. L& ]2 ^5 C4 H- i4 s8 M+ U   else if .....then use ....for u 48,5 min  ! A: `4 `6 }; t7 G% n% i
   send to die
3 ?9 s9 w& r- Z5 s1 j( S  Pend! {6 L$ a3 W" u$ A( Y/ `

, N* D; Z. I9 Q; m0 {9 L: ^3 u供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 05:58 , Processed in 0.012260 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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