设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7109|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
# E: {6 k  _. g" Q" z9 u& {# f  a4 ^1 s
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去8 a  Z* B$ ~1 T
5 }; ~& B' _9 [; `4 O( T' A) ]
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
! \6 R( k9 [4 A; ^9 C! E
) R6 |; a+ P% a: o; ]
--------------------------------------------; p- \) l2 ?; Q+ f5 T: T, q$ Y
begin P_something arriving
' K5 i( R& Y* e   move into Q_wait" x9 W; @6 b! |2 a
   move into nextof(Q_mA,Q_mB,Q_mC)6 P* d, F; ~- m+ j" C( H4 w; M* {
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min- G! W4 k' y* D& h9 n) s% D+ P9 [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 K; A% n/ H. n" \+ u* _; }8 k   send to die% v1 n- e. p# G$ @+ m7 J8 e: P
end

- y5 {0 g- G5 i! B2 `  q( j+ t6 l. k : y* W- C, ]3 q: X; n
begin P_mA_down arriving% Q8 x: `! M# p0 |( n( I- K) S
   while 1=1 do
+ Y+ Z5 c" C2 d3 c1 ~5 f   begin6 _# c9 T: s1 w! n
   wait for e 110 min. a& m- H7 G7 o% D0 Y
   take down R_mA
+ ^* y. R, F+ R; W/ B   wait for e 5 min5 h. c1 J, K# l' \1 M; z/ A
   bring up R_mA$ H  h: I- e( Z( `2 @
   end3 ]* K" a6 Q& O& |( G  v: y
end

9 T5 r5 A, b; J + |/ d; B( X' x  g3 W( s
begin P_mB_down arriving, Y3 k, B% \( V( v
   while 1=1 do) j$ k) u) `& t  t
   begin1 b* ~' W' K$ b3 F& D
   wait for e 170 min2 M' o0 R" ^/ y) X
   take down R_mB1 @/ l5 T- q% |" _7 ^+ E  x
   wait for e 10 min6 t6 {6 s! ?" P( \% F; k
   bring up R_mB- o" v" G# D% e
   end$ R' A" t$ J7 ~
end

2 y  z6 v. E: W! J- v& z8 G
( `. W$ ^) i+ Sbegin P_mC_down arriving
4 A# W* q4 x9 J   while 1=1 do ' m) }+ I0 P3 l  t4 D
   begin. u" _5 i% B( M, Y
   wait for e 230 min6 u) G" t6 X3 X
   take down R_mC
9 A  O7 r: M, S! s2 f" s   wait for e 10 min
. i' \( _% k! u% Q. F7 |1 o   bring up R_mC* g0 u- C1 |* M1 h6 {. ]. I
   end
& ^; b, d! N6 ?: @/ _7 zend
' |3 Z0 `  x5 B7 e" O
" F: t/ g. F4 d
begin P_mA_clean arriving3 P. [0 D3 }0 A' W
   while 1=1 do  H5 q( x) t8 z" C
   begin* h5 y" q3 V1 ~  t7 s
   wait for 90 min
+ O) ~, @5 m7 f, ^1 \   take down R_mA- o/ q: J2 {, i
   wait for 5 min& C; P2 n& p3 h7 {2 X7 n+ {
   bring up R_mA+ w) M, y. O0 E
   end
  F0 ]- ?  F% {  V# ?) p% zend

6 ^; |9 z! B- Z3 n! C) k) k ; J; @# r* [* C
begin P_mB_clean arriving
. m6 @1 j# a: C+ U7 |9 C; }6 |: Q- P1 h   while 1=1 do
% c& A1 Z9 E' X9 T0 f6 G* ]- j   begin/ R' Q3 @% l0 i+ C
   wait for 90 min* X; ~! @) z5 \2 p7 Z
   take down R_mB
. c; {$ u3 g2 B9 j: u   wait for 5 min+ {9 v. ^, q* K& v% O- w
   bring up R_mB
" g6 y. o' e5 {2 G   end2 v- l: d3 W/ D# O0 q
end
# {- r) O: }/ q  T% g/ M

, S8 F* ^3 j- z0 H) Rbegin P_mC_clean arriving
4 {; c/ G8 V% f9 Z   while 1=1 do
6 }8 Q- P6 F/ k% P& h3 y   begin
- m! O5 b" o5 h7 i   wait for 90 min$ \( G& @0 m0 P! R5 ]* _. @
   take down R_mC
5 q; p6 J6 y/ \; a5 ~   wait for 10 min
) g% E, O4 ?- c: ]! M/ w   bring up R_mC
; u2 U1 e* i- G+ r   end
8 g4 q$ W& [7 ]% Xend

2 u( i7 b6 c+ a& p. z----------------------------------------
& y( S3 N% C+ I8 |; G9 ?, Y' u 2 r0 }. `5 C* F' u
Exercise 5.9
/ Z' Q/ u0 D1 w& t  I# K" J7 R; z" P& H3 [

, |' e7 s% x9 m6 r  o0 zCreate a new model to simulate the following system:
7 y/ y- o: ?- u/ {- ~; TLoads are created with an interarrival time that is exponentially & l5 ?  U, k7 X% A
distributed with a mean of 20 minutes. Loads wait in an infinite-. \- b7 d8 e$ u, C) T% B+ z
capacity queue to be processed by one of three single-capacity, . x4 }$ `5 B/ {; e2 g5 _. O: C
arrayed machines. Each machine has its own single-capacity queue 8 F& U0 {" P. W
where loads are processed. Waiting loads move into one of the three
$ m* o4 ^* J6 J, [queues in round-robin order. Each machine has a normally
9 x& `( h" h" X; l, x! o& t: Tdistributed processing time with a mean of 48 minutes and a standard . P2 F# W' Z  a( F7 b
deviation of 5 minutes.
; {6 Z; X% s" H( i! h, Y' }The three machines were purchased at different times and have
4 v. K, s  @2 R) i5 X; q5 Ddifferent failure rates. The failure and repair times are exponentially 6 Z4 o% |* R( f% S8 C
distributed with means as shown in the following table:
8 O2 E! o1 b& r) A- A5 M5 ~/ T1 GNote The solution for this assignment is required to complete 2 j$ k( h. J& a5 T
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 7 {4 t. N& c* N- H7 V
your model. * `% C7 A; |% Y: B9 B
8 ~( S) ^0 i  C& ?% q
MachineMean time to failMean time to repair9 K3 O$ Z  K5 T2 w% U# w. u5 Z0 m
A110 minutes      5 minutes, C! L% D9 r7 y: f9 A7 T
B 170 minutes     10 minutes3 Q4 x/ }) v  ?( k
C230 minutes      10 minutes
- R0 i2 H  w3 w) B$ W& c( B! s0 {( A* q) C3 S/ X. h; x9 g
The machines also must be cleaned according to the following + q3 j8 n1 x# E7 C, v
schedule. All times are constant:
. F, Q) N; ^8 }2 Y  D
& I' }7 E0 X1 N8 UMachineTime between cleanings Time to clean
* s$ h  I* ^6 I3 QA90 minutes        5 minutes
2 m5 |0 a6 h9 p  O, R6 E) wB 90 minutes       5 minutes
" u0 j9 l0 v7 a) A& a5 N# r3 J7 j7 @: d2 fC90 minutes        10 minutes
/ L) ^6 P& Q+ D9 T7 Q
9 a+ M# X5 P* kPlace the graphics for the queues and the resources. : G4 V1 G$ Y3 A
Run the simulation for 100 days.
' h! V3 k6 s1 nDefine all failure and cleaning times using logic (rather than resource ) X% I$ V8 p/ @
cycles). Answer the following questions:2 ]" x4 q% H% r9 o5 [( k& t
a.What was the average number of loads in the waiting queue?
3 J7 n. a. [! W' y1 M. F* M- B( w& hb.What were the current and average number of loads in Space?
! ?+ v# T  z; O5 S& ~How do you explain these values? 9 ^; N1 \' O) M

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉: E2 J: m- D/ z6 }3 Q2 S
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 F& K; m* V# ?5 l! C, Z" E
这行好像也不太对,各位先进觉得如何呢?8 @7 E/ q7 ^% y1 y
# a: K% \+ P/ x( U- S* P( k
begin P_something arriving4 ^% z4 ]7 n1 i- z( B! W& k
   move into Q_wait
; k7 c& f: k& Y0 Y5 H3 C$ a# |+ u   move into nextof(Q_mA,Q_mB,Q_mC)
1 h2 U3 D, H- A5 r, ~' [   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
+ m, v: Q7 @- v2 i   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' l7 I9 G3 t$ s$ h+ [! U$ s4 l3 \end
. w! b: R: Y- t) n1 q8 ?
/ z' b, t1 g+ V4 bbegin P_mA_down arriving/ a/ R8 z6 z5 V- n/ p# b
   wait for e 110 min
# F$ e' d& L1 U" R  x$ o   take down R_mA# l2 x5 z: n3 }1 o3 d+ |3 X
   wait for e 5 min8 F- S# Y# \* J% a. P3 O5 E# W
   bring up R_mA1 d0 [- T& P$ Q
end- Z1 m1 Y8 H6 f

6 V  u% R: E* W4 c0 B; Lbegin P_mB_down arriving
  W6 }/ ]3 H5 V: e! ?4 T   wait for e 170 min
% P+ ^" b$ L& q, {, v) ?; ?   take down R_mB& D& A/ P) g9 g7 F' m
   wait for e 10 min$ ~4 E% J; M# y  F
   bring up R_mB/ w* B; J- ~& B4 e
end
  q  D0 i! f3 T
7 `, n$ a$ Y- l% d- `6 C2 ?begin P_mC_down arriving
" P2 G4 K8 o2 v   wait for e 230 min9 H, k9 U) D0 p0 Q1 ^. y
   take down R_mC. ^/ \( R5 j# s; w6 C8 y6 X
   wait for e 10 min
5 R( r, U: V. O: L6 a   bring up R_mC
; f/ V' }9 A4 Q. Q& Yend, r6 J" p& g$ m0 E& T

3 a( |# Z; t% z, l1 bbegin P_mA_clean arriving0 y2 m5 \; V) h, G7 G
   wait for 90 min
  F2 r  |1 s* p# H" B5 M. x8 h   take down R_mA
) s0 p8 C7 `6 |3 T9 @9 [' P   wait for 5 min. `  H8 |7 L% r7 y
   bring up R_mA/ h& v8 W  s2 ?/ a  X( u- m
end
* }" I6 H; i3 s
# l( O. W9 g# y& L7 N% bbegin P_mB_clean arriving
8 C. P0 j+ v1 a: @; o. j! O   wait for 90 min
. G& P6 e- n; ]% j8 D6 x   take down R_mB
3 p" W9 K( t6 O" C   wait for 5 min
  c& y& l& e4 x/ W) P" ~9 Z; v   bring up R_mB
' R2 K9 K* d" ~( n- [0 Gend8 x8 J! {. A' E, F
+ G; i# h: k5 C0 ~* {
begin P_mC_clean arriving
1 ]/ K7 I* o$ d% q   wait for 90 min, i* L/ f; G5 u( D: d! S. v# O
   take down R_mC8 |. Q' L3 k* ~& C: s  {
   wait for 10 min
  A0 O) v6 }8 ^# L! M; d   bring up R_mC9 _4 T6 `8 k% p% O. w
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving8 l" g, e2 }* _' u7 e; I# `
   move into Q_wait
1 r- O' N4 A7 f/ x& Q; q   set A_q to nextof(Q_m1,Q_m2,Q_m3). R8 J6 W. [% Q2 Y
   move into A_w
2 p8 X$ _4 G" {% ]9 ]# O   if A_w=Q_m1 then use R_m1 for u 48,5 min
5 H$ p# v( G& X5 V   else if .....then use ....for u 48,5 min' y: k# H0 N0 {* K* N0 z
   else if .....then use ....for u 48,5 min  
- ?, w  T4 O5 |5 F( f0 ?$ n   send to die
' C7 e' ^9 X. X+ x% s# Aend# r2 h; c+ H5 ?3 r; r! v
( [8 V0 t$ K1 M% v: N- B& M
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-30 23:20 , Processed in 0.019195 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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