设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7885|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ f, c2 l5 R( e% c7 y* |# z: m3 q- z! k* S$ t, k3 N
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
+ B( h6 S+ @3 y2 n6 P
3 C( [* O( U( L4 ^8 V, n不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
1 h9 D9 d2 A2 t) t$ H- f4 b  z  d! E1 Q6 j, Z/ ?
--------------------------------------------' ~( l& J) {8 L# A
begin P_something arriving
9 G2 x, L+ G4 c' j, I, B   move into Q_wait
3 [" \, z3 c! H   move into nextof(Q_mA,Q_mB,Q_mC)# z. D4 y' C2 \: A( e% `' }
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min0 v! D& K! y/ ~1 t8 g; Y) z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)4 P( f, B5 L# G$ I
   send to die1 s/ i9 \2 K$ |5 f; C9 x' V& Z9 u3 U
end

/ N# W7 e& }% ?3 v* J 6 d1 n- x0 E: X$ [4 W
begin P_mA_down arriving6 w* R) I8 {- p7 P3 g8 J
   while 1=1 do
  t5 J2 z* w9 O. N5 r   begin0 Y7 w' |3 A' m+ n8 G
   wait for e 110 min
: q6 E) C! S+ X5 i9 Z6 O   take down R_mA
( B8 G& X. d- p   wait for e 5 min% U1 }0 g7 g( o/ f$ Z- j8 z
   bring up R_mA0 b0 s3 ^4 [$ H! a. n( F  k
   end
  O7 w2 [& Y( n2 @6 Uend
, z- O0 F9 W8 D' A3 X' I

8 z1 i. \2 Y  _* `: l, d  z# ?. jbegin P_mB_down arriving
0 ^! Z2 c1 G& A; T3 K  z- c3 e2 d   while 1=1 do1 U% }7 K" O! e# a" \6 {
   begin
+ [$ w/ [3 L4 n" F5 K3 y   wait for e 170 min9 s, C1 V% A* ~
   take down R_mB
# r" o6 R9 E' L. C/ u' e- S) J& u   wait for e 10 min
+ C0 a+ O; W% Y3 U. Q0 v+ s   bring up R_mB& \1 N3 w2 `( y6 T" E5 b5 |9 U
   end7 s. ^* Q& L, Z6 ^  l
end
- d5 R% T* p# v
0 y/ T+ E. @4 A; c; _0 m) U
begin P_mC_down arriving$ g! p) Y0 i- F' c% D& A. R
   while 1=1 do 5 E8 c5 F# E1 F& \9 d; @! P( F7 A
   begin
# f/ b( G$ Y& Y- N/ W: ?   wait for e 230 min
5 ?& L% c! M: g  i5 E   take down R_mC. C/ ^6 Q8 \- z5 I0 V# k  i
   wait for e 10 min
, ~% S' K# [" l* e6 v1 H2 r" ]" ]5 E   bring up R_mC
& U8 h+ G; V! B   end: H2 Q! P. K" |  n# \+ ^3 F1 S
end

8 @; R. k* \& o0 z
% b! a, D, p9 I. J7 E/ Z8 E% Obegin P_mA_clean arriving
) B! N  s! ^8 R! x0 d6 Y5 k   while 1=1 do
/ U9 C: }: i' w/ K* l: j   begin9 {" z7 `/ T% h7 }! R$ q
   wait for 90 min* M. E* u5 H. a$ i. ]% {1 `
   take down R_mA
% x! R; Y1 ^( c6 a' V! B5 E  s   wait for 5 min
+ f2 C- d$ m7 h+ W% q! E6 a# w   bring up R_mA$ M& Y1 d. w/ t6 Q% q( |+ ~0 I
   end3 B1 S9 U& l& \7 {1 v- S$ S
end
: H5 ?# q4 ?) o3 ~& w( T, |
2 H6 p' \, E* M  R
begin P_mB_clean arriving9 l8 h: L8 I, G+ M" A4 E
   while 1=1 do  l; F  X: r' Y5 o! ~
   begin2 h2 n6 U2 {; \2 ~
   wait for 90 min% g4 n4 C  f9 X4 k
   take down R_mB
' v' a" p5 N6 @0 a* `1 `) z+ D$ g   wait for 5 min$ `: `" e. g- G7 p! j
   bring up R_mB
0 f8 v- @' D4 a* Z8 `) k   end$ D7 L4 Y& f/ l5 u5 y) }
end

1 D$ g/ S. K3 ^
8 C, e. Z) ^: Y! tbegin P_mC_clean arriving
3 k% W; \9 U+ q3 Q4 y% m. `, d   while 1=1 do6 N$ W0 j; G( a. b7 z+ q: l2 A
   begin
$ \2 U/ t% Q( N- @& T  u  |   wait for 90 min
; n) }, g8 V4 @+ ]* Y/ ~   take down R_mC
, B' b  R+ A, n4 |   wait for 10 min- m" V% B  M+ ?
   bring up R_mC9 n# t2 b5 e+ O$ t9 T7 r
   end! W* u# Z- W1 a' u' k8 N: e& P
end
9 D# `8 h. ^7 f$ {2 q, O
----------------------------------------5 G: M+ a5 p4 W* _# K
! x9 \% D4 Y) ?$ n- }8 w
Exercise 5.9: ~2 E6 m6 v) Y; F1 n7 p* Z

