设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8040|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
/ a: ]" k: E! A7 g% i- h: n8 b! b: i1 P: D" H# {8 [$ j3 _& u
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
3 Y! m" Q# {* }! F3 x1 o( f: D$ H" v, \- S0 J( K5 M$ @% ]
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!( ]$ V- b( E. |7 `: |0 C
* s' s- {' G; {- j
--------------------------------------------7 H) S% f& B5 \
begin P_something arriving' ?( G, n' ~1 o' L' N; f: B8 P7 I
   move into Q_wait
+ D8 l' H( W5 J0 i9 g! F4 p   move into nextof(Q_mA,Q_mB,Q_mC)3 B) O0 {( s$ C6 i; Y9 ~' _( _
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
, m3 s7 U% y6 z( F8 l( O   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 [* ~# q& U0 D* W) K0 J( d1 [7 j2 u) s   send to die
; i9 p8 O) C& l6 \end

/ {5 b4 K; c6 u1 X! l9 A4 t# I 7 |' L( M4 ^" O: ], i  @, y* _
begin P_mA_down arriving( Z; D$ ], w" q7 x7 q
   while 1=1 do
$ `3 g/ F9 u9 @+ w3 O0 C+ B   begin
' {0 g* B( D, q9 k+ ^6 X5 ~   wait for e 110 min/ B8 Z8 K  g; ?5 B9 B) ^
   take down R_mA+ @* y5 _6 c% j* g* q3 O
   wait for e 5 min
* T$ |& ]1 S) `" H/ l% ?. s& m   bring up R_mA4 u: c6 b( ]/ s; Z  d$ \
   end
4 T' d) ^7 K9 @& I2 Hend

. L& F! ?( a' w3 i# g ) O3 c& R* o" d5 d/ z7 R9 U8 l" X$ ~
begin P_mB_down arriving
% k. W8 C9 @# ]0 G) ~   while 1=1 do  l% R) P' S4 O3 H7 k/ J( P# ~
   begin8 J. g& ~- [' O$ @4 C  u  N
   wait for e 170 min: A4 f9 F; t1 A% f# ?: p
   take down R_mB; ^8 f) A: a+ m* ?8 c6 T
   wait for e 10 min
$ J+ C( |, C, ]  E7 N* P   bring up R_mB2 U' Z) a) T* ~: c3 o; J/ P
   end9 d8 D7 ^0 b- u; N/ ]  l
end

1 n" L( y: M" j& f4 i9 x ) ~  U- t- b7 q8 [7 f7 V
begin P_mC_down arriving
; m- [3 J6 ~/ X$ x! @; R   while 1=1 do 9 |) M2 E) y3 e. p
   begin9 l" ]* Z; K5 M
   wait for e 230 min
9 j" G3 ~+ E  F. o4 g4 S   take down R_mC$ T; P+ G  M6 K0 v
   wait for e 10 min( f/ w* h. z5 \
   bring up R_mC& P. P5 w. o/ d2 l6 R& t
   end
" \8 z  q/ I( `( l+ G1 iend

- _* Y+ Y4 ~( ?5 v, C" Z5 M  W3 a 6 b  ]2 w6 F) U# |; ^5 h
begin P_mA_clean arriving7 r$ Q# H9 M- P" r, N
   while 1=1 do
) {$ U( s& S4 x+ u( F, |2 s" N* b  x   begin( B3 r) t5 N) m3 f1 B
   wait for 90 min
3 T" z! m  k/ s2 C5 m: Y1 V   take down R_mA
9 F5 U3 t- q& n5 d( z9 k   wait for 5 min( W4 R. ]8 X1 y& A
   bring up R_mA
8 H4 Y# }: G  O( i- |" |: z   end
* @( H, a- [2 i( G: u" k! q3 O/ send
) G/ ]! y/ @0 B, Y! V# Y
) d) |8 \, |4 U: i2 e: ^6 M4 r
begin P_mB_clean arriving! M) T1 T5 t) C
   while 1=1 do7 y# ^8 N# c2 s& Y6 h( T/ q
   begin. @7 {: Z: |6 W9 Q& n7 k) |
   wait for 90 min
6 e; D0 z- T, `   take down R_mB
2 E& {  M7 @7 \( j. C3 \6 A   wait for 5 min: D! l& y8 z! I# B
   bring up R_mB
; a) E8 r  @5 Z$ u4 X0 l   end
; {9 O, o% A! T* T% o- J) P3 Yend
( Y) V; H6 c2 Q; L4 ^

4 J8 f: U- G' t4 k: T! d7 i6 ^begin P_mC_clean arriving  I8 F! T" [  {# h& B
   while 1=1 do
4 D( L9 A$ M- X8 X0 A/ x5 q   begin$ j) U2 F% v; u* m8 H
   wait for 90 min/ p  y8 t% z+ \9 f
   take down R_mC
9 t5 Q6 {5 m8 |8 ^   wait for 10 min
9 p6 k& ~" z$ _+ z1 p   bring up R_mC
0 R% W+ W, z- `: h   end, R0 P% u, f0 S5 S5 {1 s
end
$ W* d6 H6 D- D" V1 F
----------------------------------------
% S5 Y+ M, S; z  c
3 y. L" C0 ^9 kExercise 5.99 r+ _  o% l5 C' h9 D
! t6 E1 g$ R: r

. c/ i8 `% c1 D  k9 P: x" Z& xCreate a new model to simulate the following system:, w4 C8 u2 h/ c
Loads are created with an interarrival time that is exponentially ) D% u& i( ]! u: y; Y( U
distributed with a mean of 20 minutes. Loads wait in an infinite-
9 W6 E0 l, _* M: n1 xcapacity queue to be processed by one of three single-capacity, % \: Z/ u' k: G) {5 z7 z9 R
arrayed machines. Each machine has its own single-capacity queue
8 i( O; O8 E; s/ Q) f: S- dwhere loads are processed. Waiting loads move into one of the three
! z% R/ T8 `: O4 Vqueues in round-robin order. Each machine has a normally
" X, Q9 i0 E: ~! d9 tdistributed processing time with a mean of 48 minutes and a standard
& L: c# l; T; k. k! [' e# |deviation of 5 minutes.
. x* `; T* `* \The three machines were purchased at different times and have ; q& m. a# ]4 Z$ q: c5 M
different failure rates. The failure and repair times are exponentially 4 I( ]- f7 }3 w4 [6 P6 y% T
distributed with means as shown in the following table: # j6 v, U  V4 G
Note The solution for this assignment is required to complete , c. {$ S* i" F: d. O) g2 M- H
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of - k) Y4 Y4 v- M# S% q7 v2 u
your model.
3 Z* c: q0 U& e" a1 K, F! }1 V7 u3 p' ]5 [* D- Q
MachineMean time to failMean time to repair1 }8 q5 f% F2 B5 |% G* L
A110 minutes      5 minutes
" Z& T- y5 f' BB 170 minutes     10 minutes
1 ?: h7 O8 A, W, |. W& sC230 minutes      10 minutes) P( S! G2 Z! k

' w0 L% e  H1 C; c3 NThe machines also must be cleaned according to the following - \% {: H+ N/ e( }5 p
schedule. All times are constant:
! E7 G& @; g! o$ T) g0 g' L8 P# m. r
MachineTime between cleanings Time to clean
4 \1 {5 E5 i  X) {A90 minutes        5 minutes9 {% j1 l8 C. H9 c" A
B 90 minutes       5 minutes
# Y+ {4 J% C( q/ c% R2 M$ @6 xC90 minutes        10 minutes: E. o# x; G8 r5 H+ `

" x6 ^  L  d; c+ jPlace the graphics for the queues and the resources. : k7 k7 }5 j6 C( ]5 q' z
Run the simulation for 100 days.0 n9 \# c& f; Q% w6 ?2 l" p
Define all failure and cleaning times using logic (rather than resource
1 p- f# q8 @. M) |cycles). Answer the following questions:) r. E- @% ]8 ]& M* m) D0 R  y
a.What was the average number of loads in the waiting queue?* b% `/ G0 ~1 {. Y
b.What were the current and average number of loads in Space? 2 G" T1 C* U# M( u7 t4 c! ~/ v
How do you explain these values?
& \/ E; G; k, H/ q. M8 K2 c1 ?

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
0 W# `6 D  q9 K+ esend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% U7 R5 O# t. x, n2 h- n0 l4 }& i这行好像也不太对,各位先进觉得如何呢?
: M7 [4 p, n1 ?& r+ E
9 Y' Y/ ~4 _5 I/ [8 u& o: R8 abegin P_something arriving
, z! @* g5 s0 P8 Q1 @9 z   move into Q_wait4 g3 P* g! B, X& M. T
   move into nextof(Q_mA,Q_mB,Q_mC) : p5 }* c% I4 c; ?5 P- f9 M7 x
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
5 ^  {, X5 n( ]- j9 n$ e   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 4 ?$ \( d- d4 q
end
) `( H# s2 T* d7 }5 H; f6 z" O2 Y& o+ u2 i( z
begin P_mA_down arriving
5 G1 s3 o' s$ S' I   wait for e 110 min, z( c0 n; l0 x! A' t
   take down R_mA
2 j; f/ n4 _2 l0 w9 V3 V( e   wait for e 5 min) }9 o; p# j; g! R& y  k
   bring up R_mA
; M$ f* Z7 P) A$ X2 @8 P( H+ S& hend
6 f" i4 Q5 X2 o8 ~6 q3 F
1 y) P/ j/ \/ b+ l" O- Tbegin P_mB_down arriving( T7 K8 J9 q  K: j9 Y
   wait for e 170 min
' A# C+ Q9 I0 J1 n. f+ z, O4 e   take down R_mB
/ e. p- D+ M/ U+ h   wait for e 10 min
" D% b. H2 U  `9 |) `   bring up R_mB
- }! D% o3 a6 y2 Pend
8 k% k3 H7 T9 J- h: B. w) }& _- k7 O, A
begin P_mC_down arriving
' c1 {3 e8 C, p) T5 n' k& y   wait for e 230 min5 _0 s: i" L1 I0 y+ f; h6 N
   take down R_mC, S- P: Q- ]$ E
   wait for e 10 min5 o" v8 t  W. J- B- [# ?
   bring up R_mC
2 z; f+ Q; d" E! S/ T% K% Hend# d6 A" z1 z1 h1 \& m6 A
: W4 O: M9 [4 F- @
begin P_mA_clean arriving, e1 x% q: t7 f- v$ M
   wait for 90 min
: G7 U) B/ Z& Y1 u   take down R_mA
$ ?& W! @2 H3 q5 u6 s' R   wait for 5 min
* R0 b; k9 H9 z2 {  Q   bring up R_mA+ a3 w7 I0 _8 U4 |& W* X
end
. t: |# n4 ?" ~0 F2 }1 b2 a
, H6 ?# T& m2 K0 b/ Gbegin P_mB_clean arriving6 ?1 ~. A% e3 m4 ?3 M
   wait for 90 min
/ x- h2 c& b3 B+ u' }1 N   take down R_mB
5 E5 f3 [( G8 G9 m, k* k% k   wait for 5 min
! Z) f# I! I" ]9 z9 }3 R   bring up R_mB/ @# u: u5 ]- {
end
( Z7 d3 X7 o+ |2 |8 h/ t' ^$ _9 o  }; [! }2 J# p
begin P_mC_clean arriving& L! `- S$ F% ^. x
   wait for 90 min, ?( G) @( y* `4 }1 w9 O
   take down R_mC8 L8 G0 C% o' U5 D! v$ T. M, I! |
   wait for 10 min
: u8 o1 w  h2 t4 s   bring up R_mC  X0 v" {% u  z2 U8 T
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
# g* W* ]8 V' }  S   move into Q_wait  Y% _# C5 o7 W. n' y4 @
   set A_q to nextof(Q_m1,Q_m2,Q_m3)9 ]2 @$ R1 F9 c2 i2 B! \8 |1 ?
   move into A_w
9 b9 A. g& ]" N8 H) K; M+ m3 q   if A_w=Q_m1 then use R_m1 for u 48,5 min. I1 l( K# U8 Y, i: a5 _6 \1 K
   else if .....then use ....for u 48,5 min
2 v1 d9 }1 h% k2 X1 A   else if .....then use ....for u 48,5 min  
  ^! L' |, D2 n$ O   send to die
0 v. S/ X: W/ n. k0 [end
2 j. J( w* v, j/ Z0 N
/ J1 E% Z7 D  }0 F: V' w- }1 ]供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 20:16 , Processed in 0.013332 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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