设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7292|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
  B" M  f9 s6 A) D% F- y; q0 c2 Y% N/ H4 m
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去4 v, B! i. g2 z1 e
8 t6 U7 D1 q8 W" a1 D. ~
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
0 k; B: v0 x8 k# a, F: h- [0 B
8 e4 a* ^& M2 Z( u
--------------------------------------------
- F2 U# Q8 h6 ]begin P_something arriving3 k$ ~. |5 w' B  d: _: _
   move into Q_wait! c! d! Z8 Q5 `7 C
   move into nextof(Q_mA,Q_mB,Q_mC)
& Y! J: F& F" y4 ^% G) z$ q   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min9 y5 s7 h6 k2 Z: e- J  Q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 `9 ]- q6 W, S& ?" G   send to die5 q8 T  T+ V9 u) y
end

) C3 Q; m9 o% O8 m2 A / l  N' y% n2 s+ Y  @9 I
begin P_mA_down arriving
, G1 b- A! t7 l6 S. q9 a) p   while 1=1 do
6 G7 q" `. T# N* ~, G/ a" W! F' g   begin
0 W# O( \, P+ m# C   wait for e 110 min) \- N) p% f3 V1 g- e' E* F/ c6 b9 V
   take down R_mA/ u5 n( o8 @0 ]7 @8 ^4 |. L. D( R9 I
   wait for e 5 min
3 b* p- M. T" c. X  L   bring up R_mA
; X/ o& R, Q: F7 p. D( G   end9 X" v( O* b% u  {+ H
end
- O% D6 p% Z- X% P5 u0 U

/ z3 G7 r5 T' t6 E3 ibegin P_mB_down arriving8 q4 h" E3 W7 n9 Y% E
   while 1=1 do
6 n+ W& C7 j* a   begin) @% u. G, l/ B6 B% P/ s
   wait for e 170 min
1 G. d6 x9 Z# O% e8 Z5 O. G   take down R_mB8 ^0 P# b! }# z$ w' E/ f1 |
   wait for e 10 min1 {5 ], s6 k) B+ g! x! V" d1 G4 ~# t& _
   bring up R_mB/ i, k1 K4 G) x* R& F
   end2 o6 M" I7 E5 {0 _; \* `" G
end
4 I) T5 J, x' H% P# O0 t) X1 i& b