- B- t+ @( p3 S
" i/ o6 {' B5 g7 J2 j# r/ H  cCreate a new model to simulate the following system:, M8 ~& X( ^+ e& n) y
Loads are created with an interarrival time that is exponentially 9 q5 W% v1 |: i. n% z
distributed with a mean of 20 minutes. Loads wait in an infinite-4 I# O6 O' r2 w) m
capacity queue to be processed by one of three single-capacity,
9 v, {: V+ e" u6 P0 @arrayed machines. Each machine has its own single-capacity queue ) G  L2 A2 M: x4 S: |* O) @
where loads are processed. Waiting loads move into one of the three ) V  a; U8 g* q. {
queues in round-robin order. Each machine has a normally
9 L/ X5 V) l' T0 y+ M; ddistributed processing time with a mean of 48 minutes and a standard
% b* g1 G# l; A# e3 b# m+ @deviation of 5 minutes.
  Z+ ]( n; ?; M& ]: G" GThe three machines were purchased at different times and have
& `9 y" C6 ^. s, F4 p* o" c1 a" Bdifferent failure rates. The failure and repair times are exponentially - u) r& h) O, ^+ B( Y
distributed with means as shown in the following table: / z) N1 ^7 q# [. C
Note The solution for this assignment is required to complete / X/ k$ q9 I# w
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
% g, _4 |5 `( \your model.
! G6 J$ ]) U: e; O" F7 ], s) q3 g2 J/ v+ [3 Z; H9 m
MachineMean time to failMean time to repair# Y* T# G' e& o! h" E
A110 minutes      5 minutes
+ Z9 d) I* T2 e/ J! K4 B; H9 E" sB 170 minutes     10 minutes2 w8 Y+ u& _8 [. j8 G. l4 y
C230 minutes      10 minutes
0 s# n5 x1 K4 Q* g* \3 d( P7 m" h- q$ V  [5 l+ q) L0 n
The machines also must be cleaned according to the following 4 y0 [$ J9 E1 H7 |0 Y, j
schedule. All times are constant: ) K8 ~& Q, d. G9 ]6 W. C' A
  z: S* l* `! s* E! j
MachineTime between cleanings Time to clean
$ O/ w' T( x% fA90 minutes        5 minutes
2 C$ o! E. f/ O& R  I" aB 90 minutes       5 minutes1 R. M( ~& T" m" \
C90 minutes        10 minutes
: B1 e6 \! \; s8 U' K
: C- ?1 X  m. n* dPlace the graphics for the queues and the resources.
) r5 l: T0 t5 E2 l$ L8 {3 zRun the simulation for 100 days.' F$ L' T! q! c
Define all failure and cleaning times using logic (rather than resource
1 g1 u# J2 G1 R1 w. Ucycles). Answer the following questions:8 T& }2 w! D4 z3 Z/ s+ z: A+ Q
a.What was the average number of loads in the waiting queue?/ N3 m% n0 W* p& q8 [  d4 }/ G  `
b.What were the current and average number of loads in Space?
1 t" o4 |# z8 `3 yHow do you explain these values?
+ n! X1 R/ ?) s  D' `

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉- n; ~- i$ k: w% e
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), ~5 i  `' r3 N5 i& }9 w, X# J
这行好像也不太对,各位先进觉得如何呢?! |* w& o3 ]( G+ v4 H' ?- l# ?

& M8 e! d+ `+ R* Dbegin P_something arriving
( [( K& ?+ e. w: E" ~$ m) }   move into Q_wait
# Z' y6 v0 t- Z; U; {   move into nextof(Q_mA,Q_mB,Q_mC)
7 k* [' \1 g8 B. V  r   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
( X+ c* a' l% H. G& W; M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 d/ M4 s3 A( t4 P3 Bend; t0 w' i7 i% c
; F$ R; k! E( ?, l: u% f
begin P_mA_down arriving
2 U! k( y6 d$ Q   wait for e 110 min8 n0 N3 {( E- i3 \( g
   take down R_mA
) z, H- g- ~0 c. u) W   wait for e 5 min2 c. U0 s( ^; U  z! ]
   bring up R_mA
3 m( l1 x1 P4 q( [, Rend' u* M# l% w  B% C: n$ h

; B# h7 \& }! h& r, L& Wbegin P_mB_down arriving$ e  a4 X% D0 D9 w
   wait for e 170 min
7 p+ h7 X" z- f' {' `   take down R_mB4 Y; H; Z4 y1 w& Y$ B! w* E8 d
   wait for e 10 min/ I' `1 G9 f; L; |8 d, P3 Y; }
   bring up R_mB
: F, \. v7 P! d- Y! ]: Mend  e* g3 n4 Q6 U4 {! \

; g) w0 ~3 C: ]& }& Bbegin P_mC_down arriving
2 j" `: Q9 y, z- _# D   wait for e 230 min9 a* E' x, z- d
   take down R_mC
$ k! k/ g0 e! s7 j+ Q   wait for e 10 min1 J, ~, h; W8 {: L  k0 `% ~6 `) }
   bring up R_mC# p! y' D) ^" Q4 j- W, y$ E# w6 f
end
, {/ v& M: H5 I  e1 L
. F: Z. @! L; d" x4 Kbegin P_mA_clean arriving- B! r; p0 s; H4 \( E: ~1 H
   wait for 90 min! l; q4 e  c7 Q9 G8 X0 Y  X
   take down R_mA% C3 {7 i( i( h2 J" z/ ]- s  P
   wait for 5 min
; F" n0 S/ N  V* b2 F& t   bring up R_mA- D+ I. A% }' F% X* K% n
end# y+ ~' ^7 A9 d0 g" ^" |

+ `# t8 L$ A) h8 I8 x. }  w. ?begin P_mB_clean arriving+ R3 n2 Y  n6 K$ T+ O# J
   wait for 90 min2 {8 U! |# h# E5 k! S
   take down R_mB2 H0 O: _" ^% s1 ^4 Q& s& }/ B
   wait for 5 min
6 L0 ]* m" z1 Q6 r6 @+ m   bring up R_mB
& _/ L$ J- L0 p) [8 Cend
9 i2 {$ }& }: a& Z1 N- Z  m5 t7 H$ K5 ^: }' x
begin P_mC_clean arriving! F+ b0 T4 L! W
   wait for 90 min
$ w8 }% p4 F# l8 r   take down R_mC
4 V9 t( ?' s  k, q( ]' Z" g   wait for 10 min
, I: o( s. T# }  T( j1 s   bring up R_mC* ]% B9 c$ O3 d6 X9 J
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving+ x! X. }  X8 J  l7 w- {3 l# l+ c2 Z2 n
   move into Q_wait. b8 m) P! r6 V% f" E# D
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
+ c/ s+ G  o! S) }   move into A_w4 e$ Q2 Z6 v6 C3 e
   if A_w=Q_m1 then use R_m1 for u 48,5 min
/ X& [+ \/ ~; O0 L7 \   else if .....then use ....for u 48,5 min, d6 D" ^" W1 R7 z0 _
   else if .....then use ....for u 48,5 min  7 E& `2 K% I% k: B. E2 a! }
   send to die1 a$ d' B3 g' F% [* W
end) P1 |" p- U" ^8 |: t2 m
$ S$ Y( b4 }6 P) ?8 P+ Q
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 14:57 , Processed in 0.013743 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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