设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7327|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
1 e8 m9 ?( k3 f2 o( _; }1 S
  v3 l/ _' v" \: ~. k) i* p3 L底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去" q+ F# Z4 K; O3 J4 {2 I5 s

' ^( R3 A9 X, c2 h2 o5 Z不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!. j! L6 u+ k! u! T. U0 N

, p' @2 {% ~$ p: N9 ~, _
--------------------------------------------
2 v2 j: X3 b3 l, A$ Rbegin P_something arriving- Q6 o, _! J5 a5 I. ?/ j  Y
   move into Q_wait3 x1 L& F4 @% J" a( g. p1 B& h1 e1 Z
   move into nextof(Q_mA,Q_mB,Q_mC)
5 h' s7 a2 O2 C6 n" N1 K5 r   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min' u# p. d8 T" @) q, P2 a, f  h  V
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& K2 f# p! x; J# }
   send to die
+ p' y, f; L% {2 k3 ^: f9 uend
, w% _  \& f) m2 k8 R$ s& P
" v1 Z5 _2 R, W0 a# \
begin P_mA_down arriving
! @5 @1 n: I7 b  p7 v" p   while 1=1 do - ^- H0 T5 W/ c8 o2 N
   begin
  J! t4 ?/ U  F: r   wait for e 110 min0 n' ~4 c* y, I
   take down R_mA