; ^1 `5 g( Q) ]  t2 Z! y8 W) }begin P_mC_down arriving
3 ?) E7 s& K7 u/ Z4 j- ]   while 1=1 do
& S+ ]$ J  C+ z% v5 |! G- R5 [   begin5 ^+ d4 [: G) p% n: H
   wait for e 230 min- f' F. \, X! {6 {7 T8 p7 |
   take down R_mC
' o8 [) ]; i/ V! T   wait for e 10 min5 K3 i* I9 _4 {; E" d
   bring up R_mC0 ~2 Y9 Z8 O$ r3 J  f5 V
   end/ r8 f7 B; m; A$ s+ J3 f4 E5 @
end

& i- a$ f# e3 J6 N+ {% E
8 H- f; n9 {) f( `begin P_mA_clean arriving3 y6 X% L6 [( P
   while 1=1 do
; x* X9 I( n/ H- L3 M) v   begin
9 q  b2 E, F$ j/ K( f" b   wait for 90 min
6 |% k2 v1 H" O+ L  o7 j   take down R_mA8 ^! r8 k! {1 U$ u1 U1 {
   wait for 5 min" h6 r; S1 b. ^  }, c8 b0 K, ?
   bring up R_mA  ~% x1 Z; x5 Q0 l( S
   end  P; B9 o# [9 v1 T
end
7 O$ h3 F6 n  o. U" I/ @6 A- x
' M# H( p. r! W8 @* P
begin P_mB_clean arriving, t2 T& x2 c2 v( {3 ~) }
   while 1=1 do
2 L: w) j/ V# c% u5 K5 V   begin
, m% h2 c) D1 G   wait for 90 min2 K. K/ q4 [$ \: |6 b8 X! _
   take down R_mB
/ W* y8 c+ W: F# w; z- J! Y   wait for 5 min; {- i/ X9 w3 k
   bring up R_mB5 u1 {' J* B5 t2 ~4 x( [: q4 {" O
   end- [5 W$ N1 e0 b% y1 ~: Z' R; M4 }
end
8 T7 R/ c( `+ T* E! i/ Y' y

. p0 `% w6 i3 q9 p9 t) Rbegin P_mC_clean arriving
6 c( F1 Z' r) s+ P1 I- l   while 1=1 do9 F+ U" f# ~' Z3 m$ E+ X: Y
   begin8 t3 R; {+ O# G0 e. z  M, p# k5 i
   wait for 90 min
6 }. z8 Y3 x% B4 X   take down R_mC, u0 A+ g2 K' b
   wait for 10 min
& b2 F0 \; Z' a! C+ P5 ]" p. x   bring up R_mC
$ V+ \6 v6 `. w% W& T$ t   end
; Z* t0 [& o, J/ ?6 @/ Dend
- ^: q6 S' V% l" I3 E
----------------------------------------& ~% J% q" v0 b4 @' i8 {! n

4 A8 @) R- H9 U+ F# JExercise 5.9. P( I; z& L' T

# f9 P. l& ?. ]1 \! x. a8 Z3 x4 S
4 K* f- B4 O/ v2 G( mCreate a new model to simulate the following system:
# g9 `, ]* P6 E1 [+ yLoads are created with an interarrival time that is exponentially . Q, b3 @) p0 J9 N2 T% l8 f
distributed with a mean of 20 minutes. Loads wait in an infinite-" E' N$ H& w4 J: F8 H; R/ i
capacity queue to be processed by one of three single-capacity, # S* z/ H3 \* ~( T- v* A. N
arrayed machines. Each machine has its own single-capacity queue
( B8 S' a' d* |' M* J& P! F' Rwhere loads are processed. Waiting loads move into one of the three
; d5 ]& ]0 ]9 h6 Kqueues in round-robin order. Each machine has a normally 6 D  H4 q3 m% [) U% q. u0 w
distributed processing time with a mean of 48 minutes and a standard ! D" Y5 t! e: s, M
deviation of 5 minutes.
$ x, y8 c4 @) C2 Y: K) BThe three machines were purchased at different times and have & I5 e6 T! v! D9 m$ `$ k0 C
different failure rates. The failure and repair times are exponentially ) D! d) ~5 ]. J  X2 v
distributed with means as shown in the following table: 3 ~: b* E- s' y8 x& s
Note The solution for this assignment is required to complete
8 {! O. c* ~3 j) o8 kexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of # P5 Y9 ^) D- A) s! t5 s8 H) k
your model. 6 g* _7 u/ C$ @2 {# s4 G

1 |8 t9 v5 J" @  AMachineMean time to failMean time to repair( y/ D+ g& ~$ ?& L" _& R: |  @- u
A110 minutes      5 minutes) G1 j6 h& {/ b- n+ C, ~9 a
B 170 minutes     10 minutes
& s8 H; s" a( n2 mC230 minutes      10 minutes
. d' E8 g4 Y1 _! E' i
! R1 T. i2 a# P0 cThe machines also must be cleaned according to the following
7 p* b& p) s% Hschedule. All times are constant:
' R2 T/ G7 m3 c7 ~+ R3 I. G) ^" j; h$ c1 J0 v# \6 G: O
MachineTime between cleanings Time to clean
, I) ]% l: P- I$ Q; V8 l2 C  dA90 minutes        5 minutes
' c# x' L  [: B1 j. d) [: x: D$ AB 90 minutes       5 minutes
) u0 ]6 K* x  m; xC90 minutes        10 minutes
# C4 {5 }5 P$ P$ C0 S9 w. @6 k! ]9 \
Place the graphics for the queues and the resources. ) F! H" b% p) L& m8 k5 t
Run the simulation for 100 days.0 A1 b) N7 e7 q5 A, I+ i
Define all failure and cleaning times using logic (rather than resource
" D  p+ u6 t' y' p: |$ O" Ycycles). Answer the following questions:4 d2 V& G3 C* s: H& z$ l6 ?4 n9 d
a.What was the average number of loads in the waiting queue?# w& i7 Y7 _) P, _2 q5 i- i8 }
b.What were the current and average number of loads in Space?
6 ~& G) _9 w/ |* NHow do you explain these values?
6 r2 ]! B, K% u) u) g3 k

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
6 k: b, @) w1 g7 v7 Usend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 J; B& F' b4 ^7 ~+ `9 r8 H1 b, d
这行好像也不太对,各位先进觉得如何呢?
' J7 C- H7 U8 ~8 d7 I. _
, A; T; H7 C* v' |! b- @8 x& zbegin P_something arriving
& w, v3 ?& t3 J* j' y   move into Q_wait( _9 S  E! o. z3 O. f6 J6 d3 f0 B
   move into nextof(Q_mA,Q_mB,Q_mC) - g% J% f& O! M" a/ A( f$ f8 O& f
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
: Q  O9 z, G& i7 n   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 o: x* T8 n( ]/ mend! ~0 V" b0 o, _! q. _2 v
# f! \) n0 c$ N, B6 ?
begin P_mA_down arriving9 \0 @4 E  s5 ], M' ^& ~
   wait for e 110 min
