设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7214|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 3 M$ h  O2 R0 U

9 r" n1 b( L/ a# I' p% T3 P. n底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. w- e1 a( n$ {" E$ T' Y% o* n8 p! w+ F
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
8 v# f2 a9 _4 d% a$ i
+ r: o+ i. w1 }0 _8 u
--------------------------------------------
6 G- e' t* R+ ]1 U" N5 ^; ]begin P_something arriving
, C7 p  y$ e# j7 [  A' [# E7 e   move into Q_wait) p7 D* z; N  I0 j0 ?8 I/ g+ L& K
   move into nextof(Q_mA,Q_mB,Q_mC)2 c5 K6 p9 ]$ h# ^8 N, ]6 \& S" S
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
' ~8 ^2 t5 h+ G) J! h* e9 W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)# M! o1 D( V& z& p
   send to die
( l: g* [  ?: S) \) B* G1 ~end

1 h: U! q% j% o! k& n
6 R2 R! ?$ r+ Y% p$ i$ g* Xbegin P_mA_down arriving- J+ u6 `1 N  M% N
   while 1=1 do
* B6 O% z  ]. ]& k) Z0 U   begin0 n1 f0 @* g% {  e. S
   wait for e 110 min9 r" A2 M# r' ?6 y
   take down R_mA9 T5 L, G# G  l8 o
   wait for e 5 min
! A; _( O. O' N+ a% t   bring up R_mA) o' ^: E; Y% m8 c  }! p8 Q) R6 c
   end
* w* \! ~% l9 ?3 Cend

3 Q1 X" G: X- j+ Q6 P6 X8 y 8 s! _5 y, c# J, _
begin P_mB_down arriving
+ {6 l6 }" T3 H; f   while 1=1 do4 h( r- Q" H* {8 |
   begin
6 ?9 C/ F2 d3 U6 `0 @   wait for e 170 min
( }1 T; ?4 ]% M   take down R_mB
5 G4 J* O* B; n) R- y   wait for e 10 min
# ~  ~7 [7 k: b; {3 R   bring up R_mB$ V. k- w9 V# b2 ]
   end
$ X+ @+ i* f+ {, mend

1 H8 [% B# ?; V* @& E' M6 S( {
( V0 }3 S! t" dbegin P_mC_down arriving
4 B, ]& Q7 t* X8 G   while 1=1 do - c; P. w; b' b6 L) u4 U# s5 G' O. c
   begin
, g+ J( d4 c/ Q7 ~4 c   wait for e 230 min% a' q4 T& z+ C# ]: V. [
   take down R_mC: I3 O$ F+ ]. W& }  i
   wait for e 10 min; S/ ], J6 D, F, h/ F* M6 V
   bring up R_mC
9 K  f5 [) o7 D   end
) }% X, X+ d* p6 V9 aend

- T* Y* Y5 J( \
, S6 n3 \; r7 dbegin P_mA_clean arriving
0 \  q6 r6 V3 ]" \  H* R# s1 e/ C, d* U   while 1=1 do- X/ B6 X0 U1 J$ b, u( w$ h; q6 O
   begin6 C' [" z" V4 g9 O
   wait for 90 min: a' P( {: Y4 u4 ~
   take down R_mA
