设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7245|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
. e) D- j' f) N3 ^5 ]1 o/ S
2 \0 P; E) n, f, y2 r; x底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. x; g( U6 l6 ]' B
- o" x6 E& I/ E. |/ y4 \, a4 }9 [) u不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!4 ]1 U' T7 g" o9 Z+ J

, O8 V; ^% s9 ~
--------------------------------------------1 b2 O1 v/ ]1 {1 ?& O
begin P_something arriving9 N2 N3 _% y; a6 l8 N# c; c
   move into Q_wait
4 H/ |, g" d! e6 K  O   move into nextof(Q_mA,Q_mB,Q_mC), p: p) V$ W; t- a6 x
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
1 D/ {! y/ `# r" S   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- d: e) ?: H& i; L* z" @# E% b
   send to die: P! x; {  `( U/ w* C; g$ ~
end

5 j) s4 k( A8 b  J2 ]
* q3 ?" v- Q! D$ nbegin P_mA_down arriving
8 Q% p; ]" I( s/ s   while 1=1 do
! J9 j& ]) n' Y  `   begin9 B  c  c: [' ^0 A
   wait for e 110 min6 {5 G+ u$ g/ P% s- w- U( U
   take down R_mA. ?; q' n4 ]' l# Z* m( u
   wait for e 5 min
4 \+ R8 ^) D6 x) S2 p4 @: G! A   bring up R_mA
+ U" w" F8 T% A/ S: ]7 [   end  p3 ?! o2 w7 e1 ^6 T8 D
end

* p7 ]7 W, |+ E 9 H! F2 F3 Y$ n$ n% Q8 v, t: K8 t
begin P_mB_down arriving+ ]  W. g" l# n7 l: T/ ]; k  g  t: m
   while 1=1 do5 x5 K9 p" {. A
   begin
8 d% Z, \& s  [) D, o$ n5 X) S9 z* `   wait for e 170 min
: y; c8 ?* ~9 D# I0 Y( `   take down R_mB
% g- R4 u; M7 M8 t1 l2 o+ p3 X; ?   wait for e 10 min
0 F$ x$ E8 |3 D   bring up R_mB
8 e, h* P4 Q- I   end) P2 v- G' X: x% U# l: l
end
* j  z! r, g) _; h/ C
% J' \8 U2 h) I6 C. m0 D4 P4 P
begin P_mC_down arriving% e5 Z* W8 I. ?0 x# C2 m
   while 1=1 do
& L: e% R( l6 l) D" E   begin
+ e& ^5 R0 d8 }$ ^/ L; K7 @2 |/ F   wait for e 230 min( e' s5 z7 _; V3 T- E- V
   take down R_mC3 N8 N# J% d4 U3 J. j& v* y1 W7 G
   wait for e 10 min. ]4 L* p! Q& e3 L! y
   bring up R_mC
0 u: I/ F2 X6 g: t  w$ S; w   end
  M( D6 F- E' k& jend
  z! p+ t, R. H/ L

+ T/ T( r/ j8 }! ebegin P_mA_clean arriving
# g" o- C; ]9 i6 \( i5 _* h) q! I* q   while 1=1 do  L& G  n3 R2 I% U/ T
   begin- }( H: O9 L1 G$ v; D
   wait for 90 min5 o& q' G( H' n) G) z
   take down R_mA
