设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6808|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ) C% E- @. @$ n4 t5 v* |0 X
( f; _, f' I0 J
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
7 P0 N+ I% R# i( s- @) I4 U6 c" R- w/ Z" ]; N
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
, Y6 m1 T% E4 B( U
1 B3 \1 H4 @1 A" {5 O! i. p
--------------------------------------------; R2 y6 t  q$ G! e  h8 m
begin P_something arriving* O% v) E8 {% K8 Y  S7 x3 I8 n. E
   move into Q_wait5 [1 g4 L; E& }4 k9 m+ f7 [9 _
   move into nextof(Q_mA,Q_mB,Q_mC)
4 U* n6 @( ^/ d& O! ~# r" x6 {9 s   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min) \* q; M3 I6 Z. v( Y0 |
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* ?) l9 @1 ?6 d$ |& _
   send to die6 Z% t. l" o6 N( E% c2 r( h% i% ~
end

; h# \/ l  M3 ~# k! K* h+ [ " e/ g5 d, E2 E. ]9 k  s
begin P_mA_down arriving
+ X3 L2 g$ |: v0 O  S, H9 u! g3 b   while 1=1 do
9 {( p8 y- }4 x  k) m) F7 W   begin2 _) z' q5 K& i( @, l$ q5 _
   wait for e 110 min$ k2 |) q- V0 l9 D" ~& O6 W) p: j
   take down R_mA/ u1 ]& P  O' E+ m& s1 Z
   wait for e 5 min* ?/ F/ o* w, f$ p
   bring up R_mA
