设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7549|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! d, z7 j- k# `% ]1 `9 w" W8 }6 l8 k3 u- ?
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. ]. ]2 B3 B) O& U

5 ?. @7 f0 r( x8 y9 _不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 a# B* C5 Z* M9 T4 D" M. l2 ^
( H9 }5 |* g$ ?6 l# S  i. w
--------------------------------------------
- c# h- @" i4 S8 |" K; jbegin P_something arriving
. o% [/ B: I: H   move into Q_wait+ [% E$ Y) ^" z# r3 ^$ l
   move into nextof(Q_mA,Q_mB,Q_mC)
1 E% A1 R  C- V, B6 ?" q   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
4 T# e% a& {( O1 ?0 w2 T$ A   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 ~% e& k9 i( o* l
   send to die7 s8 [. J/ \% U
end
# ^0 x) ^( M2 \3 [0 `( }
3 {2 O, v0 b* a# Q: V! M9 e
begin P_mA_down arriving# `: A( N( q; g; Q1 ?
   while 1=1 do 1 i/ G+ z- r0 U( \( S  M7 G' D+ C
   begin
! Y4 `  W6 C2 `   wait for e 110 min
- A/ I1 U, X( m0 b   take down R_mA
1 l1 N- ~: @( o- O   wait for e 5 min
# d9 N8 q# @. c$ N6 M   bring up R_mA
& t+ g; }: A- w. R$ ~9 q$ e6 t   end
4 h4 R% c' g  B/ A' Kend

5 B. Z+ u, y$ R; I; H ! a( f- L& u. ^, x
begin P_mB_down arriving
" P8 D* W( f' W3 n% }2 @   while 1=1 do& W) I5 h' Z# F  [
   begin
6 q4 Y9 S, V' `* ?; g   wait for e 170 min
3 ?! h' f5 Q' c' ?# k( a5 P+ @   take down R_mB7 D( {: H' q0 _6 P; ?
   wait for e 10 min7 k# q9 s) [, K
   bring up R_mB  M; x) B2 @. D- \
   end
2 d4 B' s& u1 ~6 ^8 Uend

. s' |1 }  P9 w' J, f* J4 a& v( S8 v9 J 8 `1 n$ X. G8 y5 ^- K' w
begin P_mC_down arriving
5 z  n$ w3 w: v2 B" T6 g* C4 x2 S   while 1=1 do
2 W% w$ Q7 I, Y/ L9 f  x0 ]   begin) k6 V$ y1 w* g% [$ ~
   wait for e 230 min
0 d9 G8 ]' }  ~. }9 `5 m   take down R_mC! G/ L4 e* ^1 K' E
   wait for e 10 min3 Y7 L4 ~/ F6 b* ]5 f
   bring up R_mC
% X$ ~2 {7 ]; u: N5 Y   end
6 q* ]0 o+ A, ]5 c, }7 uend
- V! _8 E7 T* \9 o  ^6 i

( t& ?1 J( v( U, P4 kbegin P_mA_clean arriving
4 p2 ^9 }7 e( q% u   while 1=1 do2 E" F8 f# }$ n
   begin# `% k) A$ |$ j) a. @+ ^
   wait for 90 min% Q9 X: ]# M! s( r8 M  y# L; }# _- n- q
   take down R_mA0 b1 c$ G, B( z; M9 ^7 B
   wait for 5 min4 x! ^7 m; C4 D0 D( r& d4 i' a
   bring up R_mA
/ I2 W8 [  Z# d1 }# c   end! Y3 L0 A. `' y# R* v9 X! z
end
* W7 t7 V5 R9 X2 t

4 W+ g9 g7 u- f7 M' c$ u  Kbegin P_mB_clean arriving7 b6 J2 Q4 J# e( o
   while 1=1 do
6 `5 g* U' E1 ?5 H; A: s2 V+ @* f   begin
$ c' S' V$ o0 N; o$ f, o, o   wait for 90 min3 Z5 A2 u6 w8 ^
   take down R_mB% C. |: t' B$ Y* r& @" T6 f
   wait for 5 min+ c! ?- W, E) |, T8 _
   bring up R_mB2 `6 Z/ T3 v5 G) _+ {
   end
7 c2 s7 ?, h1 n  |end
$ Y& x+ x4 ^, e* X+ ]

( X& @/ ]* r9 ebegin P_mC_clean arriving4 W" x7 J& g2 b  I% S5 H- Q/ L4 E
   while 1=1 do
; L$ j* Q- g! c   begin3 g  v6 p3 |' [& |, Z) P4 E
   wait for 90 min  k% Z5 q7 J/ ]4 A+ f6 h  m) C
   take down R_mC% z: I2 u( C/ n* @
   wait for 10 min9 g7 y* e0 b4 t. H& v$ S" M6 s
   bring up R_mC# U3 n' j! `# `2 z4 S
   end& W6 G  ^2 f* ]- X' q: B& g
end

1 y7 [' n, u# b8 G, H----------------------------------------
" [5 r# S% |5 @% v* d6 N; j' R3 M " e' n! ^, u* d4 h4 }4 J8 N
Exercise 5.9! K3 y# _. A/ p

- }0 X% D1 _) Q2 U; z2 [$ J, p, q
Create a new model to simulate the following system:
: e) O" v6 p5 rLoads are created with an interarrival time that is exponentially ) W7 {7 |# l, j+ q% d' t8 N
distributed with a mean of 20 minutes. Loads wait in an infinite-8 Z2 j' _' F( j
capacity queue to be processed by one of three single-capacity,
# }+ p6 a1 u7 zarrayed machines. Each machine has its own single-capacity queue * M- W0 p. c' R4 ?7 t+ b
where loads are processed. Waiting loads move into one of the three
9 S0 G7 v5 J/ |8 lqueues in round-robin order. Each machine has a normally 9 l# u$ g8 m! W4 O
distributed processing time with a mean of 48 minutes and a standard ; c# Z, E, ~" D
deviation of 5 minutes.
* k) }4 J3 O/ b( M  `5 @; d* h. mThe three machines were purchased at different times and have
/ V( j& R( u# C7 S( s6 }different failure rates. The failure and repair times are exponentially
2 [8 n( ^, s$ P! j0 w4 z. _distributed with means as shown in the following table:
- G4 g3 J2 T; i1 E1 N# G" n2 v. eNote The solution for this assignment is required to complete
# e' @1 U4 w6 A; O: g$ xexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
4 f7 n' ~; g! h( k! E* Zyour model.
) c' t+ k3 \/ Z' x* y$ v
* y: K% @! P( m& A' nMachineMean time to failMean time to repair
& f: v" |5 ?1 |+ bA110 minutes      5 minutes! U4 L. o1 L* A* U0 I
B 170 minutes     10 minutes! M0 `5 L7 _  v" t( q  c0 _, o  G; t
C230 minutes      10 minutes
% U+ V/ Z4 Y: @; j% }! P& _2 P7 b, s+ c
The machines also must be cleaned according to the following ' b2 r& x7 n* ]+ O% \+ F$ W! V) A
schedule. All times are constant:
$ v% K1 [2 Y3 b' U. R) [! S
; a- o6 |8 Q6 ]9 [- QMachineTime between cleanings Time to clean
- |% e8 ]& k5 n! \5 hA90 minutes        5 minutes6 q9 q' t6 R" l# r! d8 n, X
B 90 minutes       5 minutes! z- r4 H5 Q* I+ `: W$ N5 H
C90 minutes        10 minutes
0 [& [8 h& R0 r% K/ n# q) b8 X  _4 X9 [5 }1 r
Place the graphics for the queues and the resources.
8 J0 B5 j3 X8 n% s9 yRun the simulation for 100 days.
) R+ Z' Q9 R- o) ^* V1 sDefine all failure and cleaning times using logic (rather than resource
) ]9 B* P/ q5 F' K+ vcycles). Answer the following questions:
7 }/ `9 X0 u7 ]# w% N2 z* J; o! N) ja.What was the average number of loads in the waiting queue?
9 l4 u. L# W. _6 [b.What were the current and average number of loads in Space?
0 H8 c, |, t+ C% @1 p; gHow do you explain these values? ) S( E1 ^) K# O3 I

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉. w" \# i# |# _; b& k4 ?. w
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- j- R- L, x8 \8 z2 O2 i
这行好像也不太对,各位先进觉得如何呢?
, \& |) s4 k/ f* p  z$ N
2 V" n; `  o! j# wbegin P_something arriving/ L; S3 M# {" I4 o% m4 t
   move into Q_wait* ]% a5 v% b9 A5 h
   move into nextof(Q_mA,Q_mB,Q_mC) : w4 y/ c9 j9 P
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
. z* k5 O: Q$ Q0 o6 j& i" D   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& F9 e! z& _7 H1 {% r* `2 mend
: L/ }" J; w& c' `4 w
) l3 L+ Y/ X- N- S' Ubegin P_mA_down arriving
8 `+ a% v% I6 F% g  `) i   wait for e 110 min1 {- l$ c$ m4 F; v( S
   take down R_mA
0 ~, c0 O2 y' h3 V, o   wait for e 5 min
# S9 w9 X! K# r! D8 f! f   bring up R_mA9 Q8 z+ e' R  J) J' I, Z
end2 n: g, F; h+ y( p0 `, _

; o0 g! j# Y5 y, b# X0 B1 Ibegin P_mB_down arriving) @# W1 F& x6 U4 C" Z. `
   wait for e 170 min
( ^( ?1 p6 l" n% e  o   take down R_mB3 T- a1 y0 b* F( |4 R  W
   wait for e 10 min
8 Z" c/ `* P4 A. q( y4 H; |   bring up R_mB$ w4 y( b9 s" U* C) }; }
end
3 R. O$ D+ T) i2 }. |
$ d. Q/ X7 M( J% O6 N- f5 xbegin P_mC_down arriving0 H. M- I# z& W2 L
   wait for e 230 min9 q( K* Y* ~" j3 R. i
   take down R_mC
+ ~# L0 q0 m. e1 W  q" D   wait for e 10 min
2 l" N5 ^* n9 f! ]/ D   bring up R_mC
" p  M# h+ N( B& A, F) Send% R% m$ W$ `  f; u4 y* S$ d! l' Z

8 r7 V* z( w* P$ Y( [. v. gbegin P_mA_clean arriving# W% n& N) [$ V7 ]' M
   wait for 90 min
3 v8 z* c2 M: f0 V   take down R_mA4 @& c7 m! f+ |' R4 F# w4 C
   wait for 5 min
2 r1 b$ e9 ]4 n8 V3 ?( D% b   bring up R_mA) e# d* E5 w/ R7 |
end3 \3 V& p+ @" Y& C2 {7 i- O

  q! E% l/ C- G2 c; o* Mbegin P_mB_clean arriving
, w+ ]8 ?3 {" H. J   wait for 90 min3 O1 e' g2 O- F1 e
   take down R_mB: ]2 J' R6 P* H* x/ K
   wait for 5 min7 \4 r  w* B7 L) K
   bring up R_mB
5 r% z6 _9 U0 l: j' uend
- d, X* ^4 l+ t$ m+ O- K( U( P2 ?* O
begin P_mC_clean arriving* _0 u' C. L; S& v
   wait for 90 min4 M7 e  s5 @' s( j5 y' Y
   take down R_mC8 W9 u  m* Y3 ~6 B5 B2 V
   wait for 10 min
+ w6 t! N7 s! ^   bring up R_mC
/ |7 R7 `% Y1 H, u- X- Bend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving& S1 S5 I; x  r: c* I! l% b
   move into Q_wait
! ^9 |! X8 s! ~( r* V" N6 U  F   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ K; _  }. |" j6 x) Z% ^3 @
   move into A_w
4 K, H' ~8 A+ k" G4 D( w* v' S   if A_w=Q_m1 then use R_m1 for u 48,5 min4 Y# z; S- R8 u. {) W6 J
   else if .....then use ....for u 48,5 min
, P: X) J6 X; F  l+ w. F) a   else if .....then use ....for u 48,5 min  6 R) R% @! N) ^; C8 {
   send to die
% z- ]$ I* t$ Q. Tend: C1 d: `$ P' s. ?7 a  J6 h$ G
0 Q" t8 M0 W: A2 C
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-12 23:53 , Processed in 0.014093 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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