设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7548|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
, v% J" v0 D/ V# L! b. g& c' l# T
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去, `' F  t5 q! D3 \; \
* Z9 ]  m( q- m! Y8 M+ n) ]3 f
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!2 I9 E) E) L/ y- C+ a- ~
8 {4 F' \3 U4 f8 Z  C* y# q; p
--------------------------------------------8 @" o9 a# p, K+ V
begin P_something arriving
0 S' M* W) ~8 O3 A' ^/ G. M# V   move into Q_wait
: n' H$ H. R# p  Z" j  F   move into nextof(Q_mA,Q_mB,Q_mC)
/ F+ l- B' n2 A   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 C" Y' K1 I! d- |0 [   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ A; T0 l  h2 r   send to die- D, ?/ B: _$ F, x. v
end
& }8 B3 w( V$ S3 z9 c8 r

8 G9 z2 w) O. g6 T' Nbegin P_mA_down arriving! N) A! \2 S+ n7 j. G
   while 1=1 do
* e; V; F: J& w6 N3 J- |, r   begin, P0 }0 S/ o/ P6 X
   wait for e 110 min
$ T8 W" Y% `; Y. ~% d   take down R_mA
4 P+ y# G3 i; c+ S   wait for e 5 min
! N* k2 z+ K$ Y+ w; C- j( |+ D4 I   bring up R_mA" A( F5 H& [6 g- N4 i$ \  d& ]
   end
0 {* J; N5 `; h/ i& x" m  Cend
7 s; D  a1 E: U) _
1 O# N5 z2 @$ z
begin P_mB_down arriving
7 C# V& q0 G# @   while 1=1 do7 \* _0 O& J/ a% x* }1 G
   begin# q, @; c" \: t& |+ G- }1 X1 o
   wait for e 170 min
0 Y1 m9 ?+ g6 ]+ P9 V   take down R_mB# z" m! P! ~3 s8 j
   wait for e 10 min
8 L6 V8 u! ?2 b# B   bring up R_mB3 W; |( F5 {) ]2 j
   end) f. L: ?0 ^7 L" m; D+ z1 [
end
3 \& }: A; R3 h' V2 @: ^" {
" `9 q) ]# {% T6 |
begin P_mC_down arriving" c' X7 `; b2 Z' }3 L; m. l
   while 1=1 do
% c" d4 e* y' U% f" U+ D   begin" H: g3 m+ [! r8 y; c3 L9 g8 g+ q2 L
   wait for e 230 min
& Y6 w; A& Q+ O$ K! d$ c5 |   take down R_mC
0 P" i3 g6 N, L' s5 |   wait for e 10 min- E+ L& S, r1 B: E4 ~
   bring up R_mC
& @5 x  b) B* S1 J+ W   end
+ F% D- U, ^6 @4 }4 X- P, X$ }/ wend

" Y, {& x( h" P! q! B- v6 _ # I+ k5 x& H) Q: r6 |+ A
begin P_mA_clean arriving0 S/ _* I5 a' @7 ]' }1 M* Q, ^5 ]
   while 1=1 do
  S7 e' N7 }% y   begin9 m) \1 x* O( E5 D
   wait for 90 min2 E& N% L0 [9 I
   take down R_mA* M; l. x6 r! |1 a" W
   wait for 5 min
" v4 W2 s, |3 G9 X) t. v   bring up R_mA
+ f2 t) }# z) t( k- D   end$ m, M% `4 C" v3 `- {* Y
end

