设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5044|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 + Z: j* \+ U9 d' ^4 Z

6 p5 N( M1 f6 v: [底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去# j- w: ~" ~* D6 O( D% C; ]

) y' ~8 ^: Q) S9 ?% R9 h不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
9 ~3 Z8 f6 j7 Y
* G2 b4 L; I1 a1 C
--------------------------------------------
5 R  o4 {5 f0 ~! R6 a; U+ n2 o) vbegin P_something arriving
/ v; j0 j# q  T" B   move into Q_wait
* R7 b7 F5 Q) f/ |0 Y   move into nextof(Q_mA,Q_mB,Q_mC)
/ O- l3 ^/ |' x  W   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 d' y& }9 n2 T+ b% ^$ I4 [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! s3 {% X# |1 T$ U# P
   send to die! t, ~8 f% E& `: ~& x) o
end
5 {0 {0 a* D9 t' c
1 K: C& r. h0 [/ u
begin P_mA_down arriving4 b( `2 B# r" J5 K2 I7 r7 V
   while 1=1 do ' F0 z$ b7 ?6 y, D
   begin
1 Z  r; a, K. T  `4 j. C   wait for e 110 min/ u4 x+ \2 b  h$ t# h3 Z6 r
   take down R_mA
' |4 x9 b1 Q) c& P   wait for e 5 min. {% U( V5 y7 c- U# T- {9 X
   bring up R_mA
* G7 O; x% d1 x- k! O  A) [0 R   end* O/ S) P$ [1 R( D. Q
end
' l7 w" r( a8 a. q5 a0 Z" G

( X- @8 P& e! n4 U# G2 `" v9 bbegin P_mB_down arriving& \. I8 u; `- z+ F0 Q( {3 z
   while 1=1 do
$ C( c5 C( j" \" }% s% [   begin
1 e* K; y+ u( ^. u0 e, H) n   wait for e 170 min
3 v7 a' c5 T( f. H: G   take down R_mB' ]9 ?6 I; B# h
   wait for e 10 min0 }5 S4 h) P3 s3 K9 d8 Y
   bring up R_mB
' ^2 M# {$ e& d% d   end
" P; [$ P! Y2 H' T$ F  wend

" |6 d% x/ @: h; j0 J8 ^2 D- p ' a/ C; Z- s' |3 z6 {' d( X
begin P_mC_down arriving
  u/ G; _% t( w; w8 a! A   while 1=1 do
7 A, E- ^% F6 P   begin; n/ d( c$ ]5 t6 w, |( Z3 v
   wait for e 230 min) ^+ o, c" g9 w* X* I" D
   take down R_mC( v3 @8 X1 B: W5 [
   wait for e 10 min
0 W9 Y4 d+ [8 K. P   bring up R_mC  ~7 D1 `. N0 |4 z. q6 C7 G
   end: `* @  v( m4 o+ ~6 ~! \6 v% e: h
end
- z. J" R4 \) p% I' L% g6 ]) Y

" z" r  y& G: i. Qbegin P_mA_clean arriving, z$ @% f  Y5 \2 O. C
   while 1=1 do
- \+ {7 s( z# q   begin  }7 k8 z' b; _+ u. d7 ?) Y9 k
   wait for 90 min: C8 s# n6 `3 a
   take down R_mA
# t, y2 T! N3 V" @2 O: C   wait for 5 min
! ^! Q- U" R7 L. ~! W+ X   bring up R_mA/ L5 O" v9 ]! o& M2 M' x7 w
   end
2 @  h" C* S. e+ I0 [- z) ?end

, i0 u/ z+ \- A& y8 P3 c* W# v
: O0 A1 n  i; b+ X4 nbegin P_mB_clean arriving
$ s9 R$ ]& w7 l4 i   while 1=1 do
6 V) h# O! [8 y& a   begin
3 ]6 `0 Z: U' `6 y& R" t! t! x. _" D1 H   wait for 90 min, Y/ N0 x, F4 r6 J1 U
   take down R_mB: B, I  _; Y: v6 y0 {* h+ {
   wait for 5 min
1 p0 K7 m- ~; r8 v   bring up R_mB3 G8 A/ L0 k; m5 `; N
   end
7 A7 h/ O4 y! o; C8 x' [. gend

8 t1 ^8 h, L5 l7 I- v8 K+ Z& C; n! f
) D% s) [" A3 a  G0 Xbegin P_mC_clean arriving5 q; Q  P! u: @% S" C0 S
   while 1=1 do
6 n' G4 L/ B. m" x" x& X% y   begin
8 k& q/ a3 A; X+ w8 X   wait for 90 min5 A2 z; Y6 K3 n! v( y
   take down R_mC
& V$ _- _- h. b   wait for 10 min+ [; H- t4 b- [" T3 o) ]. c
   bring up R_mC
% M/ _$ G7 Q+ K% |# I   end7 e+ M) z9 [- q! O7 }
end
# r" Z. f7 d* J: {+ Y+ w
----------------------------------------
" h9 q$ l& a0 x- ~   e2 D1 J* h* B5 }8 s2 H
Exercise 5.9+ L; e! l: X8 l6 K! y4 V# @3 f

" {: u" L. Z6 g* @9 g
# q0 D! E4 [8 z2 r7 ]% kCreate a new model to simulate the following system:
6 z  g, j1 N" rLoads are created with an interarrival time that is exponentially
% d, g) D! J' ^( R5 v' f! ndistributed with a mean of 20 minutes. Loads wait in an infinite-
& ]# j8 k# w$ S: Ocapacity queue to be processed by one of three single-capacity, . r) g1 q' Z$ f! j
arrayed machines. Each machine has its own single-capacity queue
  l. m$ ~5 \- n5 h! o# rwhere loads are processed. Waiting loads move into one of the three
7 j. G6 d, G8 W$ G4 M! l$ `; O# _queues in round-robin order. Each machine has a normally
. |. C' f5 Z2 D/ Ydistributed processing time with a mean of 48 minutes and a standard 0 s5 W) y- n1 m" a6 s7 _7 s* t) k
deviation of 5 minutes." h: A( f& o4 Z" j* Y/ q
The three machines were purchased at different times and have
4 A% l# V' f! c9 P) m: L0 ndifferent failure rates. The failure and repair times are exponentially & ~+ G$ L8 U, H  }
distributed with means as shown in the following table: , v, f' \! z/ b8 N
Note The solution for this assignment is required to complete
% V# L+ k' V: Kexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. ~- X) K% s1 \$ g# z" uyour model.
$ D& i- d0 w9 T  V1 }) e: e, t  b1 x) ~$ U0 N/ k6 U$ J
MachineMean time to failMean time to repair
* N: Q4 D% R$ P+ F! r% oA110 minutes      5 minutes( u8 Q& w" T; [6 m
B 170 minutes     10 minutes
: y3 z$ d' Y) LC230 minutes      10 minutes
  E0 I4 B+ H% W1 H+ b$ `5 {: J( [! _9 Q) O2 P. ]' O
The machines also must be cleaned according to the following
8 h8 c1 a( r  C! ^- tschedule. All times are constant: ! y" h$ p/ O( T/ \& A6 {9 o3 \7 f) n
, f' a8 F/ K' D* {! M4 Z5 ^+ @
MachineTime between cleanings Time to clean6 x; r" G6 ~. v  U. a
A90 minutes        5 minutes
! A! T9 G  d7 j0 e' wB 90 minutes       5 minutes
8 W- D% M' i% {" q' H$ C+ jC90 minutes        10 minutes6 C5 @% i  A2 Y: H
$ u' Q) G6 Z0 Z1 ~# ?2 J# a9 f
Place the graphics for the queues and the resources. 8 @. x+ T& y% A6 s" T$ |9 U
Run the simulation for 100 days.
" ^. q/ Z" H+ p8 X3 {( SDefine all failure and cleaning times using logic (rather than resource
6 M3 d8 [( K' E7 i) m! o4 [( Fcycles). Answer the following questions:
" e1 z1 Z1 d2 T9 C& Ja.What was the average number of loads in the waiting queue?3 f; K; ]2 V% N/ I
b.What were the current and average number of loads in Space? 1 C! o9 w! U% w! d$ P8 u/ e
How do you explain these values? 2 I& ]: R% u( o& s, g" g

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
( N& d% M7 t9 X3 h8 [4 wsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 F$ j: c- k) c  c
这行好像也不太对,各位先进觉得如何呢?+ Z' A5 T3 `6 w5 E; a7 A

! T% D0 W3 x6 ~- Rbegin P_something arriving
: W4 F- d* e: j   move into Q_wait3 u- a/ a, ~- e
   move into nextof(Q_mA,Q_mB,Q_mC)   m" V/ z& w% e# }& q6 b. O3 h
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
, P7 ~( p) z" N   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & V4 |0 J+ i  g4 }2 r% V
end
/ X7 u- C. W4 @2 K' b2 f" Z
" H3 V: g* ?  cbegin P_mA_down arriving! T+ c0 C. s& Q1 F' E
   wait for e 110 min% N4 e( G, h6 c3 u. Q1 }
   take down R_mA
2 R! T# k+ A* j. [9 k   wait for e 5 min  x; I& Q9 t' ^' ~1 z7 D, o
   bring up R_mA# _+ D# L$ P& l& d9 |
end4 \: Z/ e- Z0 M' y. F( k
$ e# P9 f6 D6 V5 B4 n
begin P_mB_down arriving, ?) I- J0 I  [4 j% K  P  r
   wait for e 170 min, ]& o9 u7 B" O% _& i
   take down R_mB* o% x6 v9 ?2 b. A3 O% o9 s
   wait for e 10 min
. D% X: {' u  l: Y8 L   bring up R_mB
8 ~& C$ M' b. n: F& ^) K0 T* mend
3 Q& f& p' n! d# S- g) c
2 k1 W, J4 F: k: \/ A) ?begin P_mC_down arriving5 Z" B8 ]0 `& u7 F! p+ K
   wait for e 230 min
4 e- M3 g7 t. k; M   take down R_mC
! Q/ M0 p6 w; V- N/ U   wait for e 10 min
) R; I6 X& g) I+ E! n- c, G6 }" S   bring up R_mC
) M4 {! a1 p8 A: C& gend
0 G( Q5 {9 o5 J; G/ b# R' B! c8 v% {9 C! E2 U5 d. V) h* W
begin P_mA_clean arriving
5 D7 g) \% F6 w$ j1 C! ]   wait for 90 min( a- `! f/ K* b" i  j+ z% `( Y7 P
   take down R_mA( M* Z, ^: ]  J$ t- m
   wait for 5 min
. A/ K" \. ^! W* V* t2 q4 r1 g   bring up R_mA/ V" o/ q/ W$ R: W1 g0 X
end
% r: X5 `1 l" S) y% B1 B3 E5 W) ^. A% z  s0 P, f
begin P_mB_clean arriving8 v5 S; M* \# h) y# t% i! U$ b
   wait for 90 min0 w# m2 M+ b! o
   take down R_mB# d8 w  q- P/ w0 ]3 f0 ]
   wait for 5 min
5 c6 R7 M, @. S: v   bring up R_mB: o& l9 I+ W' j, `) d$ [  ]! N! h
end
1 a, C' c3 d( ?* W% K: l3 ~
. U$ N' Y: D. w: Wbegin P_mC_clean arriving9 O  d& i4 l+ M, b* ?+ q. N( e9 R
   wait for 90 min  Q( \; y& B6 a% ^2 S9 W
   take down R_mC
5 G+ M, v* a4 S5 }9 L* }   wait for 10 min
3 C1 Z; D- l( t. C1 i0 t' U6 u   bring up R_mC: \/ O2 K0 _: C: r8 y; |; u
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving) k: k/ f4 i1 ]1 {) Z$ g! C
   move into Q_wait
9 W; P- u9 @8 `9 ^0 G   set A_q to nextof(Q_m1,Q_m2,Q_m3)
  L8 y: e. G" ]7 t+ b% N5 M   move into A_w
% X) P1 t4 e" T, Q8 S7 P   if A_w=Q_m1 then use R_m1 for u 48,5 min1 H. I1 g+ W5 R2 J, {8 }5 i6 Y- r0 M
   else if .....then use ....for u 48,5 min
+ D0 q% {. U2 \: h   else if .....then use ....for u 48,5 min  ; `  R* ]3 Y4 h5 Q4 {0 {( V, d
   send to die2 s1 H& A5 {' J7 O
end
7 V/ U' b$ N2 T0 E2 H5 H4 ~( u& h
- q* ~: l; L3 R  d( p6 p供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-4 15:07 , Processed in 0.012583 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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