设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6767|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 9 Y( e1 T" b5 v3 [# N& T

/ B1 L" H- Y/ G4 Z底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 s- @6 ^) G+ D/ {, m! J/ M7 E; g9 N- ^8 Q. E- b0 b( p- C
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
* p1 G/ o% k! n/ k1 C, N/ K% f
7 L+ Y; A1 x, P$ I: S2 v1 C, h
--------------------------------------------
# f2 y) ?+ @: h( Abegin P_something arriving
9 k; V  W7 I/ g   move into Q_wait' Q" `% r3 A6 K! O7 [) N: @  I! b
   move into nextof(Q_mA,Q_mB,Q_mC)
4 l! s& S) ]+ m5 y) ^   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
1 G3 _- f  ]/ p   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( N8 |. X2 ^# e1 o   send to die# v4 }: O8 u. q- O2 [
end
8 |$ b1 g% m8 w

4 I8 G) D1 f3 jbegin P_mA_down arriving/ \) n( c$ W3 L) B- q! t- s
   while 1=1 do , g0 x5 D3 ^# w0 x$ b: L% ~& a2 K
   begin
0 h! G, Q5 n4 D* O   wait for e 110 min7 z  ~: b) a$ q$ N$ {  Z# N
   take down R_mA
& l. {) b* E/ \. \$ G   wait for e 5 min5 K) D- n7 o" N& u6 t8 b
   bring up R_mA
, U* Y  l1 i- G# d1 J6 a   end
/ U& S4 t: Q! Q5 Q! S8 g+ Eend

2 Z  F3 U/ @& Q' }; t0 n" A; y
1 Q6 U0 B( @/ f5 E  e( Kbegin P_mB_down arriving
$ v6 H. p7 ~4 y4 h   while 1=1 do
1 H0 ^: S  q, _0 B; e+ j" w* Q7 M5 B% ]. w   begin
( G9 w& B& t1 X# H( d" `   wait for e 170 min! }8 h; M% Z9 v! \* _
   take down R_mB
2 p: W: m' c# r6 ~8 m% E   wait for e 10 min; c4 Y7 Q$ D9 e0 h, D! X4 f2 L
   bring up R_mB2 |) A( u" H0 s4 z
   end
0 ?6 O2 {3 X8 X9 G. ]& H/ Aend

8 l2 L/ B% I. e% w
7 P& G; D9 H* F5 w# B% |( |begin P_mC_down arriving
0 N' q: L3 D( R( G/ U   while 1=1 do 0 ?4 h9 w0 F+ [9 ]' n: ?. u
   begin) Q' c" l9 v! Y- F% t
   wait for e 230 min) O, N& d: F# P7 j3 B/ m3 I
   take down R_mC
/ T* Y# K! O! l6 ^1 D3 U; T6 D   wait for e 10 min
! Y5 q5 B, ^. j2 B/ e7 n5 A   bring up R_mC9 W( H. ]& W" r) C
   end- W1 T& j6 F& m' ?9 \- u
end

7 f% m! I- N" Z
# l' f* ?7 k, t( J0 Sbegin P_mA_clean arriving
% B$ A! o8 {; x6 ~1 `+ [2 `   while 1=1 do
2 ?% Y% W" q+ h' ~, E5 M/ Z. c   begin
$ B. o3 r6 q, C) k( Z1 D   wait for 90 min* E' X) J6 D& T! ]% {5 d
   take down R_mA
8 y- Z; n) ~3 e   wait for 5 min, V  t$ {" E4 [  b
   bring up R_mA- \! ]. D* D5 f* k1 l! z0 V& n
   end
/ V/ u/ V7 N, z4 A% g5 X0 P) g. g& Nend

