设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7990|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
: T1 p8 A" [$ v, r2 L$ A9 ?/ D8 @; y% V
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去- s0 g* |4 L( A" h1 ]- f" @) }) ?# c9 G
; ^; i# ?9 |; P& x# f, p+ d
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!1 W# U! t. x, S; s: K

- e( j  K' N! \2 S3 J( V
--------------------------------------------# Y7 M# T' f9 _4 |
begin P_something arriving
1 Y( ?( B# [0 o6 s   move into Q_wait
0 N% x* n  q0 P7 _: m4 B9 B+ N" ]0 e6 n   move into nextof(Q_mA,Q_mB,Q_mC)6 E. R+ K: f% K
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
& s1 }0 P* h% z- l  t+ f/ G+ @   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); K" @9 v: A3 `# ?* S5 \
   send to die
3 s0 e  ]5 }" Bend

9 C7 z( |7 w9 @ , R" {0 h  N+ D5 M" l1 q
begin P_mA_down arriving6 \" V# C1 f/ q" M
   while 1=1 do ' t! P0 o/ }( [# f8 i
   begin
. t& D) ]' Q, d' `% `6 _' p   wait for e 110 min; m8 D: I4 u# a. k4 z  E/ n2 Y, ?
   take down R_mA9 W2 ~7 S0 }% c$ W. e
   wait for e 5 min
( h9 Y% i1 k# M- k/ {6 \   bring up R_mA
8 \. V$ I% ^" j   end
3 g6 l0 l5 Y) n+ E1 i3 x0 L& Hend

5 \$ j4 k9 r; L, c' S- U
' G, f: \9 A: v( }7 E0 ebegin P_mB_down arriving5 a* ]) H' ^! O2 @7 N/ z5 |; t# O
   while 1=1 do, x) C" e+ Q, [- `. w8 X3 h
   begin  ]3 j+ B8 F2 ?+ k
   wait for e 170 min
: `4 B) T) o6 Z   take down R_mB  r; `/ E1 T5 c6 s5 |
   wait for e 10 min
% X+ c! r, u. Q5 S+ o  H1 B   bring up R_mB/ D) b$ P" B* r( ~9 t" S
   end8 A3 p, N0 M* C# k0 S
end
8 e% o. j0 E5 Z2 o1 Y3 q4 Q
2 x9 v3 U$ l* X
begin P_mC_down arriving
) b  O8 F, K" ?' T* }0 E   while 1=1 do 1 b) u1 X* v$ _& F
   begin
