设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7679|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 * Z, J4 f4 g# L! q2 f# s- u
5 E& \4 G0 {7 H4 o  G( o
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去) W7 N1 v+ B; I  Y' b. T9 x& Q
. |) O& L  \$ n# o7 d
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
' u( `6 Q% _' g1 T# T; ?( W8 e* @( m2 y, ~5 C
--------------------------------------------
# U2 N- V# i3 Lbegin P_something arriving
1 Y+ k" M- }/ F9 f  C- F- {   move into Q_wait& _" K, f4 v1 t8 X) i4 Y
   move into nextof(Q_mA,Q_mB,Q_mC)0 ?% p* W* y( O. P! g+ w6 F
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min" t( |2 _" `7 T( r
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)# ^6 m7 p6 k- }3 q- G) I
   send to die! @% W- m# _5 D! Q- ^5 V% G2 B# K
end

5 C6 D$ V+ H; e9 j6 v ( E3 a4 P4 S5 E7 N7 t3 s
begin P_mA_down arriving- ?9 }4 @9 Q7 w& Y: o# {6 s" n
   while 1=1 do   |; ]! ]/ j5 y
   begin
- [7 W; {  d' g. w% r/ N! ^   wait for e 110 min4 c& I# `: N) {
   take down R_mA
/ Q' H% q( P  m; ?' Y0 Q; x4 [& q9 M   wait for e 5 min+ G3 I- p7 _' X2 C% \
   bring up R_mA( U& K# N2 e! f7 q6 D/ C/ j
   end
6 |) r: |# l) {* s4 m4 _end
) ^3 S% S- a0 L: A
  X; T- }- a+ o1 y$ |# X4 D
begin P_mB_down arriving8 k6 N8 N7 I4 r# d
   while 1=1 do
" m) e" ~/ @2 A0 _; e   begin
/ a9 }. W* Q6 S# w& \   wait for e 170 min$ o; N" W7 y; h2 Q, q& X( d
   take down R_mB
8 L4 D4 [% E% }7 W2 ]   wait for e 10 min
3 e7 {4 ~' i% u6 K  C   bring up R_mB% h1 W% L! l  a& F5 t# p: u2 ^/ v5 v  E
   end
2 h/ U0 O; K& m' [3 @& P) y4 uend

) F8 I4 H1 q2 J! e+ Q0 j# ~5 e/ w) c
  a0 `; Q3 E! t. `' Xbegin P_mC_down arriving! x: e- {" F9 M! n: s( b9 m5 ]
   while 1=1 do , Y' c4 ]$ G* a1 K' S
   begin. M& c6 a- g6 H3 V
   wait for e 230 min: V3 \" [" C9 T. L
   take down R_mC: i4 \4 f" X# b" O4 m
   wait for e 10 min
: Q0 E. m: p" A" X8 ~6 V6 N# Y   bring up R_mC0 K/ A) h: k7 s% R3 f( _4 c) [
   end
6 w( n% o" G$ s$ {- Vend

% ^* {" C' r0 V+ b  T5 R" i / s6 R4 P" J+ o+ G$ Y
begin P_mA_clean arriving  k/ }" j' u; ]; A# o
   while 1=1 do
3 h# y6 }2 e- J   begin4 {. Z% i) h- \8 d  D7 l  E/ w' p
   wait for 90 min
' e- t+ ?0 M0 l( f9 o, W   take down R_mA" B8 P9 x, {7 D1 k+ S2 O, R/ S, W
   wait for 5 min& M  z& d# T5 t; [  {
   bring up R_mA
& W% X5 t8 ], j) V; q   end
! P- X' g  P2 Q! u, cend

