设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8010|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 2 z( Z" d2 ^, R; \
- V) ~0 I4 r% F$ q) m8 j9 A
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
6 y$ b. ?, S( S! u* h5 ~( a* N# w6 T1 Z5 g: ?" P7 z8 v
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
# d5 ]: h0 e0 ~( A0 L5 C7 M* y9 S% ]1 y& c( v6 x: b
--------------------------------------------  ?* r  l9 j' ?
begin P_something arriving
( V; A2 K" x9 F( |   move into Q_wait
( }1 L! Y" K* W- b' f5 \: c( o$ j* y   move into nextof(Q_mA,Q_mB,Q_mC)
1 G3 z, K9 S& j* x, m; t) D   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
( N! Q/ L3 _* {9 I' x   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ \  l, k0 `  B; s- V0 @   send to die" P0 H0 U+ V: _5 o) _; A) t
end

2 l( L$ I% {3 E. \# a+ p
6 T% E) ?4 f4 j, A) S) ~begin P_mA_down arriving
7 B4 t. {9 n: F) z/ L   while 1=1 do
2 ^, E, [$ X2 p, v; X- e& ~" m! N   begin! Z& ]$ |2 z- Z2 T0 y
   wait for e 110 min, [1 K! {! p( i' Y4 G+ K6 o
   take down R_mA2 z: k( `2 Z) X5 X
   wait for e 5 min
$ p, l) ~# B) c! ?6 Q8 Q) J$ M   bring up R_mA
5 }' n5 q7 D) e/ _$ \; u0 U+ A   end
9 r! d' N* O! e/ R% g$ Wend
/ O2 c- T. L  r9 Z* n

2 _5 [0 ]; J4 C) i+ B! K6 rbegin P_mB_down arriving
, R% W# e/ W. }7 Y6 d7 h, U/ {   while 1=1 do+ i' A  d" R6 o. L* W3 y
   begin
% T+ ]) X  Q- m. b" T5 A4 y   wait for e 170 min
( a, Z6 z) G$ R( K; ]# T' E% v   take down R_mB
* `: b( b, r2 F) U   wait for e 10 min2 a$ A$ R  i! _, I, L
   bring up R_mB
; D' |+ s" |$ J) n* e- n. V, L   end
: \- z1 E+ ]' P3 l' u) P, \end
* @; B4 [& I. A: O
( G4 _; f0 T& i& N, P7 [  L
begin P_mC_down arriving. g4 Q1 K0 L' N$ V
   while 1=1 do
  w- y, G( P* S+ F. b   begin
* k# `4 m, f+ H! ^2 m; c0 X% d   wait for e 230 min" Q: }! L- f* }3 ^9 T
   take down R_mC
" G# X- z) O6 ^2 r( \   wait for e 10 min
; R3 O& X) b- C5 `/ Q% \: t   bring up R_mC
' l5 p1 T# G* B- E7 [   end# d" ]9 S1 D. m2 k- n2 G6 E( D
end

1 s- T5 w  @* z: _: [$ r
. M" T) I) `& e4 |' [begin P_mA_clean arriving9 Q# f( I0 t6 h. q& U
   while 1=1 do4 O# G" p' q2 o3 |8 V
   begin
" L" i. t! c% U" H( x6 a   wait for 90 min
7 J/ D" j; q4 q. f4 t   take down R_mA
# R2 m" @$ Y- Y: ~2 B' s   wait for 5 min" a& a( F1 ~' ]0 E
   bring up R_mA
) p# O. \% _. n7 l. V$ x9 a   end% ?1 m. M. ]3 ]  H5 l
end
. T* ^9 o  A, B& a& R6 R, G3 k

) Z: v  s+ H' O5 _begin P_mB_clean arriving+ O* c# e! S# e  [0 x
   while 1=1 do  y2 e5 e/ Z4 D* {1 w/ @3 V
   begin3 e$ f. P6 ^  A/ R$ V: V
   wait for 90 min
9 {$ Y) \3 b/ Y2 |- _/ O! Y   take down R_mB, G9 ^' v4 C9 V
   wait for 5 min& q( T' j% a2 F1 d. H5 q
   bring up R_mB9 ~4 v. N) G  p. l; K4 j+ [. o
   end
( e! _% _) X; b( B$ iend

* J1 i" E  h7 \3 ?* o : d- M: Z7 F) [& g7 s& A" e" r
begin P_mC_clean arriving& M7 |* p$ U3 S: |/ Z
   while 1=1 do
1 @0 {0 P1 `$ g+ ]4 a   begin+ H0 m* t6 A' A0 Y$ [' q# d8 _3 v
   wait for 90 min- [4 ]+ \4 F, e# D; T
   take down R_mC6 V3 y. w, o% R
   wait for 10 min* Z( D; ~, e; Q5 f: h. K: `
   bring up R_mC2 D& l2 `1 _& P
   end5 p( }! ~; G- h
end
  V; |3 T; @1 p3 W2 A. J7 M, w
----------------------------------------
- c; W, c1 C4 }3 A; V! e6 ^ + U/ u8 Q1 s6 x0 \7 l9 G
Exercise 5.9
# F( x( \4 c" ?* B, u
4 q: d# }5 i3 v7 ^3 f8 v7 G# h0 d& D
! n9 y) v& }6 J9 [$ w/ GCreate a new model to simulate the following system:
* v/ y! o% n" F& u: V& ^Loads are created with an interarrival time that is exponentially " b" p: R1 M1 c. U, w
distributed with a mean of 20 minutes. Loads wait in an infinite-1 `: ]/ f, M" y' i3 ~
capacity queue to be processed by one of three single-capacity, / T% F" J, h5 `2 K
arrayed machines. Each machine has its own single-capacity queue
! t" G# N( H; _  uwhere loads are processed. Waiting loads move into one of the three 4 f  f$ W! _' |- c8 l3 d8 d" O
queues in round-robin order. Each machine has a normally % M  e2 V' C. ^% c/ L
distributed processing time with a mean of 48 minutes and a standard ) \6 d, N+ ]5 H! C9 X  U! \
deviation of 5 minutes.
8 {5 m3 n- O% b% W- v$ F7 ~' GThe three machines were purchased at different times and have ' _6 ~0 D  [# ?) P0 h, M" m$ h
different failure rates. The failure and repair times are exponentially 2 r6 ~# X- j" E6 ~# W  a
distributed with means as shown in the following table:
1 p$ t4 w5 S; `3 CNote The solution for this assignment is required to complete 8 S( H2 d6 B3 ~7 I, U" W0 A0 m
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of - t# g/ ~" l9 B- a7 N
your model.
4 Y& R. i5 Y& u
3 v5 S  Z4 Z6 v* F4 Z( T$ sMachineMean time to failMean time to repair
8 o% w& d% h1 L# x5 A: h# j; j- X2 xA110 minutes      5 minutes0 B4 X3 K2 i: H; G
B 170 minutes     10 minutes
* w$ _( e% x: P6 rC230 minutes      10 minutes  a# ?3 e2 _) M1 I' T% r# ?; N+ _/ A1 x

$ B4 J& Y% j$ a) E3 }3 S3 oThe machines also must be cleaned according to the following * a7 r. F; s$ t9 ?5 `# \
schedule. All times are constant: 3 m& W# `2 N& ]

+ x) K7 @& `. c; D2 }MachineTime between cleanings Time to clean
# i$ R. r% D( s" {* h- ]; m9 nA90 minutes        5 minutes! @* V; n3 T& S: Y8 Q- u
B 90 minutes       5 minutes
2 z0 q& n% R* [( X! \) oC90 minutes        10 minutes
# F' F/ {' Q( A& `( q7 g- ^6 T6 V& W/ b& n$ f/ F; r
Place the graphics for the queues and the resources. - T' o, M2 N1 y! R
Run the simulation for 100 days.; O: R( B: G7 @3 P3 j! W
Define all failure and cleaning times using logic (rather than resource 9 U# _. ]/ @! e, G! ^! q" m) ^( O
cycles). Answer the following questions:9 S4 J+ C$ `* b1 g" q# I& ^
a.What was the average number of loads in the waiting queue?
( ]! N/ b$ w2 x2 Q2 ib.What were the current and average number of loads in Space?
3 y7 u2 l' G, {5 VHow do you explain these values?
7 [. s  ]: N: ]

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
2 t. x: r2 ^7 O- Lsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& t8 n3 v4 y6 D" h+ D* W
这行好像也不太对,各位先进觉得如何呢?# T. D; y; n% x$ j  C0 \3 j
1 v2 r0 R" k8 V9 H! Z
begin P_something arriving2 B& w5 E. }. [! q, x
   move into Q_wait
; }& i  P9 x9 X7 t   move into nextof(Q_mA,Q_mB,Q_mC)
, M( P# z6 k) p$ c' I: G  D   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
3 w2 x% l8 P) {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ l& T8 i, `7 m0 xend
1 [: l. a+ ^& A/ r; N9 K
  f4 {$ T: ?7 b$ I, U" S! abegin P_mA_down arriving
6 i$ Y/ }; J% I* g, b3 w   wait for e 110 min
0 S# m% F  v# V; S/ x" |   take down R_mA- n* {; m% M. K5 k/ ^0 Q' l$ U2 @
   wait for e 5 min
4 e( c1 V8 x2 z$ L$ _8 k3 M" N   bring up R_mA* ~: [( v* \4 ]. f
end
9 S0 w2 G+ d" T0 H; s* b& z* e; ]& P" W0 l' `; k
begin P_mB_down arriving
8 _0 t' I  v2 l0 q1 J% n1 \4 `, s   wait for e 170 min
' h/ H/ o/ u9 U4 F0 x* [& ?   take down R_mB' C& V" r' G( k7 ~" [7 B
   wait for e 10 min; N% M1 T+ k% b$ `7 O/ J
   bring up R_mB
: c8 ]. i. z3 d, e( [1 \6 L# vend& O( F$ ~* i7 f8 X$ f

* d$ l! X  o# v! W( B+ Sbegin P_mC_down arriving
) s) {0 M+ B; V  f' m% d   wait for e 230 min" h* M/ z. Y! {
   take down R_mC4 q, z9 \9 O4 R, P, I' }0 k( t
   wait for e 10 min
: V- G) h. K; K& L* ]   bring up R_mC
: f, U* `" Y2 ?3 d4 a# Iend' O! H$ _+ ~* m: L* r0 o8 }
, B% V$ s7 m" R/ Z+ A
begin P_mA_clean arriving
8 o) x% I/ ^0 Y8 z2 G6 V- d   wait for 90 min
$ ]7 k# y5 |) Q; \   take down R_mA$ n( K# p& q% A4 L
   wait for 5 min
( g* X0 }6 p! Q1 W& h* N8 W   bring up R_mA& m, T% n; y) b
end
6 w2 B' Z$ A: }4 p( J* f
- e9 ~7 }8 H6 w7 I. n: sbegin P_mB_clean arriving$ g# s" u2 J" i( w# |3 B( _2 k
   wait for 90 min( P+ w1 Z" ?9 D0 `+ ]7 f- I
   take down R_mB- T6 Q0 k, c- t3 J
   wait for 5 min# F( h& f9 C0 `9 b% A7 ~
   bring up R_mB
5 S; s* {2 B+ m, {, eend. |5 s6 O$ T9 S. i1 Y; Z2 i4 _
; Q6 G6 F% v# w
begin P_mC_clean arriving
+ P+ j  w1 o$ {" V! B4 D: Y, C5 o0 l" L   wait for 90 min  ~* ?" e% R: N" z' z: a$ @, h
   take down R_mC3 v( y' F/ C: p- }9 z
   wait for 10 min
. |5 g$ B' U* v* ~   bring up R_mC
6 p$ e+ w! x; g  o7 t3 aend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
: R6 E5 u$ m) F  t/ u: N   move into Q_wait
# q6 V8 \, f  G( `( ^   set A_q to nextof(Q_m1,Q_m2,Q_m3)
' c3 ^4 H2 l; B' j0 x) [' ~% `   move into A_w
4 F, ?" K6 F, d7 ?   if A_w=Q_m1 then use R_m1 for u 48,5 min
9 y9 U1 T. e$ }& I( M/ R' T' c   else if .....then use ....for u 48,5 min
) ^' V5 C6 l8 b8 j3 y   else if .....then use ....for u 48,5 min  
: r# W: k. M2 S+ E# r  S; l   send to die
+ m3 N' ]7 j; O" s/ `end
) c8 x: U* I% Z8 b4 w" c+ c: O" G! T
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 23:27 , Processed in 2.608120 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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