设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7335|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
) ?5 u' v& m. Q4 |' n, V! Q; d: q1 D* R' H& I( j
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去9 F. Z# h: P  P0 z
+ n* F) F8 _& v' y) f# W8 t
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
" L; J, e! T" Z* L0 ~$ q; b; |! n( n4 ?% j
--------------------------------------------
6 Q7 Z% Y  {: tbegin P_something arriving* Z0 r2 |% ?% j
   move into Q_wait
/ C. V; J$ q) ~- u: V3 ~* j+ l   move into nextof(Q_mA,Q_mB,Q_mC)
: F8 z7 P  h6 R% a: D   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min# ?. r! M1 G' Y. O
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& l4 F8 f) ]! {, f+ {  {5 p   send to die  v7 y$ ~" m" h# f7 v! H
end
1 s: N. {7 M3 M
: R) E, Y$ m) Y+ r. @
begin P_mA_down arriving0 u2 c% z1 b; a, S! }* [
   while 1=1 do
! @1 r1 J/ i  ?6 h# M) F   begin
0 d0 h& v' D* G! t( Q) |   wait for e 110 min3 c6 J& H6 b  }# L8 A* k
   take down R_mA
% E; y! L$ d( t4 M) ?   wait for e 5 min' u3 `" x7 W/ I! z$ ^8 U
   bring up R_mA
. ^5 u# r3 @9 d9 W   end
) t' [3 z5 p4 h) a0 \# m# ^5 _" B: ~' oend
5 ~! h- M, Y, u2 {! w5 ]
- u. p& B' t# c  `5 o9 Y3 z) _
begin P_mB_down arriving9 v1 h- d9 S* m7 }
   while 1=1 do
' }  o: u% y4 v+ l2 R' q   begin
' M5 s6 y5 \8 A+ L2 l   wait for e 170 min
3 H3 v; n% A! @1 m# f   take down R_mB' q- o% T* q4 V( p
   wait for e 10 min8 K5 n- \7 F7 w/ s
   bring up R_mB. V2 [: W9 ]# _6 g1 H" n4 Y
   end
