设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5855|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 * z2 a, a" H4 i+ E& x
% M$ S% a4 |8 ~0 r" ]; ]/ v
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 ~% x, U3 Q  ^* `& ^3 n7 Z3 K9 [) X% i
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
+ ^1 R& J: A/ s$ W. O+ @* x2 g
& u& M+ J' k" s9 V6 U
--------------------------------------------
; `1 R  r( x: s3 V9 C8 Wbegin P_something arriving
7 Q+ i' R0 p1 }/ L9 U1 o3 T   move into Q_wait$ H7 F( ]2 I9 Y, I  H" y
   move into nextof(Q_mA,Q_mB,Q_mC)1 J* ?8 S! S. X5 W7 ]
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; N9 K& v" k$ W$ u* b
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 K( P; Q0 W/ Z3 x- R   send to die
% K5 @  e# L" I# P, G: Fend

" ^5 V1 h) R" Y3 @% o6 b- S* J 4 F* b' f- j( ]3 _3 s& h# @
begin P_mA_down arriving6 z) ~7 ^  W2 }! u
   while 1=1 do . G8 C. t5 T( [/ A5 O5 |
   begin, E  i1 i5 x- U4 h. }
   wait for e 110 min
+ u9 {$ ~! m- f   take down R_mA
) b. S: t+ k+ O% _- P  k   wait for e 5 min! X3 F. x- N- a1 X! }1 M5 K
   bring up R_mA
' t0 z1 `( Y: q5 L% h   end% _0 @3 H! H/ V# d: f
end

6 S" h( ?4 U7 G4 | $ Y! p8 U' t) h
begin P_mB_down arriving5 a: b, V9 W; S0 S
   while 1=1 do6 Z6 \& l6 c' n8 k: f
   begin1 A' A, N) a) T8 t! {2 s* U* F7 A
   wait for e 170 min6 m& i+ k5 h) R0 T/ F7 K' x
   take down R_mB3 v/ y2 A8 d: y0 l
   wait for e 10 min- L* E: b( }' q8 r! ^
   bring up R_mB
$ b2 F1 x# w' W/ w! }( Y   end; r( ^2 }/ |1 x& L) q$ ?
end

  [' v2 C5 e7 d! c6 e 8 }4 ^( B4 w  {8 }3 C
begin P_mC_down arriving
- }' P- Y/ t- I1 E* s  ^' O   while 1=1 do
& V9 z' M& K( s* v' i/ E   begin
6 G. V9 x7 E) j1 `   wait for e 230 min2 _$ }4 I2 ?8 J1 W$ Z8 d" H9 W
   take down R_mC
% k, I- ^9 q, s& Y   wait for e 10 min
& q+ O5 z3 I. q: _% q   bring up R_mC
" w2 x5 F* Z. C5 j   end
, j$ W4 |5 U0 m, Jend
2 J& U9 ]# O* [( X( V, z/ C  _$ `
% N; f8 a% M) |
begin P_mA_clean arriving
9 Q, \1 [/ K2 ]- A/ I' v& Y   while 1=1 do
& o* A1 f* s& I. H5 M) F   begin8 ?7 X4 ]. X! Z) w1 W
   wait for 90 min