5 t; x: Y' N: c7 S4 Y* M" C " |: m% T, l; m$ ?- K; n8 w
begin P_mB_clean arriving  O5 e8 g3 `9 r+ y( G
   while 1=1 do
- h4 t' t7 I) @/ f7 Z, z/ E0 T   begin, e6 _  u/ i' @  A" z  {
   wait for 90 min% ]5 N- g3 {& A- O" A. ^: k
   take down R_mB
# G+ w, k2 |" J8 p2 a   wait for 5 min
2 c, e: ~  I# u' j! a   bring up R_mB
! I! J7 g- X$ a6 V5 x   end! m# d2 T9 o, q5 J
end

% M1 O! y5 Z- l' [* V " T/ J1 I7 r, u- u
begin P_mC_clean arriving  W8 V, L2 P3 t# t" s8 ^- p
   while 1=1 do
! k* ?2 y4 A' e* z   begin- f  E) \) B: H2 w, p
   wait for 90 min4 T$ m3 V9 U2 t. \( p9 s7 z6 P( T
   take down R_mC3 W" [0 A7 [) i5 ?2 t
   wait for 10 min' j- d3 u" I( z' n
   bring up R_mC1 ?/ s5 @# H" F/ C; I3 V8 D
   end9 M1 Y" R0 X" W0 Q) o
end
  T% Y3 i7 p% j9 e4 w5 U" a' b; F
----------------------------------------" J% o4 j0 F+ S: V7 w4 W: g! d  u; L
6 Q9 v+ \  ]( l
Exercise 5.9
2 z# Y( Z5 A* h6 o% s9 H# v' Z, A$ ~+ v

) A, E# {0 `! ]! C4 _Create a new model to simulate the following system:
5 k/ E+ J; R3 f2 r. z0 ILoads are created with an interarrival time that is exponentially - k; q: {2 I3 w+ n8 m+ N$ R( E& X
distributed with a mean of 20 minutes. Loads wait in an infinite-
$ m' \/ T% x5 o% S5 ^5 X- Tcapacity queue to be processed by one of three single-capacity,
0 P; g7 z) q9 W" S: ^arrayed machines. Each machine has its own single-capacity queue
7 |3 d' W( g  R  P" twhere loads are processed. Waiting loads move into one of the three ) C0 @$ C, ]% Q! `8 `8 Y3 ]: \
queues in round-robin order. Each machine has a normally 4 Z+ ]# c9 e% f5 w8 S# Q0 {
distributed processing time with a mean of 48 minutes and a standard 4 [3 g3 f6 I: @9 W' S5 h- L" G
deviation of 5 minutes.
" \" o) J) U9 c$ SThe three machines were purchased at different times and have
# a  n/ {6 f: |2 i/ S4 F* Cdifferent failure rates. The failure and repair times are exponentially ! B! f8 x' X% M% J- ^- D
distributed with means as shown in the following table: , ~) _5 [3 |  x: j( L3 N0 L
Note The solution for this assignment is required to complete 7 H" A5 C% p/ o! q
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ E' v/ V4 b4 F
your model. ; t; U. j* i7 U8 R) I3 e# @1 n

0 g  }6 i$ }9 F/ b% O. V2 \" Y) XMachineMean time to failMean time to repair5 H: P5 N: {  t! W: |
A110 minutes      5 minutes0 A, B% Z$ l$ a- s$ a- P9 b7 [% X
B 170 minutes     10 minutes# P4 K' R1 {9 j) f* @# g2 ?
C230 minutes      10 minutes2 d4 o# e+ s  t1 f* b

5 c, G) {4 A$ U1 e6 V5 Z& X% v+ M/ |The machines also must be cleaned according to the following
4 G& P6 o! s8 |' Y7 T; \  A, R* Sschedule. All times are constant: ; l+ d% u9 f' Q1 t; X$ `9 P
5 }! \- X" f3 I! u
MachineTime between cleanings Time to clean7 v, T1 z4 [  h
A90 minutes        5 minutes, J7 J# f, ]' a2 g2 n
B 90 minutes       5 minutes
, y1 Z5 l1 Y5 C9 C/ nC90 minutes        10 minutes
6 H/ ^+ @7 J) b: L- d; ]; k5 w# ]
6 s- p3 J3 R8 fPlace the graphics for the queues and the resources.
6 o# k" J1 J% c; ~Run the simulation for 100 days.
+ e& O5 I/ p0 oDefine all failure and cleaning times using logic (rather than resource 1 S) k! Q$ n4 U1 z
cycles). Answer the following questions:6 a8 _( I' ^$ |' R$ P
a.What was the average number of loads in the waiting queue?
, g' D+ [3 @0 @. {b.What were the current and average number of loads in Space?
: j$ G) n, F5 f( FHow do you explain these values? 4 z: }+ {' J+ E' N3 s

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉  j" R2 U" y) l  Z, J4 l# ~
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* ^3 `8 p- O4 R8 x# |$ U* O
这行好像也不太对,各位先进觉得如何呢?
! I/ U& u. ], \: }
1 |9 y- x' u/ cbegin P_something arriving% l/ H' M* i. s2 l3 ?# V
   move into Q_wait
