设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8395|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 + j( [5 u3 U- w  E! v
* Y6 F+ u2 j( d% ]6 \" Y
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去, g& W; w5 }+ g& u
! c5 g2 u6 v4 @  p
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
& z+ J  t2 ~& P7 z
( D9 P5 [9 r1 d
--------------------------------------------" C$ o/ M6 Y6 q0 V: a: Y
begin P_something arriving
9 `" F. i, w' i% ^2 G   move into Q_wait
4 T5 S3 ^& N7 `3 O! A  A" x% C   move into nextof(Q_mA,Q_mB,Q_mC)
( D( b/ \8 N- p( e; U   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 o, |$ U: ~' K, V/ V# p; M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 }3 B6 o9 |2 }9 n* f, [5 j   send to die
# c6 t# o: S2 j8 h4 r1 gend

  C) e0 x4 g$ L; m" W  o% U ( l$ n$ r, H( U1 |
begin P_mA_down arriving- k, h: m+ O/ B1 W$ A
   while 1=1 do
) J5 W% i9 d- m: P6 {; Q   begin
7 g* m; s% `% c" A   wait for e 110 min3 \$ C) F  U9 y, q3 V* R7 H
   take down R_mA
! R* {% ^+ \$ y+ F9 J   wait for e 5 min0 e0 d. V8 ^4 W9 q5 P3 O
   bring up R_mA
# X9 w+ o1 |5 s# `, Y   end& c5 m( q3 x! @* x- U/ p" F
end
- i8 i$ b7 t; u9 Y; j7 J: O

% E! u# _3 v, p3 y/ I- F* P: ?  @( Ibegin P_mB_down arriving
- W! a! C+ l: K   while 1=1 do1 c& _. F6 z/ |( L) M
   begin
" J8 P- y' W+ |   wait for e 170 min
9 I: M7 S! O/ Y! n8 z   take down R_mB2 c3 }) F4 t, q8 \
   wait for e 10 min2 P3 W; n, k! g) j- O  Y
   bring up R_mB( W& R- y8 o6 v9 |% A0 q+ w5 [8 B
   end
8 w8 i" N1 d6 v2 _+ [end
) Z* F+ a9 F$ G2 m7 ?
  `* k% F7 O: l# @
begin P_mC_down arriving* T; q: k( d0 Y  \
   while 1=1 do
+ c8 e- P8 V1 F4 l  K) i   begin% W% n; F; f3 ^
   wait for e 230 min% e& a' j  {1 W
   take down R_mC5 i1 t9 ~8 S; _% A  }# x
   wait for e 10 min2 n; k9 z5 i/ w0 y) x) W
   bring up R_mC
3 h9 o. X4 Z8 N8 i   end% \; ]4 a! \: A% }0 y# `6 F' f
end

9 w6 e; x$ A: \2 e ' t- `# A8 o4 L  A& U9 `
begin P_mA_clean arriving. h" P; t+ b' {5 a
   while 1=1 do
3 T9 k$ V5 m$ Q   begin& i: M1 N1 u2 R, W. B( s5 u* q
   wait for 90 min6 ^" t- y  D* ]+ c' G% X; _8 I
   take down R_mA4 b4 o, U0 C/ n* q/ I
   wait for 5 min
1 I) T5 [2 p' }) L   bring up R_mA" U1 b" H: v  f# C
   end
( A+ T- {  T1 ?7 hend

; a) f1 ?9 D7 @
* {9 |' O+ Q; O, h# B5 Z- B: Ubegin P_mB_clean arriving2 |+ T+ `& A/ J. i7 F" B
   while 1=1 do1 W+ I9 n5 G% a2 U( n
   begin" D- ~' ~$ t- q" y" Q
   wait for 90 min+ k) x0 D" S4 {/ {, |8 G! k
   take down R_mB
( J% q# V  f* w% n4 X   wait for 5 min
2 d9 v. G0 n! a1 _0 U8 U   bring up R_mB
( }, c9 W0 Y' B( N8 U8 R; w! ]9 G   end
3 P6 M2 x4 A. Vend

8 P) t, g7 t$ @3 \" [ * g* ^' M# Y' I
begin P_mC_clean arriving% ~* n) l( S  c, q
   while 1=1 do
# p4 ]2 S- R: L+ z   begin' b( Z5 X) L5 d# n
   wait for 90 min
. O4 C3 R* Q; t, t4 g/ B; C. h9 P+ ~   take down R_mC! r/ m6 u3 G7 v% H! b( Z5 Z; A* g
   wait for 10 min, e1 c, X! K& \) u0 h( c; D
   bring up R_mC2 x# ^3 w" s3 |5 [
   end, ~  e3 ]$ A. t' y9 ?  C) H* r$ L. `8 u
end
2 p# e' e5 ]5 m6 W/ t0 ~
----------------------------------------
/ r/ d, w/ u/ B9 [ " l% @* x. q& v: Z3 U
Exercise 5.9
' T0 Z8 M7 o( `/ q4 u# }& ]7 ~# P, p

0 V* o' J6 D4 WCreate a new model to simulate the following system:
5 ^8 _$ W" J. qLoads are created with an interarrival time that is exponentially $ `  S' m7 v- G
distributed with a mean of 20 minutes. Loads wait in an infinite-
5 q" l5 E  W- h+ l/ O$ E! Lcapacity queue to be processed by one of three single-capacity, : C, ~1 P6 m6 a4 Q, Z6 w
arrayed machines. Each machine has its own single-capacity queue
! [! v. A7 y" d3 Bwhere loads are processed. Waiting loads move into one of the three
0 k# e8 B8 S" Q- |( }8 h; l# S9 xqueues in round-robin order. Each machine has a normally 6 |% V; y( e. t# d: F4 B
distributed processing time with a mean of 48 minutes and a standard " ^& _% l! P+ d6 M0 [) l  o
deviation of 5 minutes.% w0 `6 g; K) e4 }
The three machines were purchased at different times and have % @$ x; L( z5 R! Z
different failure rates. The failure and repair times are exponentially
  ^$ p4 I& ]+ u% D9 m% odistributed with means as shown in the following table:
4 h) a8 c9 C! o) W6 K5 `Note The solution for this assignment is required to complete ' f  }! H' F$ U" D% d- k2 _
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
9 t3 G/ u' S- P+ v" ^- i! l) Myour model.
) }* j3 `- g4 [; r" [$ p5 Z) z+ T* X  Y, P. U# u! N
MachineMean time to failMean time to repair
( }# Z$ g0 r* U$ x5 Z0 sA110 minutes      5 minutes6 E# G! h9 W2 y1 A2 f7 p: Y
B 170 minutes     10 minutes
3 o9 j* W/ [; [2 @! EC230 minutes      10 minutes
, b8 k5 W, h& o+ O/ H. |5 J$ k; @. L/ I
The machines also must be cleaned according to the following # n2 ~8 r# h" N" A5 n7 H( H
schedule. All times are constant:
: B! E5 W, _( A
9 |3 R9 b3 ?( M2 }MachineTime between cleanings Time to clean
7 }- J" _. m( }# b# wA90 minutes        5 minutes! ?3 c3 b% l0 C+ q) I
B 90 minutes       5 minutes- q6 r& G$ D! O; Z4 f6 g5 M4 I3 b
C90 minutes        10 minutes7 i) J- u* {- i4 e

0 M  L9 v& S8 s2 C" z9 s2 dPlace the graphics for the queues and the resources.
0 _: x5 G$ a; N% L+ Z2 X6 t. gRun the simulation for 100 days.
/ m. v% O: N) C* `+ }# z5 i' NDefine all failure and cleaning times using logic (rather than resource
2 ~/ @+ }% k, Tcycles). Answer the following questions:
2 t0 m: F, ]  ta.What was the average number of loads in the waiting queue?
* H. ~* L9 c  T/ A7 b. d/ wb.What were the current and average number of loads in Space? * W8 r) V# W$ Y3 s% u$ q
How do you explain these values?
% R7 d/ [$ I: c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉* S: C: B8 D- h
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! P3 s" \: T0 G9 @- `; A, M$ k& @( d这行好像也不太对,各位先进觉得如何呢?3 Z7 w/ H/ i' ]. U' {: t
. T* T  @0 M1 F0 A
begin P_something arriving
6 B/ H# W0 D* b% o0 }' i8 @   move into Q_wait; ?5 r+ G1 X6 e
   move into nextof(Q_mA,Q_mB,Q_mC) / I7 l% u' m3 Y& C  v( K
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min  m8 G* n2 o! @) J4 @
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & J+ K8 e+ y* u9 L4 I
end+ |* H- ^/ f! h( M0 W) F; e( N. q
5 f6 @. D  g8 |+ R6 n
begin P_mA_down arriving
; D" S1 z$ P( y& Q7 l   wait for e 110 min8 n" O( _1 B6 f3 `1 ~
   take down R_mA
" C3 C! j8 c9 B   wait for e 5 min
5 Y$ I: n7 X' t$ U( `   bring up R_mA; F) m/ M& n. b3 g# q
end# s% R" V; S- k5 ]

( S& Y' v- \3 r* K7 t& lbegin P_mB_down arriving
/ g+ F6 M6 ^, ]8 I   wait for e 170 min% M$ V2 ~; R: y' X1 _3 u
   take down R_mB- l" l. ^3 O. [6 @; f% `
   wait for e 10 min& P) v' l  [3 V7 A2 V' o8 V: l& T* Z
   bring up R_mB; d5 K# B7 r9 D. K
end
: T0 f$ @) e$ S4 A% B2 ~1 f; z: y3 l6 ~% n+ t
begin P_mC_down arriving
. g+ M9 e& H- @! ]( U# N   wait for e 230 min
' U- ^3 r) E: E/ y   take down R_mC
$ _9 V3 Z1 N& J) A9 @   wait for e 10 min
3 i9 S6 q  {% H) x3 E6 A; x   bring up R_mC
1 q. s* q2 w2 O  Tend
% C" O. j# j  i; ?$ ?
8 I6 V( z# Y2 Dbegin P_mA_clean arriving
+ [& c/ `5 i' F% X6 ^: u9 U   wait for 90 min
  \+ l9 ]' y4 H' E# \6 `$ P3 I   take down R_mA1 }5 g: x% ~: H# G% r( D" {, x
   wait for 5 min* q" i. A9 l9 Z% r$ A
   bring up R_mA
. ^4 b) S2 L& V1 {end
- o# ~, P2 _6 M: e
  i5 l$ g$ F- I$ y, B' Z! w9 xbegin P_mB_clean arriving9 w( L& s4 H. H, J6 J
   wait for 90 min
/ c# v) L) r/ o6 r; |   take down R_mB8 H6 i/ W6 P9 h% y$ d& j
   wait for 5 min
- C8 x. X" T. v& _& Z( C   bring up R_mB
, v( ]1 I( D& ]end) ^7 v( O9 g9 `" N* r7 i9 ^2 j

3 {9 q; B+ q7 s- M. B$ f6 Y1 Ibegin P_mC_clean arriving
5 X1 }5 D% M4 r% F8 [   wait for 90 min
$ X2 {# Z/ b( K1 ^: E3 M& X   take down R_mC) [. h  C2 P' ^: m8 T" v& ], _. [
   wait for 10 min% q3 N3 V6 P1 d$ C( C  I
   bring up R_mC7 z* ?( P4 l+ I& p
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving2 Q2 s! {* X. A& n
   move into Q_wait) E+ Y3 X' ]6 Z3 F8 L) j2 {) b
   set A_q to nextof(Q_m1,Q_m2,Q_m3)# A* m9 D5 ]4 x, p* \. M
   move into A_w
& _9 F8 O! m/ o1 X2 a5 @' o( O& |   if A_w=Q_m1 then use R_m1 for u 48,5 min
. }6 C/ _# V, T' t6 ]: X5 E   else if .....then use ....for u 48,5 min, f% E" P# v% W. s
   else if .....then use ....for u 48,5 min  
5 A( ]4 W% w) x1 |   send to die
, z2 A5 t0 k/ {end4 [( f# P6 z( e6 {- l3 C, |8 q
# O; p, l' `9 u) ^* v" \9 l5 s
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-4 04:48 , Processed in 0.021254 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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