设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7071|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 / K1 F3 y3 ]/ Z! p5 Z1 k5 \' P
& D, T$ G. d- n2 `
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
$ W6 Z  O' M! [) P9 j7 y7 q! h$ ]! ]) Z7 Q9 M
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!* C. r2 ~7 d2 y' a# R

3 d. V* {! U2 G" m9 p
--------------------------------------------
0 E$ C1 }8 j" t' T" _begin P_something arriving
1 n$ ]% m% W( }- X   move into Q_wait
3 @4 e! j% Z/ U  E( W& i* W   move into nextof(Q_mA,Q_mB,Q_mC)1 v% k; j7 ~" K; B
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min5 A( x: k/ R4 l6 A! x- J
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); ^" f! l* D$ T- _; ^3 V1 q
   send to die0 ~- Y& e& O7 ^. l/ I
end
( f7 j6 \3 M! |' e. c3 Y# t

0 r& v9 r1 t4 p- n, ?8 f" B0 L3 Ybegin P_mA_down arriving
( Z8 o" B$ d  w) T" y  {   while 1=1 do
, A* g9 B' d: P1 V  v# S& S   begin
# B# z& @. b0 G2 @+ {7 _   wait for e 110 min
2 L6 O* }( F! N6 p& T# @% e% C   take down R_mA
" A& ?$ w$ ~  l( a( B   wait for e 5 min
, ]' F" Y4 i+ F   bring up R_mA1 W1 q( |: D- P( p
   end' o2 q( @( G% \5 I; f
end

, X1 w8 l5 _4 n1 X$ R+ p
, T4 J& b6 L5 V3 ~7 ?begin P_mB_down arriving
8 D) I3 P8 L5 ]   while 1=1 do$ ]( N4 Q, k% \! r; ?2 Y  g
   begin
7 ?" g9 k3 o. Q( k; j   wait for e 170 min
/ ^0 v! _+ ]' r% a4 Z   take down R_mB; L* J, P" f/ u) s) v+ h  B
   wait for e 10 min
) r# R" H7 ?: l6 O8 X0 Y   bring up R_mB& i3 B% H( p/ T& J
   end
2 U' I+ Z9 z" k6 V# _0 O; ?end
/ G, ]$ H" U! C/ _+ U# L: Y0 o

4 _; }# n9 |/ v) lbegin P_mC_down arriving  h) O) E: V( D8 J
   while 1=1 do
4 b; r& C# [4 Q3 I   begin/ B( u+ c) B+ L" ^
   wait for e 230 min% s& P4 k- W4 o3 M
   take down R_mC
6 ?# e4 O+ H3 ]   wait for e 10 min
" X2 U7 a' z! H9 b0 {   bring up R_mC
' o8 o# K0 p! ~7 t, l3 L/ s   end
* r6 L: K6 L$ [% i% Hend
* O  m" i9 b0 S
: u: X$ Z5 E9 D- s
begin P_mA_clean arriving
- |1 b3 j( }' x9 s, c( I   while 1=1 do8 Q5 _2 Z- `7 b
   begin
* C0 n" a. }% [8 X! T  K3 O   wait for 90 min+ J  N9 |, `2 h) d! ?+ d) O+ b$ L0 i; q
   take down R_mA
+ B6 l/ L* N2 K. T$ p   wait for 5 min
) f6 |2 e& {; {9 B1 X   bring up R_mA$ X1 J3 [0 U3 R% M4 y0 W! o
   end, S$ n' M" L* L: A' [: m1 n
end

3 y; r( b5 ]1 E
+ n1 [; W0 i: S9 D& g7 Ibegin P_mB_clean arriving% y; n% J9 ]6 ?
   while 1=1 do
2 r' V' W3 T8 t1 Q" {/ ?% C. G0 m* N4 I   begin
6 o3 S) l! S( I" S5 K0 T9 R   wait for 90 min8 P  c0 b; X/ R
   take down R_mB6 f% F0 W# i9 n5 e1 y7 g
   wait for 5 min
( ]  y6 v9 i3 G/ T0 c   bring up R_mB
# P# B4 a2 j6 S$ l0 y   end
/ g& p7 [* h& v& J2 e3 H3 ]end

3 a4 r6 u3 t# |3 k$ r, |. K4 ]$ v- ?
. a8 N5 W- P, [6 ^begin P_mC_clean arriving
& ^; o0 a. E) w. W! T# G% R7 S   while 1=1 do
) y' D- [" f& t) F   begin+ ]8 _5 L' O& H6 ^; q
   wait for 90 min
- Y7 ?, P5 z! e8 A% q   take down R_mC
9 T* ^0 t! t2 K7 S9 P% z; ]) U) C   wait for 10 min  {/ [) g# T0 N, y+ r8 M
   bring up R_mC2 t* v; a& N2 B, p' J
   end
. i) C% d* L5 v3 cend

