设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7206|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ `1 F$ v. X7 u$ d+ G
+ f1 d6 G) y9 `; y. p底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
- v2 I/ y' N$ K1 o
: \3 Y  v8 I- s% P! T5 E7 v, L不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
$ [- Y; a0 k0 {  X
5 A9 y9 @9 q3 Y* ]' t, R- Z3 a
--------------------------------------------
- {2 G; w# i) g) Q7 x% N( m$ Ubegin P_something arriving5 |% {: c- x( R' U, r; @
   move into Q_wait
" {+ }. ^6 q; ~9 m   move into nextof(Q_mA,Q_mB,Q_mC)
% w* C+ [6 z& J. R   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" t: T/ v/ c3 K+ F, G( M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); W8 @2 N# Y# ]  b2 J
   send to die
, X: J+ x8 j2 f; w, M& b4 Bend

  B8 S* `" s/ _* P: o1 E
- N) k2 `/ V* S9 ~begin P_mA_down arriving
3 _% O; B+ ~* M' u. J   while 1=1 do 2 n) C' _2 f( Y* T0 V
   begin
2 b% p+ o! Z. u; ^6 O   wait for e 110 min$ a5 `9 y6 L* u$ u( w  [" D
   take down R_mA  G6 @. ^! s3 _  t6 L
   wait for e 5 min
* E9 S: m* _7 q4 o6 ^: N   bring up R_mA
- s" y: I% k) f; C   end+ g  V8 c% L! q$ B7 R$ |
end

  O# e  d, G6 n4 F3 U
+ I, w7 l# X/ F$ b5 f& a, I" L) |begin P_mB_down arriving
5 o0 Y0 ^) U+ D# [/ \   while 1=1 do4 b, T9 w1 o7 q9 w
   begin3 {7 |4 H+ C+ w( h* y) {
   wait for e 170 min, ]7 i4 b$ |; q" e* E# a
   take down R_mB
. q. _" F/ Y: Z* d, I% K   wait for e 10 min
8 i4 q' m: j6 F) n) W9 V   bring up R_mB; y0 a0 O9 V. O( B
   end1 x+ X4 L7 ~& D9 H! j! a' q
end

  a5 |, `: w. a$ T) k7 X
, n1 e, o$ K2 W! |5 |5 v7 E0 P6 zbegin P_mC_down arriving
2 @, Z- c* s: q   while 1=1 do
, M4 O! T5 H$ F2 \& J' O" ~   begin) _' C8 w, ?9 b6 ]+ R9 k) V
   wait for e 230 min/ q- T$ H8 e9 i' n8 j
   take down R_mC$ {% i5 W# _9 A" M
   wait for e 10 min
* I# W$ O' K3 @+ |, m   bring up R_mC) s9 \& G+ h+ E; @( f
   end* A: b( r7 R8 T1 a
end
0 s. e* Q1 l! c( @% K: N

4 }. t5 U6 ^9 z2 m& |0 J! zbegin P_mA_clean arriving
7 ~) {3 f9 q4 T; X0 g, b: _   while 1=1 do
* W$ o6 M+ ]% u& w9 z& h   begin
! [+ k+ x8 g$ a: {   wait for 90 min0 O' `2 I' K; A+ [% x
   take down R_mA
0 D9 M# ?& Z$ k2 E  `   wait for 5 min
* O. M  X; w; G, U0 ]2 C) t3 l   bring up R_mA
: A9 G7 E5 s7 V4 V9 u0 ?   end' s$ Q3 H/ [0 l* d) S2 n3 A
end

# {+ G% ]. U. o6 c& u  S/ h ( ~, V) U% k/ Y; F
begin P_mB_clean arriving/ Q3 F- c' }! }/ W
   while 1=1 do; f# G; Z* Z- }6 r
   begin; O  J( ]: M7 @3 b. w
   wait for 90 min
& f1 B0 s5 H" A2 j+ P. p. C   take down R_mB
, @. }: m- q3 [, p0 O  d2 P8 o   wait for 5 min& |6 o6 C8 N$ z* ~4 V
   bring up R_mB
6 [& n: R/ ~4 r) V% F8 ?   end( F0 G9 M5 ^/ H, E0 Z
end
; {8 ?. G* [( t" X8 x; V: s
5 a1 M$ a7 c( I+ [. Q, i7 g
begin P_mC_clean arriving* l# t) N" J- `4 U: f$ E2 a' d
   while 1=1 do
" ^: t6 r+ E1 z( k   begin7 o$ u# L8 y0 C0 ~  P; X
   wait for 90 min. T& o; x7 o- B( Y' n# k
   take down R_mC, j% P$ S& Q2 X! c
   wait for 10 min
  p, ]7 A8 j" [/ s# j   bring up R_mC5 N+ t; v! J2 _4 c' v1 i. Z4 I
   end
8 M7 Z; X. M3 n4 ]% Uend

/ S5 b6 v5 y2 D----------------------------------------
* c  ~2 r* X. J : U1 T) d7 ?  E5 Z7 ^# U
Exercise 5.9
# Z$ C9 I4 T" K, P! H, y/ a& K; _/ d

9 U, {9 g8 C, f# y! tCreate a new model to simulate the following system:
5 X4 }! y. @5 Q0 ?' JLoads are created with an interarrival time that is exponentially
, Z* a/ Z4 `3 E7 _4 t0 Pdistributed with a mean of 20 minutes. Loads wait in an infinite-
+ Z- j* p6 }5 x: g  q: kcapacity queue to be processed by one of three single-capacity, 6 W' b- H; ]) y7 k
arrayed machines. Each machine has its own single-capacity queue
3 Q0 v* z; m+ T! R# Swhere loads are processed. Waiting loads move into one of the three
3 e( M# }8 g) C; |8 z" ]queues in round-robin order. Each machine has a normally * L9 l. p6 |5 F# _2 T
distributed processing time with a mean of 48 minutes and a standard
  c3 F: a4 A& Z$ D! G3 Q: L. Rdeviation of 5 minutes.! Z/ D1 B! s& {! y- I
The three machines were purchased at different times and have ( I, _1 Z& ^! b& V+ [8 p3 b9 u
different failure rates. The failure and repair times are exponentially 5 Q3 p+ i2 v! x0 C, T+ w$ T0 B
distributed with means as shown in the following table:
. c7 O8 T" A0 |6 o: y9 KNote The solution for this assignment is required to complete ! W! A7 _/ u) q6 ^2 w
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
% p+ m/ q; R6 U1 k) uyour model.
% l+ l0 w2 u+ \% M1 [. s; [" U- T' y  b- j
MachineMean time to failMean time to repair
" w! l0 k( [: ]5 }! ]A110 minutes      5 minutes  s( n, V/ Z0 @9 d
B 170 minutes     10 minutes
: b2 ]. d. e9 a! bC230 minutes      10 minutes& T/ ~" I" F1 v- f
; A1 j% |4 \' G! M! M3 _' h  A
The machines also must be cleaned according to the following   F: q+ r  \2 m( e  u( v
schedule. All times are constant: 0 W0 |$ P2 G5 d. p( Y. d

- \; k; l$ U& r# y: @5 CMachineTime between cleanings Time to clean
3 o- z; C* w* B4 P+ ^7 u* [( h# nA90 minutes        5 minutes
5 y! F9 d7 g: O( LB 90 minutes       5 minutes
& P6 \9 o3 V- I  yC90 minutes        10 minutes
7 ~) Z) p; ^: R$ s: `& s+ D# u! E& ~4 @/ l
Place the graphics for the queues and the resources.
1 o' E0 k( @1 q, a; E4 A2 L3 k# ]- iRun the simulation for 100 days.
% \3 a6 ^/ e6 o: R5 B) PDefine all failure and cleaning times using logic (rather than resource , D% h( o, y- p4 s8 G
cycles). Answer the following questions:* n9 ?  i' p3 T) [: S+ h$ p
a.What was the average number of loads in the waiting queue?6 }4 w' @3 n4 Y$ V  U+ A
b.What were the current and average number of loads in Space? - y& }/ }$ O. d- J( f" ?
How do you explain these values?
9 Y* T9 E( c2 |7 b8 R

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉2 m  h5 D6 F* E
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ w; q: n! {5 a# F; f1 v
这行好像也不太对,各位先进觉得如何呢?% {0 ~  U2 g2 Z. @9 G7 h0 R- J
) G% u2 R7 Z* p% b8 L
begin P_something arriving
9 v4 {% O5 j" T. l4 q9 X   move into Q_wait
" c1 I2 s# K, N" k* Y0 E3 l/ V   move into nextof(Q_mA,Q_mB,Q_mC) " ]& y* H: b% n6 _- g
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min$ P% B" O/ {* r6 @& ?
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & ?2 O" N* n  N  a) m2 l
end
) I& ^/ z1 L2 `) k: @$ k! D- ^, ]2 a- M/ g4 w& k( l$ R& b
begin P_mA_down arriving: F6 K& G5 A+ L% Q* I8 S  i7 s
   wait for e 110 min  Z. o% l* J7 A! t
   take down R_mA4 L7 W' d( E  h1 A
   wait for e 5 min9 f3 m' w$ a% g2 R8 a  p7 d) b
   bring up R_mA
, x! @# @) w, l, a  F0 F& r. t4 H& }end5 F& d( h: }0 Z" x% }) f9 \! Q
8 I+ U) o  s$ M0 }
begin P_mB_down arriving
4 \' x5 `7 N) }& O. [' c9 ]   wait for e 170 min; f: h3 ?# [3 J3 {# _$ G
   take down R_mB
+ Y  ~+ d8 |; u7 T* }  K5 f   wait for e 10 min
4 A( G8 i* `! N) t/ j   bring up R_mB0 u! i5 `+ f. D$ H, Z7 N
end
. n+ S. @% b# U$ o$ h! {: L( d6 h' k; u0 V
begin P_mC_down arriving% j- ?$ z/ j# |
   wait for e 230 min
& Z1 [# }0 Z6 l" }! a) }   take down R_mC( y$ h7 p1 Q- k" F6 U9 T
   wait for e 10 min
. Z: g  ~( c1 U5 J   bring up R_mC; N3 l3 C6 B& N8 O" J2 g) s
end* F% `& g# F" v' V

( R& Y. z6 e3 O, n/ l2 w) tbegin P_mA_clean arriving$ Z; P( d! i4 u" K0 O1 C" M
   wait for 90 min
( y' D& h; l$ e1 w, W* \" B   take down R_mA/ w# A$ B4 @0 {& g6 T9 `) U" N* c% g
   wait for 5 min
2 z$ x' k0 r, E- m0 z   bring up R_mA
: K; X2 H( D  K+ a7 uend
8 U. U7 }$ Q. v$ u* v: p- P* {$ H( Y3 K9 @( H
begin P_mB_clean arriving( d4 R# ^$ V) ], p( g: o! p
   wait for 90 min
+ w  ]0 C% n+ s1 k: {/ y* R   take down R_mB& f* A* k' d, B
   wait for 5 min
+ q: |( X3 T4 v& n   bring up R_mB) Y& W) R1 ^2 H1 G! O
end( Z4 s% ~1 O! v, c  z4 k0 t

+ V# a0 o/ m) A6 Ubegin P_mC_clean arriving) F/ ~3 c. z5 e, b
   wait for 90 min
4 y/ e, ?9 @* w" L  }2 i   take down R_mC) U, L. Z3 N- M3 C" {3 W' m' C
   wait for 10 min. K% W, y* \, |
   bring up R_mC+ O2 k4 r' n$ \4 e9 ?* [1 w
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
% m+ x% N* n6 ?  o3 `   move into Q_wait6 O: M+ t; @& F& p4 a9 E
   set A_q to nextof(Q_m1,Q_m2,Q_m3)3 r6 O" O* H0 m- R% F
   move into A_w
0 H9 q% a, }: ]7 F/ ~% V8 G5 H   if A_w=Q_m1 then use R_m1 for u 48,5 min; Y, j, i: E: p+ J5 o- U, h# S; U
   else if .....then use ....for u 48,5 min
, r) m( q$ v- k, t   else if .....then use ....for u 48,5 min  - R! ]; W) i$ b2 Q/ V
   send to die# e2 o- J5 E* V! H
end
( Z8 t& p, M' y- x2 J# G# u! C- B4 [0 F' b  U
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-15 05:10 , Processed in 0.017433 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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