2 N6 |. N, x* l/ G% K( o( g   move into nextof(Q_mA,Q_mB,Q_mC) # a# j# T0 X* ~4 u
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min5 I' f4 [/ Y7 L0 u
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ; ^' G0 @7 V. a: J# r6 l
end
+ F& a8 V0 ^! L! u! S& M$ r" z- O8 h
begin P_mA_down arriving
9 ^' s. r9 x2 `) p  M  V1 ]% C, x: J   wait for e 110 min
/ l* o+ j* X: b   take down R_mA3 L* x1 I- a. s
   wait for e 5 min; m5 K$ `# X- K# u: m
   bring up R_mA# H. O  `7 U3 K
end
0 D2 V  n% m0 ~" W
1 n9 b( x5 ^8 P& g! Z/ n; dbegin P_mB_down arriving" N. D- P3 p1 I
   wait for e 170 min
+ b$ ?. H2 Y! {( S   take down R_mB
% W: S! `0 @( R4 p( p2 q   wait for e 10 min  U9 F, `9 ^/ G) r- l* {8 g
   bring up R_mB6 i3 c! `3 b. ^- J9 b1 W- T
end3 F$ [5 \( R! Z1 a+ M4 s* S# \8 f
" ^7 x  T4 Z$ O4 f; n6 u/ a0 }
begin P_mC_down arriving
" j. S! W: E7 b9 Z) t3 }' S   wait for e 230 min
+ S; Y4 p& E! F% P- u9 \   take down R_mC
) D- @. P, K5 r' L/ Y   wait for e 10 min
! b+ d- t+ B' z+ l   bring up R_mC6 M( @/ |, a) y
end
! ^5 ?- b* [4 n1 B& X' D
% e  D& ~) s3 z7 w, x) d. `& q  ibegin P_mA_clean arriving" S2 R8 R4 M2 q6 L% a6 Q* f2 n
   wait for 90 min8 }$ l: L; X. {& v% O7 s
   take down R_mA  P6 P$ e! P0 S
   wait for 5 min
  l2 S1 A; I# J5 i* k* y) D/ R# k   bring up R_mA" ^, C0 G, @& v" N4 k6 I
end
4 n) n: ]+ v; Y5 R( T
- v/ U6 ~% `; @. K( \begin P_mB_clean arriving6 M- p  z9 ~7 i5 V
   wait for 90 min
  O6 H: n" \* W! ?  F* ]' v, v: L   take down R_mB5 U8 Z% x4 I# t* u( t/ h
   wait for 5 min
( o5 x' C4 w9 {7 ?" H" e   bring up R_mB8 t) ^7 l# B9 _) Q8 u
end$ i. D* d! {; C* ]

  T0 |( {1 B9 d& ]5 Bbegin P_mC_clean arriving
" n7 |. k6 U$ a$ L! b# I   wait for 90 min4 L# O" a" l; G
   take down R_mC( M9 l" F$ C0 ?9 y/ ^2 M
   wait for 10 min7 ~" P" @% U5 Q% a
   bring up R_mC, |: d; z' U5 g7 _7 w
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 f! g$ Z9 c/ t& o
   move into Q_wait1 r9 |  M- D9 ]0 ?/ b
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
# I( p: {2 i7 n" s* x$ R   move into A_w
) ?; {1 b* ]! }   if A_w=Q_m1 then use R_m1 for u 48,5 min8 F1 G3 e; R9 x) j3 N
   else if .....then use ....for u 48,5 min1 H8 ~) n! S! y
   else if .....then use ....for u 48,5 min  3 S! N* h6 W6 m: N( |8 \
   send to die
0 d8 @7 O' U5 D5 i5 Q4 q! f! yend6 s8 L6 n# F# o3 j3 t/ [

( v! G; h' }* Y* @5 J# C供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-27 16:35 , Processed in 0.014774 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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