设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6809|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ T  _+ U( O# m/ J3 y$ a2 \! j
- ?" S3 q' g# _( T( U底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
# f. ?+ h$ ?( E+ m$ h6 R  C' s
& c+ y9 e" t) O+ O( @) E2 B不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!4 a4 F+ D3 s1 f- E  E1 L+ e& Z

/ i/ C! ]3 c, p2 _% L& H
--------------------------------------------( M, v% b% O9 X" T' y
begin P_something arriving
! l7 W8 d1 H8 c   move into Q_wait; @; g! r: S. Z1 o! `# [5 p
   move into nextof(Q_mA,Q_mB,Q_mC)
9 c3 b8 E( t7 P, j- J1 B   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" E  M9 _- V# q7 l; C) T! X7 A" k   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' B# w/ X+ S% W- ]
   send to die
( W0 x. V& I: O) z9 Jend
6 Y& n, W' j, S$ ~! J( }' E$ a$ Z3 `

5 c4 o2 _7 {; z% nbegin P_mA_down arriving
9 V1 I% t* p* P; R. d6 \# p. J   while 1=1 do
1 `  y2 Z# _5 t& H: _9 W7 x5 s   begin
2 `0 ?  C( r" j5 {   wait for e 110 min  y( P$ T( u: |6 E: G, D
   take down R_mA8 }6 z, m' A. @4 {
   wait for e 5 min
* H# }/ K, A8 o( ]& u/ D; o   bring up R_mA
1 j/ D7 U4 ^& m   end0 }+ ^* H1 k/ p, e' b+ A. d
end

2 v/ x4 w7 a4 {7 u/ f2 \& i9 ?. F ' C* s8 j+ n9 \3 x9 p4 S. e, W( s
begin P_mB_down arriving
$ ~" |& M4 R$ c. \" W' }3 a6 ?- N! n   while 1=1 do
" d0 R4 e, U1 r+ Q, D3 l; A   begin
* ^+ O6 h5 Q2 w4 S   wait for e 170 min$ ~# H3 R! T. ^2 [: w( ]" b) U
   take down R_mB
. \0 }0 P; I, _1 X: [! q$ L; F   wait for e 10 min  y5 \) X' s: k
   bring up R_mB% e% Q% n) ?1 }
   end! z' U, Z9 `3 S
end
4 l" a3 T* ]' n& e* |# a& n

7 |3 M/ d5 ~1 B7 Bbegin P_mC_down arriving
2 D: {+ \$ @, X' E" U0 f2 W   while 1=1 do
! k) o% i: Y5 K! \' d7 K   begin
: ~" ^! m3 n( x6 F3 K! s9 J   wait for e 230 min' y! F  L3 o. r  v& O- m( G) `$ [
   take down R_mC