" _& Q* l; O4 V, u' k9 p: j
1 f1 r* c/ [7 C0 S3 q9 G9 L4 u  J, Tbegin P_mB_clean arriving
$ g# h' n3 w/ q, p# n0 T   while 1=1 do
& |# z/ Q) ]+ K7 N; r4 l! \* J   begin  _' [: L8 Z5 m# [9 T) x
   wait for 90 min, M7 z2 u' ]( S! S& l6 I5 ^
   take down R_mB: F8 u+ v/ [5 L7 C0 i% u
   wait for 5 min! D$ Y9 d& @& ~8 x  [0 B* H
   bring up R_mB* }+ X3 [+ B3 k0 o( n
   end
* J" C$ r# }' \end
: V, R; `# w. ~" d
3 h/ E% {5 }) {* ]
begin P_mC_clean arriving* t2 P$ Z& C6 e, H$ t  c* O
   while 1=1 do/ X2 p- d; C7 B# G7 I$ s. i/ q) C, j: ?
   begin
! k' E* D8 q7 o& ?5 n2 h   wait for 90 min  g) E4 }# }7 ^5 O+ q  X
   take down R_mC% q8 w  \- A. W7 y
   wait for 10 min3 f4 F( d8 E. _
   bring up R_mC& R  l, X6 W+ t! D
   end- |1 y" e6 ?2 L, ~+ y5 `
end

: p, i6 U1 i6 ~( M; C----------------------------------------) ]9 e) t; X2 b7 O3 Z' B

5 D% r, _* w9 t; {* I) pExercise 5.9
) y! X2 [$ R2 ?8 U4 x- M0 x$ j1 B; }, ]4 x
; A3 r  l' q  V8 P* r
Create a new model to simulate the following system:
! ~$ Q9 n5 `, r4 R2 _5 R1 ]Loads are created with an interarrival time that is exponentially
( o# ?' ]& a! @$ h% rdistributed with a mean of 20 minutes. Loads wait in an infinite-
6 q: X$ [5 `8 Q# S# N) N; a! R5 Z5 V  U. t1 ncapacity queue to be processed by one of three single-capacity,
( ^: I7 C# Z+ Q, iarrayed machines. Each machine has its own single-capacity queue * u3 `+ U3 }* k& b* `1 K+ Q
where loads are processed. Waiting loads move into one of the three ' M2 m( w( Y9 Y; g# C4 U2 V0 t
queues in round-robin order. Each machine has a normally $ E& `; o: i$ b
distributed processing time with a mean of 48 minutes and a standard
3 }5 W0 N; z3 ]" K2 \deviation of 5 minutes.3 a8 p2 Q9 [4 y* k1 `0 ]; f4 \
The three machines were purchased at different times and have ! z5 r$ s: f7 Q" j
different failure rates. The failure and repair times are exponentially
+ `9 E0 C+ y0 L; q! R- H  _distributed with means as shown in the following table: / e2 h! }5 U, ?" m" v
Note The solution for this assignment is required to complete ( {9 A9 F" r* E1 o
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of " B2 ?/ }! \: L1 J: l3 R. v! j
your model. % p6 ~) g0 Q8 m- j6 U: m

" a+ p& M* r0 L4 u( sMachineMean time to failMean time to repair4 o2 }& \  F) r! \$ l
A110 minutes      5 minutes
( v+ y4 L) c( J" {B 170 minutes     10 minutes3 z( C2 W3 Z, T! f: T
C230 minutes      10 minutes
! }5 w6 `9 j9 K2 [0 y2 C; _, S1 ]. C3 e8 ^
The machines also must be cleaned according to the following
3 \- i  c4 _: w! Kschedule. All times are constant:
1 A. A2 L  _9 K) F2 |$ y3 v6 m
! h6 Y- T$ c3 J) x6 j& Q' H# v- H  t) K" gMachineTime between cleanings Time to clean: s3 s7 X# ^! e" @- F2 c, _
A90 minutes        5 minutes! ]5 X  d' o: `) ~0 v/ e* W
B 90 minutes       5 minutes
% \" G& u3 S. }: `C90 minutes        10 minutes$ b% ~8 z( \% q
% Y0 \4 ?8 f1 ^1 y& C
Place the graphics for the queues and the resources.
* R( J9 U/ A2 d6 V  H1 T& `Run the simulation for 100 days., z( q- w7 e+ i- |. e2 d
Define all failure and cleaning times using logic (rather than resource
4 d9 z' S& A/ k9 X6 l7 m4 p* |' mcycles). Answer the following questions:6 a/ f0 W1 G; D5 \$ J- B6 t
a.What was the average number of loads in the waiting queue?  t$ o- e7 l' i- S4 r
b.What were the current and average number of loads in Space?
) T9 Z" \0 w/ c! W3 a* C6 P8 dHow do you explain these values? ; _9 e8 b$ A& I  i

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
2 y5 q# m: R/ i9 D$ nsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' _2 n5 [5 Y/ ?  w' p这行好像也不太对,各位先进觉得如何呢?% z: D6 O/ s% @6 f/ {8 a6 i
6 \: o/ L- H3 `- o6 Q& W, t8 G( w
begin P_something arriving
% v& J1 p, h( \, L! @' M   move into Q_wait# z6 f9 W! X1 v
   move into nextof(Q_mA,Q_mB,Q_mC) 9 X7 \! |8 h! u4 ~2 l6 @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 O5 ^% J# ]4 ]: S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 b" g' x# ~+ P' ?. P1 O% ~8 Hend
9 H# m% S+ g4 t, j) W3 @* k& z! `* x% J( L7 ~# {9 P
begin P_mA_down arriving
4 p& ?4 Y# L4 |+ C! A* s2 z   wait for e 110 min5 h: m! j- ~( k4 W" d8 O" |2 u) p+ h- C$ x
   take down R_mA
  _  [9 `7 }" v% @- g   wait for e 5 min
& D1 U# J, d" Q2 ^) E! h6 T- y   bring up R_mA: f3 g. A2 e3 t% D4 Q
end
3 T- B3 s) n. [8 {/ b0 O; @, o1 e) J4 {' B4 F- Y# d9 f9 g
begin P_mB_down arriving
% `& `9 [6 ^5 k. d8 ^  u! [   wait for e 170 min
$ D- H5 e" \* K9 Z' p   take down R_mB
1 y9 `# V! b, I, f3 M   wait for e 10 min
5 {: r5 v& H$ r( M4 X8 T   bring up R_mB
9 N+ [9 }$ q$ zend
% S  b% x9 L# H
  C8 E% @( d$ Q9 N! z1 Pbegin P_mC_down arriving
2 g: M) ]2 b/ j2 c* R   wait for e 230 min6 v8 B, x( z9 u, C
   take down R_mC
- }/ G3 h9 G; [3 [& G3 c   wait for e 10 min
5 b0 [1 H8 l( B' Z   bring up R_mC3 o& L. s' y. e0 P
end% ^' M' K' y6 {3 x2 ^
, y" ?+ t- q: V& A5 q
begin P_mA_clean arriving4 ?& T3 E! g; s- x
   wait for 90 min
4 U9 X7 n  D# n2 v& i# U8 n   take down R_mA9 t7 G9 e, l1 Z# k* Z* K( E
   wait for 5 min
( J- H6 \! n! }: ?$ ]; [   bring up R_mA0 T6 l; T0 y$ R8 B% k
end
2 L$ t9 V, t% ~9 F
( V2 m/ U! ^1 a' j0 x7 \begin P_mB_clean arriving
/ h  W# [$ G/ u# L7 s( n   wait for 90 min: c1 p5 I8 h( i: {% y9 R, h
   take down R_mB3 c% P3 X# w7 @# d! {' F6 X1 o
   wait for 5 min3 y" x( Q7 a8 l9 k# ~6 \6 J
   bring up R_mB6 u' X6 }( S  F+ x& S5 S: E0 q
end7 c+ }2 ~7 Q" ]) M0 W5 J/ F

; z/ J( r3 v2 ?( B; O1 lbegin P_mC_clean arriving
- A5 P8 c3 n# j+ k8 W7 p6 L   wait for 90 min( o9 m* o6 I9 }, n- e# w
   take down R_mC/ h0 k' ?4 H6 c2 Z+ G: s% W& Z
   wait for 10 min
9 c4 h! }  \, @" @   bring up R_mC; W+ Q. o; M: a6 j! {7 X
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving; M4 g7 T  Y  E  j6 q3 a
   move into Q_wait
$ [: q( u# M6 v* f" W4 k2 }5 D   set A_q to nextof(Q_m1,Q_m2,Q_m3)0 Z: u2 X  B/ j* ~
   move into A_w* \( y$ e4 e- p0 H& |+ \: e+ u
   if A_w=Q_m1 then use R_m1 for u 48,5 min/ L( B7 {9 J* k' H" S1 K/ d! \
   else if .....then use ....for u 48,5 min# w* ]1 y$ W! j: E4 i$ G( B
   else if .....then use ....for u 48,5 min  
+ n/ ~4 x% P. Z# G, j   send to die
- P/ w  ?* F) p' h5 D3 Jend
. f( n, K* k3 n$ u& E2 L5 H
% g+ ]$ `4 h. ]  p供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-12 23:51 , Processed in 0.017867 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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