设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7278|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 : F( i0 M, m% K( t* O4 J; f& C
5 S/ X) y& U- G- b* l  P7 a& x
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去2 W0 m# b$ ]5 I

: S) W3 r* a8 f6 b不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!, C* U# S: M: h7 o
+ h2 y& h& f5 b. t" a
--------------------------------------------
9 W; M% o2 ?. z/ a; obegin P_something arriving8 q. o  d- i/ c* L/ u& x. @
   move into Q_wait- b4 e/ L' j: S& h
   move into nextof(Q_mA,Q_mB,Q_mC)0 E8 o  {+ X( m* W: O& S
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min: |- v( V' j3 u: [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& c4 j3 L8 c3 |3 B4 B/ ]   send to die) p: T" P  o. m' u- y7 V2 K
end

) a4 Z: Y! m" O4 |0 e8 Y ' W. T( e) ~) p- c
begin P_mA_down arriving
; n" u' V+ S- v7 u) V/ e' p- p   while 1=1 do . `1 d) \- k+ G/ m- ~6 h9 m
   begin
2 _# s( Z/ ]2 R0 K2 R8 M   wait for e 110 min3 Y* Q  b1 _1 j2 _% N
   take down R_mA
6 f* J% @( A  c7 I, s. n   wait for e 5 min) I" j% b& Y" @2 p/ H
   bring up R_mA# ]; U( [8 O! }9 }- X
   end; w- Q* V  m# A+ w
end

; d" \8 C* w" b5 I2 P! E! K / m$ r5 e1 o1 Y  X
begin P_mB_down arriving
$ E9 _, x) G+ ~2 t5 m   while 1=1 do; E& X; M  R1 E" R: z, ~2 b
   begin9 P; t+ X# Z8 m8 [$ [8 P
   wait for e 170 min" j, k3 j% y( _  }6 f
   take down R_mB, _7 `) Q: H9 O5 ^' h; j
   wait for e 10 min% W6 W; h' y) a# l
   bring up R_mB, ?) j" m2 ], t) A& J. {
   end5 N% t- t0 V6 y. C" J4 N( G
end
9 K; M6 f9 j3 A/ I
& Y  ?' N! c  v- y6 q
begin P_mC_down arriving
8 q9 d% {7 n$ O9 n   while 1=1 do
3 G# w/ E# H1 B' N, W3 w   begin
2 d% K/ r, u8 H   wait for e 230 min
* l5 _3 s! B+ @) ?8 I' \   take down R_mC
: @4 j: K9 ?8 `( [9 n; v6 ~   wait for e 10 min6 v( t$ Y: J* W  E  T# z' s
   bring up R_mC
: ^2 H" |" b; M. T' b   end
8 b$ A0 E) C+ z( x. \, i( uend

) t# i  Z- p+ {3 {, W; G / U- `5 v' U# F. ]: g
begin P_mA_clean arriving7 N& W* j. s9 U
   while 1=1 do6 X* P! ?# ~$ k8 [: q1 D
   begin
  ~- g* a8 U! N+ `6 O   wait for 90 min
' [4 y3 ^+ y1 D- c9 u& |, v   take down R_mA! \" Y" N- X+ G3 \
   wait for 5 min
3 c4 O7 I0 Q  x4 k. g+ F   bring up R_mA: ^* Q& f6 i3 x1 R  a1 K6 u
   end
/ c1 e" _7 Y- s. x& ]( c+ a- J4 E& fend
  y; N4 W- D0 y0 q% g

* J7 @4 b: X) q- B# r7 t2 u9 Kbegin P_mB_clean arriving, E* x  ^$ P7 ?0 D
   while 1=1 do
+ i  J; a! H. @. J+ f2 Q9 `' X& X   begin5 b3 C3 p/ p- l. C& M9 o
   wait for 90 min
. ^8 k: \7 h% B: p* ^   take down R_mB
6 T/ \6 }- j2 V5 ~1 R   wait for 5 min) G& h; y7 \8 P9 {  P' j
   bring up R_mB
4 K* |: _0 X( q# V6 u# ^6 ?; K   end: v9 ], w4 Q8 L1 M
end
9 D( t) {3 H3 H- N8 V
) c$ B4 h% u8 _% ]
begin P_mC_clean arriving7 M; H# d3 t. V0 ~/ K+ ^. B
   while 1=1 do3 S) `4 o% P, e* f. j5 S% T" o. p
   begin: a  g/ Q% W0 a. y" h7 W8 S
   wait for 90 min
/ u) J9 I! k7 e0 }# u   take down R_mC& [, I, L$ M  s" E9 G
   wait for 10 min, k1 W( r+ i" Z. D' k& @" E. Y
   bring up R_mC
1 Y: o4 f7 [; T% O) p   end. k( B; k0 ^7 Q$ M
end

% d. }2 T- c( u; W# ^3 P" ?----------------------------------------9 m2 i0 w; `3 U0 s
! b+ `) s/ I' m3 ]) b) I; p
Exercise 5.9
% M6 p+ P0 w  ]! S9 C/ b
' I4 F& M9 D: L2 W; r! G$ X% r5 Q) Q
6 v! C6 S' O) @6 HCreate a new model to simulate the following system:/ h  G9 D1 n! ]" H5 P+ {9 c1 I
Loads are created with an interarrival time that is exponentially 1 z& r6 D  ?! A
distributed with a mean of 20 minutes. Loads wait in an infinite-# o: m; o; ~: u$ |, |
capacity queue to be processed by one of three single-capacity, ( k8 R9 D, ]7 x+ w
arrayed machines. Each machine has its own single-capacity queue
$ m9 y/ h6 N# x3 w1 b" Ewhere loads are processed. Waiting loads move into one of the three 6 D! I: b/ g) F# U; O6 h7 I
queues in round-robin order. Each machine has a normally
* r& d( N4 N9 B7 rdistributed processing time with a mean of 48 minutes and a standard 9 o4 n; z4 p4 p0 Y! C- u
deviation of 5 minutes., q1 A4 a6 {  |7 f3 }  m, S. p# `; K
The three machines were purchased at different times and have 5 o' x& |" h0 b* [; [0 a
different failure rates. The failure and repair times are exponentially
4 o% R8 K( S+ Edistributed with means as shown in the following table:
# V8 R$ H6 i) |5 z9 Z  l+ TNote The solution for this assignment is required to complete
! G( D' U- W! e1 o/ lexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
" m  _, P' R& Dyour model. / B. J$ V& v- }( K  {0 v1 I$ h5 @' f

3 p7 ?8 A" f- K$ ]6 k7 Q+ @MachineMean time to failMean time to repair
; ^; b9 E9 k+ Q* CA110 minutes      5 minutes0 {# d6 ^' {1 y* U
B 170 minutes     10 minutes& h" c. {9 P. b4 ^- m5 A' Y
C230 minutes      10 minutes
! m& b+ m, j" K' d& N# I3 J" g) Z6 s. \) j8 S" Y
The machines also must be cleaned according to the following
) p: i& z0 X! M3 R# T0 Y4 L4 gschedule. All times are constant:
$ o& M: o% b; b5 t* R5 \- F$ _' n
& g( @$ x, w- A! I6 V6 tMachineTime between cleanings Time to clean
! r3 Z% W3 ^: M& U, }A90 minutes        5 minutes
. U1 ^' q( P; u) _  F: }* W4 JB 90 minutes       5 minutes8 ~/ k/ R% F3 i: d
C90 minutes        10 minutes
7 u  a' O! d" a! E  |- u8 v* v
$ m+ w) T/ X) l9 `7 MPlace the graphics for the queues and the resources. 8 P+ u8 `! A& E9 x- c
Run the simulation for 100 days.* E# D3 x# N3 J9 ~) T1 b
Define all failure and cleaning times using logic (rather than resource 0 C. t4 P0 f2 I  {0 F
cycles). Answer the following questions:& ^' k% g0 ^; h3 p
a.What was the average number of loads in the waiting queue?
  }+ t  ~- C& C5 k* ab.What were the current and average number of loads in Space?