/ F0 d% W2 m! Q) P   wait for 5 min
, f8 C$ v- R1 U" g   bring up R_mA" _) k( l' I6 N/ s
   end! c: {$ Y. j% z% Z/ Z
end
* v/ @2 n; W6 ]6 N% c5 m

$ ]4 w7 h8 O  [  t. Bbegin P_mB_clean arriving' f* [# b9 a) M& X$ z3 {
   while 1=1 do
4 l. t4 t5 u8 P2 L   begin9 q8 W$ S: K- A0 d
   wait for 90 min
& f- S( S& Q6 t9 o   take down R_mB9 g, `6 ]2 d# G7 J
   wait for 5 min
) q( W, Z4 b# k  M/ k   bring up R_mB
2 m7 _+ g" T3 `) e, {# S' S   end" o( ~; `& Z8 [3 `7 T% G8 L
end

- O8 g; K) D" P* f* L
8 E5 v# I4 O& f7 ^begin P_mC_clean arriving
) a& P1 S8 r7 N# J! @/ x3 t   while 1=1 do1 @' W* z& S9 F9 L( ?5 c7 [1 D: X
   begin% s5 ~0 \$ f2 J  V( w( u( V1 _* T- k
   wait for 90 min. X( e5 H- N5 V) u& X% A
   take down R_mC3 r% }3 g! ^: P+ Z8 h# ?- A
   wait for 10 min& k+ W- a3 I9 l2 M9 K
   bring up R_mC
. S  @$ z" T0 r" M( z& f   end
. t' B; K! T1 B, s9 c: Uend
/ }+ i5 f$ l: T* y2 E+ P2 p
----------------------------------------
/ t4 l/ h' E' n $ L+ b9 h; M7 P5 J+ s- A; ]% L
Exercise 5.9
4 j8 k) Q/ C. C5 O& ~# H/ f7 [6 E7 d; j
4 s5 O  ?+ q4 m& G4 W! m- D: F
Create a new model to simulate the following system:& |* @1 T6 J2 R
Loads are created with an interarrival time that is exponentially
2 L5 y# u# F) {( R  C; idistributed with a mean of 20 minutes. Loads wait in an infinite-
$ J0 r- }: l! gcapacity queue to be processed by one of three single-capacity,
/ q& e# w# D- t5 Oarrayed machines. Each machine has its own single-capacity queue $ r8 v5 M$ r1 C
where loads are processed. Waiting loads move into one of the three 8 a  K* d) q3 d  b9 ^
queues in round-robin order. Each machine has a normally % G1 X, o2 c5 S' E3 R9 h% d
distributed processing time with a mean of 48 minutes and a standard
% C; Z8 n$ f# U  z7 m  ]; Wdeviation of 5 minutes.
% Y) ^4 I8 d( s) e: tThe three machines were purchased at different times and have
3 T9 m& W/ o- Vdifferent failure rates. The failure and repair times are exponentially % ]* |  j5 \6 }  c$ b" ~' d
distributed with means as shown in the following table:
  ?/ R& Q* N" A; o4 l" o3 ENote The solution for this assignment is required to complete