, ^& y; [$ c5 H3 n1 Y: |   end
0 V9 O6 U$ g; c7 [end
, l. T: |7 V" Q1 h* l  E/ A+ g7 b

) k" d: y9 W/ O, a' ]$ H4 hbegin P_mB_down arriving
3 Z5 w* n5 e# g5 i/ ]. F3 z   while 1=1 do
: F$ }7 U. n5 }( I  D. X   begin3 E5 ]9 {" J+ W
   wait for e 170 min; l. z; ~, w# n4 g; V9 ?5 T$ i
   take down R_mB
9 k' t" n. I- E* f. P6 o0 W   wait for e 10 min
: e- d; Q2 \: h; \- U6 q5 I   bring up R_mB0 V( G: Z/ S9 M, Q1 A; j
   end
8 V! I0 V* Y4 |end

$ o' n: l# c' `7 W! Y
/ r  `& C( ^, `" p0 |4 ^begin P_mC_down arriving) [8 B8 J/ i8 Q5 u  Y
   while 1=1 do
' p) ~. @. E3 U* T8 c   begin
0 u3 H( Q( I" r7 f   wait for e 230 min
& i  y1 d) G9 F   take down R_mC' p7 d* s- L/ Z. @, ^5 O" q9 J7 {" P
   wait for e 10 min
& j- o6 R; n& C" }6 t   bring up R_mC
, f3 P# X: k9 z$ |   end
* S' ]( |7 t+ g$ a+ ~end
% c% U% y3 C# \  s0 G1 t8 k6 h  I
2 P  D4 p1 T5 C1 U5 O
begin P_mA_clean arriving
# U. N; N& m! \( o, S   while 1=1 do
8 L3 \( i8 Z/ o   begin7 a$ H6 Y1 v: C# a. {" \
   wait for 90 min2 b3 p, Z& T# r% ]* T
   take down R_mA2 L7 `5 T% x; ~  Z- A
   wait for 5 min# z* W  Q* B+ ~7 k5 B  z
   bring up R_mA, L9 n% T) F8 ^/ P0 N5 e7 O& q* m
   end* Z6 S. b/ \; n8 p+ Z3 ~2 Q
end

3 e  j( i/ p$ k5 A4 I$ J
8 y# i* e- E/ k, T6 c  tbegin P_mB_clean arriving
" O1 L1 K5 `/ E; V& {   while 1=1 do
" L  C3 C# s1 @8 Q6 u, d+ ^# L   begin0 t, h% \+ S% Q4 d" U3 g
   wait for 90 min
7 m2 J- L8 n% i" L$ w, d- [+ S   take down R_mB. {8 f$ M- _  M: B
   wait for 5 min
% P( `6 |% i. ]; l# u8 l   bring up R_mB8 c$ a/ z5 ?) ^5 `; i
   end
# Z' E9 f: n' v4 Y( m6 C1 m3 Kend

/ N9 g2 X! x1 T$ _) P+ | 2 t2 S% L+ d9 F2 G
begin P_mC_clean arriving
/ G0 ]# y, h3 U# J   while 1=1 do' W* x4 i$ A  o( C
   begin
& W% ^/ \* s2 Y# c' [   wait for 90 min
, @/ u: r6 t/ r1 `3 X! o: F$ \4 K   take down R_mC
) X. T6 [: x* w+ u- K7 \" t6 ?   wait for 10 min
7 H8 y. G2 d8 _: I* A   bring up R_mC
% T6 q' {& B. w   end- u2 x" K; @6 Q: Q; q
end

" c" i/ l$ n+ s----------------------------------------, X6 H) E- O" g" v

5 S+ P# O: G/ x& `, pExercise 5.98 W7 @6 C9 K/ ?1 W0 }- W9 g
! z  l6 K# U. r' `8 x: h' j, a! B+ d
9 a5 L! a5 _! `8 n) l. j; V
Create a new model to simulate the following system:
1 S6 x% ]  ^% G! U4 U% X& w9 XLoads are created with an interarrival time that is exponentially
5 h/ Z. a0 I6 e+ d  idistributed with a mean of 20 minutes. Loads wait in an infinite-
# i+ o! I& x$ `7 W8 p: j$ Jcapacity queue to be processed by one of three single-capacity, / {$ i1 N2 ~9 h6 h% D4 `( \/ G
arrayed machines. Each machine has its own single-capacity queue 6 X2 u. g3 j$ t: \
where loads are processed. Waiting loads move into one of the three 0 Z! E- X& ^4 I# `2 n; t
queues in round-robin order. Each machine has a normally
/ Y) D. j) X" h0 E1 q9 ?! S8 c$ ydistributed processing time with a mean of 48 minutes and a standard * u/ s; T! n9 Z' }1 B
deviation of 5 minutes.# i$ e- z$ x: N1 d2 U/ T# R
The three machines were purchased at different times and have 8 ^+ S4 @5 S* |0 s6 @, E1 ~6 q/ k1 I: ~
different failure rates. The failure and repair times are exponentially
6 i+ X# f0 \- T7 @* Udistributed with means as shown in the following table: ' R3 A: n( u1 u: s& U; ^* z& q
Note The solution for this assignment is required to complete % T4 J7 ^; K' I
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of & j$ l9 Q, v: ~
your model. % G( o1 S( a" o' u3 e8 |
$ A) p* R9 u3 U3 M2 P
MachineMean time to failMean time to repair7 D0 }) q1 s* G! H% b% \0 t
A110 minutes      5 minutes6 V2 [# l/ M- v: H, y: x+ k/ S
B 170 minutes     10 minutes
( f* r( Y! W) F/ E, cC230 minutes      10 minutes
8 g+ G3 B& x- k  t: [) U/ j0 ]3 `$ m. e0 C; @5 [
The machines also must be cleaned according to the following $ \& z. Z2 \2 `; j. p
schedule. All times are constant: ( a# p9 L( N& T

$ L( K& o2 q6 G7 k7 `MachineTime between cleanings Time to clean7 a! {; U5 w  P5 Q+ n
A90 minutes        5 minutes
9 t) F7 k. g/ C4 L9 P8 r  XB 90 minutes       5 minutes. u' |& |4 ]0 F  M; L  Y- j; J
C90 minutes        10 minutes
' d- ^6 R" l+ l% o
: c! q0 m: y! C2 t$ R. y; K+ ^Place the graphics for the queues and the resources. 9 c+ j) ?7 P9 A- u& o, T. n, M
Run the simulation for 100 days.
* S- L# n. R$ M+ S' O. gDefine all failure and cleaning times using logic (rather than resource 6 K1 W; \# C! F" x) }* g
cycles). Answer the following questions:" h) A* z, V9 `
a.What was the average number of loads in the waiting queue?
, G8 T/ C. Y# x: t; s0 N6 K0 Pb.What were the current and average number of loads in Space? 5 I- [+ C7 t2 W6 y
How do you explain these values?
% r4 {, t' h& {; M3 m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) o! e( t7 U2 C0 b) M! t- v: _2 h
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! s+ C$ w/ r' z7 L7 {0 ?9 g+ X- ^这行好像也不太对,各位先进觉得如何呢?9 V4 J+ T1 H, P- ~! c" p

3 T9 F- d0 V) z3 ?0 hbegin P_something arriving
0 R$ L& t: N* N8 V   move into Q_wait
( u2 W* s8 |+ u/ L   move into nextof(Q_mA,Q_mB,Q_mC) ; N( S3 j( c$ S" w$ J
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
2 `1 V; j% L  O" L, @8 w* Z8 f   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 R' [3 C6 B2 A, t  q5 {, bend5 g. E# M' I4 y9 ?, Y9 q3 V
0 F7 \' E7 n1 B1 W; |
begin P_mA_down arriving
( V3 H6 {2 h+ p+ ]; R   wait for e 110 min
% e8 a) c  ?$ |5 r/ A. P   take down R_mA* Q8 Z# O# x" {0 O
   wait for e 5 min1 `% i/ m0 V; Q- ]6 {
   bring up R_mA
0 _* {0 O( N: M  e' E& a1 q$ |3 ^end, A2 @' {1 O. ^' I
/ [; M1 r4 A9 `. ?1 w; L! H& o
begin P_mB_down arriving
8 E' ^' `5 g# Y2 H$ `   wait for e 170 min
+ ~" m, d5 _. [   take down R_mB
& E* J1 m2 K) Q, J   wait for e 10 min2 s7 b0 p! J  d1 P4 ?6 o+ v: |" q
   bring up R_mB
7 t2 Q6 G) [3 g- u9 `end+ P0 o/ B0 s- G8 Y: V8 c
# t: g6 k$ d. c5 }0 J1 d
begin P_mC_down arriving% x: ^- b( d/ J/ y: m0 b' a
   wait for e 230 min' w# _1 _$ r% {4 Q
   take down R_mC' e7 l. D) v- F* h3 p
   wait for e 10 min' `8 s& j7 [* F) W" ^: W/ f9 `
   bring up R_mC
/ j, Y! j% R/ ^+ hend8 m3 D6 c1 a+ c7 y8 T  h/ ^, @
2 O1 g: L6 c: j% k! A. h* ]! r9 o
begin P_mA_clean arriving, }0 `- G2 J2 x4 A0 V
   wait for 90 min) w3 g: \- p% w: Y! @) o1 F, c
   take down R_mA
7 v3 |% u) W" `9 R   wait for 5 min% H: p; q7 m/ V! f& {
   bring up R_mA& H5 e* r3 _8 W
end
9 j. y! w6 ^+ C. n
3 n9 @2 ^5 B" Z: P" Mbegin P_mB_clean arriving: o' n3 r# j+ F3 j. }; Z
   wait for 90 min! M# b) p& S% W: n) @: C
   take down R_mB
# g. |3 E* N4 C) C/ I   wait for 5 min: Q$ u2 ?4 D7 ^0 e+ f
   bring up R_mB) {; m2 T( C3 y9 C
end
% [0 k5 l+ ?4 f+ {9 Z
7 b6 t; F# x  i  @- _5 rbegin P_mC_clean arriving6 q' q& C1 S8 U
   wait for 90 min, X% i1 A0 ~5 r- U% Z
   take down R_mC
5 L: A5 o$ A, C4 z: W$ d   wait for 10 min
% Y+ O, H+ K! V9 o) O  b   bring up R_mC
1 Z. _) C0 m; pend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
, y. _3 s. C( N2 J   move into Q_wait
0 V' t$ j7 E5 Q" U  s1 ]. ~8 m   set A_q to nextof(Q_m1,Q_m2,Q_m3)6 [5 o: ]# F, H& S( X
   move into A_w  ?; u' y$ {6 }* j5 _! F1 c" T* A
   if A_w=Q_m1 then use R_m1 for u 48,5 min
) [( d5 C! p+ z0 ]4 ~6 K( K$ O+ l   else if .....then use ....for u 48,5 min' l9 f. _' ?! ?5 i4 W% Z
   else if .....then use ....for u 48,5 min  0 N, S+ ]% `8 i5 `! R$ E3 N
   send to die
& g1 J1 X( b# G; B* d# U7 l6 u# nend
/ N, ^- v' u0 h6 M, }) l$ n
/ |. z4 v8 N( \供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-3 06:55 , Processed in 0.012450 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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