设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8315|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
- k. ~1 g; x% I' n! S( S. {) Q
( ]2 L. z' |& |: L* T; X4 a* ?底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去" G- j+ M' [1 R( M
# `  ?' h! G/ c# X7 m' s
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
( f% x6 k  ^0 r3 n  L
8 ?/ u% C+ l9 w, w. n  `9 D
--------------------------------------------. X2 \5 s0 E3 C5 q4 C+ M# D
begin P_something arriving+ U2 F& o" V/ U- k
   move into Q_wait
2 e4 P7 H) n- K) K& b   move into nextof(Q_mA,Q_mB,Q_mC)4 ~8 u6 n7 U: e4 w2 W% F9 ?
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
( R. j' j. |5 j   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); h& Y- i; t5 ~4 x6 T; l
   send to die9 v/ j5 J( n' j- i# m
end
- l8 p8 b$ i4 k! u6 s4 D2 ]

7 d; [$ Y$ G- \% e2 K1 lbegin P_mA_down arriving9 P# t5 |; a: o9 C5 E
   while 1=1 do
) E7 z6 o. a$ Y  V* X" n. G9 V   begin
; G  h' F' m2 {: {* k- P( X   wait for e 110 min
2 y5 ~5 i! [5 z2 Z' I   take down R_mA
8 B* i) ^" r3 L9 e* d  m   wait for e 5 min
" L0 B4 b% [) b' Q$ Q   bring up R_mA
6 p- E" f8 t) g$ N1 q* A   end
) h5 ?" l( i0 x8 }; x8 iend
; E, t0 z, ~. j: `
& A8 [1 G8 E3 O6 s# a, o
begin P_mB_down arriving) E8 n2 ~) y% @* e. C6 @" _& ^8 ?
   while 1=1 do7 _: b- _$ D' h
   begin
- t% R( k; h/ I   wait for e 170 min4 L7 a, r2 x6 g9 W4 L1 I' V9 u
   take down R_mB5 J( q3 o: z( e) x/ d4 @! k
   wait for e 10 min) o1 E1 A1 h" B3 @
   bring up R_mB9 ]7 X4 q# ?" U+ Z" p" V1 B
   end) g% N/ H% F% Q7 j$ s  A- n( M' i8 s
end
: |, A" @. d) ?
; }+ e) P8 V/ @4 B, B* }, _/ y
begin P_mC_down arriving
! W2 O" V1 f- y5 @' d   while 1=1 do 8 r: ]) O% a2 A: Q! m9 E; q
   begin
3 x, Z0 g, D) x. u# A   wait for e 230 min
* O& p2 @1 O+ S: e   take down R_mC
8 Z$ z! _/ w9 g* _( e   wait for e 10 min
$ K9 _1 C  B( Z$ c   bring up R_mC, r& m8 [/ E: Q0 e5 S
   end6 w4 s; h: W+ @5 Q- S
end
& }. f0 @$ V; Y& E" Y% l8 p
$ X1 ]" m7 e9 {. Q( v# L
begin P_mA_clean arriving- H/ o  C$ ?) K
   while 1=1 do
+ g# g% y5 t( b6 K  D, K; z+ ^   begin! L5 O; K- U6 K; }, @
   wait for 90 min
' `0 D# K4 {! t% P   take down R_mA
6 y' ~0 k) P* O3 J& r' P   wait for 5 min) x& E( p- S2 k+ c( ^' G, D
   bring up R_mA: r5 i- e6 l) Z+ ~4 K" C. R9 |
   end
# y8 I# Y7 D6 D* Y2 f: jend

. @1 q# W1 [( s& t, R/ J0 z6 K& r9 Z
8 o- S) G' ~* i2 k& g' Vbegin P_mB_clean arriving- R+ {- c1 y$ L2 m
   while 1=1 do$ s/ {& w/ O, j1 y/ e& Z
   begin
8 p8 H: L9 j$ D: [9 ]   wait for 90 min
" |: B/ W9 z  d0 V5 ?. H0 I' u5 m   take down R_mB
% W; p- l4 X7 s   wait for 5 min
" Y! U3 N2 J% o1 O9 u+ P   bring up R_mB
3 p5 h% r9 P2 \* Z   end
6 `/ l4 d; @2 R2 o- `end
/ @6 ^" m6 @! G6 q+ p

! v$ @/ j, @: |& lbegin P_mC_clean arriving. t! _0 P  }/ s- |& j" {. u  h. S
   while 1=1 do1 r) j; @/ B& L! l
   begin