& z3 L6 S3 K+ ~! [end

% y$ L+ i2 U" S1 F4 S4 N/ T
5 q% {2 Q6 o' j% s9 E# A8 e8 Z: y' vbegin P_mC_down arriving& R9 V; h+ U, g+ ^# Y
   while 1=1 do
4 \8 w, V# P: p6 r. L: W   begin& u) @" K9 k% f% n
   wait for e 230 min/ X, q# w! V& b6 D
   take down R_mC
* o6 N3 a1 y5 i) \: _   wait for e 10 min
% k- r9 q. y# v- Y3 u# m& X   bring up R_mC
4 D7 ^7 L6 O) c( K# O4 o   end
/ ?7 {8 b$ f# w2 O0 @/ lend

! y0 O) F+ b+ u9 T! `: R 1 {! `5 s# M+ F/ k1 J  Q
begin P_mA_clean arriving
1 G  [' Z! s0 D' o. L0 w2 {   while 1=1 do2 A  U. C9 A5 T. v& G
   begin
& Z( w+ F. Z& x( \" B/ m   wait for 90 min1 Y$ D( j7 {7 ^- C
   take down R_mA& G% T# I+ g6 f! W- Y. `( I
   wait for 5 min
1 s5 K5 F7 z0 t. E   bring up R_mA) G; j8 t# s: N5 f
   end
2 _) b  Q4 Q6 x% r) i3 Q7 wend

3 u% A6 M& o' c6 U  k0 r
- |2 ^% ~% ^. Ebegin P_mB_clean arriving; p; `/ B! }( |' h4 G" T
   while 1=1 do3 |& I1 F4 b" b
   begin
/ Y' f; t/ r9 y, H/ W3 Z   wait for 90 min  X. U" j4 l8 [, ~! ~9 @" B0 ]/ C
   take down R_mB
' N; _& k9 e- Z5 P   wait for 5 min
# o; Z1 e! ]; {. ~* c   bring up R_mB
* K# j* T. z+ C" X0 J" d! Q, S   end
5 q1 m0 _4 t* Y# e9 K* n7 vend

, W" M4 `" |& O  b5 C( q) ^
( I+ D3 a* f; i$ r( fbegin P_mC_clean arriving
* r- F( k/ n' j4 ~9 y   while 1=1 do
# s  Q& F$ g/ Z! Z& |. y, H) t$ t   begin
2 J' a; ^' ^6 {. K8 A6 x" B   wait for 90 min  P1 `. L* h3 d5 c! k/ p
   take down R_mC% i! X5 H4 |8 k3 M3 P
   wait for 10 min- S0 x+ m' G# p  A0 {$ k/ q9 i8 ~
   bring up R_mC. ~* f+ t5 b# A  t) P( y8 Y
   end
& q+ V  h" l# q( D' o' m# jend

8 ^8 a) x4 T0 Z' {8 Q( E& g- n- M----------------------------------------
' P" X) s9 Y* [% T( |  g# a + G  [9 z! F6 f  j1 I0 T, _
Exercise 5.9& O; R  s2 o. O+ s  o$ y

6 e8 n$ u, |6 t, `
' }( D6 T# P) iCreate a new model to simulate the following system:4 @3 z" m7 P! P3 {
Loads are created with an interarrival time that is exponentially
* s" F: H: g3 P' v: Wdistributed with a mean of 20 minutes. Loads wait in an infinite-" ~) v* ]$ T0 Y! B  f
capacity queue to be processed by one of three single-capacity, + i$ S) D4 ?4 p# L+ I( ~3 }2 }
arrayed machines. Each machine has its own single-capacity queue 9 F; M  a2 J' s& O, c
where loads are processed. Waiting loads move into one of the three
: _* u/ \. K) {queues in round-robin order. Each machine has a normally
& X5 _# y! H; O) O* ^" s$ Bdistributed processing time with a mean of 48 minutes and a standard ( ]3 y1 [7 r+ {# k4 |
deviation of 5 minutes.! M6 P* @( A1 x$ h
The three machines were purchased at different times and have
' ^4 H# m, X  z* Q3 I8 r0 M' Z/ |" Kdifferent failure rates. The failure and repair times are exponentially
- a' ^! x. r3 L& s+ I! T# |distributed with means as shown in the following table: ( J7 M5 G$ S( n
Note The solution for this assignment is required to complete # |+ s8 q& }6 g$ d% Q
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 o  Q7 P+ l! }$ I* \3 \7 {3 b* B! dyour model. ' ?& E$ }' W, I% }
" E# ]& f, {1 o# E8 T7 A+ {) W
MachineMean time to failMean time to repair
# s5 ?: M% x/ fA110 minutes      5 minutes" \- x- z8 I$ u4 C9 a
B 170 minutes     10 minutes' i1 X4 [% S$ Q
C230 minutes      10 minutes
7 K1 Y% H! f+ j) R/ e% }
8 w  A3 l) K( m# L. DThe machines also must be cleaned according to the following
" h4 z9 W& S' @2 v& J/ Bschedule. All times are constant:
- w, ?& ~8 _9 w) |) [0 i
3 w3 j9 D: h- LMachineTime between cleanings Time to clean, A- f- m1 b( L6 d1 I, L
A90 minutes        5 minutes
8 [3 X0 {! }6 W$ BB 90 minutes       5 minutes7 _0 V  S2 @5 u
C90 minutes        10 minutes' n2 o1 {  K: K  T& G8 [

: I) h3 w3 z9 \) A, ^Place the graphics for the queues and the resources.
6 f: [& h9 W* W* ]# T* k$ ?Run the simulation for 100 days.
  G8 Q9 G. Y+ Y7 aDefine all failure and cleaning times using logic (rather than resource
# f4 q& O9 R1 F0 G, p+ Xcycles). Answer the following questions:
& |: d$ Q+ k5 n. c, F# Ma.What was the average number of loads in the waiting queue?
! ]$ `8 O$ q# {, i( U! _% Xb.What were the current and average number of loads in Space?
. S% P3 \! Q4 P' B0 b4 h& _' e  Y) H6 ?How do you explain these values? 2 {1 ]+ l- [5 Q' r8 c: x0 o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉4 J. N; @) k2 x  ^5 [  E" t! s  `1 \
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)8 ?! x% Q7 W8 X  k0 s6 ^& L
这行好像也不太对,各位先进觉得如何呢?
4 L1 p3 X2 [, i% C! \* z
1 I0 C; z8 m, ~) `+ F4 J+ K+ Obegin P_something arriving
# F) H. d' l* r  L' ~4 b   move into Q_wait' v8 `1 C3 C8 ?& x; I
   move into nextof(Q_mA,Q_mB,Q_mC) $ `/ S) B; W7 N
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min  Z' S0 T' {1 V' t2 {1 U
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 5 W7 z. k6 e& N+ v+ T
end
+ n1 o% _0 j! S: p* P! T( e0 k
% Z$ N( |- g' Tbegin P_mA_down arriving
% c5 s& V0 h) O7 z" ~   wait for e 110 min
; b$ R* z$ d9 L1 X4 {: E8 d   take down R_mA/ T& s% G2 t& P6 O% K/ j/ y6 ~8 w9 D
   wait for e 5 min
9 I( f- y9 w  s+ Z6 j/ n6 r   bring up R_mA9 g7 {1 ]' S, {8 g; r, M% ^2 t
end
! F1 K0 x& `3 y( k. [5 q5 Q& d$ e2 x, E
begin P_mB_down arriving
6 k# K8 p% e! g   wait for e 170 min5 l  d, o2 ~: }, j
   take down R_mB' S9 I* c& i4 {8 R( \; j
   wait for e 10 min
$ q3 t" v8 O- y) v2 E6 i( @   bring up R_mB
) ], X; X0 l+ ?' V! q0 u4 iend# s2 Z" n: {5 Z/ t- b6 L) c

* A! ]: R& W  i% }- \8 Vbegin P_mC_down arriving/ ~1 K( P4 F2 W2 |/ L) A2 Z
   wait for e 230 min% C( @, y  q) r, x2 u
   take down R_mC
; h8 F" z1 L- G' j- P) T3 Q) P4 d2 ~   wait for e 10 min
) A  [/ h+ C$ v7 H2 Q- ~   bring up R_mC
8 }# q) e9 u. q$ `. j. v  C: `end
8 B- I* L. a* I9 |4 F: H& L3 ?4 i4 g5 @5 x& N+ B. c- F3 ]
begin P_mA_clean arriving
" [3 a# w- C7 A& u+ J/ i. z   wait for 90 min; z$ G: Y1 `3 ^* E) d# N# f* R
   take down R_mA
5 g6 C% w9 N' ^! b& T  ~0 d: z   wait for 5 min1 F" _! W. h6 a. Z9 g
   bring up R_mA
7 u" `0 A9 P8 x! D" T, l2 mend
, u; {. S% N. G4 X* G+ \9 ]+ Q; `  ^- Q5 B4 Q; x
begin P_mB_clean arriving
( |% Y- g( C/ b/ s   wait for 90 min& c( \; z1 S: p& a
   take down R_mB
7 [# C+ n3 l/ T$ Q" ]   wait for 5 min# [% A& x" m6 [6 ~
   bring up R_mB. G' a5 `6 S  Q$ ], P
