设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7212|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 : T8 @  n( j0 P( `9 _5 s# X
' z% \) u3 M) F' N1 |6 u9 b2 O3 n
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 G8 X, Y) c- g. c" B& J1 `4 U$ i1 T1 P
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!- c/ a3 Z6 Q" i& B: o8 ?

7 P& {& D8 M0 M/ }, d* U- P' c! o
--------------------------------------------
. Q% M  t* N: _8 Tbegin P_something arriving
( P5 Y; y9 G. U! I2 q   move into Q_wait
# Y: o& v2 \( ^8 A$ m' p+ C2 H   move into nextof(Q_mA,Q_mB,Q_mC)# c) V! ?2 x) m. z; ?; s
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min: R) N. v" ?1 H2 L3 N  P$ k, [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ h, E; H5 l" ]
   send to die
$ {6 w+ o' ~8 {3 x1 Z+ D; dend
' Z: l6 {" n$ {* x" K2 ]0 `

: j# O/ f2 J( f: u' fbegin P_mA_down arriving
6 G( V3 ^" V) y' J0 N& Y   while 1=1 do
& T7 u7 u5 u' P. \   begin+ r( r- F  g( u6 C1 [
   wait for e 110 min  H, A0 [( t: ?( h! E3 U
   take down R_mA
! g' }0 O0 k' X" q   wait for e 5 min
3 \% D$ g  Z/ }8 ], W   bring up R_mA& ?- G4 X4 d$ T7 K% J+ ^
   end' ^9 T& T! e7 D
end

0 h: f( A' y2 Z5 U
! n# n$ n) p% Q+ K6 ebegin P_mB_down arriving
5 \( _$ D, G  G+ Q: o, y   while 1=1 do* J3 P& f2 O% X; ^+ e: ?# Y1 T
   begin# K( G* V, O# [% n
   wait for e 170 min6 b" b$ [/ I6 q8 E; X
   take down R_mB
6 p) F0 [! `+ F* W, j1 `   wait for e 10 min
  v6 F0 R) c4 f; @( l   bring up R_mB
* l. q9 U, U$ Z, k7 N) W) B   end7 o, x/ U: z' F, h9 Y( p
end

% {& E+ {# J: `- G1 l+ g, m ; e9 R5 u7 K, G2 d5 P5 H. S" ?8 O
begin P_mC_down arriving
" j; \+ M9 D9 d; |   while 1=1 do $ `, `+ j2 ], _; x) Y" N) ?. d. j
   begin
' J/ J$ j: e- N# \   wait for e 230 min
" s4 [8 O8 u: g9 q* C   take down R_mC$ f) ^2 ?) \* \% x8 X
   wait for e 10 min3 O( t& T; D* _5 f/ P0 S0 Q
   bring up R_mC- D0 ]4 K' q# J! ~& N! x! [
   end- ^& Y! W: j) Z9 r" M
end

1 H( _" \& {( E- S# ?3 P' D
7 L9 w; N0 L" E* b, d5 `begin P_mA_clean arriving6 e; u" ?7 g# a& {7 h+ u7 k! ~: B" F
   while 1=1 do
  ]* [- e" Q0 Q. [$ Y4 m: x   begin
' u& V% F) x  V# d2 y+ y+ D4 Y   wait for 90 min6 ~& |) ^1 d# ?- \9 M- F6 {; D8 P% l4 J
   take down R_mA* l- B5 ?8 E' I1 \, S3 X: U" Z! x* U5 Q
   wait for 5 min, B6 ?; A9 Q5 \% H# d6 R" A8 U
   bring up R_mA
9 d- h" Z. |/ s/ k; G- c2 \   end
/ ?0 t6 I1 x4 X2 }" j3 Z" ]9 kend

0 V& ]& `/ G0 Q 7 W; ?5 Q5 V4 @2 Y8 f- Q
begin P_mB_clean arriving
) L# r6 C3 R7 N+ j9 K' I" O   while 1=1 do+ X+ ~/ g: d- i" ]$ m
   begin0 ?4 ]. I0 ?3 B8 d* w* T
   wait for 90 min
3 `+ d( f, J3 y$ X) C   take down R_mB
; ^1 b4 y: s' R3 _   wait for 5 min
3 W. S2 k$ j; n   bring up R_mB* O0 g' C  l% n( g
   end
$ D' N; P% G) |# R3 E, Iend
: d+ G6 M% x1 ]+ e  t

1 B4 I" w8 i: r: V$ q% ybegin P_mC_clean arriving0 r1 E+ M! `4 s. i6 B: e6 E
   while 1=1 do
. G. F( D( G6 n   begin* o2 S- S" u' x4 Y, x0 e# U
   wait for 90 min3 W! N& P# ], v2 {6 ^% `
   take down R_mC
! N9 N) d+ l0 L4 Y& n* [% t0 c   wait for 10 min
* }! c/ s8 ~! F/ R  L1 l4 L   bring up R_mC/ x0 l+ b$ D) V
   end
# y0 X# C- D, ?- X  \* ]1 J8 T( p2 gend

0 J6 @& f2 f& ]7 i  z" k. I----------------------------------------3 r. ^3 |  D% P+ g
/ J( s' ^- N9 S  N
Exercise 5.9
' |- Y( ?' h' E% u% }& t; x/ o1 r- |4 `% [. M! z

2 }: s7 O7 [3 W  X2 z! m4 F6 yCreate a new model to simulate the following system:' {& D9 ^/ N# q; S0 _, L
Loads are created with an interarrival time that is exponentially $ ^( Y/ R- y7 @. U7 e  l
distributed with a mean of 20 minutes. Loads wait in an infinite-
9 _6 N! n0 O# Q3 Q+ A. ucapacity queue to be processed by one of three single-capacity,
7 }' k1 \- m$ S6 jarrayed machines. Each machine has its own single-capacity queue % P  W6 a" d! f+ J' ~7 x  c! v; c
where loads are processed. Waiting loads move into one of the three
/ V- ~: n' U8 d8 S+ Cqueues in round-robin order. Each machine has a normally ( I: w" l6 J9 C; S! F
distributed processing time with a mean of 48 minutes and a standard 4 H$ I- O% E5 u) Z7 z* A" O
deviation of 5 minutes.7 C. D* i% e" b, n
The three machines were purchased at different times and have
$ d. i" ?- m3 _: _) O1 R( c; [: X. ^different failure rates. The failure and repair times are exponentially
/ V# n5 @' j# f# [$ g: Ldistributed with means as shown in the following table:
- q0 B( e' g$ s0 B2 O* L4 ^Note The solution for this assignment is required to complete ) ~+ a  G) N) p  _) B
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
: ^* j/ b  x* R- uyour model.
/ M% e9 }  u0 q5 u7 g" |, Z% d* T2 D2 o2 o$ `# _
MachineMean time to failMean time to repair6 u% ^9 X, r: `& K5 a, |9 z: ]
A110 minutes      5 minutes
( h; v9 v  P2 E4 b2 I( yB 170 minutes     10 minutes
% T2 M- w; ~6 e+ s- b1 nC230 minutes      10 minutes
, S$ t% c% |& l) i$ g/ Z
1 C- o5 {6 r" o) p0 QThe machines also must be cleaned according to the following 9 M& Q7 ~  D, G* D
schedule. All times are constant: - g* U# `6 C0 \3 f% u9 t
9 {, \! U7 O& j# P, i2 R
MachineTime between cleanings Time to clean" V4 m9 B9 M$ `; U
A90 minutes        5 minutes% l* h' D' n! Q- w; [7 E
B 90 minutes       5 minutes
$ d4 _: F: ~6 m, H: n" eC90 minutes        10 minutes
9 c6 l3 w! Z  X( a$ u) V; u& `5 R" N3 ]" d8 }. z8 C
Place the graphics for the queues and the resources. - [8 p$ A* I( J5 ?* j
Run the simulation for 100 days.* ~# ?( ~. b! ]6 _
Define all failure and cleaning times using logic (rather than resource
2 H3 \- V5 Q% o1 f  T5 u( dcycles). Answer the following questions:  S- R3 B9 W/ }- d) \/ Z* S
a.What was the average number of loads in the waiting queue?/ r: ?$ Z4 F) x5 ]
b.What were the current and average number of loads in Space? 3 \3 F3 ]9 m+ Z! w0 R
How do you explain these values? ( w7 |8 h' H% ?- S2 I" y4 F

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
# Q- t8 q' K* _0 J- m2 o3 Zsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# T5 D# W' j# `* s$ B这行好像也不太对,各位先进觉得如何呢?
8 M: t8 M3 I% w8 D! @7 M: L
+ C0 [# y( o. U' W8 m" zbegin P_something arriving
6 Y7 g' O$ s0 E* a( ~   move into Q_wait
' ^$ Q* F8 I5 T( c9 D: b   move into nextof(Q_mA,Q_mB,Q_mC) 2 ^! E* c4 Z+ s/ b- D% ?
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
9 H9 P9 b5 J- q. e) z% C   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ J$ r6 `( _4 Q1 [
end
4 W. |3 c0 F& }/ r9 c$ y  q2 ?) J6 I7 k' a1 l( o
begin P_mA_down arriving0 W7 u  T! e  O) a
   wait for e 110 min! v5 z7 D) M! E: ?1 Z
   take down R_mA
( \3 i. b2 \+ e" x2 ?0 J* r   wait for e 5 min  L) R$ `3 r. f! m# D" M! z
   bring up R_mA
, ^( ]8 o" m: z& fend' [1 |' Q9 e4 |+ K( S# l- r. O6 i
2 D, s* V9 L5 X* p* c; z
begin P_mB_down arriving* g9 {+ e, W& d9 C6 P
   wait for e 170 min7 G; N9 E; K1 M7 U
   take down R_mB
# A2 U* X' Y1 W  s$ F4 A9 D% D   wait for e 10 min- M. B% g5 E( J) `
   bring up R_mB$ {( X/ P( s$ \& B2 c! W
end! A/ ~9 P" s+ A" P

: S* m7 D1 g' @begin P_mC_down arriving
% ]& T+ F! G* u9 X, t/ }5 `   wait for e 230 min4 u3 m/ [  F+ g
   take down R_mC
2 c6 `( c  Z5 g+ r& h   wait for e 10 min. ?; G  g  `% _! b: U5 P. e) `3 m: p6 A
   bring up R_mC$ m) p/ a$ s5 I5 D! t
end; j5 S% c4 P. X: x# ^

7 V) S! R. T  V: P' }begin P_mA_clean arriving' v" C. g! x* p6 h# V
   wait for 90 min
: c2 }7 k8 T  [   take down R_mA5 O9 _; e7 t9 f6 b- J, A! o
   wait for 5 min2 ?2 h! Q  l# y& J
   bring up R_mA* R' ]3 q7 D9 J: o4 U7 E
end
8 S' C6 t- k8 P% B8 p3 w+ ~! o" ^# j
! ~) G5 _+ n, ^6 [begin P_mB_clean arriving
. U' e0 O5 d, E4 f/ n& T   wait for 90 min9 P& Q" Y" N/ u7 S5 u+ {3 [
   take down R_mB
7 g( }! E1 E: B' N   wait for 5 min% J8 @7 i( X9 r% f3 z! O
   bring up R_mB
8 }# I, F5 j8 G! S" a4 c7 _8 C8 Tend
$ g3 Z/ _5 H( ]# u
  s/ P! P8 P- J& q/ w4 Y4 o, Dbegin P_mC_clean arriving- L2 Z: z4 ^& B! d# _2 r) t" d3 L) v
   wait for 90 min" W3 @. D7 Q! N2 p4 _
   take down R_mC
4 [2 s4 F: _4 z9 l   wait for 10 min
+ p5 H+ V# y% S/ l   bring up R_mC0 @1 O% E* j. P: i
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving( E( j. ?1 n0 U; h+ Z5 b
   move into Q_wait- f! t$ J( T9 d0 v; U! @& P  Y
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ q. U2 E$ D/ [   move into A_w
2 d" R1 m: }$ ?' k& s  C2 p1 e9 @0 R   if A_w=Q_m1 then use R_m1 for u 48,5 min
' f1 R  ]$ S9 o* `   else if .....then use ....for u 48,5 min
) P1 l- z, c6 ]" b8 Y: E   else if .....then use ....for u 48,5 min  ; y" b" I% s4 c! ~  O" p8 N* [; k2 F: |; O
   send to die
# ~$ ^4 B- F6 J1 \  d0 L) ?8 @end
5 K% V$ L9 J- h$ z' \9 G) v  D0 u0 f  d2 x
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-15 12:26 , Processed in 0.018421 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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