设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5002|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 - G9 D  t7 R& z3 J+ M4 T( ?* ?

# h0 E! E& ?. @, y( n底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去& q: q9 ^! g6 t+ N8 R4 ~; Q3 z7 Z

% o/ ]' {9 E% z" j1 s/ k$ c不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
9 c, V3 `5 o% |* i0 ^, p- N" M$ t% G* M% v. D7 S* V. X* V
--------------------------------------------
2 a! d  Q! a+ w- p# ]+ abegin P_something arriving
% _9 U- M8 {1 o1 j7 Y   move into Q_wait
! |$ y8 @* a8 c   move into nextof(Q_mA,Q_mB,Q_mC)
+ _  H$ w9 w' `* ?, {/ c+ j   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
4 `+ j9 |: `# W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), b2 m5 ], P  U& y
   send to die/ L( ~: s" |  Z. i1 j
end
* D& P. A5 P, e/ g6 |, t3 r

% W5 E& e2 v7 i7 y8 hbegin P_mA_down arriving
, i7 ]) B4 h$ S8 v5 j/ e1 N   while 1=1 do 6 E2 T% u1 A* c+ {- u% E
   begin
5 d9 @& p6 l* l0 F1 `. j% G   wait for e 110 min
& L1 z3 C& x0 r" g0 C: X5 \0 O8 u   take down R_mA
/ P  e0 s& |7 F$ o$ b# L   wait for e 5 min" M7 O: b  ?" h, W) J$ j' _' ?% _
   bring up R_mA  G& G: T+ Y! n! v2 v( S
   end
6 f. b( v$ Z6 D% D9 h* d) Zend
0 k' O& g( m; E7 P. ^3 u. Z! a/ M

( q- y8 E% S8 l. ]# k1 ~4 H( z# r+ jbegin P_mB_down arriving
( v& m/ Y9 ^; _$ w, L0 h   while 1=1 do
& l2 I" y  D8 Y0 b   begin, W, ^) T: E0 P. ?. T7 z  F
   wait for e 170 min
2 F$ g  C. t# ?6 S- W   take down R_mB
# ~/ V/ n) w+ D0 G8 J  o7 t5 m' w   wait for e 10 min
" t/ o6 N: g% w& J; S   bring up R_mB
& u3 P( u8 z! R7 L   end
2 T2 U$ W4 [7 D8 _$ Eend

( P/ K: k9 ^$ i  ^; f( S8 e . \7 K$ X4 v1 @: G1 n
begin P_mC_down arriving7 x, N/ w$ A% _" D2 z
   while 1=1 do
5 ^% b5 g" c2 s   begin, p3 T' S7 L' h4 Z
   wait for e 230 min
# U" C! L8 y: g# v5 a% g7 C* G+ j   take down R_mC6 E7 `+ r: B1 O5 _9 t# W8 g2 X
   wait for e 10 min
  {5 @4 L, q9 u   bring up R_mC
. h, o3 x# ?6 t& g, \: E   end3 ?3 X2 i& f( B; w! Q
end
* l$ o6 j8 J% \5 u8 N
% u( y- c' F) Y7 k! ~; _
begin P_mA_clean arriving
  z8 R# c" o2 |& z, w   while 1=1 do# S6 t% J, k' @
   begin9 z: O+ c, g( F9 f5 ]" f0 W9 M
   wait for 90 min& N& d8 Y9 u5 \
   take down R_mA' a0 M' Q9 u* J
   wait for 5 min
6 \3 B0 h1 l* o% d9 \2 ~   bring up R_mA- J% D. v% G( o' t1 Y7 e& V
   end
2 T5 `7 V0 Q( b7 [  B" Gend

+ ?. M; B) R& t" l
8 f8 \  p$ \5 ibegin P_mB_clean arriving" D) K0 o5 w# K4 g" x1 a
   while 1=1 do
( O$ n7 Z' }( E: M6 g( A   begin
! p" y+ B( p+ X   wait for 90 min2 M0 w5 @8 X5 C( \$ `: @. H, m
   take down R_mB' U8 y/ U: I5 k5 f' f1 y
   wait for 5 min
9 f& s2 A& N( w, i0 F( H   bring up R_mB9 T3 D/ a# s0 G8 R
   end9 J( C' F) D* U
end

' L- R3 F  r  A8 _ ! O- F" K0 n& x  T' P
begin P_mC_clean arriving- ~2 g7 i, ?( ~$ v  I" Y. j
   while 1=1 do
# G% V, _: Y$ W( h   begin. h* S% N) o/ c) }
   wait for 90 min/ T' z3 h5 t* b3 Q9 c
   take down R_mC( S, R& h/ p4 S
   wait for 10 min
. @6 s+ o& P2 u! }5 U1 G   bring up R_mC* `4 {$ P* [0 @9 \
   end
& g' ?8 L! L6 Z3 A9 _  iend

6 Q( }' p- z5 V----------------------------------------
, A& `: p0 a+ s0 X+ \0 y 9 v& E" S* s' M
Exercise 5.9
, w  {& W" G. o( S, {* C3 Y$ K
+ t; W1 b3 a1 W. j5 o1 Y0 b9 Q" k) d5 B  \7 r, s4 ^
Create a new model to simulate the following system:) H5 b7 {$ T  W: q7 v+ A$ a- l
Loads are created with an interarrival time that is exponentially 5 K+ N' }( o( C; r; Y: Y
distributed with a mean of 20 minutes. Loads wait in an infinite-
- {1 W2 [- u2 s, z; Qcapacity queue to be processed by one of three single-capacity,
& E& ^/ T( }2 V% ^- K! zarrayed machines. Each machine has its own single-capacity queue + x8 ]3 |2 i& z2 e  h) I+ b
where loads are processed. Waiting loads move into one of the three
+ B+ v; s: f* n0 J3 tqueues in round-robin order. Each machine has a normally , h9 y9 e/ x9 J# T% ]# g. |
distributed processing time with a mean of 48 minutes and a standard 4 V& n- f. t; G1 J4 G
deviation of 5 minutes.
, L3 D9 o# h& {8 m5 [) VThe three machines were purchased at different times and have 8 \7 f' c* A  U# b/ R- |& d& b* F5 I
different failure rates. The failure and repair times are exponentially 6 ?  c% [0 k2 [) ~. `& E
distributed with means as shown in the following table:
8 H( F, K4 G/ `8 ANote The solution for this assignment is required to complete - h6 `/ F* S4 {8 d( ?) t
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ h0 o6 b0 }4 L+ y+ p& B& S8 X* Z
your model.
4 }/ o; N* [8 w: N  o9 {: l+ n' u  U$ l
8 J! o1 X. g7 I, Q/ h# MMachineMean time to failMean time to repair
: M5 C! x6 E( f0 N6 _' \/ `A110 minutes      5 minutes) N7 W% D' `2 |1 r' [
B 170 minutes     10 minutes
- ]& a$ i: b; QC230 minutes      10 minutes
9 |( o) m7 ]- t# G# I6 K2 D5 @' N6 Y" W8 p" _3 ~# K. D  _3 I
The machines also must be cleaned according to the following 4 C/ b) q0 M# ^. V0 @0 ^
schedule. All times are constant:
+ {; p+ P) k9 o; [  @
5 c! m& ~3 @/ V8 IMachineTime between cleanings Time to clean
7 E) O# l0 ?5 r5 sA90 minutes        5 minutes1 a. M* ?+ y  M
B 90 minutes       5 minutes
( b& b6 z* T" u. `9 o+ FC90 minutes        10 minutes
) K1 M& l4 \5 c) F" q+ Y
' p& u& y2 {, cPlace the graphics for the queues and the resources. # t+ d3 `6 \- M
Run the simulation for 100 days.: t) Y& ^' W4 `  x: z
Define all failure and cleaning times using logic (rather than resource ; X& n) l9 W/ E" c+ _- f
cycles). Answer the following questions:
4 z% {4 J' b4 P7 da.What was the average number of loads in the waiting queue?; v: f4 w. N0 @5 x3 U
b.What were the current and average number of loads in Space?
$ K4 U( R2 t, p; @0 d4 NHow do you explain these values? 4 d( c( O3 C) Y( B% c# c* Y

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
: d$ q1 w$ Y1 M1 Z" ysend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ R2 W5 v* I& _) A( p这行好像也不太对,各位先进觉得如何呢?" |; h. M. `7 W
; S* k/ Y; S5 ^9 j& P
begin P_something arriving
* g  E$ ?' x" F8 f* T  y- w0 ^   move into Q_wait
0 p$ r/ E) C# s* h2 a   move into nextof(Q_mA,Q_mB,Q_mC) ' a) ?. X, ?0 a4 U
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
# v+ J. i/ S. @. m+ {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 3 C7 Y( [# c2 Q, w; w; C0 x
end* ^( \- N! t$ ?2 C
6 s8 V2 n1 C( g! q4 w; |
begin P_mA_down arriving0 q- A8 T6 v6 c; X' J$ j5 a% {0 V
   wait for e 110 min! @7 v1 Y; v+ i. S
   take down R_mA
9 t" h' m- {) I   wait for e 5 min
$ s& _! c& `: ]& A) r4 J   bring up R_mA
% y$ u( X* ^. Uend
/ K8 V5 @# X) T6 s+ c6 e: W) B( R8 G9 d1 l" |
begin P_mB_down arriving
* R( R! G! i$ U! e& R: f. ?/ @  L   wait for e 170 min
" n& y% F0 u) k# {   take down R_mB: U- ?2 q* u( }' e' W
   wait for e 10 min9 d3 A1 G* D# @: @
   bring up R_mB
8 d& K9 x) n7 y! M# |  y' iend
$ e) x- S! O2 Q# L( `# h8 j* l8 s
begin P_mC_down arriving7 B# v0 K( h! W4 j4 L: ?: h  l" N
   wait for e 230 min1 Z. Y. m8 ^$ h1 A& ]0 n
   take down R_mC- u/ P) ^" i* d1 `) t% K
   wait for e 10 min
. ^) c  b2 N* {2 c0 ^% b   bring up R_mC
% Q# i: v* G5 b# }/ oend5 ]2 w2 Y' a  g! i' Z
5 a! b3 s( i( t7 x
begin P_mA_clean arriving$ l3 f7 q# O7 {% d6 [
   wait for 90 min
  l8 [& b" e( C2 \$ T& [   take down R_mA9 m8 ]# }, m/ M) q
   wait for 5 min
/ |7 u# H0 R/ x- I0 H   bring up R_mA; F3 ]' S- ]+ l9 ~9 o; E7 |7 G
end+ F' `/ m6 m/ T8 B1 \

5 e7 M2 D- a) E' O4 nbegin P_mB_clean arriving5 T1 X  m9 `3 w3 Z5 f4 X( w
   wait for 90 min
' q  I# e# z7 o   take down R_mB
2 v/ j/ ^/ w- T7 w" y! r   wait for 5 min
$ R$ L) F, _- a) h   bring up R_mB; s$ z+ D3 V6 |! n9 }6 ]" w
end
5 H/ U9 ~! C  S& ^6 b* {1 F' t$ j1 A
begin P_mC_clean arriving2 b6 G% u( m, B
   wait for 90 min+ d$ X- K; v# x6 Z
   take down R_mC
! Y4 R$ o. y' o! W6 s& O   wait for 10 min- ^6 G; f" L- ~9 w& K; \; G
   bring up R_mC& h% A& G# C# i! L( ^' P
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving4 t1 z& M; E  B+ O/ I! ], c
   move into Q_wait
) g5 v+ D' u  d/ J+ v   set A_q to nextof(Q_m1,Q_m2,Q_m3)
' H3 F1 h, U( [" }( N  A   move into A_w
* m$ ~$ ~3 H7 s5 X2 x! L   if A_w=Q_m1 then use R_m1 for u 48,5 min" R# Q: U. N% M0 N+ H. ]
   else if .....then use ....for u 48,5 min
6 `* w5 v5 |* Z- n- b   else if .....then use ....for u 48,5 min  ) W5 M0 C( t4 ^3 d$ t* W! W
   send to die" ^2 T! R$ `5 g$ b* [6 a9 K2 f
end
8 }$ h) r( F: }- L& d
4 A/ A: g% W  P$ M! |: t供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-24 04:58 , Processed in 0.012189 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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