设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5156|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ' e" S. Q- d! y0 S

# C& V+ \3 _; v7 R7 q( ?" Q- M  H底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 T; i7 r& D/ H5 S5 A# p

/ V4 h, l4 W7 v2 y9 @/ `不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!2 a9 S, M+ R  ]% c' G6 i( ]
- c: c7 z# q. B
--------------------------------------------
& ?: Q9 n/ ?) w% P6 ~begin P_something arriving
* T8 S9 G( a0 c; s' W7 s   move into Q_wait
1 k; `  l+ @# N$ U/ ~" I( N9 H   move into nextof(Q_mA,Q_mB,Q_mC); o3 c5 P" P$ X2 b
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min" a& Y. i& Q% ]! z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 e9 ~6 t; {& R/ m  }
   send to die. D* b. T9 \  d, j/ B
end

% k$ F2 t* B5 [8 H' `, R
- y3 C' I7 C8 T7 r3 lbegin P_mA_down arriving8 k  k/ }/ v9 Q% i
   while 1=1 do & A: y' e+ n+ R
   begin
. _$ Q8 G9 K. a% B   wait for e 110 min
% n! J9 u9 t- R( _   take down R_mA
# [0 u# o- i7 K; Q' G3 H, v   wait for e 5 min* G+ g/ h/ l! B( L. K
   bring up R_mA
0 G" q4 f: J9 ^2 E' Y( p; w5 ?& z+ [   end9 E# N1 W+ q. N( u5 ^8 |. V7 b) [6 Q# r
end

* o2 C4 N) R1 n ( {" w# _  \/ w5 _, d1 i3 p- L
begin P_mB_down arriving
  [7 a: X3 H' v   while 1=1 do7 l0 ^1 g4 p9 L( j/ F
   begin% c% A/ A. K8 y
   wait for e 170 min
$ `/ c4 h( n$ p' `, O+ K8 l   take down R_mB; E6 [6 n% C2 g2 X, c/ f, Y* }
   wait for e 10 min
" b- i% M9 d# \( C( i   bring up R_mB
: E3 ]: z- `! s+ u- i   end  N' J2 w2 {4 L( x4 q" W
end

. T- U. Y' y# m( D
* U% h% H, a- q7 Ibegin P_mC_down arriving
" V( e' H" }8 H  b: w   while 1=1 do
: V7 E6 e. v/ j$ h0 w( M! S   begin
3 J$ \) |/ Q9 C5 b   wait for e 230 min3 N. F6 R0 i$ h3 a6 c+ ~! `
   take down R_mC
9 r5 Z( [9 q' o; f   wait for e 10 min: L3 s. l0 c& ]/ J! e
   bring up R_mC3 L+ {6 K- Z3 h. y
   end5 ?- Q% C( P8 I" m' ~6 _
end
) X7 o9 H1 p  g

5 c+ X6 {, L) ~0 Zbegin P_mA_clean arriving& o1 A0 U# a+ O. B, M
   while 1=1 do
, G* [0 u6 f% k   begin( K; ~& Q* P( h$ n( p3 r
   wait for 90 min
; @# [* v* n! `9 N; W  i   take down R_mA  O! b; s$ d; w# |
   wait for 5 min. Y2 ?2 S# c! x- \$ L
   bring up R_mA' a& Z. Z2 v$ B( m5 y
   end
* M' B: s3 S$ b8 s5 aend
( J" T, q9 |. X( Q3 q/ ~! t. J$ x
  {$ A: t* D! D  d6 R5 J7 E7 Q8 {
begin P_mB_clean arriving" r9 f9 W+ H' Y8 x, B. r
   while 1=1 do* L6 W2 r  a$ ?5 _
   begin
- L' ^$ H  u( p, T) M, {. U   wait for 90 min
: |' t$ r# @5 }6 G4 a   take down R_mB
2 M5 \5 q! r0 T9 d; s- b6 N   wait for 5 min( {; B. u" t3 }; u8 A) v! W
   bring up R_mB3 x8 P1 a: ~% K4 Q
   end
( [& P8 I( s" ^) aend
. H7 |7 C, G$ v0 Q$ G
3 n+ d7 q9 _% J6 ?# C" U
begin P_mC_clean arriving
( l! \& w* c# v   while 1=1 do
, P) l6 P/ T$ n! Q9 W0 b8 l   begin. W$ ?. y8 L% U; R; H" \' O
   wait for 90 min
! @  x6 j. X  Y- z3 L   take down R_mC
# b0 {* _0 l$ v- ]7 M$ k   wait for 10 min
+ I, a2 D6 ?# y$ M8 k4 n7 ^   bring up R_mC# k9 {( m3 ^; j
   end) g$ y& V: g2 h' E/ m. s( K" n
end

- b# n1 p6 t1 X% k----------------------------------------2 \# C5 x7 |$ ~

5 J8 H, y$ [/ p2 SExercise 5.9
% @; r4 C. Z* H; h; p  w, L- a& N/ n/ x  t. F

2 i( j1 o4 q' Y2 xCreate a new model to simulate the following system:% |/ N+ h, _  v1 r# F
Loads are created with an interarrival time that is exponentially
3 t) r2 H1 T4 U6 s+ qdistributed with a mean of 20 minutes. Loads wait in an infinite-
. ?7 e+ E% B# L/ f, Zcapacity queue to be processed by one of three single-capacity,
; }6 A4 ^) k7 v; l5 b5 ]arrayed machines. Each machine has its own single-capacity queue
9 f6 M# \4 Q$ j$ S' m% fwhere loads are processed. Waiting loads move into one of the three 0 X7 S6 [* C0 H6 a6 ?& `
queues in round-robin order. Each machine has a normally % n2 M4 M9 K9 v$ W  d, I, g
distributed processing time with a mean of 48 minutes and a standard
1 z# k0 B$ @( a0 m" Udeviation of 5 minutes.3 u$ C1 N! j+ H
The three machines were purchased at different times and have 2 L  `, g9 `% _0 m& f5 W- G
different failure rates. The failure and repair times are exponentially
! Y6 M" R1 Z5 bdistributed with means as shown in the following table:
7 j. M6 z0 K  \5 B8 J. tNote The solution for this assignment is required to complete
. g& \3 ^0 M3 L* `# D# Pexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of / k. g; l1 ^! W4 |) S
your model.
0 b4 N( \7 M: |; {
% ^/ p5 B: ^5 o5 u; vMachineMean time to failMean time to repair/ w7 A; T0 R) F7 `8 y' R
A110 minutes      5 minutes
0 \6 A4 K. H) c6 h, U$ KB 170 minutes     10 minutes
' w+ W0 _7 r+ }  O/ jC230 minutes      10 minutes
% V6 v0 f% P1 o/ g% q2 ?0 p
, i% N; c7 o: i* qThe machines also must be cleaned according to the following
( _, e. a" e# }" F: ^% A1 e. l; wschedule. All times are constant: 8 ~1 `* N) ]" z7 r
$ T. L/ }. b+ ^9 m8 _* _$ O
MachineTime between cleanings Time to clean
9 b( d0 m: n* a  h; p: }A90 minutes        5 minutes) ]3 \1 b- B! a$ q' E5 Q9 h5 b; X1 d0 k
B 90 minutes       5 minutes) Q) }) j' N1 I6 c, n; f2 }+ N9 V
C90 minutes        10 minutes
# K5 y3 [' n! x' G) B
, b1 n5 ]( [& j: D; P9 IPlace the graphics for the queues and the resources. % f! Y1 L( L5 Y' a! I+ a9 X4 x
Run the simulation for 100 days.9 e( V8 u! L+ o& L
Define all failure and cleaning times using logic (rather than resource ' S, \' i9 t, E! K% @0 U3 w
cycles). Answer the following questions:
  \5 X& \# Y) w* ]a.What was the average number of loads in the waiting queue?! Q4 I( S; m9 h
b.What were the current and average number of loads in Space? 1 |- a  Z+ A( q: p, P: h
How do you explain these values? % @  d* W! Z$ z3 c9 [- E7 s

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
7 b8 h* r6 x7 u8 [! h+ {9 d: x/ tsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ S* z8 A: K6 ~* ?( Q这行好像也不太对,各位先进觉得如何呢?  M8 e8 p% T; ~( t9 [
2 f: C$ X) G7 O6 C3 d* ?' x8 f, q
begin P_something arriving
+ y7 w( _8 V) N   move into Q_wait
8 F5 S4 I' [* d, b) Y   move into nextof(Q_mA,Q_mB,Q_mC) + m( N8 u7 O% [, L
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
' o2 c2 u+ h8 \+ m3 n* }8 N/ M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ Q! |# _" ?% Y0 E3 oend
+ v# k- D8 C  T
& R1 R9 e% d' Y/ j5 w- ybegin P_mA_down arriving
) U. K* X. J( F   wait for e 110 min
3 b& _5 }. ]; r: N0 y* Q' I   take down R_mA
( L. e$ f6 V' _( C; c5 ^" q   wait for e 5 min
% V4 U' n* \1 |   bring up R_mA( z' S7 O7 ]; j- K9 c# }  Y' S
end7 f# C2 ?& w1 F. @3 V- ?4 `
6 x+ q% G' v% ^9 W3 {" A: ]. P# o
begin P_mB_down arriving& n0 k: g# Q. h9 y9 q2 U9 B( f$ E
   wait for e 170 min
- e2 d( G# [& X- d0 G   take down R_mB
+ H$ K' T; t- I   wait for e 10 min
& i* @; L( X8 F! ]1 n   bring up R_mB8 C* _) ^% a( w* W) Q3 M  I
end
. D6 j& o. g% w
- G3 d8 W2 N! y9 a$ Mbegin P_mC_down arriving" a+ w6 b8 z/ b! s: j0 d
   wait for e 230 min# ?  p. [, B  Q/ L8 D
   take down R_mC  J4 b3 O  U# L8 N4 X; Q
   wait for e 10 min0 R5 L" R9 l- y( E1 n
   bring up R_mC
# M# k3 M. s9 t0 z" o8 H! a+ j0 vend9 A6 F" P& U" S/ h- G
$ [8 r2 P, i3 r6 P# d8 L
begin P_mA_clean arriving
0 ^3 M( E' E7 Z6 I4 M! M  g   wait for 90 min
% I" e" S1 o& G0 l8 A   take down R_mA' I1 m+ e1 ?; p2 u. ?8 z. z% z
   wait for 5 min: t5 |; z6 F) a0 g; D- v
   bring up R_mA% s' N* h/ \% s/ N$ `% H0 s0 a
end
! e# Z; E  H% y* ^6 m- s5 }" B# d( X! C1 W
begin P_mB_clean arriving, L7 |! s- m5 i% a) v. c
   wait for 90 min" f0 H3 y- ^& K- V( R+ g
   take down R_mB2 w: f: U- n5 G3 a
   wait for 5 min5 `9 h; Q6 {) P6 F# m8 `) L
   bring up R_mB
7 Y. E, S8 U2 W# l! _! g1 Z2 ]end9 b7 H% W) S( m! D
' p+ z9 E. }# K9 q1 Y# ^% b* b5 G
begin P_mC_clean arriving
5 {. v# f( E9 G2 S+ N) Q3 f   wait for 90 min
# _( Z4 R* ~; v* \% U2 w& {   take down R_mC
; D2 v$ ?2 E- v0 d   wait for 10 min
5 L- ~6 h6 W& }   bring up R_mC
3 e( o2 l; p* ~9 Lend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- @* y3 X# q) d8 V   move into Q_wait
* ]7 L/ A$ E: l: l. `3 e0 h. S2 y   set A_q to nextof(Q_m1,Q_m2,Q_m3)
: C: `) J$ H& ]) o   move into A_w
3 D# |: g. v7 b3 `+ H$ k4 o$ h   if A_w=Q_m1 then use R_m1 for u 48,5 min6 c& b0 B# w% H( W0 X" j' h0 }: C9 d
   else if .....then use ....for u 48,5 min
4 V; t4 Y0 n* E9 {   else if .....then use ....for u 48,5 min  7 z. {/ p# T& M9 C: X4 h9 O
   send to die* g! Z1 B; ^  J4 D& V3 y. a# \+ ]
end- e9 A* `4 B3 ]; T% o8 `. R6 Y

- k0 E, [+ f0 b4 j6 j$ A供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-16 23:55 , Processed in 0.013890 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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