设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7258|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ' z$ p4 O) z- N. f* V. l6 w

  y+ L; E; E0 y- U底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去0 o: r0 N# L2 r7 U# _6 W
9 m/ k4 u1 h* n0 \! S2 e
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!# e' x9 Y6 U% Z9 n/ G
( ?5 B, d" F9 {/ g+ _% e
--------------------------------------------) ?) W. Z% f+ t0 L' V
begin P_something arriving
+ c8 C2 P7 d4 m   move into Q_wait
7 E: Q0 X9 t6 v+ Z2 k   move into nextof(Q_mA,Q_mB,Q_mC)
7 Z2 U, E& V1 E1 |/ r   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min/ ^: n+ m5 |! [) j" K0 j
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# G$ |5 m4 N  i5 I   send to die0 ^# P7 T. w! a% m9 W: [& Y, m0 T
end

$ P1 t+ {3 P, _ & t+ o: K+ H* N3 `: l
begin P_mA_down arriving3 V' K! `% L$ e7 t
   while 1=1 do
, A4 m: n/ N0 {, @% u; t   begin8 J& |4 f% ~4 L( O  H7 g
   wait for e 110 min% I5 M1 K* I% J7 O3 L- D! y
   take down R_mA
$ z) W6 n1 S- z& p) m   wait for e 5 min7 R0 E  u" g! F& L. v
   bring up R_mA
9 `/ e, M0 ~- F% p   end
2 A* E6 \% v% b$ p/ bend

- X( z1 D/ z! J& _8 {% s+ x1 x4 T
' Z2 ~' x3 n$ R" }7 {$ ~  w" sbegin P_mB_down arriving5 k/ I- p) |; B2 {+ l4 `- B
   while 1=1 do
; ]- M% d4 C, d   begin
7 O$ |6 a' r3 V: N8 b, |   wait for e 170 min- N' c3 P8 ~9 l9 r
   take down R_mB