9 R# `; F6 u9 B8 ~ 2 y1 o$ r7 Q# M  n) N( D$ X
begin P_mB_clean arriving( F, l/ O( f4 I  d! @
   while 1=1 do
* W6 M6 l' L  K2 |# Y7 N7 h   begin
( @9 r! V8 E3 Y  x# J   wait for 90 min
+ x8 r" h& |  E9 `1 g  _! T+ F7 U   take down R_mB4 }$ Y$ I# f5 n; Q/ ~
   wait for 5 min' H& T5 y+ V* F- m% P8 q
   bring up R_mB
" n' Y8 n1 q4 j0 P+ D   end
' u  K% y- G& ]" X, b0 x$ u) {end

4 e, i# T' Z/ O6 h) e1 v
% d) Q0 s) m3 q& _: e( @4 kbegin P_mC_clean arriving
2 @7 n3 ~' o3 Z$ X# n   while 1=1 do' j' \& r$ I# V7 I+ g4 q: @- i* w
   begin2 O. E% l! U2 K  q+ _1 d0 {
   wait for 90 min
+ }% R" B! l; R4 r" `   take down R_mC
' k+ B1 V2 x' _3 G( u   wait for 10 min& k- j) a. f- T7 X
   bring up R_mC
% S4 o( p) M3 ~. H   end& ?  }' @- X; i; W
end

$ M, {1 _/ N. _/ P& w----------------------------------------
) f; x+ y& P# z+ o: L2 k0 U7 x0 {# w 2 R' o1 f! R" f! Y; i' F
Exercise 5.9
3 `( \9 g% [4 ]: a9 \5 S; G9 v! `( _' k& R
1 p# C* _/ Q* v+ N. M" j' r
Create a new model to simulate the following system:
* _2 r: U- v* A% ILoads are created with an interarrival time that is exponentially / e( P  Y- j6 Q# i: Y% ?3 E- \
distributed with a mean of 20 minutes. Loads wait in an infinite-) Q2 G0 m: c5 a( i
capacity queue to be processed by one of three single-capacity, 8 k( \! |7 p& X! y, E
arrayed machines. Each machine has its own single-capacity queue
7 S8 O0 G& y- X; ywhere loads are processed. Waiting loads move into one of the three
& j0 p& J! ?( E( Fqueues in round-robin order. Each machine has a normally
% T- P+ p% C, Xdistributed processing time with a mean of 48 minutes and a standard
: E" i4 K8 Z9 L' E' s4 g5 X8 b! Mdeviation of 5 minutes.1 `) l+ d( Z/ V' ]
The three machines were purchased at different times and have : N( X8 M/ Z4 Z: a+ c) d
different failure rates. The failure and repair times are exponentially + w  [. ~0 ~1 W, a+ T! U, m- Q
distributed with means as shown in the following table: ' k6 Q) p9 `; x2 B0 v  ^& u
Note The solution for this assignment is required to complete
! I  `4 ~8 M3 n/ u& Xexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 5 {+ K7 b4 z, d# i
your model. & F( K' a; w7 T6 N

3 K' n& R' ]0 x3 i" pMachineMean time to failMean time to repair
2 c; d' q2 [! z' EA110 minutes      5 minutes$ e0 T- C" |) r8 V: ~3 p  E8 P
B 170 minutes     10 minutes
  d/ h( N. E& c: N3 P9 [/ ]3 DC230 minutes      10 minutes4 z0 S( U8 ?' y: G+ Q. \8 _7 \# h
) T3 O& a& K* M9 o7 c3 m
The machines also must be cleaned according to the following % N! j; W" \/ f$ @. E
schedule. All times are constant:
9 ^1 n. c' }7 E3 j+ j0 k* j# Q  f& [5 S' R- d+ u" y2 ^8 h7 z
MachineTime between cleanings Time to clean5 G2 X1 v$ S7 F6 \  K
A90 minutes        5 minutes- o7 w& |+ ?# l
B 90 minutes       5 minutes
% r1 Y" r9 ?5 W3 ]  zC90 minutes        10 minutes& P! x7 e9 k* [, @

& h  f/ U1 V9 S( k3 @  E% hPlace the graphics for the queues and the resources. 0 u* r( A: |2 M) K3 y
Run the simulation for 100 days.
! T; {6 Q1 V5 N' X0 w9 W9 e- IDefine all failure and cleaning times using logic (rather than resource " t7 \5 @1 u4 n+ ~
cycles). Answer the following questions:
3 P, ^4 z/ N- Ca.What was the average number of loads in the waiting queue?
' \; v3 o2 Q( Fb.What were the current and average number of loads in Space?
0 X) \& n0 ]- |3 S3 x( gHow do you explain these values?
) j5 P5 ^8 k4 H- m! Q6 j

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
; |* H# q) M. v9 {( {% R4 _! }9 hsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 n# Q: z7 }! C% T$ T& `这行好像也不太对,各位先进觉得如何呢?0 Y$ h! j( m* r, u* n. Z- p
5 u( L& U& b- }* \$ a  `! V* B6 w3 c
begin P_something arriving) p( P: f' v& \% @  r
   move into Q_wait- m* v6 ]! I0 K% C7 k
   move into nextof(Q_mA,Q_mB,Q_mC)
! S$ I- S5 k3 B! L0 ~3 h. M   use nextof(R_mA,R_mB,R_mC) for n 48,5 min  C# w2 t* n4 X7 z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 Q* H% ^& w! N* [- a8 Y" \end
' x! B& L2 z  {, j3 H+ S) u2 E8 ?
! w6 V0 `# C0 Cbegin P_mA_down arriving: l% `6 l% {1 Y3 Y6 w
   wait for e 110 min
. H7 S2 S7 ]8 Q, F# S2 w7 b2 t1 P   take down R_mA* @  r- f  j' ~/ k9 S8 O1 n
   wait for e 5 min# I2 O, Q' Z# D' R5 `: d
   bring up R_mA1 ~* i/ |, \8 O. P  ?
end5 J" U) a" B. t8 G' H" C

. O$ C. m0 F# L% q8 S* v( |4 vbegin P_mB_down arriving* l9 g3 t. T" n. b+ b/ x
   wait for e 170 min
6 v; ~0 G& `9 g* v4 T3 q   take down R_mB
& ^  ^: _: v& S; z7 b. V3 ^6 x' q  J   wait for e 10 min4 d" ?6 c+ {* H
   bring up R_mB
+ [  T% t$ Y# N. {& ]- B. Vend
  N4 x: |$ j( N8 `# N8 b. E2 E& H; }; p
begin P_mC_down arriving
. E8 v! a1 O/ U$ [) {   wait for e 230 min
, g8 i. F1 s) s" {9 v! `* [1 g+ C   take down R_mC. X+ G0 {( F  `! T5 y
   wait for e 10 min
- l7 f& X8 K4 U   bring up R_mC! h; P. Z: K* M: H0 x% Q
end
' M* Q( C' n/ n, |1 @3 A; V, g- `$ b7 j) G, a( K' P
begin P_mA_clean arriving
; [( S$ f6 V$ H' e   wait for 90 min
, M1 z* O% T. i4 ^   take down R_mA
5 J) @& V9 z) t2 b7 s8 N+ S: r) R   wait for 5 min( ^. C; [9 O0 q& A( _( t
   bring up R_mA
) a. H" H6 f8 s9 z# e. G" send1 ]- ^9 X' j2 N* k0 `- Q

6 h, p+ ]: c3 _( e# k1 b# Tbegin P_mB_clean arriving! ?$ p5 d/ }4 N2 G
   wait for 90 min
4 Y1 |# [6 ~& j" h   take down R_mB3 i4 r4 s# Z1 P* F- K/ i5 i/ l
   wait for 5 min$ e3 b! t1 ~/ t# j. ~8 ?) k
   bring up R_mB$ W; P! @/ m$ A" a" q- D& Y
end
$ B1 R" k$ K8 t; d' @+ Z/ Z4 v
; G7 {8 N* i  E/ Dbegin P_mC_clean arriving
9 I: ~  g7 E$ h; |3 N  Y   wait for 90 min" l, d; s) H* J5 ~# t
   take down R_mC
5 T' f# o  R/ Z   wait for 10 min
7 T) e. \% ~/ S# b2 Q  g   bring up R_mC% K9 N; A! ^; ]7 a  R
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving  v; i' {+ _4 G' B0 E& Z
   move into Q_wait
4 y) @8 C9 A1 c8 p   set A_q to nextof(Q_m1,Q_m2,Q_m3)
- G; e6 \2 j2 i" B   move into A_w
+ ~6 z6 d! u( p5 U9 F. K   if A_w=Q_m1 then use R_m1 for u 48,5 min+ H& K4 y$ R7 p2 h9 Z
   else if .....then use ....for u 48,5 min5 X  t9 }! J" G9 w. ?" \
   else if .....then use ....for u 48,5 min  
. \( R9 y; D# ]) p' W1 O   send to die- L  `; ?, B  G
end
2 m: B7 c6 x8 n- b7 X: M
, i, ?4 V0 |- {+ K$ \% {供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-24 02:27 , Processed in 0.020828 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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