end
! K! Q6 a: q2 z3 w( v
  }+ K. O8 t8 V1 Rbegin P_mC_clean arriving/ d0 f) ]$ S* M, s) `* @* u5 v
   wait for 90 min" \- I0 D  H: y' t1 f2 i4 Y- J7 L
   take down R_mC) I2 o- p. l$ y; v/ W0 X
   wait for 10 min& `7 k4 t& }( I( J" ]% \: `. t. Q
   bring up R_mC
2 W. F6 a0 r% d( Dend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving' u! H# m# n) J4 n( G
   move into Q_wait
( l7 P- J- w4 i& f   set A_q to nextof(Q_m1,Q_m2,Q_m3)
. A$ J: F- K' J4 q   move into A_w
: y4 E0 Z1 F& {! y( V   if A_w=Q_m1 then use R_m1 for u 48,5 min
- m- C* H4 h3 n9 |3 p0 [   else if .....then use ....for u 48,5 min' A- ]& b! N  u! X" Y2 J- J, u
   else if .....then use ....for u 48,5 min  
1 P% o6 [) p+ d1 B% A: y) n   send to die1 X7 V$ ?' i5 p: n1 i- z
end
) n1 m: Q) h& d3 U
: ~4 {- r" j* A- i$ v  P" F* C供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 21:37 , Processed in 0.013810 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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