- k0 s4 G8 ?+ I( U   take down R_mA9 o( Q3 a1 L. N7 m- B$ Z+ U1 J
   wait for 5 min
* ?, X5 N/ q* L3 A! W9 }   bring up R_mA  a. Z& R8 a5 T1 l( O" r5 s
   end: q, T  a; l: a+ j. F, X
end

5 j* _- e4 ?' d) v& n2 r8 @( K 8 I* z& u7 R4 i8 w( B8 p. q
begin P_mB_clean arriving
4 ^) f4 N. [6 p* m   while 1=1 do+ z7 N4 e0 z( H* H- i4 i' m$ w
   begin
" Z: H- h2 V2 ]. S# z5 D! x# ]   wait for 90 min
1 x5 v& U2 B) a   take down R_mB4 f; s2 g! K4 A# {6 q: |8 B7 G
   wait for 5 min5 f7 E3 @! k* r/ m" C$ _
   bring up R_mB
1 Q$ D' s0 h6 U  L; w  K6 F) f   end4 Y3 i2 {* N& T3 w
end
" @/ z$ `+ i" l' P% j" R

2 G  @/ M0 Y) b7 M: Zbegin P_mC_clean arriving& H' n, s2 ?: b
   while 1=1 do( J  I; z% _; D2 }4 {3 ~
   begin
9 s/ U2 T( o! h7 [9 Y$ v! n   wait for 90 min
( e4 W& Z2 ~3 R& i+ I) u1 _   take down R_mC5 b, C$ C7 I) w' d; ^8 ~; I3 Q
   wait for 10 min
0 `9 W7 s/ B  d7 x2 V/ j. V   bring up R_mC, }* S6 }3 C9 t! G9 z; ?
   end% E$ d$ x  S: ~  ^# c, \: K
end
- ^! b4 o  {& K
----------------------------------------9 c3 z! U8 K; Q' H) i+ d

: n- T+ j" F6 i# R; EExercise 5.9# P0 I. x0 I) c' H

; I. n" O: X6 k5 C  `; z+ ?
/ w( R$ {  L  l  c7 Z0 [6 o" y& ^Create a new model to simulate the following system:
5 ^- R9 q8 l$ E' m7 k1 D/ F. YLoads are created with an interarrival time that is exponentially * p/ y- g9 q! _+ D! A; \
distributed with a mean of 20 minutes. Loads wait in an infinite-  w* p' Z) R4 n7 i. u4 t2 F
capacity queue to be processed by one of three single-capacity, , C& r' g2 }! T. t
arrayed machines. Each machine has its own single-capacity queue " X9 m% E" ~  _7 K  g0 Y. G* ]7 _
where loads are processed. Waiting loads move into one of the three
! R5 a9 a# t5 a) Fqueues in round-robin order. Each machine has a normally
" ]$ X6 C5 H$ C( Ddistributed processing time with a mean of 48 minutes and a standard
* U3 E# @. r+ {" T" l, Tdeviation of 5 minutes.8 D! L8 T. z3 ~  x; I( j
The three machines were purchased at different times and have + i- q" f/ q2 @; o" m" q/ O/ \
different failure rates. The failure and repair times are exponentially
! J# }- ~0 c- O% p- Idistributed with means as shown in the following table:
9 {2 U2 Y, a9 c9 @Note The solution for this assignment is required to complete
3 _4 n0 w' N. y/ F/ T+ d/ cexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
( T( a" l; k, ^" L1 Vyour model.
% i- l8 }, p" z; e" l! F& f+ {. l+ U/ ^+ L& V
MachineMean time to failMean time to repair
6 U) S- @3 ^8 D9 [* \; iA110 minutes      5 minutes
9 `* i- l: M7 f% k. W! |B 170 minutes     10 minutes
8 V) Y& p) Q. z- @1 Y3 w- `C230 minutes      10 minutes
) D! ^6 u5 `; ?
' h; C7 j2 `5 Y) [; @8 g/ |The machines also must be cleaned according to the following   T/ Z8 o  o2 B$ Y
schedule. All times are constant: 3 s0 j( `/ z1 T/ ^( h: \

# z. k0 w4 w  v8 b1 bMachineTime between cleanings Time to clean* J& A: Z& W: z2 W
A90 minutes        5 minutes
6 b: N! c0 R' J  G& GB 90 minutes       5 minutes
; ~, r5 A( O; M1 {! `, |  OC90 minutes        10 minutes
% _$ d9 r1 f  E. m% _9 w
( S; M6 T4 y6 i$ Q3 N# H# J! j$ g7 z# gPlace the graphics for the queues and the resources.
- E& x+ k3 e9 k" V+ v* y# ARun the simulation for 100 days.! O5 q+ n4 ]. l0 M% g
Define all failure and cleaning times using logic (rather than resource 8 e8 {, L% {6 U
cycles). Answer the following questions:2 B  h/ \, d$ u/ ]/ S& J
a.What was the average number of loads in the waiting queue?& J: j" W8 d, J# x% B. W
b.What were the current and average number of loads in Space? # L# ~( K- |( U$ E
How do you explain these values? 5 D( }/ e1 m: V# e$ Q0 S

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) t5 Q- |8 h- r9 s& G9 |% V
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
9 \( X. p8 _) g" g( Y这行好像也不太对,各位先进觉得如何呢?- x' `  Z/ y1 ?- R2 C

: @9 p) t7 s$ I7 @begin P_something arriving
1 y  X1 a0 S' f# `/ V   move into Q_wait
! g: [# e6 _" M( D   move into nextof(Q_mA,Q_mB,Q_mC) * b$ D. G0 Z, E% t: }2 V. c2 O1 W
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
" ]* K, f" W4 v6 A   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 B/ ~! s7 r! W" V0 jend
; _8 u. B; E( I$ a* \
* ~8 i, P1 Z/ r! y5 lbegin P_mA_down arriving. \2 l- y) L3 r
   wait for e 110 min/ @) u; F1 t# m$ p( [: P6 N/ V
   take down R_mA9 v/ F; _$ h6 b  c, G! X
   wait for e 5 min
1 d% u( B3 ~. |) \2 A8 i) O   bring up R_mA
6 v0 y5 |" \, P) {8 Xend
0 C$ x4 l- k) a+ K2 i
! n' Y9 k2 X9 {1 P) ebegin P_mB_down arriving
: u; d. D; J" r0 T; B2 r! n   wait for e 170 min6 C# a: e6 k% m  f0 J5 d2 w9 ~& }
   take down R_mB
) Y: F6 y, D/ S   wait for e 10 min4 j8 h& \+ i4 f* x& j; `5 {1 c
   bring up R_mB. W. c% O2 ?+ x( v
end" z, i6 z& H( R, M
. E; n1 m0 U3 Q1 `
begin P_mC_down arriving
6 x* j9 G; q! y, h: }% X7 E   wait for e 230 min
) b/ c& M# `# _1 @3 O/ f/ b9 a   take down R_mC2 B% a$ L( X6 f2 a4 A
   wait for e 10 min! y* f- S! L% G: p. d0 Y8 a3 `
   bring up R_mC' M2 u  @) O) O
end, b% Z! m: W) u

$ E2 H+ X- B$ o8 S# ebegin P_mA_clean arriving
3 t7 O& M! C* u0 Z) h( J' |   wait for 90 min
! y7 h5 ]& \# U' V   take down R_mA
& R, q) @  Z/ S4 z9 ~   wait for 5 min6 m; M+ x4 U0 I; o# a
   bring up R_mA% V$ R: Q$ @: ]6 P1 ^( l
end
9 N. _1 b8 U" v8 U5 y5 A& l* u* q; O& i3 c3 K! \( M- [
begin P_mB_clean arriving
0 }. a+ v4 \: D3 ~   wait for 90 min$ G3 t# k- X! A
   take down R_mB& V2 |& Y3 L# w: X  R
   wait for 5 min# L/ y, k: c$ l  m" }. H
   bring up R_mB3 \& N4 f# S& j1 U8 G/ ^# T3 S4 R
end6 X  J; K' |; W% a; a! _
1 a* }  r" b) \; `- K
begin P_mC_clean arriving
7 ]8 V) L4 D! A: ^6 k/ k5 {   wait for 90 min  z. Z6 X6 x$ u* i) y* [; A& \# c: c
   take down R_mC
: \+ C* k4 N' |: a9 }: v   wait for 10 min
! Z8 X; c4 i2 \5 x   bring up R_mC
+ }7 Z! V/ Q: V+ j0 Pend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving7 ~! S. N) }7 n' j9 @$ ]
   move into Q_wait
" ~7 h5 V  ?' q9 _   set A_q to nextof(Q_m1,Q_m2,Q_m3). ~# K0 Y2 J0 ~8 w  P& {2 q
   move into A_w" l; C' Q, G; X& M% T
   if A_w=Q_m1 then use R_m1 for u 48,5 min
. d' b# I, K" L/ _( u7 u   else if .....then use ....for u 48,5 min! a1 R4 L6 T% C6 K& T
   else if .....then use ....for u 48,5 min  6 f4 h  W$ B* \- h! n
   send to die
8 `3 O+ x; w0 lend
9 u3 Z* z  P  j2 \
! F8 L5 w: |6 B% U  c8 w# S供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-2 00:49 , Processed in 0.018920 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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