设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7289|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
. w7 X& k  M. _! o: X( D; i/ U% R6 `1 z( U; f$ j% H
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去# a: R$ ^( c5 X8 w7 B7 U
& W' [2 t/ o; m- _/ }' I
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!9 K% t; z+ R* X) Q2 u% N- w+ \
. C2 C, S/ e+ f
--------------------------------------------
6 M) ?! C' @0 @5 g8 G, C" C0 {begin P_something arriving
/ O; P, m" ~5 G" X- k4 x6 n) ^0 M   move into Q_wait8 d; Y& r0 T" s; m; R+ Q$ F
   move into nextof(Q_mA,Q_mB,Q_mC)
' u* j# ^& N5 X' Q1 }7 v   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" `( u+ @" l5 J% q! k8 n  C   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  g& O, R8 v: c6 }
   send to die
0 o4 p) V* |8 y& Z# K6 [/ C9 Z, X8 |end

, Z$ F0 J  {; T; p+ |$ S # z. r- b& e& O3 N
begin P_mA_down arriving( W5 b" R% _3 q6 S& z
   while 1=1 do ; X" J3 {4 _0 H0 H8 b3 C3 _' \& K4 q2 d
   begin$ ~  |5 A% q: {" K- b& i
   wait for e 110 min5 t7 k" v( ~& `
   take down R_mA
' z: H! Z1 j+ K0 d4 l% B   wait for e 5 min
1 V5 ^4 Y! V/ z( A. p, E" }   bring up R_mA
% W4 V$ S! \& Q& K! C; G1 _6 y   end
7 g2 q' R, j: w5 V) Aend

7 c1 [. s0 j- V* O7 N" i
" M* x, p! K1 ~0 O# S" m: ebegin P_mB_down arriving  j* s1 D( }: ]2 N
   while 1=1 do8 Q; K! j8 B5 {+ U5 g2 ]4 s
   begin
) b/ n8 X) I4 o1 I   wait for e 170 min
( J/ X$ e- R4 x/ q7 T0 }0 Q7 |   take down R_mB
; P, C$ D& p& }6 d/ C7 S   wait for e 10 min
% d3 t/ U4 S) ]$ B   bring up R_mB) J+ c. n& y/ P5 m* F
   end
6 t2 N; R7 H4 S% nend

3 o- ^, s7 p* u- X' _ ! w' L! c$ O" }. R3 _$ Y9 t9 [
begin P_mC_down arriving
9 x2 ?; o7 D/ A4 a   while 1=1 do & n! E' W) G3 x- f# E/ ~5 T+ q0 v: @# f
   begin
. ^) p% C& |# d   wait for e 230 min
/ ~" V8 S3 ]: S! t. r! G   take down R_mC9 N! a$ o: Q3 I
   wait for e 10 min7 A5 H, D4 [3 B& l" M' s+ F
   bring up R_mC
; ]- f+ o; v; E  M  L# V9 v   end
! V: d# ^2 [# Y; j0 H2 z; Zend
# j/ U9 C; |1 m
: S- I  @) r* Z' F- o, K( Y7 k
begin P_mA_clean arriving: J) n1 o0 Q! J! J
   while 1=1 do, u# _( a  o# \
   begin
# b6 T: t8 g) a* Y  @9 }3 H   wait for 90 min
! v8 E. l* G; Z$ K/ y" P" R4 o+ Z  R8 u   take down R_mA
9 ?% ^) j+ |& y, \! W   wait for 5 min2 m" R+ [1 J5 o% Q; N; m1 G
   bring up R_mA
+ o" L; g, o1 Y/ ?, Q   end( f% ?0 J5 L# u/ V! C
end

/ z- Q3 r8 N7 G" E' O7 _1 @  v( f1 E6 ?   v9 n5 H& f' r
begin P_mB_clean arriving  m6 G6 r) V3 o: b8 u
   while 1=1 do