$ O/ d' T+ f, {' t5 UHow do you explain these values? & m1 p; S8 p2 l; P+ ]8 V; h, ~( G

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
& O! a( q! b; }5 @send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 s2 q9 ~. x& @2 S& j. D( f5 V这行好像也不太对,各位先进觉得如何呢?  D4 L0 t" a1 M/ C- P5 {6 S

4 g. Y( h( l( gbegin P_something arriving+ a6 V$ ?0 f2 b3 K
   move into Q_wait4 [; w) M' F# V% i% r
   move into nextof(Q_mA,Q_mB,Q_mC) ' X" J, f* r  D9 f5 |4 `
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
: Y6 ?5 _- D" \1 y( e   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" c- \* R: z1 x* o0 [# F+ l! @end
0 K' o: t  s) {+ ?. b- p( m1 n: R; w7 l$ N: n  X
begin P_mA_down arriving
5 S3 e) [6 }% ^! @: _  e   wait for e 110 min  @, Z$ N. B% q  W! a
   take down R_mA
. \$ |9 M5 Q& C; N' _8 o. e   wait for e 5 min! q' {, }! v5 J+ {9 V$ Z; A
   bring up R_mA
3 x" s3 \4 C7 ]! }/ z3 n& Tend# G/ ~- n/ ~$ V4 y; l
" c9 F6 a' s. M; ^9 V3 L
begin P_mB_down arriving' Q" f. n: ^  t' o' v2 V
   wait for e 170 min
, C( \  j9 z. ~/ T7 J# {0 O; c   take down R_mB7 R: @0 G% A, _9 h
   wait for e 10 min) l; K0 A) k3 }: L3 A+ G
   bring up R_mB
$ U  X6 u; D( v1 \: B/ i9 a% gend1 Q- S" v! b8 M5 ~9 N5 t8 s6 V$ C4 O

! a1 [0 \9 c# Nbegin P_mC_down arriving
2 U. M' c% Q# |! j* a6 z   wait for e 230 min: ?# M) h) _+ u! b) \, g
   take down R_mC4 h" ?* ]5 d- Y% r
   wait for e 10 min' r, q$ F* O+ {% k3 ~5 F! y) ^
   bring up R_mC
: j0 l$ q$ G  p8 jend( _) E' {" ?5 H5 v* @

0 `. n: j$ o- }) R/ W- S1 I1 [( Ibegin P_mA_clean arriving
! I" t: ^) P+ ]9 \* k4 ], a   wait for 90 min
: K0 r3 i6 G+ {; n: e0 C- @   take down R_mA& g9 o  y, N- k! g
   wait for 5 min
4 c2 n; f1 S, z, ]4 d   bring up R_mA
' c( F3 }2 o. P! S+ c5 mend
& T" d0 W$ D7 R. b: M& K: H. l0 K; A& F' i
begin P_mB_clean arriving
- E: m/ z, U! [$ W. }8 {   wait for 90 min9 ~. a; }* D; J/ b* L( o
   take down R_mB
& l% V( W5 i$ [   wait for 5 min  x$ B) K  R1 q$ j* M# Y& h0 ^# S6 k
   bring up R_mB
# N; G( I0 b% |+ J1 T! f- u2 wend0 J' L* J7 ~2 E. C) I

+ E9 b5 `; Z9 m" Z; s7 |begin P_mC_clean arriving  o5 f3 A3 f( ^: j
   wait for 90 min9 \" h  c4 P- y* ]  i9 S
   take down R_mC1 U: ^2 {% `; ?, ~$ y" R
   wait for 10 min
* z4 `" ]( e& I: q9 a5 G* m   bring up R_mC0 j# E. }7 y9 R2 u  W1 ~
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
) I. E( \. N5 M0 U   move into Q_wait2 {4 H" ]# V! \& B$ E" |
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
5 W: ]% }& l- |" H+ ^8 a+ t   move into A_w
7 Z; |5 B, ?8 g/ V& o0 z' x   if A_w=Q_m1 then use R_m1 for u 48,5 min
) t- D" D0 ]* P  b% l   else if .....then use ....for u 48,5 min5 I+ f0 T# o# y$ M6 f
   else if .....then use ....for u 48,5 min  ' L3 j) j2 l' Y: @
   send to die
" k  B: ^" i, x2 v& F$ L5 send  c% D1 Q/ a9 @, l8 M$ h$ M# `

1 a9 u+ O5 n. k+ ?供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 13:11 , Processed in 0.018229 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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