设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8044|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
0 N) M' w- Z* c8 R: E" p$ t$ l2 d6 s6 x+ |2 v+ f
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
- u' r# Y7 o# }1 }) _  N
5 Q: R7 x$ C3 L+ M* ]不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
+ n3 ~! w3 {' N. w/ P* C2 x7 O  b0 ]8 G) Q! d' w0 f0 A9 @
--------------------------------------------* h0 Y/ r# Q6 {2 j
begin P_something arriving
, @; c( U0 v# s( v9 [   move into Q_wait
2 y" z- y3 @# e2 V8 {   move into nextof(Q_mA,Q_mB,Q_mC)
( ?) r/ g" p6 g# Q   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 c2 p' W( O6 z0 p* W1 A) V5 r. S   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 k. Z: \6 M' H) r" p6 B3 t2 ]
   send to die) ^$ E: _. }: q
end
6 O  C+ {& p. T! C% X" G* ]* K/ E* d

* r; j; A3 Y- E* ibegin P_mA_down arriving) a  U( _4 @% @9 O
   while 1=1 do * X8 v6 ~. b# C/ E1 X1 ^* p. P
   begin- ~9 i" ?( M+ d- W, |
   wait for e 110 min& ~: x0 f& q/ r. S
   take down R_mA
6 r8 ~  ?6 @: R8 p   wait for e 5 min5 m0 B6 c1 i* @
   bring up R_mA* V4 b1 W+ K3 }* m8 s$ E
   end5 f+ v, Q- `3 W1 r
end

$ L/ x! H9 ]" V  J4 K
( t( }% W; R! jbegin P_mB_down arriving: d) e! j" y5 b( n# T7 T
   while 1=1 do
0 ]) t* O/ U1 s   begin
) r, F+ y6 q( u$ l  |   wait for e 170 min! E& ?' n+ K9 A/ l! q0 B3 i3 e
   take down R_mB. T5 S" C3 S) ~% U4 o" m+ ^# l) C
   wait for e 10 min5 _: @- E) Y/ x: {- }
   bring up R_mB/ N! I" i: x5 Q& [* P" g  O5 H
   end8 J+ c" s6 m; D( Q/ ~! [
end

! s( @$ p: H' }" E
3 i, |& c# a( V* |* x5 M3 dbegin P_mC_down arriving
. D1 ]9 K! L/ V) Z$ v1 z   while 1=1 do
4 q3 O% h& x5 F7 `: f   begin
, ^% T9 t* S" h4 `   wait for e 230 min
! x. {/ Y+ \! ]   take down R_mC  O! T7 P. \6 Y  p  u( J% ^- U' b1 o
   wait for e 10 min6 C  `: i0 ]7 s7 O8 v4 ~
   bring up R_mC+ \. W; L3 L" E2 |
   end
$ G7 x9 z" A$ E: m$ l4 ]4 Jend
7 C: l% N+ e/ g  c

! O7 o9 l4 k7 {begin P_mA_clean arriving
. W8 \: o& O& u$ p   while 1=1 do
' K- D  j9 [) r8 `# r- j5 K   begin5 n5 J# w* O6 W, p' \
   wait for 90 min
3 V0 R$ G6 J6 `   take down R_mA1 O5 H2 N! v( q. X
   wait for 5 min2 D; O0 I9 d: x5 I
   bring up R_mA. T$ {3 Q& a5 s1 P3 F9 d+ a6 I" c
   end
5 ?; |8 g+ o# w3 x0 j% Cend
" j* Y3 u0 @, E$ T9 P

, @' }# B+ B: J: i" K* vbegin P_mB_clean arriving! V* k& G* a" ?5 s. b" G- P! d- c1 q6 a
   while 1=1 do. \" c& P3 r" i  j
   begin- _% U6 N- m( L1 I, H& I
   wait for 90 min
6 u* F2 F: b: P0 R- ?0 J   take down R_mB
, f1 A1 n0 i  y1 T$ I% _: e   wait for 5 min
5 D  u5 i1 t+ a9 N, M( |$ r   bring up R_mB
1 \; ]- h! C4 f- a4 \* a   end
* r. n; c! g/ ~end
/ o3 r: i8 K" M6 q
* n. s2 F. ~& N5 u7 V2 s
begin P_mC_clean arriving0 _9 s7 N6 q  o. z
   while 1=1 do
  U+ d# a$ z5 T   begin
& i3 r0 [9 C7 [+ y4 L( p   wait for 90 min, N! f5 p" W: Y. v+ d2 C* q
   take down R_mC
  \. z/ B) J/ Z* W! W; B+ i   wait for 10 min
2 X/ P5 K& J0 O4 A4 N   bring up R_mC
3 j7 N; c, {: ]3 v5 {   end
7 H2 ~+ s4 R8 [2 j% m* `' Tend

% {; X  b$ W. ?4 A* F) `: n- h----------------------------------------) [6 \2 L6 s4 M0 C& u& ^* i" z( g, f
! R0 d# v: `, [. q* X/ L( R
Exercise 5.9
, A( ]$ ?5 ^* E: o( J+ h7 W6 O' R4 h2 N" S

( O/ f8 }8 A. Q5 ?Create a new model to simulate the following system:
& c2 _1 V9 D! c- |8 ]% _Loads are created with an interarrival time that is exponentially
# D3 s9 \' ~2 w  Z- r) fdistributed with a mean of 20 minutes. Loads wait in an infinite-2 v  {; y% a$ C
capacity queue to be processed by one of three single-capacity,
) l  T! P" \  p! {arrayed machines. Each machine has its own single-capacity queue 1 T( K2 A" t) Y! m7 t4 h  h
where loads are processed. Waiting loads move into one of the three
0 S6 R6 n6 S' Q5 fqueues in round-robin order. Each machine has a normally
5 i) Y2 ^- H$ x( g/ ^/ Gdistributed processing time with a mean of 48 minutes and a standard 5 X* E  P) m1 R; h/ W8 l& J7 \
deviation of 5 minutes.5 {/ j0 c5 C5 r' E
The three machines were purchased at different times and have
+ T; C: U1 z+ U/ C5 B. S/ q* pdifferent failure rates. The failure and repair times are exponentially
) o. z2 J  o5 n! G- ]' Gdistributed with means as shown in the following table: 5 l; z& q; D9 g; H. J0 F: a
Note The solution for this assignment is required to complete 2 p% a* m: C  y2 i' j8 B6 i8 T
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
* g& v3 L# [" R7 w( Y2 w3 T6 Uyour model. ' s/ j; d( f' y/ g- e