8 W2 O: s9 x4 b   wait for e 230 min
: S, f1 G9 `& W/ N% J8 v   take down R_mC& Y5 v! z* @$ M8 t5 K; N
   wait for e 10 min
9 P+ n& I6 x/ N* I& @) I& J+ d   bring up R_mC
; C3 ^# D2 b1 V   end5 O) L2 C& A# z% A1 w
end

! i4 I" _) Q8 d% a0 K 6 N- t0 T5 p- B+ {6 O
begin P_mA_clean arriving6 S6 g6 X$ S  a/ d1 R7 q: U
   while 1=1 do  ]+ x$ ~4 ?1 H1 r+ j
   begin/ w) ]( o7 u0 I  b1 g$ r- [3 s& K
   wait for 90 min. ^5 U- n( w# ]5 m
   take down R_mA
4 Q( o, K( Y: Q; [. ]9 l   wait for 5 min
0 s! ]$ f8 ~% ?, E   bring up R_mA
" ^: F* l8 V: ~8 \6 V. @3 Y! x( @   end
5 {5 a% B& r- b) f$ K' _end

: S5 p/ D! D- i! ]6 O- T9 t8 v
, H, K  b( U7 Cbegin P_mB_clean arriving- L; K& \& n7 e' M6 h4 J
   while 1=1 do! ^9 o! ]. [) c7 v: E
   begin
1 }4 G5 U) u: f( h+ b   wait for 90 min
1 y6 o: J/ @+ @% ^6 j, F   take down R_mB8 ~+ O! \# U$ e' |/ f
   wait for 5 min: X) H) N4 ~8 \. K3 M
   bring up R_mB7 d( H$ {: J1 f/ W. j
   end
3 s3 R: G# E5 Iend

" [  {( E( [8 x2 U+ _5 { 2 k7 X; Z  J0 v$ A: B6 K/ [
begin P_mC_clean arriving
) A6 H% z3 f% t0 E% J/ B   while 1=1 do
! b. i+ o+ N! a9 h: B& w   begin4 V& k* X  X4 {' r7 |7 p
   wait for 90 min
5 a* d) D. ~0 `% C- ]   take down R_mC$ _5 T. q) U* p2 h( v! B
   wait for 10 min
( t. b$ @6 D- R! x, V6 E   bring up R_mC
: [  c# A( ~& R. G$ O" U   end
. c( j5 g, T9 Y/ i3 P* Iend
/ y2 ]! }* g( @0 T7 m
----------------------------------------  g) e$ L" q; ]
' Z8 U5 I+ b3 u
Exercise 5.9% w! t' u# Y8 S$ `+ r  H
" z1 c6 w3 A1 o. K
0 |+ F) f7 ?* U5 {* u3 z
Create a new model to simulate the following system:
! U, T" S' c3 X; L- d, pLoads are created with an interarrival time that is exponentially
( ?8 ]( s1 M$ Q2 Ddistributed with a mean of 20 minutes. Loads wait in an infinite-2 ~* G; X7 F4 g# ~
capacity queue to be processed by one of three single-capacity,
. T" ]+ X" {% farrayed machines. Each machine has its own single-capacity queue
( X5 _5 M; a! c2 A( Z. {where loads are processed. Waiting loads move into one of the three
9 w5 ?* _! K: l- k; l! ]6 }8 Fqueues in round-robin order. Each machine has a normally 2 o+ J5 Y/ [8 H4 c; H3 }7 f
distributed processing time with a mean of 48 minutes and a standard 4 z3 E) Y: O& U
deviation of 5 minutes.
, E5 w9 H" b3 yThe three machines were purchased at different times and have 8 N7 M0 v, A( X7 {
different failure rates. The failure and repair times are exponentially   r8 ~: F( ^+ P/ Y- }6 T) ?
distributed with means as shown in the following table: 7 s- r( u0 X/ z! ]/ @$ l7 p
Note The solution for this assignment is required to complete
) \9 U" J# E4 Lexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of , b, v# a; A) {( h
your model.
$ x7 f7 Q( I! v6 }( t6 x9 V& ^7 `0 v2 D5 z6 R, y1 Q  c
MachineMean time to failMean time to repair
: X2 T, {  J& B% h" X2 @1 BA110 minutes      5 minutes8 b, `3 v" |8 k2 e  b9 r2 M
B 170 minutes     10 minutes% n: l' A6 {% W6 T$ t& L6 w
C230 minutes      10 minutes. ~& h3 r, v8 e$ ]4 `6 j! `; V
) s' `' F  C/ R+ Q4 Y
The machines also must be cleaned according to the following
+ e( [: m6 \. }+ e% oschedule. All times are constant:
" ]+ A  ^; x! ]  }1 L, g9 Q; F$ `2 M' F  z1 v: @
MachineTime between cleanings Time to clean
9 J3 F% _/ \4 A* i* v) H7 BA90 minutes        5 minutes
) Q8 |3 Q: {- ^B 90 minutes       5 minutes
' U" |% r7 N" K5 y5 F! iC90 minutes        10 minutes4 @8 I1 E+ {$ H

5 e3 ], s4 b# T' F: p9 K: B7 MPlace the graphics for the queues and the resources. ; X3 Q& T7 M: |- f2 ^2 k2 x
Run the simulation for 100 days.3 J% U( h/ o  v( h8 T
Define all failure and cleaning times using logic (rather than resource % t, B& W) ~( v7 t+ Z
cycles). Answer the following questions:3 I! ~  K; Y  ~- W4 O. h. b0 j0 V
a.What was the average number of loads in the waiting queue?8 `, f7 y5 z2 M, X# i6 ?( g' n- v- k
b.What were the current and average number of loads in Space? " M5 @& ]; r% \* t3 ]0 ?2 d6 {
How do you explain these values? % S4 L# x% u4 W6 Y1 E) d8 l$ T

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
8 @; K% T7 g6 Psend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  V+ B& W6 M6 l( k, E
这行好像也不太对,各位先进觉得如何呢?
; ^4 n8 h6 n. Q: l3 ?
2 g* P& U/ b3 ?3 W& H: j8 R" F% q4 Ibegin P_something arriving
# L5 b4 b# M2 K6 l   move into Q_wait* e/ S. \& b, O6 J& `; y
   move into nextof(Q_mA,Q_mB,Q_mC) 1 d7 C! p& J6 W* ?* x# ~, `$ l
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
# F5 \% F* s/ ~$ v& K8 |+ }   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 1 U; \& a& U8 X) W
end' Y5 H: \: t4 L9 }% F( {
# R6 b0 u/ @. e, I) Y
begin P_mA_down arriving) S7 [7 ~/ V! N. Z/ m4 {9 k
   wait for e 110 min) F+ y) ~( g4 D+ U- O7 @* O
   take down R_mA
& E0 {+ Y0 K9 w5 H7 A$ o  Z   wait for e 5 min
- N6 R2 p0 B; k   bring up R_mA
  N' O: x) \' u; E" lend
( c, A$ k4 X: w; w5 C
! [* F. l: J+ l6 fbegin P_mB_down arriving! x. H9 a4 W8 a8 F2 L$ y& j
   wait for e 170 min5 V% U1 I# {" a; w- T1 c7 H
   take down R_mB+ i5 j% j( @$ S  m: h; m1 O
   wait for e 10 min4 L, h/ z! A: ^5 i; b% M1 M4 I
   bring up R_mB
" G7 F. I+ w: d# }. h$ Vend
7 L4 K; }8 o: \: ^# W! G
6 F% K5 m( i# ^- s; R# F- mbegin P_mC_down arriving, Y3 P- F5 N& }, D
   wait for e 230 min" J% j$ k4 U3 @' w* R* c
   take down R_mC
/ [* |$ z9 q. {$ i, m   wait for e 10 min
" h2 d" {, V# B- I7 r   bring up R_mC& P$ l* ^$ Z& w% B  }; ~' M  \
end
$ Y# n( A" z: u
4 L# Z. R6 l& L# Q  Y( }1 ?! Z1 ybegin P_mA_clean arriving  t$ i4 ^  B/ R
   wait for 90 min
! U+ X: r* @5 e7 d' r3 ?& L   take down R_mA
7 J- i. l0 a0 w, f# ?, H   wait for 5 min* Y1 M7 {# G1 _+ u/ u. N- _2 M
   bring up R_mA
4 M) O8 Q7 @; ^end
8 x; @( I+ \$ Z$ \/ k/ t; @) E; k9 D9 a- K% e+ }3 ]
begin P_mB_clean arriving
/ I) u, {. i" V% y# G" d   wait for 90 min
. h6 ]" q, B' @! Q) c9 F/ y   take down R_mB8 o1 [0 e% H0 M4 T( e
   wait for 5 min; t1 Q' k" I1 o$ w, J
   bring up R_mB
5 ~8 J  \8 Q$ c, \- p. P3 Oend
+ t& i4 w! C  p, }- n7 [5 M+ |* x) e1 P
begin P_mC_clean arriving5 |& t/ N! C5 [/ k. c' f: d
   wait for 90 min7 C8 N" p) B; l2 W: C6 f
   take down R_mC! k! u6 Q* W: l: H( O4 h0 Z' |7 \
   wait for 10 min4 Q. a* x( s! v2 |- }
   bring up R_mC" D( ~! P) H. `* a4 a6 N: f
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
+ a! d% E, b  t2 G5 y   move into Q_wait
, W- A1 W  b8 N2 i   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ y' h; `3 w6 e, X0 v5 K   move into A_w
1 u' q# L! Q& K4 E8 D   if A_w=Q_m1 then use R_m1 for u 48,5 min$ ^$ E$ M0 k6 l+ ]6 n% }: B
   else if .....then use ....for u 48,5 min
$ g+ j, d, [1 G$ j: g   else if .....then use ....for u 48,5 min  ! F7 G* P3 u1 H4 k
   send to die
$ U* h" f- @4 S$ J4 E# iend
6 T7 {  L* M0 T+ ]# \+ F% s3 A' W2 E# W. p  S# q+ |0 O" ~
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 04:02 , Processed in 0.017580 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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