; F8 Q% Y' V' q: X8 z   wait for e 5 min% {$ P8 P" v; {/ D6 |# w' Z
   bring up R_mA  g0 ~+ j$ z: e" u1 ~
   end
: @4 {0 p7 }" N) E: rend

6 L8 \+ [& o4 G0 i; c ( T, `6 b0 H; c
begin P_mB_down arriving6 }6 Y+ A# }0 _% K. W
   while 1=1 do- H( O$ B7 k; M  c. H
   begin- x, v2 z5 W, F% Q
   wait for e 170 min/ m$ E1 k0 b' F: P. m/ E1 O, x
   take down R_mB8 O2 G0 }: a2 q+ r! f- }$ A; |. g/ I
   wait for e 10 min
! M. M8 R9 l2 y9 U& p! Z   bring up R_mB
& F  l! z$ C9 z7 w5 s$ z" t' ?) S   end1 B+ s0 D+ d, I" e% g/ ^( F1 B
end
; R. H: ~$ L3 u9 S
( b  @7 {+ d$ G5 v
begin P_mC_down arriving
8 `! W+ E* ]5 C& Q( d6 N   while 1=1 do * n1 o) |1 Q  \$ F
   begin
7 f' Q& E* ~& }* B   wait for e 230 min# d( h+ E0 W$ b7 U3 Q
   take down R_mC
  M6 I1 y1 q6 Y0 o9 L   wait for e 10 min' `: a6 Y8 F% z& u7 t4 y2 K  S! n* w
   bring up R_mC
3 U7 Z% |4 J4 o   end" ~5 Q' n" s9 P2 r
end

3 h# t, H  N, u, b' y, Y
* x) ?9 {, \/ m* y7 G! c& I( l* ~begin P_mA_clean arriving$ S- B( F- o$ m- i
   while 1=1 do0 e$ I9 N3 [9 l9 B
   begin: U8 E+ o# F3 p1 r
   wait for 90 min
5 b0 w) {$ o$ T! J$ ^   take down R_mA0 L. w9 a  r: e0 T2 K) ?1 k
   wait for 5 min
# K4 x( c6 w$ B: [, d' e/ c' u" [   bring up R_mA, ]; s& x8 z& O6 s3 J$ P
   end
3 M$ R3 }. J, U% w1 qend
+ t! W3 L& W- k3 k, S/ j3 k

' L: x% N. ]) B: i/ xbegin P_mB_clean arriving- E8 \. K7 Y4 g& p
   while 1=1 do. u6 f/ I2 p3 F2 B
   begin) k+ w7 q" |: k- G' C& r; n
   wait for 90 min8 M6 {" _2 P0 |3 ^. o6 W& I% _
   take down R_mB
3 Z  S* m0 k8 y0 G" P   wait for 5 min5 J( @) A# J0 v* t1 V; k
   bring up R_mB, S* r* R$ J1 b3 x0 o1 J: ~
   end
) _' J! q4 W1 p7 {% ]end

! D% X' z) P$ a* Y 4 K( l" f4 B3 {" x; B0 E
begin P_mC_clean arriving! y5 e% N& @0 q6 E4 ~- V" V# h: @
   while 1=1 do
- N  M5 x5 g5 [- i   begin2 v: v- k* n! S) S1 Y
   wait for 90 min) {' B8 n$ y) z0 A: j; g% H! n
   take down R_mC. P3 E+ d# y; K; M
   wait for 10 min) \; Z1 h1 v. H0 s4 M
   bring up R_mC$ [0 g' W. D2 G( N+ E' a
   end9 U6 Y. l6 u- l8 T& x' I) y- G0 u
end

7 K# S4 I3 g/ \: x' |----------------------------------------+ d, z! q; d3 z( @) T/ ^

/ Q. l3 J1 s$ {9 F, }9 q$ bExercise 5.9
+ Q0 ~- a* Q( e& L/ j, B& K/ e" Y6 N" v6 w+ V& B9 E  ^

4 t5 N% _6 @4 L/ D! ^0 ^0 MCreate a new model to simulate the following system:
9 |2 E4 A8 }. i# Z  ]* ]" ]# W2 NLoads are created with an interarrival time that is exponentially
# [4 |/ i3 |. S8 S6 [9 Jdistributed with a mean of 20 minutes. Loads wait in an infinite-
! g5 P0 G+ N* f/ s  Ocapacity queue to be processed by one of three single-capacity,
" S9 g' s5 j% |/ C9 q& K9 Uarrayed machines. Each machine has its own single-capacity queue 8 ~! w+ c2 |  N. M
where loads are processed. Waiting loads move into one of the three
/ I2 D/ b' K3 jqueues in round-robin order. Each machine has a normally ; q0 P, o% o; P  i: S% T8 \0 u
distributed processing time with a mean of 48 minutes and a standard 1 A, y" y$ ], _! X8 c
deviation of 5 minutes.! ^# d( K* K) [& I
The three machines were purchased at different times and have
# E+ y8 b0 `+ s3 [( V* Qdifferent failure rates. The failure and repair times are exponentially
& R3 T8 g2 q7 F( W6 I- gdistributed with means as shown in the following table: " U+ f+ P  U" ^* d& [
Note The solution for this assignment is required to complete
- a- `) c& M7 T3 P# x' k& texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
9 `/ p% F2 a& d* kyour model. 1 g: \5 ]: Y9 x) \% A) @2 P; g
' O  w1 A8 D. l
MachineMean time to failMean time to repair& I9 [1 ]. k2 X/ R8 A  E
A110 minutes      5 minutes
9 r+ K# d8 Y% g6 Q& H8 H& V1 UB 170 minutes     10 minutes6 t5 |* v3 @8 Y5 h% k# A" Z
C230 minutes      10 minutes& ^% M. j  T" X7 m7 l% X% w4 T7 c

7 c5 }; T0 m. [7 vThe machines also must be cleaned according to the following   M+ Q/ E( h: \. e( _. ~9 J
schedule. All times are constant: / n- j5 R2 h  @) J/ m

6 K3 A, @$ \2 l$ z) s, |MachineTime between cleanings Time to clean
/ K% q, o  o. O1 I& s. }* C6 pA90 minutes        5 minutes
6 y- ~! H5 A3 T9 o! b: a, s( DB 90 minutes       5 minutes
, f) C6 Q( F0 F4 t' y5 uC90 minutes        10 minutes
. A: C, ^4 _6 V% q$ u+ [# x. W- {! \# Z, v# C5 @: R
Place the graphics for the queues and the resources.
. b, [$ e  o$ {Run the simulation for 100 days.
( ~& u. a  \# EDefine all failure and cleaning times using logic (rather than resource
( `. ^/ {, J: b! ^0 ?cycles). Answer the following questions:
3 x$ o! H' h' k+ B0 M! I1 na.What was the average number of loads in the waiting queue?1 t4 x0 \  n0 R* _! K& C
b.What were the current and average number of loads in Space?
* A& e4 \' U( F* n8 e6 [# xHow do you explain these values?
9 [: Q5 p; ^& R% l

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉. C) X! Z# ~  m+ H$ V
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( B- q- w. B6 D9 j( W! x, F这行好像也不太对,各位先进觉得如何呢?
! X" N" {7 H+ I$ R3 t4 ?
! I. ~9 ]* E* Sbegin P_something arriving+ @' w' d: w" U. w
   move into Q_wait, A8 B2 l: ^# F* `- U8 Y% U
   move into nextof(Q_mA,Q_mB,Q_mC)
! ^9 K) r4 G; ~. y$ V/ \   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
* h( R/ t! V+ }9 |3 i5 q. k) h# O   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ b# u5 _# Z. r- t5 F
end, Z& ]6 v- {- x

  O- n) o  o% z) lbegin P_mA_down arriving$ U+ m3 b9 r9 M6 n$ E
   wait for e 110 min
3 H# T$ T/ N) r4 m+ @/ Z& b! k   take down R_mA
6 q, x/ O* s# p: @$ l1 h& F   wait for e 5 min& L3 U4 S( D$ ?/ }- S. P+ Z
   bring up R_mA
5 g1 y8 A% X  Z5 @end3 t/ o! o, B" d  @4 `8 |
( h0 U1 z- m0 H$ v/ z
begin P_mB_down arriving
) t+ I( D2 w/ Q. f# a   wait for e 170 min+ [. T( @& x% ]
   take down R_mB
7 {* K6 k, n# {' D9 Z   wait for e 10 min/ r# R! U$ z9 W4 n3 u( n8 V
   bring up R_mB
0 n3 f# l# `$ `) ?, K% aend  y! f) ^- b+ I3 k" }
" C! q, [% g# Z0 ^
begin P_mC_down arriving+ ~: `4 @, s% V6 I4 G6 P; u
   wait for e 230 min
2 f- t& s- {. G* l$ D   take down R_mC
" A* ]" n/ c# E7 S7 Q   wait for e 10 min0 h( e4 H! h( \  @0 c. S
   bring up R_mC
, w, a4 Q8 `* L3 nend  X0 h" ^) Q* y# ~+ L
5 R% \) D$ `0 m( }
begin P_mA_clean arriving
! d' T, U9 O6 ~/ P' r  H, r2 p! L   wait for 90 min
+ R1 A: K7 X* L8 I4 K   take down R_mA4 n) g- x5 W, S- P3 y8 E
   wait for 5 min
" N3 n# T  E( q8 e7 T& ^   bring up R_mA
2 Q% y; @$ ?2 a* Y4 H% W  k) hend
. D4 i  `& ]  q+ n, Q9 F- R- Q
begin P_mB_clean arriving
8 X1 S" N6 Z5 h1 \; D4 u   wait for 90 min/ I7 ]' o. T+ E
   take down R_mB
  U: R9 {. v7 @- g   wait for 5 min% L4 l; Q; h! S' n8 s# J
   bring up R_mB
+ p4 m' j0 I6 w, |- ^end3 T$ g# c  {+ W3 u1 y

2 j2 O+ L# k* P+ ?9 z- a- ibegin P_mC_clean arriving
9 ]/ C3 `. I9 Q) g3 ^; Y6 y& S! _   wait for 90 min
/ M( Z& ]! m& D, @% @2 S; \) c; ~+ i! q   take down R_mC
& _- O4 p8 f  Y! M7 [- G   wait for 10 min
1 y9 \# s: T0 e& U0 y6 d% G3 ]  f   bring up R_mC( P( Q6 j7 P# o5 F: b
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
* ?" }( n9 g9 K   move into Q_wait
; G( S: q' c1 }0 w1 G- W" ~   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( e, y# O, t+ U4 P2 N  V3 ^/ h   move into A_w7 V# [' @$ M1 P0 J- c
   if A_w=Q_m1 then use R_m1 for u 48,5 min# O6 v, b" c4 P- T! D
   else if .....then use ....for u 48,5 min; }1 `; Y0 i4 L1 W7 K
   else if .....then use ....for u 48,5 min  
& o  F4 M( l8 q6 m   send to die7 V# Z. X6 [7 r/ t! M& X3 @2 E* I9 k
end# |" Z  ^( C# B3 ]8 S$ c. a

0 _6 b  P/ h, T. `供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 07:13 , Processed in 0.015665 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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