& m5 v+ O& H$ ]- @6 U$ {   begin
5 S8 W  X* U/ ]( t8 {. T$ ?7 ]   wait for 90 min1 `+ Q2 l- {9 }$ C
   take down R_mB8 H8 G6 ~3 J! Y: ]9 `- m
   wait for 5 min
( v0 [1 ^: C  v& x5 I   bring up R_mB
4 `7 a/ @% F. h  x% I0 S% h! v   end* K# t4 H# ]  D+ V
end
* `0 M" h" G7 a

" [6 {7 l! J- b2 p- D  ibegin P_mC_clean arriving
" A" _2 t, P$ `8 U" x* T   while 1=1 do
3 p: o3 H  V4 A# O" s0 c   begin
# B( @5 N9 U9 ^* ^7 ?5 i   wait for 90 min
/ i" [5 ^3 r  P* e: F( }1 _9 o   take down R_mC% T1 E& F  o0 ?
   wait for 10 min' ~6 M/ m8 T9 G
   bring up R_mC' |7 ], ]3 }4 |) ?! d1 t2 g1 d: g
   end7 W  Z1 F# L. r8 _7 d, ~# p
end

2 b! J% I" O' y  F& P' d' `' g; n----------------------------------------/ x& t' z; `% m

, ^' Z0 Q5 T( I+ OExercise 5.9* J7 Z0 O7 v3 O& [- Q6 l
; ~. e' C% q& \& o  B. @: A- Z

9 g, J3 y; o! ?2 b0 WCreate a new model to simulate the following system:
" q  ?5 x/ R3 P5 y6 E3 GLoads are created with an interarrival time that is exponentially , E' K8 z! m9 R9 |
distributed with a mean of 20 minutes. Loads wait in an infinite-6 k$ D) l1 F4 |5 I; a4 B
capacity queue to be processed by one of three single-capacity,
/ l7 m8 H' S1 m$ Tarrayed machines. Each machine has its own single-capacity queue
- Z$ ~8 n1 k3 N0 s1 w; A6 Pwhere loads are processed. Waiting loads move into one of the three # c" V  L; `' `0 r# a  U- i
queues in round-robin order. Each machine has a normally & Z8 [7 l# {- c" m# B. l/ y
distributed processing time with a mean of 48 minutes and a standard
0 E( }0 e2 q7 ^& k1 ?0 ndeviation of 5 minutes.9 l* W; V" V' y3 W) h) R  p( B
The three machines were purchased at different times and have ' |* F" V* p  l! T7 u0 h
different failure rates. The failure and repair times are exponentially # X5 K" m7 e! o  t6 K: r  y
distributed with means as shown in the following table:
5 [2 c! q' A# U( G! oNote The solution for this assignment is required to complete
+ q. t8 l. @0 Sexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. j9 e. I, K3 v  D+ `your model.
0 y3 Q* K: T( H9 R3 q6 t, v! z2 w7 O/ x( n& c* t" ~
MachineMean time to failMean time to repair2 u# }& ~  N! X, X1 w
A110 minutes      5 minutes
1 @- Q& `7 w. ~2 C& s4 n* DB 170 minutes     10 minutes
' E! v% E' S8 ^) o* EC230 minutes      10 minutes' K* u9 x1 u: }/ Q, o$ K

' j. Z: m# E+ e# n! z) D5 j" ?) @The machines also must be cleaned according to the following
( u) m8 s6 F8 Q: B! bschedule. All times are constant:
2 ^8 X; q4 e% \1 n, J: _+ s
( z  T; s# i! YMachineTime between cleanings Time to clean
: E, p, A9 e$ A3 ]6 f* }A90 minutes        5 minutes
  N. e  _0 b( ]. JB 90 minutes       5 minutes
/ I! M/ l& f1 J  @7 F! [C90 minutes        10 minutes* O2 M) V" w+ Q7 Z* f0 {
! I5 M5 p# x) y9 M( O7 P2 [
Place the graphics for the queues and the resources. ! m  \& v/ ]) q  x* R- G( }
Run the simulation for 100 days.6 N3 O: T5 i/ L( N4 R& A  J
Define all failure and cleaning times using logic (rather than resource
$ J6 p5 Z  D1 V* C1 ?cycles). Answer the following questions:
& F0 |  m, U$ Za.What was the average number of loads in the waiting queue?
/ k1 I, `0 O2 O) f8 S, q- yb.What were the current and average number of loads in Space? 8 g8 q. _6 b8 K+ [/ {7 |
How do you explain these values?
  P% H+ c) h9 H6 E& b$ A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
: E! x1 @2 n- n& a$ c: a7 t# Qsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 X* g( e* p+ P' W
这行好像也不太对,各位先进觉得如何呢?
1 o. j& B: t, V6 v9 }; n% P( X6 E9 ~
6 v+ p  T4 e  P6 S! h$ nbegin P_something arriving: J/ T3 [, L0 X6 ~
   move into Q_wait
9 c% l9 H# y# m( X   move into nextof(Q_mA,Q_mB,Q_mC) & i7 v( s0 H; }. }* E& N
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
- q" R7 O7 _5 S   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
* ^! P" X9 m$ Q. z8 \! H" \' M( [2 ]$ Wend7 z5 @5 m* i& H2 _' _+ m, y
1 x+ Q% e. s. |
begin P_mA_down arriving
8 ~$ R9 p8 q, A% s3 C( b   wait for e 110 min" u' |6 N2 |2 s& j. k
   take down R_mA. @; Y" \! N& o/ R7 J' V
   wait for e 5 min
* t4 s" \7 o2 r) |7 }   bring up R_mA
9 j5 r- a0 e: L$ ^0 p9 j1 Rend0 G8 G, i) X4 t' g7 u: [, E6 v

- d* J  k8 u/ Dbegin P_mB_down arriving
6 w1 }" k& x8 x4 f5 f5 W# [   wait for e 170 min
- g: ]1 H: d: S+ q% q   take down R_mB
, H* p4 @. p! Q   wait for e 10 min* H& l# e4 h- u
   bring up R_mB2 d8 a  J, Q1 z: J
end
, i' F9 w( y* \5 @( P) E& H- A2 `' m5 g+ h2 J
begin P_mC_down arriving; v/ q+ R- _5 n$ B$ P0 |0 w
   wait for e 230 min+ ^6 D* U( _" @: M) Z, R9 V
   take down R_mC; ~: B% r$ A6 ^* s! z) u
   wait for e 10 min$ ]& x+ U$ b" V3 v% m1 T
   bring up R_mC
' w% R% F5 q2 P, }+ @/ Rend
- v7 U1 A3 J& h' m: {% }+ i+ A9 L- C* N
begin P_mA_clean arriving
9 |3 c+ U: L6 |* `* `9 m$ x   wait for 90 min2 z4 S; Q( B/ M: X+ H2 _0 u
   take down R_mA
5 q, d8 p3 P# b. c5 i& ^   wait for 5 min
: A$ N0 C9 p6 v0 f/ d6 g4 \   bring up R_mA' H; |2 D" @0 U& M& |6 b, H, j
end
! K8 t8 p% L, H9 {3 k3 V& N! T; Z% V7 i: g- m3 r5 Z
begin P_mB_clean arriving
9 X* b/ B2 k6 ]   wait for 90 min2 p' |( j6 o# [5 S$ I. \/ T
   take down R_mB
0 g( N3 P6 W! b   wait for 5 min  Q' s6 l' g! t! N
   bring up R_mB* O: B9 I3 f) _9 v# J
end. y4 u$ H  k! ^! P3 |

) ]6 B% p5 |* }! l% P0 m0 Nbegin P_mC_clean arriving0 {  i1 H. W7 {% ?$ b7 Y
   wait for 90 min
4 @2 `! q% Y4 C3 U$ r6 p   take down R_mC6 `; N) e% R+ d
   wait for 10 min& ]1 r2 O: L4 g5 L) p8 T- `( o. `
   bring up R_mC& |7 N: s3 u" @  w! X
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% n  q# O/ n! I: F
   move into Q_wait& b( g7 f- v1 b' d
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ \# B* F' B: H7 ~   move into A_w3 \( O9 ^$ a  f4 W$ p. k
   if A_w=Q_m1 then use R_m1 for u 48,5 min
/ g6 j  P0 W4 `' |   else if .....then use ....for u 48,5 min
- C4 g6 V7 u& n   else if .....then use ....for u 48,5 min  8 a) f$ V& @, C: e8 ~! F. R8 ?  n
   send to die
4 x7 f0 z8 B; P% ], I0 C" e8 Kend
0 K2 M  G1 |/ S  p+ h: w2 g" v  W5 _" h# F& L
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 01:25 , Processed in 0.014389 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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