1 y% g, q4 x2 G4 v7 X1 y( cMachineMean time to failMean time to repair
, H; ~& T/ w/ ^: W: e5 hA110 minutes      5 minutes% X) _  ]1 X7 W7 y# l4 |7 W
B 170 minutes     10 minutes& w9 [" i7 h8 c0 i; n
C230 minutes      10 minutes
; c& w9 g+ Q0 H% ]/ G8 r2 u6 q" L# ]
The machines also must be cleaned according to the following 8 H0 g  |% G$ O8 y
schedule. All times are constant:
! g9 B! m1 k9 r6 o* a+ |2 I8 P% q! ]2 W! ^# Z2 Q& g& M9 r8 i
MachineTime between cleanings Time to clean8 g3 y9 p+ T; }& R' {- i
A90 minutes        5 minutes4 x& Z4 B& A) ?
B 90 minutes       5 minutes. @7 g  y. r. E2 r
C90 minutes        10 minutes
+ f% U; s% O+ V6 ^) _$ l: E4 F% ]
& O: s1 J' ~% }/ f  S  dPlace the graphics for the queues and the resources. 7 t+ W0 W: V& M) Y. |$ L5 V6 g
Run the simulation for 100 days.
& ~2 }. o, h) PDefine all failure and cleaning times using logic (rather than resource 2 R( E- V* a& {- a% ~
cycles). Answer the following questions:
9 K" A% k- s' k5 q8 x" Ua.What was the average number of loads in the waiting queue?3 |  D( r5 u5 G; m* D& g- S  a
b.What were the current and average number of loads in Space? $ m- i: r* t" W2 M
How do you explain these values? % O. Q4 [' P( e0 n9 W1 B

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉1 t# Q, j' t1 `; f" p
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 N" U) e# @4 o$ s2 b这行好像也不太对,各位先进觉得如何呢?
7 ^5 W0 f/ q  V. Y0 L
" b! A/ i( \3 c- i! c7 r0 |# zbegin P_something arriving2 o3 l3 o- r+ `8 y
   move into Q_wait
' K; T, }. I; \! r) ~& E   move into nextof(Q_mA,Q_mB,Q_mC)
! J" Q) g- Z7 X( ^, d7 x- r   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 x7 ^! c! n# ]/ Z! H, u& _) n
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) * m) J/ r* _/ Z- I: \
end
3 f, D+ h+ k1 V7 I1 e9 Q9 U+ z2 w) I& t, A5 @& B
begin P_mA_down arriving0 ^0 Z2 u" L7 N* W8 z- |3 F& T
   wait for e 110 min- u: ?5 j% c5 ?! n: d9 X4 b
   take down R_mA
5 W- T3 t% @  z+ k. d* f3 i+ G5 q   wait for e 5 min7 B+ c& Y- a  g, v. u
   bring up R_mA
5 y. J* u/ t8 N! \6 fend. r% Q6 _) g- _! i9 ~
+ }. C3 F# ^# ~3 G: \
begin P_mB_down arriving
" n7 K  u( @% v9 m  H0 L' l# Z! b" y   wait for e 170 min
" H4 Z/ [4 E) r5 [5 F# w& H   take down R_mB6 g& H2 B* ?; C4 Q+ V  y
   wait for e 10 min