* X' ~7 {, W. h. R, d$ v  |; R( Q   wait for 5 min
! ?! c: R3 K& ]   bring up R_mA
# C; C1 l( I! p7 d6 z   end
3 _6 Z( {5 \  L" H, Iend
" w+ q& X" R0 }1 m0 d
- Z  s8 _# @" [$ B, q3 J# k
begin P_mB_clean arriving
9 N4 _( l- d/ \1 L   while 1=1 do
! N3 @9 b7 o. h- \$ H# {   begin6 i) O9 P' a9 x2 m
   wait for 90 min
9 Z& f! C( l' E0 }0 }: e- R   take down R_mB" A5 x7 r  [# i/ E5 I% e1 s1 c
   wait for 5 min
2 e" v7 p# p, y3 u   bring up R_mB2 N) p$ }. ^& Y' `0 |" J: n
   end' L  k( E. ?. [+ p9 ?
end

  r0 x. O; W5 }; w: i2 @: E 5 S5 n- N1 O" V  z" Z8 n
begin P_mC_clean arriving
. w- T5 \  `2 F8 D. t5 S- h   while 1=1 do
) I- M5 H' F' ~5 o   begin
: I+ c* @! M1 Q2 v7 Q   wait for 90 min
" J& j9 q3 K# s+ R: w2 Q   take down R_mC
% h+ t2 E. c6 Y- e" e4 |- X9 _) p   wait for 10 min0 {* ?$ Q! Z6 ^2 M. f
   bring up R_mC* U" y) ]& ^1 e7 s1 G
   end
7 w8 x* r- e8 g  Uend

* n2 }! r. w( n, ^: Y- L----------------------------------------$ F& B5 |* B8 G4 q3 s4 W

# z5 N' z, J1 c3 GExercise 5.9
* n6 X& v5 v& G7 g$ w' J. T# c; u1 z! c
& y2 _; z% C( S) N4 Y. O
Create a new model to simulate the following system:
4 E5 X9 \! U) lLoads are created with an interarrival time that is exponentially
4 |8 s) F. @' C% ^distributed with a mean of 20 minutes. Loads wait in an infinite-0 P; Z8 x" X" ~$ A9 o$ T
capacity queue to be processed by one of three single-capacity, - Z& ?& `0 E9 p* o5 m1 z2 F
arrayed machines. Each machine has its own single-capacity queue
1 Z: _# N% W& _& [where loads are processed. Waiting loads move into one of the three
# _  _2 v0 B3 Y$ M8 i3 Nqueues in round-robin order. Each machine has a normally
' h, u$ v# O+ T/ Zdistributed processing time with a mean of 48 minutes and a standard 0 t" z; M( ?. w. X8 C: C" M
deviation of 5 minutes.- t/ q5 i, f$ z" Q7 o& N0 P5 D
The three machines were purchased at different times and have
$ m) l, G. x$ V9 r: `6 hdifferent failure rates. The failure and repair times are exponentially
% N7 u) t* G9 M" F) L, e9 Mdistributed with means as shown in the following table:
- [- }/ a7 j% J- RNote The solution for this assignment is required to complete 1 y# }% x1 f7 i: r! W7 J/ e
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ B3 I& L3 q' Q# `7 W
your model. : }9 w' \3 |7 S6 x7 Y  ^9 U" Y0 s# {/ K
9 h/ j) ~' b  z% \  ?$ ]4 V
MachineMean time to failMean time to repair
# q/ w$ m6 T! bA110 minutes      5 minutes
# g! h' o1 [, H: J' y* A; T3 U1 kB 170 minutes     10 minutes
0 Y: h' E7 w# F8 sC230 minutes      10 minutes- B- _$ D7 R; I2 w8 Z