( |! [( Q- c1 `, {0 G* z' x3 [   wait for e 10 min
  _! G5 }8 T8 T* I0 H- W+ ?   bring up R_mC) r! a7 D% o, c3 J& X8 p
   end
0 g: k/ m9 E2 f/ ~% Iend
6 f5 Y% S8 M! w% s, R" L6 ~

: N5 D* a  ~/ fbegin P_mA_clean arriving, a, {# J8 g2 j# O4 t
   while 1=1 do; g  N9 k' h" s( u  Q
   begin
# v( L- a# K9 |  e* M   wait for 90 min! W  G8 M) z! S9 z8 w
   take down R_mA! D+ E% ?- ]7 K/ W$ o$ `) {
   wait for 5 min- v: M0 Y+ {& F9 i8 X( l, Z
   bring up R_mA0 q1 @4 N0 u3 \" e/ F+ J
   end+ E7 ]% J3 N* p% n
end
. D9 p+ K& Q/ L' e5 R1 p
% A: j, M" t! `- Z7 n
begin P_mB_clean arriving$ G- s  E, I& w
   while 1=1 do7 s; X1 l( k! R; j& Q8 d7 o
   begin* o6 I9 x" m$ t2 i3 P
   wait for 90 min4 L& C$ u6 f6 e% q/ n
   take down R_mB
4 S" s8 T, l5 r: T( e) Q6 f   wait for 5 min
' F( S2 {4 V3 e$ \+ O   bring up R_mB" s2 @9 _# K7 {$ g! C- g8 \
   end
, p+ N3 J/ W6 v0 @4 U, qend
* |& v/ X% k/ t- p! `) b0 f
: w& R- z2 N- i9 z0 d5 T2 \
begin P_mC_clean arriving
0 B3 e. l: s. q6 c9 m   while 1=1 do# J. \/ n: b& c/ ~+ l
   begin( m: }1 `% @' @0 D8 S* Q; C6 ?5 K
   wait for 90 min
( ^. u+ h2 N3 ~; O0 L' I! i3 p   take down R_mC
4 U+ A2 k6 M$ S7 m( M   wait for 10 min3 H/ u8 i3 }" l/ p  b3 g/ a" z
   bring up R_mC5 F5 J, R+ V# }% o. ~3 T* \9 O
   end, p" C9 X, K8 C% C! S
end

, x0 ~- H2 c1 ~* C+ w. O----------------------------------------- W3 Q( u* i  @. `
6 D2 x* a  [3 [& [' V3 K$ p
Exercise 5.9# b' o; @- m  |) ?6 W

# F3 g% X, J9 f0 @1 [; a$ Z" U- T7 m& J' k
Create a new model to simulate the following system:
; Q1 d9 t0 d0 BLoads are created with an interarrival time that is exponentially " H. }) M- j! A
distributed with a mean of 20 minutes. Loads wait in an infinite-+ C/ z. i. [3 y+ t3 E2 S
capacity queue to be processed by one of three single-capacity, 7 t7 B8 T+ G  y) t5 J
arrayed machines. Each machine has its own single-capacity queue ( |* j! B# ?3 }1 I' A# L6 F1 `( W
where loads are processed. Waiting loads move into one of the three + a3 }& l* S8 v* J+ P% Z* U
queues in round-robin order. Each machine has a normally
* z) e3 z& C$ cdistributed processing time with a mean of 48 minutes and a standard % U$ j; S+ ~& N0 ]
deviation of 5 minutes.3 a0 c2 l6 l) V+ i# r$ v
The three machines were purchased at different times and have ) @/ }) {% j' q# y5 F3 w
different failure rates. The failure and repair times are exponentially : {* j* T" X/ Z9 _% c: s5 c
distributed with means as shown in the following table:
$ m* S( Y! Q% O7 \( r8 ONote The solution for this assignment is required to complete
  |0 M; o6 a0 q' A: |( g3 ^exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
% J9 J7 _$ j" C3 W' F/ ~your model.
# r  r! Q0 c; _  |9 c9 w4 T' l9 M$ B. n( k) G
MachineMean time to failMean time to repair
. r7 d1 u% A: }, f% Q, HA110 minutes      5 minutes3 ?3 O1 \8 A* T, n6 _
B 170 minutes     10 minutes
, i3 E7 _! Z! h# v+ C- _7 ]C230 minutes      10 minutes
1 G) B' C; i, r9 q, P9 y6 v- o, q& g6 T, H0 o
The machines also must be cleaned according to the following
4 U! }  P1 B$ g9 fschedule. All times are constant: ' i* J6 r# {" ?/ G
5 _) B" _  A7 z0 {; F! C, ^6 J
MachineTime between cleanings Time to clean
& i# [4 X) P7 {A90 minutes        5 minutes
. y/ d! t/ Y, c, E" TB 90 minutes       5 minutes
9 {5 ^% j2 s% t# sC90 minutes        10 minutes
' q5 k/ K5 e* r
' ?% \9 d; F! R, O- b7 _; ZPlace the graphics for the queues and the resources.
  F9 `* A. A" E2 PRun the simulation for 100 days.
( v# n9 o" E' T: N! e- t" F2 j- V& xDefine all failure and cleaning times using logic (rather than resource
% |- P- \$ n* ]. H4 scycles). Answer the following questions:
' D. q/ T+ z. X9 Y- Ma.What was the average number of loads in the waiting queue?
3 h  [7 F$ _9 vb.What were the current and average number of loads in Space? $ l; [  b1 j8 j
How do you explain these values?
. j. C: r- e1 |+ _$ M/ X

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! w9 T- D1 B0 N. u0 ^
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean): j9 X$ P- h5 ]. F  g+ i/ N4 a5 s
这行好像也不太对,各位先进觉得如何呢?
" R8 ?  v" W5 X6 k! [) V8 z/ u, ^: P9 ^1 R* j0 o2 k
begin P_something arriving  f$ }3 {( z) N$ b" N
   move into Q_wait
. o5 E, O/ ]# x" Z   move into nextof(Q_mA,Q_mB,Q_mC)
! U8 f) j, m! ^, ~- |1 v7 J) m# o7 y. `   use nextof(R_mA,R_mB,R_mC) for n 48,5 min: X0 n9 U3 P- s4 b
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ' n* q5 Y; V9 [4 M. s% U  p
end
/ K: l- x8 m4 j, b  v! p/ x% S. W9 m$ C9 L
begin P_mA_down arriving  I0 f6 M3 o, {  M! K$ [
   wait for e 110 min9 r: T  t. X0 ~' W1 H  k
   take down R_mA; s) e/ P: Z" C& |) ~( @# O
   wait for e 5 min
# [6 h2 l) j6 e6 d7 L   bring up R_mA2 @( A" a/ [- \/ _) ?1 }$ t
end; z! d4 _$ ]9 w5 O7 c1 `, v( K
- q/ d7 C' w  j0 X! J! V
begin P_mB_down arriving3 H1 M7 b+ ]; {  N
   wait for e 170 min6 ~, x6 M+ X7 C5 ], q7 P
   take down R_mB
7 \9 F# b0 M' m3 A! S* V7 ?! u   wait for e 10 min
' `6 w% G3 @6 t* f" b. n   bring up R_mB
' k3 z7 i! v( o! p) C/ pend0 P  ~9 Z* s3 ]1 v$ x
% R$ Z9 M1 ]. _6 f& ]3 ]
begin P_mC_down arriving
* J" e. b5 C1 R0 q2 L   wait for e 230 min5 I% T* [5 C7 @1 h7 X
   take down R_mC8 m9 Z+ e3 _$ K8 s* R/ R
   wait for e 10 min
