设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7275|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 , Y6 p9 |2 m; h( N  g$ E$ W0 u

3 O6 R1 Y: ]7 m; ?底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. O1 d& Y( q4 n1 m2 J' V
( M4 C" j9 h3 Q4 x- @$ S0 r- k. R不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!% w# a8 T: h5 l) I0 `
; G& v6 O  m2 n) Y/ E
--------------------------------------------
- I, k( ?$ D/ {' ]begin P_something arriving% {8 A7 t2 R$ J
   move into Q_wait
7 m, x% q& ?8 \; L" c   move into nextof(Q_mA,Q_mB,Q_mC)8 R! \$ z5 ?' _( L  D5 C
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
. Q! C4 b- S1 A/ |: Q0 l   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# I: e( X4 \3 ?$ @; s7 X* \   send to die
: z7 O" i- p( M/ V  \* I  f% hend
0 ?! U+ W. M! P& `. }6 b9 i

7 ^6 m5 M. c0 Rbegin P_mA_down arriving3 v+ m; Z, a  N$ D7 |' i
   while 1=1 do ; f: ?6 U& k4 J' f8 \! p
   begin& c7 X8 I5 v% M% F' Y
   wait for e 110 min
! H/ g* F8 j. c, ]% j! K4 b   take down R_mA" |) C! e8 O8 _/ ]6 Z5 a4 G, x$ l
   wait for e 5 min; l% y6 z& F6 W2 R3 F* r
   bring up R_mA% M+ @9 U3 P( L2 \
   end
, O$ x( C# I- d' m) M4 H3 bend

" S# P$ y6 |! y& |% C
6 u# T0 q3 A! `begin P_mB_down arriving
7 b6 l. }( h6 r) r9 _3 ~4 X' X$ o& p   while 1=1 do
* ^+ i; |1 A, s8 g5 S   begin6 q) h6 n: Q" X! R1 b
   wait for e 170 min6 f/ f: z7 t& ]6 q' B
   take down R_mB
* Q, U$ W5 a5 w- f! |2 n9 q   wait for e 10 min1 u. B6 x! ?, H: e3 X
   bring up R_mB, A9 d9 ]3 v  _6 a# n+ }2 u* a9 D
   end
  A' E# [; g  |: \+ t9 G" Bend

  _5 ]# F2 w  s3 W5 J 5 @2 p% \# k2 q% h! }
begin P_mC_down arriving! A1 @7 X. N2 s2 ?* i5 K
   while 1=1 do
' @8 B3 y6 y$ k2 t   begin
3 x2 X2 y& r) S# l# b   wait for e 230 min
# j1 B4 Z; u& W8 ]   take down R_mC
9 \# p% V0 `% w  G   wait for e 10 min. g5 m* [5 U" M% T1 q0 I
   bring up R_mC
1 `3 t. x+ e- p0 [& R   end
. {3 q' O/ D4 a0 Q6 z. Dend

5 p( P; Y9 ~% D1 {+ o/ K : \& `! X1 D/ c# K; H: l; u# V
begin P_mA_clean arriving* M, s1 ^* P$ P; X5 @, {
   while 1=1 do
) H8 v+ _, L3 `7 p   begin* ]! W" E! ?, M
   wait for 90 min
1 S- l8 q, D9 R; c4 w" T, ^   take down R_mA) p7 Z( T! {( J4 y. J4 v$ r
   wait for 5 min
2 S1 M/ l9 O# b' o0 V   bring up R_mA
1 b0 o1 [. M8 c4 v   end' B9 }* E) R! F7 l6 D
end

& d6 x5 u; M5 }9 r# u/ J
2 }2 }1 P& C4 P* z: O( i! @begin P_mB_clean arriving
: R4 Z0 Z# }& f8 }7 M8 t- k8 W   while 1=1 do
+ X& ~+ a) ~# s" g   begin
" @/ ?; g0 ~% h4 I1 m, d   wait for 90 min8 Y6 |- g* k! @9 ?; `. p! q4 }+ F
   take down R_mB
$ E0 Z# ^: U. T. R9 A! _   wait for 5 min3 h8 x9 M0 A" Z8 p6 h
   bring up R_mB