# k+ {0 g" g0 n, W0 \The machines also must be cleaned according to the following 4 A4 z. n* y* m  S$ ?/ G
schedule. All times are constant:
( F$ P, L, l6 c! p
/ s. H" P5 y* HMachineTime between cleanings Time to clean/ ?/ y+ [) d+ {
A90 minutes        5 minutes
* t6 E7 E9 ^( mB 90 minutes       5 minutes3 w0 ]# o  k' j4 Z; u
C90 minutes        10 minutes2 U0 g. `/ Z* }9 W: w  G& P

0 G; l1 H4 c; U+ j( N; gPlace the graphics for the queues and the resources. ( V1 \0 m" o! a2 k& o
Run the simulation for 100 days.
7 F* l+ j4 E2 l' G4 WDefine all failure and cleaning times using logic (rather than resource
1 w' e0 x, C& c. i8 ~& H9 b; Acycles). Answer the following questions:+ F* D, |) C8 h: |" `
a.What was the average number of loads in the waiting queue?
) ~/ m; [  M- mb.What were the current and average number of loads in Space?
" i4 ~( K; D3 \+ `How do you explain these values?   B5 [: e9 x5 p% d/ L8 @; t. F/ B

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
3 M2 i, E# z$ v+ \. _send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' U8 K3 u1 ?3 @" ?/ d4 `3 y/ I这行好像也不太对,各位先进觉得如何呢?- J0 {$ V( y) E. V# I2 u

& V2 B  T6 X' Y& V7 U6 [begin P_something arriving7 @2 u3 l, n: K% e9 ^: \
   move into Q_wait5 p$ _' s/ D( [# L$ T
   move into nextof(Q_mA,Q_mB,Q_mC)
. L9 C& F; p4 f; `   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
, k; G! W  Y4 O- S* G& {$ E$ A   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 5 v& [% N/ \- w
end) L  o$ F6 T, C, E5 e$ x, e

/ n  [5 {+ a7 ~- v$ d! f) Obegin P_mA_down arriving
6 F4 Y7 {5 q0 v  I   wait for e 110 min# p; }- L% `2 O* j# n; Y6 b
   take down R_mA
2 I) G1 F0 A: H- N9 g   wait for e 5 min  ^& n0 l% N( m( H. u. n$ B
   bring up R_mA
+ s# H' A, n" v- Send
$ B3 \4 d3 n( G# }4 X
6 i# H! }- }- q0 Xbegin P_mB_down arriving& V8 R& K; g7 B0 s# D
   wait for e 170 min
" E+ A+ f+ M, E8 @* |   take down R_mB
' Z4 i4 u, C, W% Z   wait for e 10 min
' }" w/ |4 `( Y. Q( |, t6 M" Z3 G+ S% T   bring up R_mB
) j& e8 C  B# `: T- j5 p+ q. Eend2 m; v# ?* V4 }& ?( p4 L& ]
: S" e1 F5 S, k0 H& C+ }
begin P_mC_down arriving
2 A/ |' A$ H3 ^: Y   wait for e 230 min
5 b5 G, l0 g" p) u$ y7 H   take down R_mC
" ?0 B1 j) P0 I0 }9 j   wait for e 10 min
* D' x% G  G3 U4 e9 h   bring up R_mC
$ M. R7 @. D) }8 d; d) eend6 l) ?2 N6 y# \4 A  p

6 E) a* ^- V* [begin P_mA_clean arriving
+ `) {# Y- Z. D( a9 M" I) G   wait for 90 min
% e  q: R. s; i) J   take down R_mA; `2 _& _1 T( J) B8 y
   wait for 5 min
; T5 r* O; t9 v  R9 {! `! z4 W   bring up R_mA
5 V5 R  G- `% `, l/ D$ aend6 A$ j- j( E# Q+ b
0 p% I1 c8 Q6 l7 |) m* x% G7 n! {
begin P_mB_clean arriving0 S3 S" f$ C4 y2 O( x' k
   wait for 90 min" b8 v% y1 x- G5 ]$ }
   take down R_mB
( D$ O. n( {- |' K   wait for 5 min" [# }% j' \! G2 ?) P
   bring up R_mB
) B. E* j6 _9 G: k" kend
+ z+ b) ^2 J5 ^1 g( W% A/ S# v( r
- S& _' `% [$ S7 b- l; fbegin P_mC_clean arriving$ J0 l/ s2 C( u- n
   wait for 90 min
4 O: Z; D9 i! U8 _   take down R_mC
- t( c1 t: _' j& B, D: H   wait for 10 min
9 q; o) H3 x, {2 p( K4 w   bring up R_mC
8 G0 n* t2 ]0 a5 R0 ?end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- O, E0 I* I* E: U   move into Q_wait
4 K* G7 b' |# f) f% A$ E+ B   set A_q to nextof(Q_m1,Q_m2,Q_m3)
3 c* ?6 D+ f$ b6 k0 F% p2 a   move into A_w
% K6 j* [) k3 J. f3 [7 j   if A_w=Q_m1 then use R_m1 for u 48,5 min. |; O4 g& ]' v+ `* D
   else if .....then use ....for u 48,5 min
6 s1 E% [0 Z: H6 j- |   else if .....then use ....for u 48,5 min  , e5 v7 m$ }- \
   send to die% W/ Q  Q" B4 B, y! t
end. y4 K2 n% x, W1 ?

) w; F  G3 C8 ?8 I; w  W& U8 L供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-15 15:02 , Processed in 0.014544 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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