设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7070|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
) G, N% f/ @; C% s3 ~2 g0 y8 v0 o# r7 p
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去! {! a5 s' Y# B# L  ~, B1 y: n

8 q6 \# R; v9 Y& N5 Z" t* f不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!) o& G# u2 |/ ]/ G) P" t1 X, B

$ V+ }, h+ b1 Y
--------------------------------------------
. T! Y6 t' o5 b4 L  [begin P_something arriving
3 n1 q" Y- t) c& g$ Z" A3 H   move into Q_wait3 [; h5 Q% W. i! s4 X
   move into nextof(Q_mA,Q_mB,Q_mC)
  T' z$ V6 p5 v0 y0 q+ t! X   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
% N9 o# H% G1 U  a   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 M$ O( Y/ d1 h" M5 G
   send to die4 {6 X! k; N3 K* Z- i! i- N
end
3 b; a% J4 H( y# ~
+ c: W8 y& ~$ w3 e
begin P_mA_down arriving" F1 B: F5 W" e0 P2 c2 j' i$ d
   while 1=1 do 5 o; H) O$ C0 d% d% x+ L+ y; z
   begin
+ Q1 X! k. G/ h$ ~* [: K# K' M   wait for e 110 min+ B+ N2 a1 V* _) a' p
   take down R_mA3 f0 {9 Z. u* h2 k
   wait for e 5 min
+ R7 t$ Z: T# ]" x   bring up R_mA6 ~/ ^5 d; e$ A/ O
   end$ |& J2 D3 i' Q: j" j
end
7 q3 u) N+ S5 Y5 u6 Q5 }+ M* J
2 e% `6 B+ j! z" |# ^# I
begin P_mB_down arriving" L0 i& I% D- j7 m" ~! E' m
   while 1=1 do* G, m1 \( W& O1 Z" H) ?
   begin
- l1 B6 q6 b, R4 u* c" c& P   wait for e 170 min/ e* P1 _4 }' y4 V3 ]) q( T" v% F
   take down R_mB$ W/ w" _( `/ w5 R
   wait for e 10 min4 p3 L9 g& d( e9 ?
   bring up R_mB
4 p( @  ]. ~6 @, Q1 f1 `5 A& d   end
+ b) k/ R! I% L0 a8 j& hend

6 ~/ f/ Y: _5 g
& e! P, |& ]: Zbegin P_mC_down arriving
" q+ Q% b/ O$ O& D2 T' V6 t   while 1=1 do
3 ]8 \4 m5 T0 L- x8 K; t7 S   begin
2 U. Z8 ^& |" _+ @) _. Y# p0 }" B   wait for e 230 min/ k: l. ~! ?; `$ l* x
   take down R_mC$ h2 Z( X( B6 Z* h
   wait for e 10 min" H4 I1 A( g& Q
   bring up R_mC
  h& ], k1 F' C4 [   end; |5 u: P# O: d" y8 S, Z
end

" U- W0 n9 l- |$ @ * R& P; z/ F8 [. _# m" y% r( h
begin P_mA_clean arriving
% t% R4 F& h' v" P& e   while 1=1 do
. ?( s0 ~  }' N* h* U( d   begin
8 N6 r$ T" n$ g1 k9 p2 t- i$ J   wait for 90 min& M) M! \& I6 K7 n* }4 H7 \( b
   take down R_mA
1 @( S& I  L6 n   wait for 5 min
9 j! S" E5 d7 L% z5 q' O   bring up R_mA% z. M! p! b1 w( J- [
   end
; S* t1 F* d) dend

5 ?) J+ ^1 `8 D2 s8 g + M5 W% j' k  O9 |4 K) u  p0 A; V2 U8 {
begin P_mB_clean arriving0 @+ _. l, ~5 k# z4 n
   while 1=1 do
2 d1 D+ W  ]. R   begin
0 v4 r2 o) B" G   wait for 90 min/ L. f9 D% f7 q7 ~/ Z
   take down R_mB7 K  T% v/ c! y# O' F0 S
   wait for 5 min
' E( }& _9 z0 t   bring up R_mB
' N& n4 j2 C1 l   end/ S6 F4 U% b: G
end
( c! ]) a: u. Y, B) w8 ?
$ j+ Q6 U; i' a" G, U
begin P_mC_clean arriving
& Y* s' o7 X% j% n: K   while 1=1 do
; k+ D% u5 L' F+ x   begin
2 G3 @* s1 v; k7 e8 h% s   wait for 90 min5 m, X2 U# K- x7 k% K
   take down R_mC/ G! @3 B! X; l
   wait for 10 min4 h! I! }0 }' k7 T# i; R& {- l' t
   bring up R_mC6 g) u" l0 O3 f* p
   end
( O; \& ?; m& c+ E( F2 {5 L' @end
$ |. M( j/ E, c2 b
----------------------------------------0 ?% b5 j. s1 b

9 P* \; z# U5 `( L. f7 ?Exercise 5.93 `0 s* t* C0 C- z" y& L

5 t* W3 a. R; r; }; m2 ^+ ]4 ^' h
Create a new model to simulate the following system:
  z2 M( q. c5 K* _& gLoads are created with an interarrival time that is exponentially , d& o$ O! N4 Q8 U1 K0 @2 Y2 h/ J
distributed with a mean of 20 minutes. Loads wait in an infinite-/ ?+ D( w4 m8 {% a" I
capacity queue to be processed by one of three single-capacity,
4 h, G; u' ]* x+ r) z0 ~- [' |arrayed machines. Each machine has its own single-capacity queue 9 l: Q. D4 n/ J: ~: ?- W9 e5 E+ N
where loads are processed. Waiting loads move into one of the three ( i0 g6 x/ D% _$ @! ?/ U5 C
queues in round-robin order. Each machine has a normally . x; h% S! n5 _% }
distributed processing time with a mean of 48 minutes and a standard
1 G: K* O+ z2 N7 o3 h+ ^deviation of 5 minutes.
6 ?; W9 J3 t% B" w  E, z9 }The three machines were purchased at different times and have 3 S0 R4 E! J+ |. Z; ~; _) t$ g
different failure rates. The failure and repair times are exponentially : j( c( i" R' v
distributed with means as shown in the following table: / g" @" k3 |" {3 Q' a7 u+ {
Note The solution for this assignment is required to complete
$ u; H& C: O5 J! J, T$ ~exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   [9 O! P8 A: q; v, r3 f+ F
your model. , x5 ^" j- B9 I) B3 v

+ d% g2 t' f1 b- f6 FMachineMean time to failMean time to repair$ Y) w' k! |/ q- {) p' E" c
A110 minutes      5 minutes/ P. M$ F' m% {
B 170 minutes     10 minutes) j0 o, ]5 N$ J) G4 i2 s  m
C230 minutes      10 minutes" y4 f5 M0 l8 E* E2 H0 a( l! G
8 y* D8 W6 G$ D$ q; w0 r! Q3 |
The machines also must be cleaned according to the following 1 ^% S: e( \% C; a
schedule. All times are constant: 1 Z/ {$ ~- ?0 x: O" n- ~2 q
: s( ^# ]/ j+ T6 K+ [/ A9 s" g
MachineTime between cleanings Time to clean9 ?8 i6 [+ v1 z3 g6 ^9 c2 k
A90 minutes        5 minutes0 d* o& o- k8 m) E) n2 S  |
B 90 minutes       5 minutes; b# C9 Q  i5 Q( V  }; ?6 }) B' f
C90 minutes        10 minutes. F3 f4 {9 U! B) {0 I' v3 a! \
* o0 C' d# K( s! ^
Place the graphics for the queues and the resources.
' Y4 u! }. P! f4 d" {0 s5 ERun the simulation for 100 days.$ M- V0 n) t) z3 u4 n# L6 ^7 w
Define all failure and cleaning times using logic (rather than resource
+ M9 k. e" g* F" Tcycles). Answer the following questions:# T& N" V* A, D5 ^$ d
a.What was the average number of loads in the waiting queue?, l3 A6 `, Y0 P) g  Q9 j
b.What were the current and average number of loads in Space? 7 u! X" {4 N2 l" N
How do you explain these values? 6 K4 ]6 [/ Q4 W+ p

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 [& j, ^8 j+ C: F5 K
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); ]: v; |+ n2 u2 v
这行好像也不太对,各位先进觉得如何呢?1 L5 b  m% |# c( b( T4 \

) c5 \7 f/ R+ o+ q  |5 m8 D/ Hbegin P_something arriving
0 p& [5 ~5 E& \7 a* P0 r& V# j   move into Q_wait
0 M: n9 c; U" R4 r   move into nextof(Q_mA,Q_mB,Q_mC)
' Q, J  i3 M4 Y) b5 K8 _1 J0 t- f   use nextof(R_mA,R_mB,R_mC) for n 48,5 min( Y% A( ~- Z3 ?( A* h" s; N
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 n; Z8 O- O  \- R9 T9 ?8 o' Uend
) p+ W" ?6 V# p( D. u
4 P  \" J0 D5 w  w7 p& S5 ]begin P_mA_down arriving4 h) L9 |& H& f) O
   wait for e 110 min. [, m5 g. h4 b, T! O1 u7 G5 y% X
   take down R_mA
( c9 H( e, K' C8 J   wait for e 5 min
4 W+ `$ l/ o. m. [0 n& M9 Z   bring up R_mA
0 A% b! b1 ~5 ~( c( nend: D  e* X: P) Y- j

- x+ h1 |$ p3 |, ^% C7 v  Bbegin P_mB_down arriving3 m. j8 A, W- s' d+ b
   wait for e 170 min
+ H5 \- F0 R# j" M' q1 ~2 \/ \8 A   take down R_mB5 ?( [3 c% c9 y) g) V) c
   wait for e 10 min
# R' z* ]+ I1 K# q& x, ~4 T   bring up R_mB! k, ?$ C2 V6 P
end
+ X% w: W+ ]7 L" z
7 O3 Z& w* V( U4 Q3 d5 ]- F+ Abegin P_mC_down arriving) J% M1 S+ m& b+ [
   wait for e 230 min+ ?- g. W8 z- X- d8 h# J
   take down R_mC
0 \: o/ b. ~- n   wait for e 10 min$ }+ ?( c5 n% K; c
   bring up R_mC* i% {' N& q! _
end$ e5 z0 \& T2 t& z$ X5 l! v
/ i! ?+ o, N) Q& y
begin P_mA_clean arriving9 B2 G/ p9 r; \+ T  I
   wait for 90 min
' ~, \7 J' Y, r6 K4 b   take down R_mA
3 i$ C7 v2 E% j; E" X2 H" F# m   wait for 5 min, \& {5 V& _) w! a2 x4 o* t
   bring up R_mA  h0 R; T3 d3 X' V( Y
end
+ c, g# O5 ^3 o) O3 G: B) i3 H
6 {+ v9 U1 n/ J1 Mbegin P_mB_clean arriving, b! o5 U# j5 Q
   wait for 90 min
' Q+ H, c0 ^' Q  Q* H  K( q2 C   take down R_mB' C2 a; ?  y) x! r, B/ q" s8 p
   wait for 5 min
& r6 D) L6 K) s   bring up R_mB
: s/ J2 a" J( T! v+ i: M6 wend  R+ {! J/ t* c$ [0 v

- D% ~, S4 f3 J7 c* X& T6 X+ sbegin P_mC_clean arriving
$ @3 O, ^# n7 V$ t   wait for 90 min9 \$ P! [- o" r% B5 o- e% g
   take down R_mC
  ]) h- ^2 c. {   wait for 10 min* p" q* b, W' ?
   bring up R_mC
1 o) u6 E. o: Z/ ]# P: p6 xend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving5 i6 @- s, N, M: D
   move into Q_wait
5 C$ H: }4 X8 W3 V# C# U   set A_q to nextof(Q_m1,Q_m2,Q_m3)
* Q! L* r9 _9 `* t! f6 Q- g1 I   move into A_w, G8 N' Q7 {) y) M4 r5 f, F
   if A_w=Q_m1 then use R_m1 for u 48,5 min0 r9 F, Z% N9 D
   else if .....then use ....for u 48,5 min3 T/ r9 B$ W6 Q8 Y2 X! `
   else if .....then use ....for u 48,5 min  * q4 |1 z- K6 f) t- x" d
   send to die
% M0 X# X- `9 i$ gend! W6 D  m4 I1 ^2 @8 y& Z

: c2 }+ s) G* o/ p, m# n5 W4 r供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-24 07:00 , Processed in 0.013018 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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