设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8316|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
1 Z7 w# @0 e' ~! T
0 Y3 c$ t+ k" @4 g0 }底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
3 W5 T( p$ m' d4 v( c0 z
" `$ a. B% S8 k2 [' B不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
/ r3 Z. |8 {6 u6 V4 i, \9 i& p/ d* B: M4 O0 C' t* P
--------------------------------------------
  L7 b* H8 ^5 u3 _9 c; H$ s8 b" Pbegin P_something arriving
9 [1 m) _/ W5 Y, F$ z0 q' Q, k   move into Q_wait
0 [& G2 j# o% H# T   move into nextof(Q_mA,Q_mB,Q_mC)4 q$ c4 P' q6 j' P% |: g. v7 g
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min) n1 H7 B; O6 U, w
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); f  G, k7 o6 x3 Q4 |
   send to die
3 |: J, `. n+ j, u3 _8 _end

. h' Y, z4 J6 D
) D) l# Z' ~7 R/ pbegin P_mA_down arriving0 Z/ ^3 d0 D0 b* g
   while 1=1 do & \7 B9 H0 E- J8 O
   begin
+ |# f5 |4 }7 Y   wait for e 110 min/ k  \8 Y# T" N/ N  L7 r
   take down R_mA5 B5 Y2 n" _& `( T
   wait for e 5 min2 U- L8 z1 P; Z0 A$ `
   bring up R_mA6 h- d, M, W1 H5 H, ?  D6 z  W
   end
$ x1 D0 O' `: h& ?6 E/ K3 Vend

9 l* F# a( z" S" w# I8 U0 j( R
* T8 a. x8 o" g1 D8 m& L& fbegin P_mB_down arriving
- ?% o; o9 ~5 g5 L+ X8 U  C4 v5 Y   while 1=1 do
" q3 H& ~0 k, G   begin
- |& ~' O( J- F! F; [) y# ~) a5 `4 i   wait for e 170 min
3 n" R' F4 }0 V, @# i   take down R_mB
6 V; B  t. j6 [+ I$ N   wait for e 10 min' O& f" E: W4 v( |( K
   bring up R_mB
/ \" a7 M( K$ y& O8 L   end# G! J& g+ k) M9 p% J% L% c# o
end

2 x2 t/ h/ ?+ x 3 G4 T2 y! \) x# }9 Z
begin P_mC_down arriving
$ o8 H# D/ c- n$ }0 }& Q   while 1=1 do ; @3 v. R; G4 |  Y& Q
   begin
6 E3 M& h! B- i( j  ^7 o- |   wait for e 230 min
/ `: v8 f) O) ?0 Y   take down R_mC, }! \3 u2 T/ j! A
   wait for e 10 min3 s0 X6 @: W8 _, s: d9 D( H
   bring up R_mC1 ^: _/ A* B' n3 k: [
   end
; E' F$ v1 ?% ?  _end

2 U6 q4 Y8 l% d" }" D0 Z
6 h% q0 e- y: ]/ G, Y# {( i) sbegin P_mA_clean arriving
  v# {) `- r  X# v/ l, Z1 n. _   while 1=1 do' I5 I, P% M% M
   begin* l1 n8 c) P$ ?' h" E% e
   wait for 90 min
! g# j! d1 H. L1 l8 }6 l7 D   take down R_mA# i3 v/ v6 i" W
   wait for 5 min
+ f8 b7 H: p+ r2 G) v3 E   bring up R_mA( J4 r+ B: ^/ L( B$ I- `1 D" T6 d
   end. h" Z& s, i. _) q& N. K  e( ]
end

6 z8 g7 W2 ^5 A+ J & ]/ c7 N: R$ A& D8 r6 C
begin P_mB_clean arriving( l+ V* t& ], w1 e/ A: T
   while 1=1 do3 o" M9 H( V0 y! g/ ?2 E7 R$ ?1 n
   begin: N, i' ~3 `9 w) y  B
   wait for 90 min
& x1 G! f6 \8 Y- r1 k   take down R_mB
9 o$ j" D6 c( ~% n8 F6 r   wait for 5 min) j8 z( X0 U; I9 c
   bring up R_mB
1 f9 l% z0 T# h# X   end% S) r; D3 n' \$ L  }2 l, b
end
3 u. {$ V4 }' Z7 ~; A
0 M* z: s9 G, ]1 a/ Y2 S
begin P_mC_clean arriving- A% O3 [1 D5 w2 r, k2 K. q% ?
   while 1=1 do
7 I0 }. Z% ?, n& I5 {! [5 c0 e- D9 {   begin
" ?7 H" ^) |, u+ |! B   wait for 90 min- D( V) P' `, ]( j5 Q
   take down R_mC% M; T" p# Z. X$ i
   wait for 10 min
; H  D# _# t0 g& G' U( X5 h* I0 r* s   bring up R_mC+ v* J) H' X) n0 `
   end
$ G% M' d5 A3 ?* x$ Wend
. j+ a! |* i5 }! Z% a
----------------------------------------: h: X5 {+ ~3 S% q( U
6 j' ~% N. J: ?2 m( @) M$ d
Exercise 5.9. Q1 Z# {) Y7 M3 C9 Z! G
. I. `+ ]* y8 O$ x5 ^' k

/ C% k) }' Q) n+ k4 ~9 B) ICreate a new model to simulate the following system:
% J+ i% B9 f3 r9 t0 x7 x4 ^9 wLoads are created with an interarrival time that is exponentially # f0 x" E2 W* d' d# @
distributed with a mean of 20 minutes. Loads wait in an infinite-0 f; U* o. B# @- C9 P! B0 A" r
capacity queue to be processed by one of three single-capacity, 2 l1 q2 p; J1 I9 c0 j& E
arrayed machines. Each machine has its own single-capacity queue
9 y# Z6 D1 B6 ^. {8 w, Vwhere loads are processed. Waiting loads move into one of the three
* K4 n0 T& B1 ~# Z% squeues in round-robin order. Each machine has a normally
0 S, [$ q# B5 q5 ?; i) R5 q( L2 Tdistributed processing time with a mean of 48 minutes and a standard
1 j1 m3 d. d0 d8 }6 P8 e2 ~deviation of 5 minutes.  g% ^0 d. z; K- m" ~* A) V2 X
The three machines were purchased at different times and have
( a$ [7 U, B% R7 t* edifferent failure rates. The failure and repair times are exponentially / e$ K9 o) I1 A, X, G
distributed with means as shown in the following table:
4 s8 b; t! m( zNote The solution for this assignment is required to complete
1 t( ^5 {3 q8 ~  o, X' Eexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of # h' F% P8 M1 |& d
your model.
" h/ i1 Q! q8 m& Y* E  V1 }6 c/ v: J. d
MachineMean time to failMean time to repair
1 b9 E# z2 K' BA110 minutes      5 minutes7 t/ \. g& Y/ ?  ^1 b1 d1 I
B 170 minutes     10 minutes& U3 O1 c. `. [3 _+ j
C230 minutes      10 minutes
5 b( [3 I+ c" N9 d/ u( [5 ?" I- R5 ?/ q4 `* D
The machines also must be cleaned according to the following 0 |, S4 l: y5 m; s
schedule. All times are constant: . N; ?; v  W' M# i

, q1 ]9 z% R. A! m$ mMachineTime between cleanings Time to clean9 ~- u& x8 P9 M4 y. {; I
A90 minutes        5 minutes3 U3 p: l  k7 Q* h# A5 j
B 90 minutes       5 minutes
- P4 `" J" u2 s/ k  Z! t2 I! ]C90 minutes        10 minutes2 `& [( U% m! p4 ?7 H, V$ a  O) R
5 }5 o( Q' K: w8 S9 }1 r
Place the graphics for the queues and the resources. - K( A1 M# y9 i$ ^, u. T  N! N
Run the simulation for 100 days.4 S# s" `: [: t4 U" M9 v8 R
Define all failure and cleaning times using logic (rather than resource
( M  f# {% W. H: E6 lcycles). Answer the following questions:( T2 v( V# ]4 w: d  k) ^
a.What was the average number of loads in the waiting queue?1 {/ j1 q- Z4 |; w/ }- e
b.What were the current and average number of loads in Space?
6 y8 g7 j# M  E+ \+ O, zHow do you explain these values?
0 n. U8 Q8 T8 O7 h" M( U

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% t4 d5 ~( n+ |8 ]1 \; ]* m7 N8 isend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 B+ d9 `+ a1 b  O; [1 k. B7 L这行好像也不太对,各位先进觉得如何呢?
" @+ ]; X) H6 m2 u% K0 Z, b2 Z8 t. l9 C5 S
begin P_something arriving8 e6 n( T4 r( Q) [' {, q$ y) i
   move into Q_wait
. P$ l" X8 `) `6 w  Z$ v1 _3 }. G   move into nextof(Q_mA,Q_mB,Q_mC)
6 [0 x1 D2 i. T/ r/ n+ w   use nextof(R_mA,R_mB,R_mC) for n 48,5 min! X& z( X! X2 a8 @7 X8 K/ J
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( S3 c' h' r+ W% R: g7 X& Rend
2 o. m$ s1 B1 X" _0 K5 Q7 K4 q
2 y7 J2 |8 }, ~  M9 n: {& ]begin P_mA_down arriving# b- h$ \. g& G& i
   wait for e 110 min  B9 n: f7 R& A
   take down R_mA
6 B( P6 }8 G) U* n7 Z   wait for e 5 min1 @0 ?- {* x1 l: b, I/ l! [- e1 ?! |
   bring up R_mA
0 ?/ B/ a' G" _; D5 @, r8 gend
) Y( t8 b0 k- y: g' O3 K9 x( D/ S4 K( |9 T
begin P_mB_down arriving: \+ B! E/ P/ o/ |
   wait for e 170 min
+ f( S6 [& Z( j& j; }5 D% C0 [   take down R_mB
) q: q( n+ z1 o& K3 ]+ W   wait for e 10 min
5 b$ a- Z7 ?' N, @/ X/ ?   bring up R_mB7 v. m4 F; l# j% F, A' D
end0 q) R. J, Z' {" [( s' J9 Z
" g* z5 o% H: {: {
begin P_mC_down arriving; a) O! E! h  t. T- w+ U
   wait for e 230 min
9 O3 F2 Q. e" h/ r   take down R_mC
6 h- a* n" t/ H' O   wait for e 10 min
  {# O; s8 Y: b6 R0 b- l) b0 |1 a   bring up R_mC* U0 |/ R" O' O- l7 M1 A
end5 O! I3 m( n% P3 K3 _% V

5 E$ ?; x& o1 \/ C1 K) Y$ e$ z% Mbegin P_mA_clean arriving
; Y+ @+ Q& y5 @. d( G9 O# W   wait for 90 min: s/ R" B, c5 }% R
   take down R_mA" w- o) ~% ^) D- [/ R1 W1 t
   wait for 5 min
' Q& i9 C  D3 J# x   bring up R_mA
  Y! ?( a* M+ j8 ]5 p: S; Y- Xend# c2 B0 }# c# k* D& q3 Q4 J8 B
4 l! G; j, r+ I2 s6 \5 m+ `' \
begin P_mB_clean arriving* ^& W- H. t6 M9 X& M$ j
   wait for 90 min; C& u/ b6 h! K6 |, [& v' z# ]
   take down R_mB
9 L% H* h- f# f$ z  A$ T: _3 B   wait for 5 min' R' q' S( a. {2 r7 w. `
   bring up R_mB
) V) ~* r( ?8 x' H7 U$ w4 C8 Hend
2 p! v- L. P3 i9 S- x$ N1 [0 a4 z
: H& ?2 D/ C4 [/ o' cbegin P_mC_clean arriving( \3 Y: R5 a' y, t
   wait for 90 min
5 ^1 y7 t6 c, ^: J( c( K  h   take down R_mC
/ S1 [9 X! j  A9 L; v   wait for 10 min7 `3 z& m1 C: S; f
   bring up R_mC7 h. L* s  N4 T/ x* v- z$ Z9 J
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
3 f0 {9 m* b/ p( G- M1 j, @' T   move into Q_wait
% t( f( ]$ k9 v# D   set A_q to nextof(Q_m1,Q_m2,Q_m3)
1 ]* R/ }* N3 v5 V# F7 c   move into A_w( N. C% A/ R3 }- P
   if A_w=Q_m1 then use R_m1 for u 48,5 min
3 w- h" g( M! F& s8 t$ d   else if .....then use ....for u 48,5 min
) j. ^0 w1 y+ T  Y0 x# i2 `   else if .....then use ....for u 48,5 min  & U! M. ]5 H1 y
   send to die$ Y# x4 G+ P% l% j
end
0 y- ~: N2 z/ J( B, s# A! g, C1 w7 f) `. w) z# E& G
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 11:00 , Processed in 0.012348 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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