设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6811|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
, J9 L3 ~1 t( O* y$ C( L7 P3 T% Y& O+ X+ a  Q: z* x& a! b$ D
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
1 ~4 l' `9 `) F9 _& q- f# |8 H5 \) k- g
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
7 z# K9 m0 }  h$ C; ?
8 u: p* S% F- y& l
--------------------------------------------
! ?8 c6 H) p$ E7 \( j" Q9 Nbegin P_something arriving# e: G3 C; _( q5 C7 G. K7 w
   move into Q_wait  @1 y5 O7 e. @. ~2 i+ `
   move into nextof(Q_mA,Q_mB,Q_mC)
. d3 P# c, c5 l' q3 h* Q3 a   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min2 e, _& [/ I% p  z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 ]0 W/ V+ y5 j" D, r: E9 R, w   send to die, T: x, S) a- h
end
" z; [0 r- Z/ A) a5 c& A2 d

# T+ I. y5 q" V; k' A3 _begin P_mA_down arriving
& Y2 p0 a2 z0 ?3 e3 P. T& M9 S   while 1=1 do
) r( u+ z7 W3 V1 r$ s   begin
9 j& y; S( V/ ?" c  ]: {7 m, N   wait for e 110 min
! u3 q9 k( _; c. J6 K% [. i   take down R_mA
/ v( E/ |, Q1 K0 F1 L5 H  m   wait for e 5 min) {' H. q1 N9 n8 K! q& T, K# t
   bring up R_mA7 H/ s" N& ?2 ]* e( ?
   end. v! s9 E+ o4 G  l
end
: I3 q% W- B: H) B& K9 M2 z; Y
3 W3 W3 x7 I% w/ ]; Q5 Q
begin P_mB_down arriving  k1 ?2 R0 w% g' r- P
   while 1=1 do, Y" o& _) A0 f8 }" p5 {0 y2 S
   begin2 E, j) K9 m3 h9 B- [2 Q. c% g! K
   wait for e 170 min
9 N7 c) N6 y% F- e0 x5 c* M   take down R_mB  [5 P. g- H3 S! T% P2 f0 t! g
   wait for e 10 min7 X/ e/ p6 h& y' @
   bring up R_mB
: p: ^# L; H: s  `* p# a   end
6 D7 m3 }/ V/ e1 c" p' f+ lend
0 ?  g& ~- I! z. q

+ f( n3 P& |( H, E) ^$ [, fbegin P_mC_down arriving
0 W. ^4 F4 |. S7 t6 e   while 1=1 do
: b1 }+ N! Y8 B7 d   begin
1 p* h# ^% P3 _0 S7 ]   wait for e 230 min
! V& y" P5 m! l$ P: k# O2 ~" a' \   take down R_mC# }" N  G8 m- d5 p" e/ [4 q
   wait for e 10 min$ _: S. J0 x5 }2 m, i! R" ?/ j
   bring up R_mC' m4 C7 C8 R/ h
   end
* A, D9 \; H( w5 a2 F1 Gend
+ X9 Q5 g, Y4 E8 q5 A! t, B) ^

9 d1 o# ]; P0 M4 ]) ibegin P_mA_clean arriving$ i: e0 Z4 n2 d+ N
   while 1=1 do
4 ^6 l; t3 V- `% O3 L. E) }   begin
, `. k  r2 Z" }: U   wait for 90 min6 A6 `) Z6 a( @) d9 t2 _
   take down R_mA1 l$ ^# O4 r- a% s
   wait for 5 min
3 p$ k  b: [$ K: q   bring up R_mA4 j; F( }. E; @. e/ G. `; @* Z
   end
9 T! i, Z. v4 H% M, m% g0 @+ pend

, O/ {, C% R3 k0 T' J 0 R7 F, l1 Y. ]4 R" ~
begin P_mB_clean arriving
& f5 Y/ L7 d  c+ b+ X   while 1=1 do7 F3 x6 ], a! u/ E! H
   begin$ b+ L4 E  C  l$ V! `* e! f
   wait for 90 min
7 L% ~0 x" j7 T# C8 C0 l$ d5 o; h   take down R_mB& d* M6 ]9 J4 `3 d- C
   wait for 5 min
- E4 `9 v2 i; K+ g# n3 w5 Z$ C   bring up R_mB& o( v, I" x3 {0 \
   end+ o( o1 z5 ]) {' c
end
: R0 \! u7 X7 c% Z) I# b! n% N

6 O% m0 G3 {. ~. y- ^- H- |begin P_mC_clean arriving
" `- T5 D+ U* Q$ T( `) }5 n   while 1=1 do
# `/ e9 L; Q$ ?; ^   begin. S6 j0 e8 ^, B$ Z
   wait for 90 min
% A/ Z& y1 A0 r   take down R_mC9 c  n4 P2 @8 C" P) w
   wait for 10 min
- E' C3 X2 A5 S9 |   bring up R_mC
% ?6 w. d! ~  n4 H: y4 L   end
1 I+ I; |* [3 _8 t) fend
# a4 z, f1 E6 z1 C; H
----------------------------------------
' R6 B" e3 ~! j: q9 y! Q% k+ s * E, R+ j3 g+ ]) D9 o
Exercise 5.9+ K, V0 s* ]8 Y
4 I: [" H$ l* M1 O+ C7 Y7 ?4 [+ {

# o# X- g3 e2 M5 y, r& L/ \* @1 T& iCreate a new model to simulate the following system:$ Y$ ^& Z( v# A
Loads are created with an interarrival time that is exponentially
" m2 K6 c( D8 D1 mdistributed with a mean of 20 minutes. Loads wait in an infinite-8 L) x! f5 F* T; V* p# H
capacity queue to be processed by one of three single-capacity, 0 u: X& r" @) I. M
arrayed machines. Each machine has its own single-capacity queue
; Z1 i1 ?+ Y6 c$ \4 [where loads are processed. Waiting loads move into one of the three
, n, e  {( \. T: ?3 |2 dqueues in round-robin order. Each machine has a normally - A2 X3 \1 B' ?+ V6 \
distributed processing time with a mean of 48 minutes and a standard
- S. W$ e0 A( M0 qdeviation of 5 minutes.
9 \' V3 ?# g  e) b( \The three machines were purchased at different times and have
* U' A1 W" E: C7 Wdifferent failure rates. The failure and repair times are exponentially
8 r# W5 W' r! x, _5 h9 u! r% T" L. _distributed with means as shown in the following table: . y# f( e& n0 \" O
Note The solution for this assignment is required to complete
, y; j; y0 W  Texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 6 ^/ m& ?3 G- e$ w
your model.
$ D6 y2 A6 t- l. t6 H9 g( {: N/ _0 z$ f: \' u3 T* G
MachineMean time to failMean time to repair
* O/ {+ d% k; m8 U( aA110 minutes      5 minutes  X2 B3 T  l9 a1 ^
B 170 minutes     10 minutes+ a- c6 K1 I* q3 L
C230 minutes      10 minutes4 |' @. J' s9 s" T* j

6 i) k8 e* x7 ]- F/ P% @5 t( m0 mThe machines also must be cleaned according to the following
/ Q) X2 N2 P- f, Aschedule. All times are constant:
9 ?7 [6 ~0 U& ]+ S. H, y: R7 K% a' z( j* F1 d! I" P  B5 u2 f
MachineTime between cleanings Time to clean& }7 F3 _: v+ \0 x
A90 minutes        5 minutes7 w' |' V% f6 G" l
B 90 minutes       5 minutes
, F9 n% V' v8 a: L  uC90 minutes        10 minutes! @7 ~3 g7 j1 G6 j+ J, s$ Z

1 g+ k- E2 W0 Q1 s) }Place the graphics for the queues and the resources.
. p6 r. I+ U& o! {4 Q& c/ fRun the simulation for 100 days.
! j4 h( n" `7 s( b9 UDefine all failure and cleaning times using logic (rather than resource
, k1 ^: M/ z# k5 |5 p5 o, Fcycles). Answer the following questions:* x5 s9 g$ H$ Z4 T
a.What was the average number of loads in the waiting queue?
. R2 C2 Y5 k+ N7 r( J9 K/ l" pb.What were the current and average number of loads in Space?
$ a& Z- z% b% UHow do you explain these values? 6 Q; M; L8 V1 @& k; q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉6 x: P$ B; l" u/ @- h; P
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- k" v/ E5 V  Z8 i这行好像也不太对,各位先进觉得如何呢?/ E& P% D# x' e" i
0 l. ?+ u' j% w  s' }0 Y- Z, y4 J; v2 Z
begin P_something arriving! d" n9 o" Z) g$ f. A: W
   move into Q_wait
" l% T( f: w' F; s   move into nextof(Q_mA,Q_mB,Q_mC) 3 H8 K0 l* Q' b
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; G/ f/ x2 w+ ~9 I) c( N5 S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( s/ I3 i/ S% s& ]8 z8 eend# C2 L5 b9 q: |6 X- k2 K% ]9 H- J
4 K$ }7 q% _  @9 L: a/ ~8 D
begin P_mA_down arriving
, @$ ~3 O) n# U/ w   wait for e 110 min
2 ^# U; v7 \2 T4 Q   take down R_mA' m* \: Y- }+ E& D0 ?+ \
   wait for e 5 min
8 Z/ j5 B6 L1 l0 e. o" Q   bring up R_mA4 Y. j  z6 N: F. d
end8 X5 p3 E. ^/ m

! O, \. x, N$ t4 E+ k6 q3 \begin P_mB_down arriving
9 _; d8 a0 B8 L* x1 a# z   wait for e 170 min
! l& o, D9 `/ H& x   take down R_mB
# x& Z9 T2 y+ w/ b' `   wait for e 10 min) ^- C! ]9 H+ g, o
   bring up R_mB
- u9 u0 O1 p9 Q# \& U" Yend
( w- K7 I3 T  A
4 z3 {4 R5 W6 C" g, s* s1 Nbegin P_mC_down arriving" h4 }/ u! Q6 M# G" {' f
   wait for e 230 min
% Q' F5 M' [) [   take down R_mC
" n) v1 W% ~( q( r5 {# A! r   wait for e 10 min
- G& o: C/ g5 [7 D1 I   bring up R_mC7 t0 q# j/ d5 L8 ~! }
end1 s! d  a0 ?- {; v+ A
$ D; O, f9 E4 j
begin P_mA_clean arriving$ s4 v- J+ Z8 i& t9 L" X
   wait for 90 min
0 g( y5 I% T0 X1 N   take down R_mA
* x+ B/ V; z4 Q; o% ?2 [2 G: o   wait for 5 min
3 W  U% P" R  Y( F) N$ e; x! D* D   bring up R_mA
& s! _1 ^# i% i: send6 |- z- p3 d9 o4 \* Q
& S' F" J+ w' Q: G1 M1 h
begin P_mB_clean arriving
/ s2 w- p! _+ L   wait for 90 min) M( t5 ?' q+ ]' l) Z" _* d  M
   take down R_mB
! Y8 ]& |8 ?2 y1 g( l! {5 w. ~   wait for 5 min0 K! h" |2 i' P6 G
   bring up R_mB
7 ]) X+ \# e/ P" Q- h, y! ]; Mend
9 @+ Y3 ]) L. j
* i9 @5 c# V/ t9 H0 dbegin P_mC_clean arriving
' e5 O: W4 g: `0 h7 g   wait for 90 min* l/ A/ V5 k4 s1 ^" t6 f! S/ `' }( |$ n
   take down R_mC, F" B/ M& x( S( f0 K6 q
   wait for 10 min
7 Q2 U8 P9 v) c2 z: ^* g   bring up R_mC
- M2 v& Q: V. @+ R, @% G5 U# T; yend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
& _. m. {# ~3 B" t# V6 R   move into Q_wait# |7 [) H" P+ p# E8 q" |3 c. b
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
: c+ R8 l; Z( b+ g# W   move into A_w
$ q, q+ i% N5 S3 c   if A_w=Q_m1 then use R_m1 for u 48,5 min8 h: b6 v! w  D4 i; O1 \3 Q
   else if .....then use ....for u 48,5 min
! o* Y/ h& v! ?9 O7 ?   else if .....then use ....for u 48,5 min  
# i3 u+ g. E! J) r% t   send to die% v+ y6 z" S9 R( ]# a5 @
end
" H$ q' K$ a- w: i7 }
" v! ]! m- e9 n$ b; q供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-3 12:50 , Processed in 0.012260 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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