5 v  i" O' Z* t: f3 `% D6 I7 D   bring up R_mC
' t  v2 s6 H5 ]! r& R; {end2 X8 j+ d+ _9 l$ Q! V
# n& V; J' p5 F. l! H) @
begin P_mA_clean arriving
5 A2 D2 j9 B, |9 [1 o- }   wait for 90 min' c2 H; \- y) E. u1 g3 {& {
   take down R_mA' _) w( _, Q3 g  ?
   wait for 5 min2 [  t+ ]7 J3 w2 y
   bring up R_mA
4 g) r( g( |5 C" H; @end
1 v& I; }' t. q0 V% W9 p
, ]& Q) {, G3 b! l! ?: A7 }5 Kbegin P_mB_clean arriving8 S2 G, H7 v+ t) G, {( L0 Y+ u% k
   wait for 90 min
& R$ l, A' w$ h9 u   take down R_mB( |3 T- A# Z2 i+ Y: k  p8 ?
   wait for 5 min
, [$ Q, V0 r0 I6 R  L9 q   bring up R_mB
1 A+ J; r- b, [4 \& {$ D4 x: Send
+ W2 X" C5 z1 o
. Z. c6 r5 j' ~( jbegin P_mC_clean arriving4 ?; ~, D% }/ v* j* F* x
   wait for 90 min
% U4 W- h/ I# P$ R/ B   take down R_mC, X# I5 o) A5 n. z
   wait for 10 min
+ l1 ^- {! @# s2 d2 F9 F* g% |4 u   bring up R_mC
0 A6 h, I' Z+ P: _end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
  n: s  H  |  v0 k   move into Q_wait
. B/ E2 V4 h5 F! v, t) a+ m- U   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ D' F) K. ~6 v; [( U   move into A_w* j% Y) m* `. z/ i" k+ m+ A$ s8 @% V7 [
   if A_w=Q_m1 then use R_m1 for u 48,5 min
! Y/ j6 K8 E6 Y" R& Y   else if .....then use ....for u 48,5 min9 m1 E! S: q/ n8 J+ M
   else if .....then use ....for u 48,5 min  
. m" L4 n5 x+ _  f' q. v   send to die
5 u& L: R+ x6 c/ x& i( W; wend
1 D, X7 y0 }  }8 S6 ]5 t# X& ~) ]1 J, P
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-3 09:48 , Processed in 0.012486 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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