设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7296|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 & d: k! a2 P/ _+ Y+ Y2 P8 Y* I( D
7 S& t0 a3 e' U( g; X
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
% k# {7 O9 I+ ], T# ~$ h: G3 w7 j# H# V) w% w3 F8 V3 @
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
7 M  }8 D$ O2 P) D( T4 L0 _6 r# m0 v2 |* m& M6 h: o
--------------------------------------------2 v6 I5 e8 N# x# `( R/ t6 B
begin P_something arriving; c! _4 [# Z; ~
   move into Q_wait& S/ i7 z) _0 K5 J! [
   move into nextof(Q_mA,Q_mB,Q_mC)
, w+ X& l9 Z+ r, R7 f* I) F   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min0 B; m' Q8 `  F: M1 A9 p
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 ^9 F9 r) ~+ i
   send to die
6 b4 b' {( v+ H  E4 l, o' O" W; e3 Vend

% K3 k5 @7 Q$ H$ A  H) J  Q: Z2 Y- S
! \" S' {! a  J9 D! Obegin P_mA_down arriving
5 h7 o+ D; n$ J6 f+ Q  M0 L   while 1=1 do ! ?2 i# Z7 q; {5 J7 v
   begin
6 ?! L/ s) n: P% X! N& f   wait for e 110 min7 M; m5 }' I+ v5 ^! @1 V
   take down R_mA