' P  B- t/ T/ {, z. S; W   wait for e 10 min
; ]$ I5 f- K- i1 {   bring up R_mB
7 t1 t$ ?3 Y+ K9 l- j$ I6 }& _* S3 w   end
, `8 z( E0 x9 k6 S# oend
- j5 ^2 l  P/ ~: \1 y! I
& c4 ?' k; h  l5 \; O
begin P_mC_down arriving8 h) K* O6 m; j2 z  E7 L5 ]
   while 1=1 do / w# V6 G* J0 e3 j8 p( a
   begin
& C, b. M* c& O4 T   wait for e 230 min
+ D/ @1 R, `6 \* r* v( o/ r   take down R_mC
: F  ^1 R; r, ?0 C) I; d( O   wait for e 10 min
( l  ?5 {+ G1 h   bring up R_mC+ e7 ?. U8 L9 q/ U0 z& q/ b! U' b
   end
; \. C9 \" Y/ d' K# _7 }8 e6 Z5 Vend
  b" P) {( u3 r9 M6 x% |7 u

+ D( ]0 E: X! L; c/ U4 ^! \  [( Qbegin P_mA_clean arriving
& h" y7 J# x+ e; H5 u% F   while 1=1 do
: p9 d- [! y* l& }" l   begin
0 a( C6 i* O& R' x9 m   wait for 90 min
. @, [( _) E1 g, _3 ?& e3 z& D   take down R_mA8 ^" }0 E2 z# W; i
   wait for 5 min
9 I' m0 o/ D/ v- G: F   bring up R_mA
# T' Z. h) L8 H: ]   end
5 r$ @/ ^# U% a5 G# q! f# Q/ `end
, c) @; `. G2 D. r4 z% ^0 {2 O1 {" G
# b, Z0 P8 |7 C5 R) o7 }
begin P_mB_clean arriving+ H& Q8 k8 L! `5 f1 K+ j  [
   while 1=1 do6 |8 o3 V# O9 G1 P2 X" F2 M% C
   begin- l5 Y; o! F( {- m# }6 @
   wait for 90 min) h* g# B, w* G6 w% f# r1 W
   take down R_mB
) t" B& I3 V( z1 F5 T. \; u   wait for 5 min
( O9 @+ Y  ~2 c) [1 G   bring up R_mB
5 `2 i) s& Y- K" x   end
# i1 c2 Q! P; v$ y$ uend

8 Q6 L) a, \, r3 [; }. O$ T
+ P( V4 q0 B9 G; O( W% x1 Kbegin P_mC_clean arriving4 B' J7 L7 S4 u7 H8 W5 A) e2 D
   while 1=1 do
4 F  q% F  E9 d% U" M   begin* Z# Y5 I4 B: p% F: P+ v
   wait for 90 min+ V+ V" c" c, O( x. Q
   take down R_mC2 Q: B5 h( ~! X
   wait for 10 min
" ]& g- F+ ^! Z* ?0 D$ Q   bring up R_mC7 e  ], f8 F" E% j7 P
   end
$ x4 G2 N. @! H8 Iend

( k# o) O  \  ^; ]5 [% Y/ F/ y----------------------------------------
1 F. m/ E; T( _ 0 L5 G* e5 I+ b. b, P: Y
Exercise 5.9  P- ?0 ]8 H; J

- L: g; d6 \# N; a- y! s: J" I" A) f9 W, T8 B
Create a new model to simulate the following system:
- Z9 f. D5 ^, A" @5 cLoads are created with an interarrival time that is exponentially 8 G& L! B1 i; R' e. u
distributed with a mean of 20 minutes. Loads wait in an infinite-
! w& Q6 |& u) k" a7 c+ f5 d9 Rcapacity queue to be processed by one of three single-capacity, & n3 w0 I0 X; m( L( A
arrayed machines. Each machine has its own single-capacity queue . S  D) D. l( O
where loads are processed. Waiting loads move into one of the three * l% `$ n9 w- y3 X- P
queues in round-robin order. Each machine has a normally ) t4 v5 I) }& y1 d0 Z
distributed processing time with a mean of 48 minutes and a standard * u' i. _. @/ u! z; Q; b" Z9 O
deviation of 5 minutes.
; n1 W4 f0 b! ]5 z- fThe three machines were purchased at different times and have 0 `4 l1 A( `8 P( \
different failure rates. The failure and repair times are exponentially + f( M% t% V! H& b
distributed with means as shown in the following table: / p! N, r) t8 M0 J& [2 }/ `  v- @3 J
Note The solution for this assignment is required to complete
2 `  d0 N% |; u3 l: w4 t1 o8 Jexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 |1 _* f' ^& ryour model.
, M; y9 F+ G2 R. ?0 ^' w& _0 M4 O' w, p
# b/ [& f2 e- vMachineMean time to failMean time to repair
# P7 w# G, N7 ^& n$ MA110 minutes      5 minutes) T2 Z. n/ |+ R  d7 v- W
B 170 minutes     10 minutes/ f* T: J: E4 j3 y3 |! w
C230 minutes      10 minutes
, n% P3 w, `, j( A( W
6 G# V% |1 n" y+ N0 {. y  S1 [The machines also must be cleaned according to the following
8 P2 r4 H% U; l. y( {+ mschedule. All times are constant: 7 }; R9 f/ c3 H2 Y% \# V5 T
( d/ h3 I: A( t! @! F' _1 X
MachineTime between cleanings Time to clean. n8 s1 K- G% u5 B2 m
A90 minutes        5 minutes
* N+ Q8 f. X0 W# CB 90 minutes       5 minutes
! g8 a' {' t/ m* @+ O9 JC90 minutes        10 minutes& r: T" T1 W$ o5 G; ~2 g) e
" u& T' T* V% C. D/ B% g  k
Place the graphics for the queues and the resources. + E8 Q1 a3 S+ c) T# J9 W' m
Run the simulation for 100 days.
0 U7 f; C2 @# c+ z' }4 ?Define all failure and cleaning times using logic (rather than resource 6 r6 |! _& A2 v
cycles). Answer the following questions:
$ J% P9 w. ]; ~5 t6 A9 \# Ba.What was the average number of loads in the waiting queue?' r/ F4 I$ S9 y0 ~
b.What were the current and average number of loads in Space?
. j0 Y# g% }. F- d# l& `How do you explain these values? - o" _) t# s, h' C5 L

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉& Z2 c$ |7 k4 A* k) s! X. M
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 r; V( m9 T: T+ G# I% @2 w
这行好像也不太对,各位先进觉得如何呢?
9 a" z3 B, J. i4 c! f6 {0 `, R0 E  u' ?
begin P_something arriving
4 }8 i3 k3 \- V" f% J   move into Q_wait
, k6 p. ~3 O  Z5 c5 D! f   move into nextof(Q_mA,Q_mB,Q_mC)
+ o- H6 D7 o+ \: K  O4 l! E   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
9 ^, v0 {9 C5 b& B' J# e6 l   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 8 n3 E. T: W5 Y7 N" X5 o$ f
end
2 Q6 T2 \3 W5 E; `* \0 e2 \% S9 X/ ~7 L8 j
begin P_mA_down arriving
* O$ C; n0 X' n3 U   wait for e 110 min6 ^% e0 F" y4 u; L1 P
   take down R_mA  \' V# _* P9 Q/ o
   wait for e 5 min: m1 Z8 ^# l& R$ q# Q$ K) W6 u$ I
   bring up R_mA& x5 H( h4 F, X
end) a- y2 G4 U# q5 Z# \

+ a8 W8 c- s! b. Bbegin P_mB_down arriving
3 i/ Y4 t: }. a0 F" u8 X- n8 @   wait for e 170 min/ w( t1 L7 L) `: ?
   take down R_mB( Y3 c" ^+ x6 t$ ^+ L
   wait for e 10 min
6 {" X. \; g* N   bring up R_mB0 O* D) G! q! h$ ^% g
end
+ V, t  V2 V! j7 ]5 x7 |4 B0 e  O) L0 W: H; t
begin P_mC_down arriving
+ m( J% \+ P2 w1 o6 m' B1 ^   wait for e 230 min; {3 U; y0 }" O1 n2 h1 [) x1 [2 e
   take down R_mC
. m' Z, ~- v+ `2 F0 ]   wait for e 10 min$ o% U$ W4 v* D
   bring up R_mC
* t7 x- x, c' g( _end. E) v" }6 B3 V7 }: u$ H7 \/ l% O# J

2 i" q4 v2 o  Z5 R3 Y& _" Q- nbegin P_mA_clean arriving
9 e8 I8 e$ i, n* z4 N/ e+ {/ |   wait for 90 min
! B0 @) P, R: @7 P   take down R_mA  S$ A3 {2 ]' w$ @$ a( ?7 a  x
   wait for 5 min
' ~+ q; `) A  W. _% O5 W   bring up R_mA' r& _8 u# w: ~& l
end, F/ J9 E  w5 M- Q. [  i; C

" x* J( V# l& i! ?9 ybegin P_mB_clean arriving
$ T4 [! _  j- a   wait for 90 min- l4 M/ J/ X$ K8 ?$ S8 E9 q1 d# N
   take down R_mB! X+ k3 @7 o& s
   wait for 5 min) F$ B* R% e2 L) p4 I9 T  |& @
   bring up R_mB
; h( T! ~+ G7 J. qend' q4 |+ N* T/ L" p/ A* e5 I& V9 [

/ b1 M, D) m% P8 c0 l/ }! X( R5 abegin P_mC_clean arriving
7 Q' S7 m$ a' Z  z  G) ^   wait for 90 min
% a2 S8 a$ C4 m$ i' k7 p   take down R_mC4 S5 W* C# @$ h/ A2 l
   wait for 10 min; q/ v, D( _8 U, H
   bring up R_mC1 V5 U8 c/ B$ ^: }
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving/ x6 U. h- y  j
   move into Q_wait1 H1 L& w2 b: I$ g4 \
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( X! [# U! Z1 M" g7 {) j4 n   move into A_w
- I& ]1 A! N+ \4 b8 {1 s   if A_w=Q_m1 then use R_m1 for u 48,5 min
9 b; z' c5 D$ i  [; q/ {   else if .....then use ....for u 48,5 min' n& ~6 a7 B1 [4 Y/ c' f$ \( E( |) K
   else if .....then use ....for u 48,5 min  . H  V- r6 k- u& U4 D' O: v' y' X
   send to die5 r( d: ]- B6 \, v
end* {& S3 V, N) d5 o6 m4 o
! x" _5 m6 x. v
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-21 01:43 , Processed in 0.022229 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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