: H* D0 h+ `0 Q0 o+ L   end$ C. w+ v8 y: D  ?" B/ g
end
/ v' H8 t' P$ E5 J

% o* i: c6 K7 @! A8 vbegin P_mC_clean arriving
  |2 q5 ?. v" h( C7 B/ h$ H   while 1=1 do2 }9 k% s$ l7 ^8 n- P: D8 _" J9 w
   begin1 ^: r: b" s$ ^. m9 q' o8 l  T) k8 g
   wait for 90 min7 L! K- n$ ?5 U- ]4 U1 m8 l, E
   take down R_mC. W4 k$ T& }3 ?$ M' B+ ~
   wait for 10 min
; W; ~; D$ V$ e) r, i+ r   bring up R_mC' \$ e/ }+ T+ d# g( V: c
   end  m4 P. O& s; a  T, S. g7 ?* W6 s5 E
end

/ j: M* O4 M, ]$ t4 n8 H3 U  Y  m2 {----------------------------------------
$ K+ Q6 C  _% Z7 B0 w; U / d: K) M& O1 F8 {# ^$ u
Exercise 5.9
) A: g2 j& ?( Z+ ]4 Y) ?! {3 h4 X5 b7 n* l
% t4 `1 X1 m) u0 y; N3 P% K
Create a new model to simulate the following system:) i% B7 c  W! o8 K/ S& n! D3 b! y; ^( t
Loads are created with an interarrival time that is exponentially # D4 q4 V9 g: A. O2 H8 D
distributed with a mean of 20 minutes. Loads wait in an infinite-
( P7 q5 K  i) W, o$ }- Rcapacity queue to be processed by one of three single-capacity, + W6 ~+ h; ?( Z
arrayed machines. Each machine has its own single-capacity queue 1 L" G' u% f' e6 B7 A7 ~/ X: v2 z
where loads are processed. Waiting loads move into one of the three
- }- W) E" y# h, h0 C' zqueues in round-robin order. Each machine has a normally ) L% D% U: [0 p- F
distributed processing time with a mean of 48 minutes and a standard * D, d! c- e& c6 V7 a& [/ Y9 I
deviation of 5 minutes.
5 `. u0 K0 J2 n1 I* ?% UThe three machines were purchased at different times and have
* B2 r5 E& u- Z; fdifferent failure rates. The failure and repair times are exponentially
5 E+ y9 [) j: C7 O# hdistributed with means as shown in the following table: 7 E0 n$ o) @& b, x
Note The solution for this assignment is required to complete
  Y& @& K6 \# {4 c  mexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 C1 F3 w! z- W& H( Y) C5 z" P( Oyour model. & @! a% A$ N, `# b% q0 e

& _  [% h# q, T% x8 n$ KMachineMean time to failMean time to repair9 ^- O1 u7 ?/ y' }! l7 L! O& U
A110 minutes      5 minutes% Z' [& z2 D1 ?) o) y
B 170 minutes     10 minutes* z) _6 k5 M" m$ `# w. n% G; r
C230 minutes      10 minutes
/ l) Y3 h% R* N2 K1 U6 [5 i
8 g& k1 c3 x* IThe machines also must be cleaned according to the following
" u5 p' X. K9 f  C1 m' X& Oschedule. All times are constant: 9 l9 A% q* M' \6 c6 T8 y; G6 d- Z

! T2 n" z: u: @MachineTime between cleanings Time to clean
9 P# u: s! \' Q  k' B& xA90 minutes        5 minutes* {  f6 F; i9 W3 Z, v( t  a
B 90 minutes       5 minutes/ ~! I+ T! U! G' R4 Y* u3 p1 Z) G
C90 minutes        10 minutes/ H4 t7 d( S& c
5 I& y3 [3 o. _3 y$ U2 @5 N' Z
Place the graphics for the queues and the resources.
: ]" l, l1 y$ d/ @: p6 q( g) p$ hRun the simulation for 100 days.
$ M4 ^" V3 f2 e) yDefine all failure and cleaning times using logic (rather than resource - u% K3 v- U  }9 i8 U3 ]
cycles). Answer the following questions:! Z& s2 y0 B7 c- a1 Y( L# i
a.What was the average number of loads in the waiting queue?
; j5 ^# j. Q  H- l  c; lb.What were the current and average number of loads in Space? * z* u1 e( N& s& o" Q# C! O" ?6 p
How do you explain these values? 7 Y( E9 R1 m$ s, M& Y: A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! r- [4 x5 i, l5 b3 P
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 c) [2 o  ^" I. @3 {
这行好像也不太对,各位先进觉得如何呢?
6 I& Y( i$ |" J& x% R
% m6 ?+ T( ^3 F6 Cbegin P_something arriving
4 Q: a. g# I. l  M   move into Q_wait+ k) p# ^) Z) @4 ^, d
   move into nextof(Q_mA,Q_mB,Q_mC)
. {( X' C8 X4 z: \   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& r3 u! Z5 v, _! L   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) % ^/ d: j0 `6 z$ \0 M) h! }
end
( S7 d0 M: O, V" T4 L3 w& z( \) W# E1 I" ~% C) N
begin P_mA_down arriving6 Q* G' g5 @( M7 o5 Q
   wait for e 110 min/ r, _+ \6 D1 S1 z* Z( n+ r& Q
   take down R_mA
/ I/ D$ q5 c" C0 ^  c   wait for e 5 min. k  s6 H" X- ^6 I
   bring up R_mA8 b5 N! p8 {' T! L. d6 m! |
end& Q0 h6 ~& p+ m$ M; z0 [6 ~
7 W/ y2 z% y2 A' W# b4 R# V
begin P_mB_down arriving& v6 Y7 `4 J3 U% s
   wait for e 170 min3 o# Y8 q: V( h1 B* E2 X5 R( ~
   take down R_mB; M- E: N% q4 P' C; J+ O
   wait for e 10 min
8 S+ n7 K& s5 p   bring up R_mB
, u" l. L; C# L* \' ^end5 v0 u2 ?1 u4 T
! `5 O# t* i. q4 a
begin P_mC_down arriving
6 u1 k! o. i, l, Q1 w8 ?. }4 F   wait for e 230 min
; ^! V- @3 ^- y0 I4 n   take down R_mC# P+ e' D% Q: W6 ~% i
   wait for e 10 min
% u1 f) p% J9 }/ x   bring up R_mC, B' M" e* b" D& @9 F) y
end, e6 p( \/ a- c6 `1 [$ d

( T: F( \, b: Wbegin P_mA_clean arriving
2 f% `' ~5 X# e8 g4 @) j   wait for 90 min
8 G% ~  \% `/ c2 t$ F9 H% H* @   take down R_mA
  W( W6 y( Z& y8 r  {   wait for 5 min
9 S# ^. z2 D  T0 f) ~   bring up R_mA
6 H0 T4 b$ \+ O1 |$ E( {. {# uend$ L9 N8 Q  R$ W% x+ Z; w
5 v7 t& ]! U9 a9 u
begin P_mB_clean arriving! ^6 A, K/ N3 v, [" n' s7 m
   wait for 90 min4 w5 F% r3 a6 R- f3 @+ c7 k
   take down R_mB
+ b0 w" Y. `# z   wait for 5 min& A8 Z) \, {& g3 Y  o/ _! x) e; R
   bring up R_mB* X. w% L3 |% W
end
* b: B1 U' y* i  |: a% [9 B- R5 |, r: @- s8 |# k( {4 j" K) ?
begin P_mC_clean arriving  ?. b( u. {  S& S2 y
   wait for 90 min) q. L+ T. U4 G; t+ f6 ?  s6 p! V8 D
   take down R_mC$ @6 U3 A1 U4 n, E3 I2 o
   wait for 10 min( N# E; N5 z, G8 k
   bring up R_mC$ V* s) z. D7 r( m
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving) y7 L3 M2 n0 K
   move into Q_wait
9 q0 I2 H# a; \3 {5 g   set A_q to nextof(Q_m1,Q_m2,Q_m3)3 }% I1 R" S+ o; o4 X- p
   move into A_w4 a, x8 Y8 j& h, `) \! c/ c
   if A_w=Q_m1 then use R_m1 for u 48,5 min9 t7 q/ N- @; h% @* k5 {0 A
   else if .....then use ....for u 48,5 min% i" k5 l: k  \
   else if .....then use ....for u 48,5 min  
6 o' e* P$ l! y   send to die
' h$ F' v/ J) o$ I4 k5 ^end
' C3 Q- f1 q4 r( B$ k" D+ x( @
, m& s2 x2 w( y0 w/ [供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-23 18:38 , Processed in 0.017063 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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