! Q9 |' T8 D' Y: V1 \) L----------------------------------------. v  }# A: n: y6 L7 v7 s9 v
/ l/ {0 ~7 k1 _. E% c* M
Exercise 5.93 I% V; J9 l" {5 t) X
+ E5 h7 ^: I* m  b
1 g2 Z4 S8 m$ d* f+ Q& x' l: s% V
Create a new model to simulate the following system:
5 ~% N6 u+ {* l# k& r1 RLoads are created with an interarrival time that is exponentially
) r1 c: L" C% J$ m/ Z) U  Bdistributed with a mean of 20 minutes. Loads wait in an infinite-0 F- L. j8 k- z9 y! l* S2 |6 G
capacity queue to be processed by one of three single-capacity, ! G. Q" w* [  ]
arrayed machines. Each machine has its own single-capacity queue
8 ^0 M9 d5 W% F( n4 U1 m4 Twhere loads are processed. Waiting loads move into one of the three " ^* D$ y' U3 Y& C, w, B
queues in round-robin order. Each machine has a normally 5 a& X+ W) m% h6 O( o4 b
distributed processing time with a mean of 48 minutes and a standard 5 @. ]1 m4 M/ l1 I  [: H$ C
deviation of 5 minutes.* G. W3 r! ?6 G* E
The three machines were purchased at different times and have & i. s, V& U3 n! S, ~. H
different failure rates. The failure and repair times are exponentially
. E7 Q5 x3 z$ y9 L- idistributed with means as shown in the following table: 0 s" u3 R- `8 W0 B8 r; |
Note The solution for this assignment is required to complete - P& k) G- ~3 n6 p/ }1 G/ e
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. @# D5 r' }9 e, r3 J5 k+ Zyour model.
. V; h7 ~) J9 D& K, [6 U% d
, n/ I2 @, g' k* MMachineMean time to failMean time to repair
& {% ^  L/ _, GA110 minutes      5 minutes' q$ a7 d( S5 O* q
B 170 minutes     10 minutes
) N/ w% d) s1 WC230 minutes      10 minutes
9 j9 s% S% N  M5 i' g' }  j. P. Z7 p" W( Z4 z$ }
The machines also must be cleaned according to the following ( ?$ t  c5 \5 a  I- Z
schedule. All times are constant: " M! o" n) A9 R* \

  o) T8 N) g' L( _, ]# W5 W2 }MachineTime between cleanings Time to clean' f% L! a8 N* @' y5 ~' n