4 Z/ o! B* W( h0 q, {   wait for e 5 min5 [4 D& M7 u8 X3 n
   bring up R_mA/ v# K! M' n) b# W% u
   end
, s# ?* [8 N4 S- d1 W# uend
( {2 S9 Q( H3 v6 V: p5 h3 B
& M& Z+ F0 |4 o8 a/ c
begin P_mB_down arriving, r- @( d; P9 r& M, I9 \& @6 y
   while 1=1 do
. |$ A8 e& A% Y/ @' a   begin0 @# b$ _, b5 Z, B3 M
   wait for e 170 min
. T2 J/ n* R0 v( c2 t   take down R_mB
0 M- F  p  @4 V+ n$ Q   wait for e 10 min
3 x% U' G  D! v. i! x( Y( b   bring up R_mB
/ X3 @* v- ~: g9 q- Y% f+ L   end, r% z: z$ a* {) E, O
end
5 l/ \# i# Z1 h1 y6 \7 x
0 D. g9 z2 @* x6 F  l! w
begin P_mC_down arriving
5 q$ B" t3 v4 c# K% d   while 1=1 do 5 o; |, R) v6 T( c
   begin
1 `9 A& G4 R. l" T' U   wait for e 230 min6 _4 `  ?- S, Q1 H! d% |8 [6 x
   take down R_mC
5 z! ]. D% O: N9 O   wait for e 10 min
1 E+ a+ _' {) }: ]   bring up R_mC
( ?4 ?4 O7 l- H) h* h4 W* H7 V5 K   end; d: H+ k' w0 m9 M: P
end

0 O6 P0 o; b+ ~7 M0 h) N9 q  m
/ D, o$ \$ B  T, nbegin P_mA_clean arriving' W4 I  W# q3 Z4 Q: T9 X( A
   while 1=1 do
3 A! b8 g9 `/ y, [4 T   begin! K: j% Z3 b* |) _" Y
   wait for 90 min! C1 @- i, {- z% D* `( I
   take down R_mA
" l( O/ A% |$ `4 D; _3 G   wait for 5 min: u, ?- f8 k+ ^$ ]( w
   bring up R_mA
) m( f* G2 K# }   end/ Q3 X2 t+ a  d; h' j
end
' r! n; Z+ m* U$ @
" ~: d$ t' [3 c3 D* B
begin P_mB_clean arriving
4 F; X! C, A- l0 e   while 1=1 do
$ s6 g" G* x/ p: Z7 g3 H' b   begin) T' K* d# k& g) e3 H2 @9 U3 t& n
   wait for 90 min  e. t$ a' c( O; X0 u: `* l
   take down R_mB
( F& n, A3 w& Y   wait for 5 min* D+ K( Z- n. B' {; K, A- ^
   bring up R_mB4 `# f1 l$ |8 j  @3 R
   end
3 U0 o& n7 b; a# ]; lend
3 X+ M& B* C9 l  R# g! @
6 q8 B- E& l) ~1 [! a
begin P_mC_clean arriving2 a' ?( ~1 I5 d0 ]3 s# a! z
   while 1=1 do" Y) j$ x3 h; m2 c1 a! v; M
   begin! U/ v  G! s) |  t) n8 u. U% ^
   wait for 90 min
' h0 m" b& |) c. c   take down R_mC
. z8 _/ {$ E4 @; M+ t* T9 \& n   wait for 10 min" P) H4 B6 Y. N% T0 X
   bring up R_mC
. o6 A3 B8 ~. ^2 m( i$ ?$ y   end  m5 @8 R* y+ G4 E
end

$ D! k! o: m! ], C----------------------------------------
- I" X, e$ b; M/ F # G; G' l; K) e7 a& \; |* p
Exercise 5.9
% z4 h$ b; e, V& _0 _3 @& q4 _: ]
! T: s7 B! j, X3 G2 W8 l
( ]: b3 J, n' ]' _* QCreate a new model to simulate the following system:2 i/ ^  y& c9 p
Loads are created with an interarrival time that is exponentially
! I: c0 p8 T8 x0 d" i" S* u2 m; Tdistributed with a mean of 20 minutes. Loads wait in an infinite-
: E- z* b, k+ e- h/ fcapacity queue to be processed by one of three single-capacity, ( j8 h9 c! H! R4 n/ c! N
arrayed machines. Each machine has its own single-capacity queue
" k; x7 U% M3 V  L) c' f1 x! G+ t% Owhere loads are processed. Waiting loads move into one of the three + B9 e4 }8 A  [
queues in round-robin order. Each machine has a normally
, @# O  J5 ^: fdistributed processing time with a mean of 48 minutes and a standard
2 g7 |) m  p8 g$ d+ F- b+ Qdeviation of 5 minutes.+ k3 ~+ R& V  W
The three machines were purchased at different times and have : q5 A4 H: B" j* H- ^0 c1 d' X
different failure rates. The failure and repair times are exponentially
: B) M# Q' H! m8 G) s; u3 ^distributed with means as shown in the following table: 9 R. _' W( z' H8 {
Note The solution for this assignment is required to complete
; |0 V  e* w) d1 yexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ( i5 L9 l8 w; c, M4 M
your model.
% Q( f3 t2 C& J$ {: n% d/ A6 ^
  V# V6 j1 I* \, XMachineMean time to failMean time to repair
+ g  C4 N# [4 H  i8 x0 M( NA110 minutes      5 minutes
' x: c* v9 D! t1 F0 gB 170 minutes     10 minutes
  d) O1 A2 P: p) VC230 minutes      10 minutes
# i/ C, a2 z$ N  [. S8 ?/ U9 F  A% o1 W. L; ^; _3 X) q0 s" d) J
The machines also must be cleaned according to the following
3 |# L# V5 Z$ A$ D' }schedule. All times are constant:
4 l+ j" [2 b& W- z( {* o/ e; u
  f( s. e% d! `1 b. \) K" X& ~+ rMachineTime between cleanings Time to clean
7 ~; O2 @: t. ^4 n3 ]A90 minutes        5 minutes
: H" f2 g, W; P/ W! uB 90 minutes       5 minutes) N  B8 _0 C3 L3 F4 @  I9 w5 Q( E
C90 minutes        10 minutes! g+ b1 A' t5 u
- z4 a- o& r/ z& v
Place the graphics for the queues and the resources. $ }9 \) ]/ R& p$ o5 P* P* p
Run the simulation for 100 days.  k& e5 V1 I" d- S  j( l+ S
Define all failure and cleaning times using logic (rather than resource 5 A. R& ?- \: K, n0 h1 b
cycles). Answer the following questions:, ^: u8 Z, e& p1 u3 T" [
a.What was the average number of loads in the waiting queue?0 }! A, i/ j" F( o" z; q
b.What were the current and average number of loads in Space? & g5 N6 ]8 J3 w6 R
How do you explain these values?
, ~. |/ ?- ^' R) m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
+ R) [: s0 _; S. A! h3 Usend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! z" L4 d9 D+ K2 ?5 z
这行好像也不太对,各位先进觉得如何呢?
2 E4 x" w5 j% g1 ]7 S! y+ X6 D6 q$ j$ S) B# ]- v
begin P_something arriving. D8 F* D' C. Z8 i. C4 E
   move into Q_wait
7 W* a$ S& @: D  @9 S   move into nextof(Q_mA,Q_mB,Q_mC) 4 D7 e7 _6 w1 q8 I0 l, ^
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; ?' W0 X6 R  {/ \& N  K' M3 y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 ]6 f5 E  }2 z, @end0 R$ ~5 l8 {6 k" T/ w6 R

3 A" [* A( O  |* J$ ^' j5 z" v0 kbegin P_mA_down arriving, J% ]) r9 ^# [$ A, t/ Q
   wait for e 110 min5 I6 L8 }. U% O- `. ?* o
   take down R_mA: A% l7 N" [2 z  \  u3 o) E" b
   wait for e 5 min
% b" n) N7 ^2 J. f# D+ X( I   bring up R_mA, t: T" t8 [- ?; P: [- ?2 Q
end% u) r5 b! `: f2 ^; W
  v1 _6 G( T5 f- k) O! {
begin P_mB_down arriving% u+ j% {. J! N9 Z, e, x' f$ H" C
   wait for e 170 min; |% C2 k' e: [! G
   take down R_mB
0 T9 i3 K$ {4 ?- F1 Z: s3 V+ d0 s( E   wait for e 10 min8 g  B" s9 }" [
   bring up R_mB
3 Z2 N1 Y3 X2 C) {& j8 c1 }" Mend3 B" M9 [7 o% Y! ^- k, z) p2 `
6 o+ k$ q/ X  W! e, r, B! R
begin P_mC_down arriving5 A, e3 e# K" f* J
   wait for e 230 min
  b7 H: Z" |! l5 e( u. o% @   take down R_mC5 s% G& W0 e9 Z/ M, _
   wait for e 10 min% q$ W( F8 v- w/ B; N( Z
   bring up R_mC2 Q3 f/ z% r' ]
end
" i/ A' H+ Q3 [8 {8 \( R
6 Z& G4 N7 L! g6 wbegin P_mA_clean arriving( e( f/ C0 `# H4 n
   wait for 90 min
& j+ ~- _1 S. `/ T; k   take down R_mA
8 t6 L& P/ J0 M& w/ f6 a2 P5 a   wait for 5 min/ u$ x( y7 _* F
   bring up R_mA
3 S( o9 s! @, @- S% ^8 Pend0 |* f3 A0 A1 L7 I- ]2 J& j8 Z

1 f( c6 N5 P7 i3 p: Dbegin P_mB_clean arriving
! y( \* y( s8 O: K- Y   wait for 90 min* [9 I& y8 f! [) b6 Q2 K1 P
   take down R_mB
" v, \- W' z) I, d$ L1 q! r   wait for 5 min
1 S% w0 }8 p2 O& e' \4 L: c   bring up R_mB3 e; w! @1 i+ U; o
end
6 t, y2 R8 S1 O( z! W2 j
/ L8 p, z. n1 `  e  Lbegin P_mC_clean arriving, e, e# P1 f6 J4 n9 S2 w
   wait for 90 min$ U( i: h- f. y. S9 d3 z
   take down R_mC
4 X! `* X- v2 S5 g7 b   wait for 10 min$ I$ s* U4 [: o1 ~, ]
   bring up R_mC5 D* C# O- L% q) d
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving; e+ b2 C% E/ f( s3 v
   move into Q_wait: j  K0 J1 j# g7 l( F" s
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
6 {- I+ e& l. C, v. I   move into A_w
" Y" @0 \1 i9 i3 \- D* ]; t, ^+ S   if A_w=Q_m1 then use R_m1 for u 48,5 min% q  s/ y6 U! ?1 R0 C; o
   else if .....then use ....for u 48,5 min5 Z; F! x( O, L
   else if .....then use ....for u 48,5 min  
3 k3 w5 I0 H& ]7 p   send to die% D3 o' m5 ?, t8 E% a# e; X
end5 g  X' ^6 k0 U7 y) R1 M/ ?6 @

8 \8 n) P5 w2 e3 M$ ?' U供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 22:59 , Processed in 0.015401 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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