设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7677|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
  I  |8 w2 d' S2 g  s9 }8 x/ M# F- J2 a/ M1 K: J: w- w! O! J
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( j1 O" b  {, A4 f2 _: G2 h
9 q/ W$ W# g/ t" h1 D不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!! R) w5 d! [4 ?9 U% h7 o
$ F8 \3 q0 x' y2 ]3 W$ h$ _
--------------------------------------------
/ e5 B" e- L2 _5 `begin P_something arriving
! ?3 b( [4 h4 V8 M$ l' f   move into Q_wait
, l5 C+ }/ {; z# C   move into nextof(Q_mA,Q_mB,Q_mC)1 ^/ t- Y" Q, o
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; `) U1 B, a! h; s
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* e, X6 t' c9 @
   send to die
5 E7 g  T! g* T) Pend

; s4 I2 K. `# Y- l
; A( F' V6 f; I# h6 J: Z7 h" g& Ebegin P_mA_down arriving
8 H% p( w8 D, r) r5 ~   while 1=1 do
& V% m4 y  y. b& f: h   begin  l+ G6 a, k* H, \7 C, e1 }
   wait for e 110 min9 r( e/ ~! @) u( Z# ^, O, F$ D* c
   take down R_mA0 s- g4 o0 V4 y- I2 _, @
   wait for e 5 min
" C; l) v& U8 z/ d. R; I   bring up R_mA
! D& l, E$ K. H5 w/ V6 o! L" n   end
, ~  c' v9 k8 C; X/ R' Jend

- p' x4 q" W6 H4 m9 F: [ # |; A* s9 z; f: `: o% O( b  F* ]
begin P_mB_down arriving
0 T4 B( [5 L' X$ @" c: A; t   while 1=1 do4 y+ T3 e& c3 Z% k9 N- M" V
   begin& d1 R! y' ]: S% r8 {1 k
   wait for e 170 min3 `2 @; w: e+ g% _5 Q' Y6 W# s% I9 `& d
   take down R_mB4 V1 `: O/ b) A. C" [2 T
   wait for e 10 min2 o0 M; t( g0 ]1 [+ L
   bring up R_mB# S1 b+ N# X6 ?- q- Q# {
   end) E! V. E$ V' L$ ~! A
end
% c1 v3 N1 r$ U0 f' I' p( p
4 g" G7 X  k& A* _  u3 n
begin P_mC_down arriving
4 q' m, s0 I. D, }   while 1=1 do . Z' y. J5 n1 S. I! x) a8 K% \
   begin+ ]6 X7 q3 p0 q' Q! J5 Z" y
   wait for e 230 min
( P  f( I  k# g4 N0 {% U   take down R_mC
. y9 N8 ^: }- Q  y   wait for e 10 min' ?# o; k7 L- o1 s
   bring up R_mC1 _; x  \% B- O2 H1 c
   end
" Z7 n& g  ]  ]8 v8 Lend
/ g" a0 p: H% z& Q* Y7 z
; @& Z: z2 R" s+ j3 Q) P2 j/ W( ?
begin P_mA_clean arriving
. m# T' R6 k- ]7 b# m7 Y  N   while 1=1 do
8 D" g% X8 J' k- x8 [% V( i   begin' }* r" ?0 M  g, U- z
   wait for 90 min
( |, s) e. Z0 X& V/ o( y! V: F6 R   take down R_mA
  @6 Q4 s" Z- ~. b6 p   wait for 5 min
' Z) g6 {$ E0 F8 {/ q8 }   bring up R_mA
7 j. d# [) v% [2 \& w   end1 _4 j6 W' ^* H. q( T4 k% p9 \' {
end

) v* U6 Z& w9 R# o$ Q( a- | " I7 x, O$ i7 W2 s. f* S
begin P_mB_clean arriving* q! Y: u6 V5 l, C
   while 1=1 do
* p, L/ Y9 J9 P) ]2 L   begin
* D1 p/ B) `. I8 L! q4 p1 S- {   wait for 90 min
6 u0 s  O! r& {4 F5 N   take down R_mB
* G, ]5 ~  J& N5 B6 d   wait for 5 min
- b4 |8 y# F" c0 G   bring up R_mB
; l: V' q1 P+ x   end- `) J" Y' o- E4 I, E  r7 C
end
  ]7 d# ^* f) {- t

$ i/ s) D5 z; Y1 v5 Ubegin P_mC_clean arriving8 |( T0 `. {# h/ C. H6 s
   while 1=1 do
* V- b/ j0 A- P  W; ?+ b   begin
4 [8 W- r' h( i4 T   wait for 90 min
, t/ |1 \3 M8 g; ~1 H; X! q5 R6 H- {. z   take down R_mC7 Z! j9 I# F; [; Z* b
   wait for 10 min  o& J% G1 J5 z/ N4 l
   bring up R_mC
  x# d4 F4 R) \  n" w/ X   end
6 J+ d* G+ v7 f& Eend

4 M, `5 U. O! U5 ?6 ^6 P" x% p  v/ y$ {----------------------------------------' ]& O6 D# N4 i  G8 H" o" i
0 j) n. R/ N; ~# f
Exercise 5.9- B  a( T" v8 J" s) t& X4 R2 R

" x; ?+ e: U& R& \2 k& \$ e5 C1 H4 ?$ j6 ]% V0 X5 K
Create a new model to simulate the following system:
" [; E& ^+ b* J6 rLoads are created with an interarrival time that is exponentially 7 @% f; N: c: H
distributed with a mean of 20 minutes. Loads wait in an infinite-8 h( n* X9 N7 Q3 x
capacity queue to be processed by one of three single-capacity,
& z7 ?1 O4 C6 O8 T$ D& p2 Parrayed machines. Each machine has its own single-capacity queue * @' k8 g9 ^  C8 V$ B3 N
where loads are processed. Waiting loads move into one of the three
9 m0 K6 V2 x1 J7 L& ^queues in round-robin order. Each machine has a normally
* Y1 P. S* ?2 y9 A9 q) Xdistributed processing time with a mean of 48 minutes and a standard
" b3 m7 X9 @( L8 H& ?! I! J/ `deviation of 5 minutes.
: C1 M( Q1 l/ F8 ~, u; E4 s( aThe three machines were purchased at different times and have ; \7 L/ \: x) \8 k
different failure rates. The failure and repair times are exponentially
0 z# @: A9 A: _: o# Mdistributed with means as shown in the following table:
% f2 V* S6 Z- ?2 }2 Z1 j! |1 MNote The solution for this assignment is required to complete
3 |. q4 t1 N2 [& @" w& O5 c) b0 kexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 C& i( k) g, v' N$ Fyour model.
0 b5 X8 L) J) Q+ @
0 A: B( p# l3 ]# wMachineMean time to failMean time to repair1 U( r5 b6 b, S- F0 J1 r
A110 minutes      5 minutes
& s! o5 e" ?* c4 P, ^4 R" {B 170 minutes     10 minutes
) P0 q; D( G/ d  m/ W: xC230 minutes      10 minutes
% `6 p! X0 F  }) D
0 m# G/ n1 Z, I# U) IThe machines also must be cleaned according to the following 6 E: r* ~3 |' Q+ i1 J& h5 a
schedule. All times are constant:
* v  P2 g9 m4 E$ e" o( x4 y- L+ S* E: W$ n. s! y4 S
MachineTime between cleanings Time to clean2 h1 [+ ^" ?5 G6 ?
A90 minutes        5 minutes
& i; B+ H& N/ p# Z9 d) cB 90 minutes       5 minutes* u- Q* y5 s* N5 ]8 r7 V9 e4 k2 F
C90 minutes        10 minutes1 B" @; G+ F5 \7 M+ r
, ]. A5 @: d: b" R! K& G
Place the graphics for the queues and the resources.
# G0 I0 ~* u  ~8 v$ c, BRun the simulation for 100 days.
/ X' |/ }2 h! j) G' lDefine all failure and cleaning times using logic (rather than resource
" O: f7 }) B0 `3 A3 P- t7 R" Jcycles). Answer the following questions:
9 o. M: D% D' m! K" da.What was the average number of loads in the waiting queue?# U/ v/ R1 C' ^; O4 M
b.What were the current and average number of loads in Space?
/ [# J- x/ M3 C2 ~! L( tHow do you explain these values? 1 l8 v9 P" I" ^1 j

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! ^. n3 z( e% r' _! D6 m0 L; _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 b; s7 w" o* e这行好像也不太对,各位先进觉得如何呢?8 F2 C: z9 T, R( T

# W2 h) S. X8 V) N, \( b2 v5 ~3 N( Sbegin P_something arriving/ ]0 b& m  O' U9 A$ A+ s  w/ F
   move into Q_wait+ e$ L8 Q% I) J. X
   move into nextof(Q_mA,Q_mB,Q_mC)
% Q$ t, l( h, e  M( t6 T: Z   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
* K# n7 U5 X& d; V. B4 J* d   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
. ]6 l8 _4 z" h$ s7 _end6 }( \- t7 E/ ]2 F, M1 v7 I

/ B; f! _7 ?9 t1 U8 d* J" wbegin P_mA_down arriving* \+ c; N% f* O" L& I4 h
   wait for e 110 min
( e8 c/ q( Q8 f( K7 ~! _   take down R_mA
" D" G9 s7 Q$ |  U   wait for e 5 min, Z/ X: G: ^& V9 J
   bring up R_mA
4 `  |  g2 V( {end
5 o7 k$ Q8 z. @# D
) m4 j) n8 e- w; U9 I: w! b- kbegin P_mB_down arriving
' B' |# J+ o: K, J( y- U' Z3 }   wait for e 170 min
1 C+ C% @  L+ f( C; G0 \+ f   take down R_mB
! B& S! _+ P: {: }   wait for e 10 min+ e; ^5 i8 K# i
   bring up R_mB
$ V/ y6 d) t6 t! H: r0 R5 P9 j% Vend
4 K4 Y  {; w7 R4 Y7 o( d' ~, H8 w
begin P_mC_down arriving! W( S) r( ~6 c5 W& \& T
   wait for e 230 min
; u' @: H5 r0 i   take down R_mC# e4 S% x4 I* K9 p" x2 ~$ V
   wait for e 10 min
9 M, w, J, }: r" o0 A/ H1 z   bring up R_mC
6 Y: I4 S' J0 k2 Qend
# b2 e, K9 N. }/ p% B% A3 p6 L
2 A* _& L( @' P$ J1 c) L  ibegin P_mA_clean arriving* Y& k- H  o! X
   wait for 90 min
/ _$ L; s4 T: o   take down R_mA4 g+ P, V1 r: C% e& {  _8 K
   wait for 5 min
- J+ v, _% k( Z/ Q% s- {+ P. j   bring up R_mA1 J+ K% U9 c! U  i6 O1 B$ v3 {
end( n/ w5 i* H( S9 M. y% J/ ~

% ~4 ^2 N- Z* nbegin P_mB_clean arriving
, [' x+ _7 k  p( V   wait for 90 min. P, \) W( D+ x
   take down R_mB
9 Z' N% @7 p9 ~: p) `   wait for 5 min" i/ d8 G# K  I
   bring up R_mB+ }, [/ ?. E4 U
end
, o5 P9 C1 k. R" s
" x+ z" t" a. h0 c* Jbegin P_mC_clean arriving
$ k( u- y5 }- ^5 H0 ?   wait for 90 min
0 y' e- H$ S1 `; N- T6 b   take down R_mC
/ a, B; b* V6 G4 ~& H* u   wait for 10 min
  l4 W' V3 B: B/ r   bring up R_mC$ s& k1 e. Z) _# y
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 O7 B& O6 g, ~+ |% y  [. X   move into Q_wait7 }9 X6 I7 f  J  E8 k: o* h2 G
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
3 o$ P! O6 y1 B1 c   move into A_w" `6 e$ M, a, _
   if A_w=Q_m1 then use R_m1 for u 48,5 min" Y8 D, G) X0 \
   else if .....then use ....for u 48,5 min& W: l  ~8 h3 M" w# D
   else if .....then use ....for u 48,5 min  + t$ u" A% E  B; Q- y6 S
   send to die
* p0 H  x6 u: t6 o& iend+ p' n4 |; |: Y5 f" A

" V+ i, t% v" C供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-23 23:39 , Processed in 0.014277 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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