A90 minutes        5 minutes; x, W/ R4 [! W# e
B 90 minutes       5 minutes$ q& n  J% m7 h0 m% d
C90 minutes        10 minutes
* ^( v- G% M& f2 v) i* J/ r% F: h/ ]4 s/ \! x
Place the graphics for the queues and the resources. % e7 T8 N8 Y7 S6 H
Run the simulation for 100 days.
3 p, _* G, K/ N. W( {: G& tDefine all failure and cleaning times using logic (rather than resource
" n! v' t2 A" v. w& U) lcycles). Answer the following questions:
& M6 F; z9 n8 H% p% g+ Y6 D+ aa.What was the average number of loads in the waiting queue?
# {/ ?( K2 ]! i' N9 }b.What were the current and average number of loads in Space? 7 [7 y! B, S6 s
How do you explain these values? : n+ Q4 M. q! @" r+ m5 O

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
5 z' b" u6 Y7 S/ W" R6 r8 `send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" ?, Z  a# A& V, H
这行好像也不太对,各位先进觉得如何呢?
( V, ^1 `! t: S3 a6 o* v' m( }/ V
" C3 C6 h  Y  Z( A) ]' U. t1 Bbegin P_something arriving, O" R' [/ E. j7 b0 n
   move into Q_wait  b# }3 f$ u4 G: |
   move into nextof(Q_mA,Q_mB,Q_mC)
' F8 J9 L) R& t2 b5 }: A8 M   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
( U, O& ]$ E3 ~2 T" k/ z5 M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# f2 v* F7 l5 `end  U1 J$ ]  H4 m# @) B* e2 N
+ H! Q! X3 c+ q% K: i. Y0 s  T' w
begin P_mA_down arriving
% [9 @4 ^4 S$ s! L, t5 h, r9 ]   wait for e 110 min2 U3 _# ]7 r! ]) N8 C
   take down R_mA
" ^6 @4 J" n) S/ P' q1 P0 R5 Q3 a   wait for e 5 min
8 f' d: J7 j" M+ G8 q$ F( j- j7 Z   bring up R_mA
4 ]$ q6 B6 D: |/ y8 d7 r( f& ?end
/ z% h6 c- m6 B8 G
, C, K' H# B2 N2 n8 D8 T4 kbegin P_mB_down arriving) q4 y( t) M2 P: [
   wait for e 170 min4 _3 }6 w* v- g
   take down R_mB
  r' l3 E4 n2 r   wait for e 10 min- d1 s& @; F2 A+ I6 n! |
   bring up R_mB4 c/ e; Z7 {3 M' d1 \" }
end
3 @1 t0 ?6 o; L# i% A2 ]* X
. k8 c& _) U) z- n- Sbegin P_mC_down arriving
$ {  m# u& ^% b" |' d! l0 A   wait for e 230 min
, Z+ G& p3 L! I$ }& o# j6 B) [& ~   take down R_mC
/ K8 D; R! L. t: t3 C3 {   wait for e 10 min& ^' V% @5 p) X) i. A
   bring up R_mC! T5 j  {6 o8 ]" A; M* p
end6 r! L7 O& J( @8 p8 V4 f
: E7 T: k6 I' v5 ^: ~
begin P_mA_clean arriving
* H# R' w* Z9 h) D2 v5 U1 B2 F   wait for 90 min
3 b" W2 W$ e: k4 V( D   take down R_mA
6 t/ D* k6 N9 F& g8 k+ o   wait for 5 min
. ~8 j+ z1 }- k5 u3 y% w0 P   bring up R_mA  `/ D0 V. p  z. M3 y0 _3 W# g
end
8 i6 E2 _9 X8 Q' V% `
# T% o  L% f/ J3 xbegin P_mB_clean arriving
9 N/ J. ?3 a2 \5 e/ [. v3 c   wait for 90 min
9 L5 M8 j" `8 g  U   take down R_mB
, I7 k6 f, Q% w- h   wait for 5 min
  m7 ~! D+ |% ^( ^   bring up R_mB' K: t5 D! E9 Y) j: ?
end
( x1 o, Y1 }8 d' w) b. Y8 q* w. a& U
begin P_mC_clean arriving: X; d( ?, k" L3 r
   wait for 90 min
, C- I5 l" v( w% _   take down R_mC
5 u' k" v: k: F# T   wait for 10 min
- `4 x5 ]8 ^! T6 _% s   bring up R_mC. g  A2 \7 j! ?4 t2 q. Z  I. |
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% z" H8 q$ Y( U( N
   move into Q_wait1 I: k& A$ J# }( z! t4 ~- _( k
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
+ N" n1 \8 z" W) K  A% q   move into A_w
- k$ o( u$ w$ n$ E3 i7 H0 V" S7 x( t   if A_w=Q_m1 then use R_m1 for u 48,5 min
( Y5 U2 H! V5 p2 v3 r) D; l* D% q   else if .....then use ....for u 48,5 min
, u6 G8 I9 K, Y8 h- N   else if .....then use ....for u 48,5 min  ! Z* A. q# b# V! l8 }; n
   send to die! \2 y2 n- ]5 Z& t0 H
end+ X8 s3 b' ?" g; Y! J

2 u5 N/ M+ i0 ~" U! ], I$ {供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-24 09:41 , Processed in 0.013613 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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