设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7110|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ( u1 Z* \" j) ]( Z  F* i

' E' f) N8 C" R. ^底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 h$ L9 S& T6 W: ?8 R7 ?
  {$ [5 _( q$ I3 @- X
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
" _- u3 g1 S; m1 R
8 a4 j6 E' G6 k2 O  T: c
--------------------------------------------
, W) E) c9 u( X8 Gbegin P_something arriving! v! U* a( R) V  o, [, x* k
   move into Q_wait
" y: h& }' \& v, ~/ s4 y/ M9 N   move into nextof(Q_mA,Q_mB,Q_mC)( Q" Q0 C0 I- `, e
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ k- C. N' d$ ]& b$ F) p+ v# q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ J' e! E" Y7 t) S. l
   send to die
! c' K+ H* i6 t9 M3 Zend
5 k1 P; c: k% }  G( ^

0 c8 R& d& Y4 k9 g7 X6 kbegin P_mA_down arriving
9 }+ H# O2 [7 T; L  M$ C5 x   while 1=1 do 7 Y2 j* H0 p; S- b* f6 ]% V% g: ~
   begin
: M+ |1 z; U) a* p   wait for e 110 min
7 n# ^! m4 q% l; e" Y   take down R_mA
6 y8 A; @3 b# ]- M; \   wait for e 5 min
: w* L% \& F) T8 N  R7 T   bring up R_mA3 W. b) Z6 v/ Y* }7 _" H& m
   end. c4 N. Z( L/ B
end

1 i0 Q' C# @3 W
3 i) y. @8 J$ [7 G6 m! v! Gbegin P_mB_down arriving0 q8 B7 {9 r0 C$ Y. r
   while 1=1 do2 _. Q3 k: z4 J1 \% X  C
   begin$ ]& C" ^4 L0 v3 P' \! {- r
   wait for e 170 min
3 i! [  y$ B4 Z) a! d# _   take down R_mB
2 a+ V7 o9 o8 B* q+ C   wait for e 10 min8 g; `9 ~/ v2 t
   bring up R_mB
- V$ q& G8 q6 R4 r   end
% g* C  z5 _: H% Send
0 |  O/ H" V0 e6 B* t* G6 o, z

: `: V" B9 c9 E3 P) }4 [2 i) }6 `begin P_mC_down arriving
6 l2 b4 @1 R+ W" I9 u& O   while 1=1 do
: q8 b" h9 F0 E3 R* O3 w   begin
5 [) \, B/ W( S# Y! k" q   wait for e 230 min
# @( S: E$ g' Q! F: X2 R   take down R_mC- n! e2 }. r# Z5 p
   wait for e 10 min
: O& H* g& Q% f; E3 M: o/ L+ c   bring up R_mC- h0 [' o( u" }+ `5 p+ }3 `( A) K
   end
; h5 k$ V4 V/ l# y. @6 qend

0 D9 B, L9 I/ z7 A& y
+ C' i: c0 c/ G) e5 F6 E' P9 ~" rbegin P_mA_clean arriving
4 @7 k: V0 M) A$ P- r   while 1=1 do' z7 c  N$ Z1 X
   begin
/ \1 |& o& c: z, T' @& w4 S   wait for 90 min1 C+ G% j1 V  A4 t$ `% M
   take down R_mA
# l0 g: l$ g% O  C/ t5 v& p& M   wait for 5 min
. C! X7 r* j% O8 i/ L) B/ T   bring up R_mA
( m; {6 r$ i3 R- W* {   end
- h% `  d. i- @* f0 kend

: b( n- Z+ k1 Z8 L2 }1 D . j! r0 K) M+ `1 F$ v4 o* C- X) n
begin P_mB_clean arriving: e) w4 M& J5 Y: _0 V0 ]6 D
   while 1=1 do2 _  l& w( e/ r1 J, A- F9 |
   begin. p" X+ @4 s0 P2 h( I/ t% M; R
   wait for 90 min5 S2 L$ ?1 F8 i* o9 r' `; U4 v
   take down R_mB
, Q+ q! g. U4 A- G   wait for 5 min' w' _% E7 `0 Z$ d4 ]0 V
   bring up R_mB; I( y2 Z7 p$ ^" f8 b4 s, z# x
   end  ^& m1 c1 D# S' u. P3 K; N
end

) ]* h3 q1 m" f4 V' t' ~
# _8 @: {6 N( m/ a* v. P5 sbegin P_mC_clean arriving
: G( N% Y: y8 P4 A4 b   while 1=1 do
0 O4 {* z5 ^8 Y2 w9 T/ ^   begin
4 q. P9 I0 n9 A* S& |   wait for 90 min4 N; x0 y$ a! K: z) z
   take down R_mC
  }8 z. f8 m" T" Y% a   wait for 10 min
$ X: f" ]. X( `& G" O   bring up R_mC0 C4 }# G. ?3 g: ]7 m) k
   end( g# P% y: D6 U! L
end
3 x+ ?/ @5 u% J; }9 x' N
----------------------------------------
/ h8 ?$ I4 t& ]4 m% Z  b% @ . d/ T  {0 [: j) v7 r/ L
Exercise 5.9# ]. ^" ?- q1 D6 n

1 H1 U, w0 o) T! N6 `; e1 u! h( W
Create a new model to simulate the following system:
$ g/ p# @* W$ G1 ?5 _: T/ lLoads are created with an interarrival time that is exponentially + u3 g! ~) s) B# J
distributed with a mean of 20 minutes. Loads wait in an infinite-& f3 k' T; ?: M1 e. n8 D. ~' H9 W
capacity queue to be processed by one of three single-capacity,
/ P1 X# X* Z! qarrayed machines. Each machine has its own single-capacity queue / \7 i; E4 c  V  B8 _1 G$ z1 k
where loads are processed. Waiting loads move into one of the three
( W( A& f. x: P% Vqueues in round-robin order. Each machine has a normally   H: D# r8 x9 B( r% Z
distributed processing time with a mean of 48 minutes and a standard
+ W3 y& `  t  F* m# b8 l3 ddeviation of 5 minutes.
# r5 U! K) W% i3 R. J& YThe three machines were purchased at different times and have 6 t4 y) X4 x1 H- M% g# B$ q
different failure rates. The failure and repair times are exponentially
, {! G8 c' P, Q7 Vdistributed with means as shown in the following table:
9 a# ~2 e% O) O( h3 g9 aNote The solution for this assignment is required to complete : f; h& B$ W2 L! H- G$ Q+ \, F0 V
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
1 {+ s" Q7 h9 E  n5 pyour model. 7 c. m0 P: u: ]9 g
+ a. x5 @& d6 i' r: i, {" e5 p
MachineMean time to failMean time to repair  O+ o7 C, Z* X1 m
A110 minutes      5 minutes
+ L  W" e  R' |6 P7 e6 |B 170 minutes     10 minutes
: f3 ]! E/ s9 @  s1 n# a9 \. DC230 minutes      10 minutes
( k# Z- A  D' V) @8 `- s
1 D- {5 T2 u& RThe machines also must be cleaned according to the following . ^$ K9 b+ ?" Z6 y% K
schedule. All times are constant: & O& l) m0 e! ~0 R; d  \

9 m1 M- V2 g; u: G0 K+ xMachineTime between cleanings Time to clean/ w! B& l! H& k2 K6 ^
A90 minutes        5 minutes
2 E% |( ?& Z* Q# K& \B 90 minutes       5 minutes
/ i# ]; o' C4 w9 v! b8 \C90 minutes        10 minutes% W' y" ]( n# t6 P
1 a6 F* _) Q5 I- Z9 |
Place the graphics for the queues and the resources. 9 B$ q& [# h; d( w0 D
Run the simulation for 100 days.
0 T  N2 r8 p7 F$ O6 cDefine all failure and cleaning times using logic (rather than resource
5 d8 T# v9 K& Z9 y- V) a& U% Xcycles). Answer the following questions:
- T& V: f$ _* ~% W- G3 j0 aa.What was the average number of loads in the waiting queue?
. M; n5 g5 T' ]b.What were the current and average number of loads in Space? " u8 Y3 e6 J" U7 ~) s% f
How do you explain these values?
; s- Z+ o0 P. m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
! f1 Y& X& e/ h5 tsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
  O1 @1 j7 Q9 @2 r1 A! a$ g这行好像也不太对,各位先进觉得如何呢?
; Y/ K. b# E/ b5 O6 p& ]$ A
- O7 z7 K7 v/ Jbegin P_something arriving
/ J) s5 R2 I2 \' \2 ]* V   move into Q_wait4 R* i& k' k  M* ~7 I
   move into nextof(Q_mA,Q_mB,Q_mC) / ]+ J4 D/ u' \* v1 `
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min1 q0 J# a4 f+ ]. m) i4 F2 r4 Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 9 A, U4 Y3 }  d4 O+ u7 l
end
2 h4 H+ u1 I, L. `' M$ t! X$ s* v+ Y! l, E# |: E& w
begin P_mA_down arriving$ s* Y' c! \  ?4 v/ K. y) i
   wait for e 110 min+ e4 M: f3 k( w8 E% Z% i# I9 C
   take down R_mA
( s7 ~$ w0 c- E" W. {' r5 H+ I& b2 H   wait for e 5 min
  `+ }4 {- b& ^' t1 d* e& e   bring up R_mA
  H4 U8 X8 e) r: z7 ~* _end
" G' q1 m8 `0 M* l1 ?' X# N8 V4 n: p5 r; R- _
begin P_mB_down arriving
& ]& X) ~" _- t& z+ f/ Q' |   wait for e 170 min
4 Z. G& Q8 }# Q# {0 |4 N   take down R_mB; h( n- Z0 j) s: o) R% y- W
   wait for e 10 min
  A( P$ R; G: h$ V   bring up R_mB
6 v4 A, i9 T6 z5 C  Vend
- D# I. y* I7 z- I) X" e
8 B: Y$ {" J; R* ^1 e7 b& |5 Fbegin P_mC_down arriving$ R8 k; s. `$ f9 I$ n
   wait for e 230 min2 A' \3 m: V1 k$ V' Q+ R8 h. w
   take down R_mC
2 p8 {6 }. t2 l* n. Y1 ^/ y   wait for e 10 min
0 q7 c  r" {) a( V9 @/ S   bring up R_mC
; i; S7 l1 R7 ?  X- hend9 g7 X( u0 J+ y+ \
3 x- S2 S( ~& r7 F3 v
begin P_mA_clean arriving) G. i: @% v# J( s+ }! w
   wait for 90 min
/ d" b' [( G, ]1 Q9 D. R" w" w! `   take down R_mA
/ D- K0 u) ^. i0 Y   wait for 5 min4 p9 Z6 [  o7 s4 \. x, o, _
   bring up R_mA- l& w/ h9 c4 L, S/ c" d
end
' Y( H. r7 K1 B8 E6 d# D; F2 U3 u6 c8 E9 t
begin P_mB_clean arriving* r( i- {  z& g' ]
   wait for 90 min9 q+ e7 ]5 ?$ N& L& l, a5 K
   take down R_mB
! X  h, \$ r* b4 C   wait for 5 min
" Q2 F9 f' k( d+ ~  E" C) \   bring up R_mB
$ q( d0 i8 I3 p- bend
$ w4 r! r3 i2 K6 r$ Q  ^% m  P8 Z' w- A* g, L! A2 C7 ?
begin P_mC_clean arriving
8 B$ I1 p5 G. a" W! D/ x   wait for 90 min
7 L/ R- c, B' N3 ?; f  k9 K, g   take down R_mC
& d' ^1 y: I- P( ]5 z- j2 n" w% v   wait for 10 min4 u, C$ m/ l% ~
   bring up R_mC- D4 ~( y- j3 R
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving, _& `) F2 I4 K
   move into Q_wait
' Q. i) Z, O% c; ?/ h1 U0 ~1 i   set A_q to nextof(Q_m1,Q_m2,Q_m3)9 I" \6 m  ~0 s" h
   move into A_w
% s* x$ Z! I7 B1 e& Y+ z   if A_w=Q_m1 then use R_m1 for u 48,5 min9 p0 k) u. n) J
   else if .....then use ....for u 48,5 min
% R2 F% Q+ _  q7 B   else if .....then use ....for u 48,5 min  $ s# l6 X* e' H/ E1 V; t
   send to die. S/ K2 ?7 ~$ K& h" e/ D! a
end
$ k$ Q. b2 H' S, \* u! m" o7 `8 z6 a3 {: \( R$ ]8 S
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-30 23:27 , Processed in 0.023498 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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