设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7179|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 9 {% S1 Q4 o$ _$ @! C4 C

1 h+ L8 q6 A+ v" O8 H底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
! B, Y/ i# P% l1 E0 x4 S; r, s$ q/ S6 i, [$ ?
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
/ i7 b# i' P) b) v6 K: M; W. f  ~8 |* q1 P- i4 y
--------------------------------------------
# |& j+ ~3 t: Hbegin P_something arriving
/ [4 K5 f! l- z% y% ]- t   move into Q_wait
$ S! P+ Q3 N) S/ c9 g   move into nextof(Q_mA,Q_mB,Q_mC)
2 ?1 l; ?- }/ G: [# K: J   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min6 R& h0 h/ M. ?1 w5 n( b) x
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 a/ U# |) B9 }% C( Y- I
   send to die
2 M: L& W* }; Q7 }! Y" qend
8 @0 B# x. h) c% X* U' ?
6 B" L6 O/ F& r, n/ n
begin P_mA_down arriving
  T, j' x6 y" J5 W4 q/ i   while 1=1 do
* |7 E$ A0 k: Y4 x4 C! {   begin4 F1 w" w2 W/ J* ]; M) ~
   wait for e 110 min
* i& D' H) z' q   take down R_mA
, Z) [8 {! j& C6 z/ I1 K. i   wait for e 5 min
$ T8 U* [5 T) Q( O1 |   bring up R_mA
, c' O5 |0 k0 _; c2 ~3 w   end' K% G/ E( \% w
end
5 _* Z1 `3 T) O/ }
- Q! |- D; f7 D# J+ O5 ^& ^, h
begin P_mB_down arriving
1 i. R: S) m: z: c' D   while 1=1 do- J9 r: C, H& `$ x7 q& F" o4 z3 B/ Y" C
   begin) O; [' ~/ x" b! N( l
   wait for e 170 min3 r3 g3 [9 x$ {; O! I4 `% |* x7 J
   take down R_mB
2 O0 R, V  S9 r   wait for e 10 min) \8 \" i/ g! A1 p1 w
   bring up R_mB
& @6 \6 K9 X0 Q+ c% I/ N( R   end& d- K) [2 v/ b5 l+ E) ?
end

. ^& ~7 A0 g# K, G# A; a / n5 r' N6 z9 s6 \7 P
begin P_mC_down arriving
( }) r6 `" x  c. }, v' H   while 1=1 do
# g( m" C( @7 ~! n! R% J   begin
% D! h( w5 d* E( v; d' x3 b. k   wait for e 230 min; V9 e" w; h- d5 X; A4 M
   take down R_mC# m# s6 C9 m4 s* L$ {
   wait for e 10 min
& c- f  p" y0 W* T# M' N  _   bring up R_mC& p6 `1 w6 N2 T$ @3 N) a* s
   end
. {2 d; v, I0 c4 |$ R4 ]' v( M( fend

9 r5 a" _2 G: A0 I7 |2 B: L  }+ x
! t6 P* C1 D8 ]2 B. W& sbegin P_mA_clean arriving4 @  n8 b0 P. g2 Q' ]7 D( W
   while 1=1 do* N1 D- S! N+ [9 E
   begin7 H" d3 E5 G! l$ U
   wait for 90 min+ H+ _' H9 s9 D
   take down R_mA
' s! s7 {9 l4 x$ T+ f   wait for 5 min! Y1 F9 V. V. h! o9 _
   bring up R_mA: p* G& c& G$ u. s- F! A
   end$ v8 @# D3 w# l2 T6 S
end
6 q$ P9 |1 m6 t. F$ U: X
2 p- w4 Q! O7 t) G$ n* ]
begin P_mB_clean arriving
7 E, G. N, c; `# W/ [+ {% Q   while 1=1 do
) t/ T$ m# h/ @& I7 t3 o' o% A   begin# H+ h" J( i2 a9 l
   wait for 90 min  \5 s: |$ \7 J& o
   take down R_mB
9 Z& e2 i/ }' N& i   wait for 5 min6 R( q/ Q/ S; I
   bring up R_mB
0 Q8 L1 k5 q9 [# l$ j: P   end/ c+ I/ k, |$ x) B& O6 H
end

/ e) d. @3 M( J . t* X& C) `; c6 b
begin P_mC_clean arriving( H2 G6 W, w& J9 I8 i& }
   while 1=1 do$ V$ e2 l' s% Q. k1 d
   begin
' V" E. q# C. @* ^7 e   wait for 90 min  X8 u6 _# C% u) n* N$ O: h. l; T
   take down R_mC  U) t$ G  [- X4 K4 i7 \: _
   wait for 10 min) \# X  ]: P6 a0 T6 w' x* b. q0 S
   bring up R_mC
, {! J0 S8 m: _: ?# \  a1 q8 z7 I* E   end
6 |- Q2 ^2 d$ h$ `6 \9 Z5 Xend
7 K  r" G; l5 }& ?% z3 c9 c: w
----------------------------------------
5 |8 h( @) w! P; z* h
) p7 o9 k2 W' lExercise 5.9
  ]6 s7 J1 F7 m2 `  M. W% f5 s: G- A
2 x$ o: M$ E% }" I7 q5 J+ f- u
Create a new model to simulate the following system:& I, V, P8 V/ }3 Z. I
Loads are created with an interarrival time that is exponentially ( A  x% w* V% ~, t0 t
distributed with a mean of 20 minutes. Loads wait in an infinite-9 z) v* _5 H# {
capacity queue to be processed by one of three single-capacity, % X+ w& ^  I; X7 U
arrayed machines. Each machine has its own single-capacity queue $ ~; t; l5 B2 Y7 ^3 C
where loads are processed. Waiting loads move into one of the three + Q& w* b! V, `$ Q0 {, U& W
queues in round-robin order. Each machine has a normally
3 \8 x) T* r) q6 @, c( y! S- pdistributed processing time with a mean of 48 minutes and a standard
& \" R, g+ h" l. n9 }0 ldeviation of 5 minutes.
9 l$ D/ W( @8 k1 F, W& fThe three machines were purchased at different times and have
0 q8 }9 E, B1 A! Cdifferent failure rates. The failure and repair times are exponentially
* p2 ?9 l! r( L( Ddistributed with means as shown in the following table: # k5 ^7 E0 ^& @) @! l$ G
Note The solution for this assignment is required to complete
+ [% N+ ]2 q  p' ^) kexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 1 a# o, ^3 z5 W+ ?/ u$ D1 O
your model.
! H" o* G1 m' ?7 C/ a  ~& c9 o/ ~8 m  h: w& I+ w
MachineMean time to failMean time to repair# @: W; e: N* o: Y. X: U' U6 ~! m0 e' p
A110 minutes      5 minutes8 S8 H, H! {$ N3 L5 v! N6 C. X) {7 k
B 170 minutes     10 minutes' b* F& h: ?. `1 c2 p! Y
C230 minutes      10 minutes
" Q3 S- a4 g" \, m2 M
8 r8 t9 A5 R: d. ^) _/ o7 @& gThe machines also must be cleaned according to the following   r' L! r( J. W3 H; q
schedule. All times are constant:
7 l: L4 V3 @3 x& [! E( q, A  {/ c' Z, |
MachineTime between cleanings Time to clean
8 W# A6 f8 N, u0 g* S5 j( p8 xA90 minutes        5 minutes
" e& ?  r! V" h) M. mB 90 minutes       5 minutes8 u) U# m* {- J  B, Q
C90 minutes        10 minutes$ ~3 l5 _- c% A5 g9 r3 g( F
: K* I% M6 O" _+ [9 @2 Z
Place the graphics for the queues and the resources. : B/ y  @7 V( w6 D8 ^! }/ O; @
Run the simulation for 100 days.1 `) o# H6 w& R) e- G$ Q3 G
Define all failure and cleaning times using logic (rather than resource
  e# A. d0 l/ _# ]) O! Pcycles). Answer the following questions:0 `- u* @. U* S7 Q5 R9 U
a.What was the average number of loads in the waiting queue?9 y- s; Q% S7 j5 k
b.What were the current and average number of loads in Space? 8 s$ Z3 Z' {" w, K
How do you explain these values?   ~2 h8 B7 j, N8 @; E' o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉% ~) i6 @: `% v  W( Q
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ n4 t' B( A; F- y; P' c这行好像也不太对,各位先进觉得如何呢?
9 ]  x: G) t1 o9 S, Z$ H
2 z! o* }( }: i4 g4 h+ ]( hbegin P_something arriving
  M, @. u% V( R   move into Q_wait( |( C3 f$ y' s- k. ?
   move into nextof(Q_mA,Q_mB,Q_mC)
3 C7 n$ L' q$ P2 q3 B   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; A4 F. _. l0 D9 O7 c' Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 V" _9 y* G8 I5 z& V. n7 Send
& S' [2 u% b, o4 r) Q" a% h2 O% @! f5 R9 Q! d8 }# }4 f7 x3 m5 y% i
begin P_mA_down arriving0 y! e1 z. W, Q  t# ~: p
   wait for e 110 min
4 ^5 I% r% a5 j8 H2 X5 U+ K   take down R_mA4 V+ m) m# I4 S+ ]) z9 E* |
   wait for e 5 min* l, \2 f' a6 @% j3 e
   bring up R_mA
6 |) Q4 w6 a# K- {% H* u8 yend
$ x- y' n7 _( x6 ^2 z6 D! S
' h0 t$ \4 X3 C, R, e# tbegin P_mB_down arriving
1 y: d6 b0 T3 q   wait for e 170 min0 X3 ^( C* ?9 n% [6 M! ?5 h' J
   take down R_mB
6 k" ~6 A5 {8 B% U- g( j( A" s   wait for e 10 min
% h- `, s4 X1 X$ r2 _! O   bring up R_mB( d. t+ T4 j! ?
end
  w, ^0 j% o5 P4 H" O9 r: H' U- P1 X. T6 p( K  C
begin P_mC_down arriving9 H6 m1 M% t' Z
   wait for e 230 min
% T- J5 J3 x4 d' l) [# g8 [$ H   take down R_mC1 F4 a* g* _( j$ b2 q
   wait for e 10 min+ ^9 ~- n' i5 t0 Q. f; M1 N6 y! e
   bring up R_mC. T; G3 X9 \$ W0 i2 `
end
0 Z1 d( S5 b, b4 S% G& P- _3 k) _# H4 A1 Y
begin P_mA_clean arriving
+ U( G; ^$ W3 R. O9 n9 Z   wait for 90 min
; K" T% M8 C) m4 @% K   take down R_mA
' F, T; f' f' E5 \: n/ a   wait for 5 min% M$ b2 P+ b* |
   bring up R_mA
) G; {2 c- Z, M5 n1 ?+ V* ^, T6 n$ Kend
- n2 @( x1 R. g0 O; R- T1 B# Y3 P3 Y' @/ c: C
begin P_mB_clean arriving
" U( L$ N  y4 C& X' j0 v   wait for 90 min
) A* O' p/ @" H$ g  p   take down R_mB& {% s, T8 j- g: i
   wait for 5 min
3 u* e2 Y8 [& n   bring up R_mB
! P7 o* R- W1 p: I& lend
& G! S% r0 Y& F8 t0 v- Z0 `/ `2 W& P8 q+ ^; @3 e) T
begin P_mC_clean arriving+ s$ M3 s. k) P& F0 `+ y
   wait for 90 min' ~$ d3 x3 z- y* B8 l# n
   take down R_mC1 P/ {1 _, y0 k1 {. @) q
   wait for 10 min6 K* W' s3 t) v
   bring up R_mC
; F; \3 o- S- [6 j& I! N7 |end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
' R$ A9 b3 r: w6 _. N0 u   move into Q_wait
7 J0 S* h6 |3 A' j) D   set A_q to nextof(Q_m1,Q_m2,Q_m3)& \+ g6 x, m2 A
   move into A_w
, J- b$ u1 _: O2 b3 X2 N% F; Z   if A_w=Q_m1 then use R_m1 for u 48,5 min! d+ B! T7 `/ c$ q/ z. T# M
   else if .....then use ....for u 48,5 min
2 o; Y; P) _2 {& H4 N5 s0 c7 o) {   else if .....then use ....for u 48,5 min  : Z7 Q1 G" x% ~. P( ^! E: M
   send to die
9 L) P9 i4 ]5 j+ \$ w+ iend
1 |: k+ M$ a5 R  }7 r
5 S7 o! ~* A. ]0 g) H供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-12 14:38 , Processed in 0.014595 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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