设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8018|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 , X" b9 h: p6 B8 e; N, t
0 S" p! x! L) T2 U4 d" o
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去0 ]: ~+ N1 r: G5 h4 m$ a' H; E

+ e" \. p+ P5 Q- }3 x* S$ `不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!, o0 [+ F% {# L3 l: ~! }4 r
+ c- E9 v8 x& w1 z4 k8 ^; _( y
--------------------------------------------
0 m; C' q- m# c) N" b2 u3 n( h2 `3 cbegin P_something arriving( N4 o1 |8 b6 P# x- z
   move into Q_wait
+ S% L: [0 R; ^' s; Y& D0 p- E   move into nextof(Q_mA,Q_mB,Q_mC)5 [: N4 y8 z6 x: L9 u" d
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
6 {9 h0 |3 i6 \# X) v$ j/ t% T   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! m) @+ f- S% O1 H- r
   send to die
$ z6 K; k8 D5 b1 w( l2 D1 T( ?end

1 m3 f! d7 d" z) z1 R& E# Q7 D6 e8 P $ S9 a" i' q2 P" ~/ h' U5 F
begin P_mA_down arriving8 Z7 {! z9 l- f* Y
   while 1=1 do
: ?+ G  W6 o+ H  |   begin
2 X- v6 K$ G- p9 V9 K   wait for e 110 min8 n( r: |1 y# f8 C
   take down R_mA
: q' a" e/ M0 B8 _   wait for e 5 min8 W9 }- @0 g9 Y$ u7 K+ @
   bring up R_mA
9 J( Z6 h7 f' z/ Q   end. h* N# o) f# I* q; j- O
end
) }1 D4 q+ N  Z! ~
" O0 G: B) k/ R8 `  ?
begin P_mB_down arriving
. B5 W4 h$ F2 d9 [   while 1=1 do
4 z! j5 @9 u5 [* J   begin
0 n3 I9 H8 [+ |5 q8 k* c; L   wait for e 170 min$ N  D- G$ j0 L2 y
   take down R_mB
0 t8 ]5 a2 l* d1 a   wait for e 10 min
9 y- ^# {, U4 v' K7 O" i   bring up R_mB
# s3 Y) ~2 p3 e0 e   end! _0 [5 p/ u! i
end

9 y8 ~2 r- u8 D3 z5 N$ q( r , M1 U- j  `# p# q$ g+ j
begin P_mC_down arriving" G  I! H* h3 e% Q
   while 1=1 do
; a! }3 _' D4 Q   begin* Y1 P- N. o* Y
   wait for e 230 min
0 E4 r4 j, m! Z   take down R_mC# J$ i% T$ K* f. K. H' Y
   wait for e 10 min
3 z( }6 Q6 Q) I" t; g2 g   bring up R_mC9 `$ i5 g, V" W( R# C
   end" U* Q1 |' l, B# |+ s# i4 |" j
end
' X4 N: N  `3 U

& D0 E" \/ j9 R% hbegin P_mA_clean arriving$ F, w: e$ w, _( R, Q
   while 1=1 do' [9 a7 R( j$ n# p4 ?8 C
   begin, P/ ^' V4 X) t7 I! D0 p! W
   wait for 90 min9 l4 a6 y4 o! T, O9 P
   take down R_mA
) s& T( m0 _) t4 I% k* B" C   wait for 5 min
5 Q1 n  o' p5 l& d   bring up R_mA: Q% I0 [! V0 z9 k( [* A
   end
, Q' _  D2 X! O* kend
  f* `" o6 I; X5 c. [0 N! h
2 Q% L% q5 H( H9 J" F! Q4 A' P
begin P_mB_clean arriving
1 i, c% s2 v. C8 L   while 1=1 do9 T6 ]2 T! e& U& M& B. b
   begin# e; P1 q% t% V. a
   wait for 90 min
1 Q( g0 j2 n/ O2 q   take down R_mB6 q9 ~2 ^0 {; F- l2 ~7 W
   wait for 5 min0 t" i+ ~9 J( P
   bring up R_mB' W$ S- ]: W  J
   end
. _) C- k+ u, x7 u+ ^end
/ h6 G1 j' F% p( ?

! _& E5 n& S' Jbegin P_mC_clean arriving& s" k% y, G& n1 f; q: R
   while 1=1 do
6 v3 ?8 r& W; G7 C8 h" s   begin( P: o8 t& b' `+ y: g
   wait for 90 min
( q$ L% v# \" h8 e   take down R_mC# _& f8 L) @$ U
   wait for 10 min  {) `' \- [$ j3 }
   bring up R_mC
% d, n2 J6 |8 R4 b0 G   end
' O  m/ v, }4 q  C$ dend
" p: ?+ _1 X6 k0 k8 w2 w" f
----------------------------------------! k7 S8 \$ L, e& O) J. o
* [) u  Y% U- A9 w
Exercise 5.9- t0 v! j7 |' u% r4 `* m
8 R$ z2 Q0 l' U% z
0 }5 R5 W" `. h$ t
Create a new model to simulate the following system:
- {4 h# g, \, r* @1 M, o  aLoads are created with an interarrival time that is exponentially
- _9 m$ _, A1 t( w- N5 ]0 odistributed with a mean of 20 minutes. Loads wait in an infinite-
- e3 W+ l9 P) D0 ]' Kcapacity queue to be processed by one of three single-capacity, & R$ j, I. C1 p# i" ]: {- M* K9 j
arrayed machines. Each machine has its own single-capacity queue
7 R- a& a( S8 k6 Z' Iwhere loads are processed. Waiting loads move into one of the three
, n9 |" \9 ^. s6 k4 y  R0 fqueues in round-robin order. Each machine has a normally ' _% X. q) K  K. o' }2 k
distributed processing time with a mean of 48 minutes and a standard
7 ?% P( e5 x2 p% F. J3 Ydeviation of 5 minutes.9 Z0 r# X( g+ R/ @2 L3 |  t8 U9 X; b
The three machines were purchased at different times and have : Q+ ^$ |$ O$ E
different failure rates. The failure and repair times are exponentially
9 U, C" \7 S' r2 m! O: cdistributed with means as shown in the following table:
; ?$ S* i) R0 D( F0 ^2 KNote The solution for this assignment is required to complete 7 q( Z" W9 U& _3 y. a) G6 ^
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of . L4 t. v- A9 L* y4 s$ A
your model. 6 e1 J: O  O* \5 y( \( B
  N  J% ~! b  V7 c
MachineMean time to failMean time to repair
4 }$ n0 W, e: Z8 q1 J8 p8 kA110 minutes      5 minutes
$ k3 `' _& f) H5 b: TB 170 minutes     10 minutes
/ L! l' @( G$ p  jC230 minutes      10 minutes
. f7 q" P1 B. @! K' @0 k/ A) j$ Q9 Y4 v
The machines also must be cleaned according to the following
: B* t  A  ^+ V$ c6 v% `schedule. All times are constant: , c5 Y: T& V+ V- r$ X
9 L2 ]+ N* {; z; n9 p8 F6 M) t
MachineTime between cleanings Time to clean
* v" P2 \7 B: |1 m, UA90 minutes        5 minutes
8 i2 x  W1 _; u: |* c: k1 FB 90 minutes       5 minutes" }+ C7 l: M% N4 h7 n! Q2 a
C90 minutes        10 minutes( {4 y1 I$ g3 q% `# J' Q0 i9 Q
# e$ k6 a* C8 B' Y
Place the graphics for the queues and the resources. 9 ]  F, W; i- B) G; b) w$ z4 ]
Run the simulation for 100 days.
3 g+ ^4 Z1 i; v& xDefine all failure and cleaning times using logic (rather than resource
. h0 J0 r* j' l0 m: e6 X1 k. ]cycles). Answer the following questions:$ a" A9 R7 R( J# Z0 }- S% g: t* K
a.What was the average number of loads in the waiting queue?4 q. z& L$ z( J4 ^2 L  Q- s
b.What were the current and average number of loads in Space? ) T* Q+ Y/ }: t
How do you explain these values? 7 m4 ^+ x: z* c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉2 Y$ p. H( c% z: i/ P+ J
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 N$ M9 Y  g% F; C7 ~' U这行好像也不太对,各位先进觉得如何呢?) z4 F& [: I0 C; E
6 e2 ~0 s1 \  ?( o6 X3 R% v: P
begin P_something arriving3 p2 {) j" m3 Q
   move into Q_wait. ~( P' d9 S6 r8 u! @" }
   move into nextof(Q_mA,Q_mB,Q_mC) ! d5 q0 G& O+ F
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 |4 G, V( H" s' C+ D) V# {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
4 ]! q$ Q2 `) V3 o/ M1 C: gend
7 F# ?: j2 w. z, `& F5 c
- \5 R6 B- _  i2 S- M7 u( jbegin P_mA_down arriving
" N; I; p. J1 l1 ~5 T  _   wait for e 110 min3 e. M  v$ T" p( |+ ]' @8 k. F
   take down R_mA# u5 |! p) ~4 o
   wait for e 5 min7 z* A9 `4 F( B( a$ h8 v. ?
   bring up R_mA% R$ [3 E( v4 J
end. D. G; E6 J& D* G- Y- \

- h8 Y. ^& r  E7 E+ h$ l1 V9 J/ |" ibegin P_mB_down arriving  W5 P7 J$ C! |: ~9 I- }
   wait for e 170 min
6 z* U7 n/ M" ~& N% a  H& [/ q9 `   take down R_mB: m, ^+ m$ q& Q: L8 F7 T( b
   wait for e 10 min1 _: P% @; T7 u6 _: F) [1 i) z
   bring up R_mB: H  B' q5 E& x6 Q
end
1 k3 b1 t5 l$ O2 B0 a$ ]3 S# h
+ \! t9 j9 ^+ n2 D; ^: l7 `begin P_mC_down arriving
! B  C! y" H8 g1 J   wait for e 230 min
2 k4 B! q1 H. k6 d   take down R_mC
" e6 t! T" e: f2 l, S5 w6 K   wait for e 10 min
2 ~% c8 J8 c: q# x6 d+ `) i   bring up R_mC
2 f: `0 R0 O  k5 d" @% K5 V9 @end
' _$ q: l* Z: ^8 g0 @% L5 X7 K) I3 N
begin P_mA_clean arriving7 o' N0 _4 f6 Q# F* o
   wait for 90 min
. M% Y$ ?- V7 w( q- e. i* E/ E: Y   take down R_mA; v; O$ n$ p, B' h6 m1 t
   wait for 5 min
5 i+ L# p5 G" `: T$ M5 \   bring up R_mA' m( k+ R. i' n) k$ c% Y
end
$ K, K. m. W! b% I  G& N- p, C! g! I* h: P# T2 `
begin P_mB_clean arriving
$ O6 ~% B4 J- Y   wait for 90 min
$ P; n% l; E$ g/ M. R/ N& n' f# p   take down R_mB9 Y" ?" h- A/ ]- I$ Q6 @! Y
   wait for 5 min
7 g. ?) X) A/ U* R   bring up R_mB7 |$ y( z; o/ z! W
end: `8 e, j7 b- S) i, m6 L/ [: Q3 }2 W6 |

7 S& r* q% v2 gbegin P_mC_clean arriving
; [: d$ k4 S; v* k8 C   wait for 90 min6 o2 b9 [1 Q$ Y% ?5 U. @  h4 V
   take down R_mC  ]8 Y5 a* |, {8 s3 b8 y
   wait for 10 min
/ U) w: L/ @& q) ?. j3 V& i4 C/ a   bring up R_mC
9 A- C% u  q: z. k1 Q. rend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving& A+ d# x# I& F+ f0 Y
   move into Q_wait. P1 _6 W5 R7 W* H$ D
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ k7 J1 T+ O" M2 K0 v6 i* `   move into A_w6 O: C+ S/ Y8 w  e
   if A_w=Q_m1 then use R_m1 for u 48,5 min& V& _3 F' R5 q% \$ x" O
   else if .....then use ....for u 48,5 min
# r/ I$ T. A8 \$ p* s' v5 H+ F   else if .....then use ....for u 48,5 min  1 [6 w# b3 h* J. m
   send to die
( q. _/ @6 H' U5 y" U& H3 Rend
$ }) |3 H. b) M9 U- T! k. R$ Q6 B( j' G" [% r- p
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-13 20:38 , Processed in 0.014656 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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