: K+ Q: ^3 V4 l9 A3 i: Z: z' I$ U   take down R_mA
$ {- d- I% b+ E5 Q  s$ J   wait for e 5 min
+ G! q; N* u' P   bring up R_mA5 g4 [+ R. x+ E4 |# z+ R; P
end8 l5 d( V6 k& b4 s9 A
) Z, G; f+ Q# u- q; M$ D. o
begin P_mB_down arriving
; U) M, N: _0 q6 y- B   wait for e 170 min
+ F' J9 F: F+ X5 P5 a0 N$ X5 V   take down R_mB1 x) U5 |) e4 q4 K" ]/ s
   wait for e 10 min& p& _) I) i4 f' i) Y$ _7 X
   bring up R_mB9 M) I) e) D, J( j2 r- K- G8 G; m
end
) o7 p7 H0 ~) s3 u. B$ m
, n2 S, Q4 c* }' |1 Lbegin P_mC_down arriving
: C0 @. }, d9 H& B+ G9 O7 J2 K, T   wait for e 230 min$ ]% e5 n% l" b- S% D. x
   take down R_mC# O8 c% E- ]) K; _, k( H& b6 e! B" y) [
   wait for e 10 min
- F2 s6 S3 h' c   bring up R_mC
4 I5 y* j% o2 [end- j& y6 e( _/ J0 I

" S- ?( M5 _% n; `) ^  e% ybegin P_mA_clean arriving1 q: ]( G6 M) R
   wait for 90 min/ F7 `9 I( p/ P7 G4 r+ l
   take down R_mA
  ~+ [- r' N1 Y5 `# j$ A   wait for 5 min
/ d' k9 r6 E: o2 f; ~6 f   bring up R_mA/ M8 P. R9 v* s& D
end
( F, D8 Z" ]* ]" l  s& D& \9 t( v  N" c2 |4 C# C$ k
begin P_mB_clean arriving
4 I/ X0 m; ?4 J5 G  g) O8 C1 I   wait for 90 min
! N3 a, `; @* Y) C   take down R_mB
  f3 F: r3 d  M  ]1 v: r# n$ F1 X   wait for 5 min. B$ S+ T, ]% q) i0 a
   bring up R_mB
- U0 e$ g9 _: J0 n. Hend  c; s& n* u0 k# z8 a, x

: U! W; u" M7 z% zbegin P_mC_clean arriving/ _! R# a- D& j4 _& u( R
   wait for 90 min
+ p1 |  V7 \( x1 O0 \# X5 D   take down R_mC
, X# B* C* K" Z* I/ Y; X- w   wait for 10 min, d$ _: W* H( F3 y( ^
   bring up R_mC6 Y$ j& ]% i& @/ C: O6 W: a
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
5 U) z, O! A  X- y3 L- Q   move into Q_wait: V9 y7 o: ]9 R
   set A_q to nextof(Q_m1,Q_m2,Q_m3)1 W- W$ S, `& e- d: p, v* T
   move into A_w0 p$ R. b9 H/ H" i/ A% J
   if A_w=Q_m1 then use R_m1 for u 48,5 min
' q8 u# \$ c# W7 B$ u" Q   else if .....then use ....for u 48,5 min. T6 X9 i7 {7 C' h: w+ K
   else if .....then use ....for u 48,5 min  
% M5 }; g4 w9 j: }1 i0 G   send to die
4 n1 W+ x5 T9 O$ @/ `; {% j7 `5 Mend6 W8 ?  `4 I) v& F! v# Q
' l+ r- b8 ]  ^9 p7 ?5 |, S
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 10:36 , Processed in 0.017905 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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