5 ^/ Y; b3 x. [0 l+ U1 u' m8 s   wait for 90 min. D7 {% T0 k) F0 `0 E5 b! H
   take down R_mC
' h' W% K  u3 \. V   wait for 10 min
8 w7 b6 J' \# c. B- z: A+ G) X* |   bring up R_mC
5 [' }0 ^% v9 s4 R6 {1 f   end
2 x5 p# k8 ?. W- M% x+ _end
1 |, B! B  k+ N1 T7 C
----------------------------------------
" }( {1 u6 d/ [: Y  Z9 Y) f % t' l; r! g4 s" \+ M
Exercise 5.9) F0 ^) p2 @0 S, L$ Z

- e/ q/ M6 b; ^4 ?+ L" P! N. E# s* s( x
Create a new model to simulate the following system:
. B  s; L) q& x2 lLoads are created with an interarrival time that is exponentially
; Z+ G1 l6 Q: Sdistributed with a mean of 20 minutes. Loads wait in an infinite-( S" d4 X  ~7 [0 H) u3 j4 G
capacity queue to be processed by one of three single-capacity,
/ P! d/ L: L# tarrayed machines. Each machine has its own single-capacity queue 7 n& S) P7 }' h0 c8 U
where loads are processed. Waiting loads move into one of the three 5 y% y5 A9 U# d5 I' [
queues in round-robin order. Each machine has a normally & ~+ o5 |+ ?  a  d6 ^
distributed processing time with a mean of 48 minutes and a standard 0 E* H7 L) ?+ S. n1 {- e) t
deviation of 5 minutes.; A- T7 y5 H; `9 m: }4 D, h+ P. n& T
The three machines were purchased at different times and have # f" U8 b$ I' J: ?, R' y
different failure rates. The failure and repair times are exponentially
& f3 L, c4 M$ O5 M" {( A9 B+ O) \distributed with means as shown in the following table:
& l1 d5 E  g; Q9 G) h* CNote The solution for this assignment is required to complete 1 M5 U$ m- B+ M4 c& }% [4 p( P
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
, x; l! ], L) b" _your model. & j1 ~- W0 o1 O! h+ L

$ B/ n4 S+ X9 d2 b8 vMachineMean time to failMean time to repair
$ [$ Q# h) n1 j* C; J2 JA110 minutes      5 minutes5 K6 d7 A0 O7 k! V( j2 n# x
B 170 minutes     10 minutes
% z* s& d$ g. @' p- M' tC230 minutes      10 minutes+ d' h6 D* Q% q+ a% G5 G* w/ t
$ Z/ d# X+ i# d* `3 X$ w  F, t$ Y
The machines also must be cleaned according to the following , Z/ e+ J' m7 \( g" f) V
schedule. All times are constant: ; a  `0 a! W5 {: n  \! Q$ \3 s+ V
6 x" G. [- U( |! R  K
MachineTime between cleanings Time to clean/ C; o; z* X4 o1 J0 g, v# b
A90 minutes        5 minutes& `6 v- _: b& O3 ?6 @9 ]' y/ Z- |
B 90 minutes       5 minutes4 N$ ]& V4 I" M2 c( D
C90 minutes        10 minutes/ A* o" x8 @3 b, J1 Z& ?) l
% j6 n7 z- L. ~
Place the graphics for the queues and the resources. 8 E) y- a& ~! S" ~
Run the simulation for 100 days.
% ~1 Y. K5 E9 j, _/ F6 E' GDefine all failure and cleaning times using logic (rather than resource ) ?/ p: f8 n& u8 i$ L7 q6 Q) ?
cycles). Answer the following questions:# H$ O" t& B0 w& W6 D
a.What was the average number of loads in the waiting queue?
1 R% ]2 ?  |' g8 Bb.What were the current and average number of loads in Space? ; X1 H$ [4 I4 |2 `
How do you explain these values? 3 K. B* Z6 L1 U  L2 O4 Q' p

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉, X5 A3 |) l1 Z$ ~7 @% d5 V5 a+ q
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ O3 u3 I1 b# r4 z1 q, D
这行好像也不太对,各位先进觉得如何呢?, l2 j" t' E% e  T, V; T$ _