& ~$ B8 }) K: l. j. {: X   bring up R_mB
9 m4 s9 v) Y9 r6 y/ M9 m* Lend" Q: K3 D/ l8 d: ^3 ^

: F9 j# x" z0 b& W; k# abegin P_mC_down arriving
" D: ~, j* p; X0 C; Z   wait for e 230 min; T6 H1 S9 y: T) _  c) }
   take down R_mC
' |4 j& \! W1 d2 I+ \' S; n; B   wait for e 10 min  |; U6 ^  ^% p* f8 X7 ]. Z- n! s
   bring up R_mC& j5 f- p) T# }
end& C) |; F1 l% @( x9 \7 }9 B
$ W: T0 D: C9 ?& j
begin P_mA_clean arriving, W# ?% @7 q; M. s* r0 [6 Y
   wait for 90 min& y3 K9 }/ z$ }3 I8 e: l
   take down R_mA
' c" h  G/ ~( [% C   wait for 5 min
2 Z+ K+ a# p  Q3 X0 ^4 E   bring up R_mA  u/ p( `. O: f% a( B( P, X
end0 ]. F" d  s; R9 o
# ?2 ]6 [$ {" F7 d
begin P_mB_clean arriving0 w. v9 @5 g" }) R& c
   wait for 90 min
( J2 a  Q# k1 H% B, V9 @9 ]   take down R_mB) {( Z* n3 P2 t0 p5 X0 u
   wait for 5 min
3 ?1 s% O3 g: q   bring up R_mB: H$ [, L. K- r) q; v6 C) M
end# ~9 v4 k- x; C* `/ T  }
! v9 q) M  W# N
begin P_mC_clean arriving* V# A1 X" y# ^& p9 ^4 `" A
   wait for 90 min8 A3 ^. y6 P' `4 l5 W% ^
   take down R_mC: I& y) Y7 U# Q5 H. R) Q- s
   wait for 10 min
7 w% j9 \- n+ l2 d- d) v' d& t: C# C   bring up R_mC8 o' ^- y$ \+ J0 H, {
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 p, n, _* o% o: B( v5 _
   move into Q_wait
9 D9 G1 T3 w% t( \   set A_q to nextof(Q_m1,Q_m2,Q_m3)
2 N& e: Z; h2 y6 v2 \, k   move into A_w
$ V/ }  w8 a4 f1 s' D* D  K7 f   if A_w=Q_m1 then use R_m1 for u 48,5 min
: E8 B* N- P9 p3 ^! C   else if .....then use ....for u 48,5 min; J* Y) c7 I: D: Y" X# `9 A8 x
   else if .....then use ....for u 48,5 min  9 E1 Q: e$ S5 ?' B2 k1 c1 ~
   send to die' q! |  g5 F9 b% ?0 T) D
end
" V1 t+ e% r3 t8 F4 j, y" V' f) U' a0 w# h; o
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-23 00:28 , Processed in 0.012920 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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