" m9 p- e6 H& jexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 W, X7 M7 Y4 Z3 @# `& j  J
your model.
5 w0 y( B6 ~' x8 A6 t2 ]2 J6 ]' C- n5 N( `
MachineMean time to failMean time to repair: ?" ^9 a: n+ g
A110 minutes      5 minutes6 T' E$ O2 f( f. J6 T' c. k- t- Y% p
B 170 minutes     10 minutes9 f& d3 @, b1 R/ K7 Y( I
C230 minutes      10 minutes9 g8 i2 w0 `1 n; ?! z; i

, U1 @# |/ o* @  j+ k2 wThe machines also must be cleaned according to the following ' u" q- S! W0 b9 q7 T( w
schedule. All times are constant: ' }$ k  X1 t7 f9 t

1 b% N( T, B! Y! vMachineTime between cleanings Time to clean$ T9 u: E3 @9 P7 J
A90 minutes        5 minutes8 w# b- U6 E; `/ s
B 90 minutes       5 minutes7 |! @: Q% m7 ?* v! W
C90 minutes        10 minutes
# F. B8 _8 _/ I9 o* _& J$ i
8 P: o) I; ?- s; h3 L9 ~( y0 yPlace the graphics for the queues and the resources. 6 u& |/ r  i) ]& i
Run the simulation for 100 days.
' X3 ]# Z1 t  x* y9 ^7 }- l9 ^- XDefine all failure and cleaning times using logic (rather than resource 5 H: M. r( Z  b+ I. K0 @  b5 J
cycles). Answer the following questions:
. m& v- E9 X4 ~8 V! Da.What was the average number of loads in the waiting queue?- y- I' r& Y0 K# C  U% N( G
b.What were the current and average number of loads in Space?
( M* e: o/ H+ Q1 IHow do you explain these values? + P$ Y, k5 Y- D/ y/ Z& q! Y7 e. ^

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉9 p% e, t: t+ s3 H9 P
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 F4 ?% \3 {( g6 L# g5 q# `9 ~这行好像也不太对,各位先进觉得如何呢?
/ {2 {9 G& z! G. F8 d; ?2 g. V: |& n% M0 A4 _7 `. h
begin P_something arriving
4 C" y; @- C) y2 J! ?9 V& J   move into Q_wait
& r" k; b" ^/ ?8 D9 ~( v' z   move into nextof(Q_mA,Q_mB,Q_mC)
6 F/ W' v" V- _$ a; o   use nextof(R_mA,R_mB,R_mC) for n 48,5 min* k0 t* e& }& f: V6 F
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& L. P* A6 U# L: c  m/ W4 lend
  D: b9 Y! w+ ^) J) G: N- s: O. N6 k  \3 k8 X! @% V; i
begin P_mA_down arriving; r& Z! Q* }% F+ I4 {0 S* ]2 p
   wait for e 110 min
2 s) Y# P6 T( Q6 y0 G1 k5 x7 o   take down R_mA" E8 O/ r- e+ z: v6 T' F' h1 T! X  N
   wait for e 5 min
1 q- R- R/ e6 f8 k$ A1 z   bring up R_mA( ]+ j/ F% V7 t; \. m* I  c
end
( \$ p: V# t0 h$ p
4 w( v7 N' R2 ?6 b3 R9 ebegin P_mB_down arriving
( P6 i/ |+ F' W, a' `   wait for e 170 min
' K* G7 p) }; t; s3 w$ u$ I   take down R_mB1 `& M: n* v1 e1 c$ ~  b5 u! N
   wait for e 10 min  s8 h. k+ W5 N5 L5 I8 Z& m0 p' ~
   bring up R_mB+ l& l3 B+ r, x0 V! C  U; V$ c
end
0 [/ t% l. {7 k% \( Z( q8 F2 o4 [- p
begin P_mC_down arriving
8 g) w6 F: H! I& F! h4 R+ J1 U   wait for e 230 min# I% `$ d  b+ P6 ?
   take down R_mC; m$ `' `0 h8 r9 F3 Z1 q" M9 G4 Z9 N
   wait for e 10 min
" j' f: o6 H6 {0 h( Z- w+ c   bring up R_mC
; R% R9 O9 O4 uend+ n/ ^# x2 ]9 r, B5 J; Y, S+ S9 C
# c5 U* u& @0 L
begin P_mA_clean arriving
% n, G/ k1 c  d  A, }2 E   wait for 90 min
7 u$ `+ E8 M% U0 X7 c0 I9 i   take down R_mA  U% |4 g& y  J0 a
   wait for 5 min
- i0 M+ O/ u0 L; \0 Z2 \$ |   bring up R_mA+ l5 J6 c0 D4 d
end$ _5 \5 [* q2 ?3 C% {- a
! Q$ v4 g; I0 S% l& ^+ d& l
begin P_mB_clean arriving
: g: D) ?& ~4 G: H& M/ \! Y   wait for 90 min: e. M# D" l- @; l5 K+ P- @: ~- B( t
   take down R_mB1 N1 p: i: v& i; h
   wait for 5 min
$ H3 e4 W- s4 f- f! T   bring up R_mB6 S2 {- D! Y$ B8 ^. h, K) J
end
" u. y3 v& U) m) U
/ z- t) X& `( b" A. wbegin P_mC_clean arriving* N( Y1 v8 {7 a" [- C
   wait for 90 min  a5 @( u* j: _9 H& i- h
   take down R_mC
& t; U  Q/ L- H& A! [( T   wait for 10 min
- p. D( w7 @" _   bring up R_mC
% K1 Y- \& w" l' I$ m7 }: p9 Uend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving: b. j2 N7 [/ N# H+ Z
   move into Q_wait6 t5 ^' [5 `/ m
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
6 q  D2 }: M& X: v! y   move into A_w
+ b8 s; X9 ]- z8 M3 }   if A_w=Q_m1 then use R_m1 for u 48,5 min/ C/ v9 E2 v  @
   else if .....then use ....for u 48,5 min
" A+ Y2 k! H+ S2 S9 h   else if .....then use ....for u 48,5 min  
- [  L+ h; l; X   send to die
* t3 l3 b) J; _4 Zend0 l7 h& i' |) u9 C) P4 ]+ j$ F* b
6 w- w! B, d0 D7 J" S$ C
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-18 04:15 , Processed in 0.016557 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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