! K! K; D3 M  y! p" Jbegin P_something arriving
2 e- F# d: B9 N6 e1 j   move into Q_wait) S- B" \" s* h6 q! k
   move into nextof(Q_mA,Q_mB,Q_mC)
2 p) ?) B% _4 _* u0 v, F. O   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
5 `- U  A5 @" t, N5 [0 [# e   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 x, @0 O+ j$ q: _7 dend
' R/ s1 U6 @1 d7 y8 ]2 b6 @4 ]
# H6 s* W) v9 T) Z; S% E3 v' q5 W5 Tbegin P_mA_down arriving' g1 ^" b, m, f4 T( F
   wait for e 110 min- X, w! b) a/ `6 _% V, P
   take down R_mA7 g( W, I3 g2 [* ]' J: R8 M. d4 X
   wait for e 5 min
1 a' p+ s4 h) }) o( S   bring up R_mA# d4 U: S* W* o0 V3 o
end
9 G& ]% ?6 d0 G0 d
# S1 j  o+ ~7 _' R% Q2 ]" G  ^begin P_mB_down arriving
; ^2 p1 X7 d% C/ |* E   wait for e 170 min
$ n0 ]! }$ P' Q" i  m   take down R_mB9 Y9 `8 c7 h' Z6 r
   wait for e 10 min/ c# a2 X$ O, @! p) G* b; h' a: W
   bring up R_mB# ~7 [4 l3 p; E$ i. x3 _
end
4 w( a4 `! Z/ C& T# u: \0 Y3 y+ Q+ I" p6 h" a# R
begin P_mC_down arriving
2 U$ M5 ]" @) s7 F9 d+ H' s( a   wait for e 230 min
! q  u9 `$ a' R   take down R_mC
: f) x1 U" T) s6 P: r. a8 w6 A+ M   wait for e 10 min6 L- K9 l. [" O; F6 x
   bring up R_mC
" s! f) E% }  F! u& U( _end9 L0 P2 {! }& c$ ]- l

! m; J9 l# \) a! U' ybegin P_mA_clean arriving
6 p( ^! z6 |; ?3 j# q   wait for 90 min
% _. x- d& l! I+ ~   take down R_mA0 ^) F% c7 X$ k; j" Q' w6 }2 o- @
   wait for 5 min' Y$ y  e/ @, M, b( {+ v9 i
   bring up R_mA% v5 S0 g! u7 |* M6 E
end
2 t/ E' L) ]! }! f2 `
. `" }1 b1 S. }" L& a7 Y$ y) Pbegin P_mB_clean arriving
* i! w: I3 B: z2 l: u   wait for 90 min5 S( J& M1 u& \, X+ x7 J2 O" m, S
   take down R_mB
1 T2 E: f" n& z5 r   wait for 5 min
$ s) S" @$ |( H   bring up R_mB1 c; @/ T" [9 z0 L, C2 z
end% e+ w4 p' d! v# K( |5 c0 |; x

$ \1 Q; `- N* }/ Z: M( Jbegin P_mC_clean arriving
5 I- J! C+ W0 C) B0 V" @   wait for 90 min+ E3 _) s: ^& T& N/ N5 d5 _- Z
   take down R_mC2 a7 s- ]9 E/ u/ R5 [
   wait for 10 min
! k, h! R5 z$ J/ m3 f1 F   bring up R_mC7 X7 u) M* Q, s- [2 V+ L
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
. |5 l# O: S5 S% l. `& ~, t) p   move into Q_wait
6 s$ i- z8 E( \8 q& a' R   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ p- Y* ?! A( l! P* G6 V% B   move into A_w
1 a7 R/ r8 M5 D& X! D   if A_w=Q_m1 then use R_m1 for u 48,5 min9 H* B1 k* B+ S9 |! c6 Y
   else if .....then use ....for u 48,5 min3 Y- t3 R  g2 ]7 Q7 n7 O2 Q
   else if .....then use ....for u 48,5 min  3 J6 y# e/ @# x0 @
   send to die" H$ m' q% t8 Q0 L- @
end
& u" ?( g  m! U* O- d( {
2 p, A" g0 G- l8 f  D供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 10:58 , Processed in 0.020683 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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