设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7334|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
  H3 w# }( c$ A1 y2 b. V) z% k7 H$ X
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去$ E$ b. l9 P$ t$ v7 ^% N
% c' T. S3 y2 s: L5 R$ i
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
' [4 p  y  c5 K/ V, h( e* C8 K: o6 J
--------------------------------------------+ z6 y! Q* T. ~( }4 B# p6 B
begin P_something arriving) w! d8 q$ ^- ^8 P* N( @7 ?
   move into Q_wait
5 l* n# G( X3 @; e   move into nextof(Q_mA,Q_mB,Q_mC)  w$ P( q( _, M* M+ @6 u
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min% N3 k8 E7 k4 ~. g  V
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ F" \$ b5 Q1 r1 j0 m
   send to die
+ l; P2 b! F. {: vend
) L$ \5 ~! L; q2 G4 |2 o  s
: t) N& `- o7 R: U4 O+ E
begin P_mA_down arriving( U: K" n7 Y' q1 u8 E
   while 1=1 do
  F$ G7 @$ @% `3 c   begin
7 h, D3 N  u$ V   wait for e 110 min
. P$ H% d( P4 x# l' E# Q( h   take down R_mA( ]7 k: [$ v# u3 b% w; p
   wait for e 5 min  K# `- O+ o8 R) [
   bring up R_mA# q4 A7 w" J: z/ Y8 K9 W& i) G
   end" X8 ~& Y  ?8 J; }' ]: Z
end

4 s/ Z! a3 I* j, m1 \3 f2 ^4 M4 p8 c+ z
' y- K  Z+ [% u" ?  Q% C3 q% I! Hbegin P_mB_down arriving' }! x: L9 W. a% J* ?4 e
   while 1=1 do
6 i' ^+ n; {) g. U2 X9 S   begin; Y4 W  i( O6 L
   wait for e 170 min
# \- z) c* s& t5 j& ?   take down R_mB
! j2 N+ T0 R6 Y( `   wait for e 10 min, A$ u9 ~4 n5 b8 |
   bring up R_mB0 N. X2 I( J+ f5 ]9 E
   end: d9 S. l2 H1 U( V/ s9 O
end

; a; G( Z9 w- W( j/ v ! b# Y( ?! I5 J- Y
begin P_mC_down arriving
5 Q4 z8 }. u9 |  m   while 1=1 do % c/ x( V- T8 k
   begin" o) n  P& N  X# \2 ]
   wait for e 230 min
1 j3 W5 m" B  W7 X/ \   take down R_mC$ G' Q$ F9 B  Y: p4 S& }. d* q1 H; H
   wait for e 10 min
2 U" A, h  c$ J3 ~7 S& L4 O) E   bring up R_mC
! i8 G( N3 T8 ^9 f3 f. {8 W# q; Y   end+ ]% o1 ]) [# F! O3 T, g
end

; e8 V1 S# i9 h0 e' C& n
+ y  l! ^* ~$ e( Abegin P_mA_clean arriving, f0 j) N  B* J) U' Y# ]
   while 1=1 do8 I7 [/ }) `6 O7 f$ z! j
   begin
* _) f( w, \. k7 C/ J4 g4 y$ t   wait for 90 min5 B9 A5 g" d: O/ `: Q
   take down R_mA# H$ U- x2 U4 |/ [; x; P
   wait for 5 min# o$ s! k' U5 p) m
   bring up R_mA, |( i( o, r! K; r2 z
   end
0 J1 `$ B/ D; R3 E; Mend

: M$ P- B$ u7 A( q
  k! Q! {- r4 a  L6 gbegin P_mB_clean arriving5 M& S3 v$ \: x% Y
   while 1=1 do
% T* z5 @1 l0 e   begin3 t- ]1 p* w. C  s7 n' C% I
   wait for 90 min, B9 |; Q) u; Z3 w* ], w
   take down R_mB  s7 M. @' L9 z, h) F
   wait for 5 min
% M7 j/ l" s( H2 I. Y9 S* J4 K8 f   bring up R_mB8 e% x4 O7 t; n6 ~! S( [0 L# W. C
   end+ N+ u1 _5 C8 E( `4 R
end
2 g" w( s: N" y5 D9 `- T) ~) Q

5 o8 J0 l* ^9 _" ^) p- @begin P_mC_clean arriving2 ~$ [+ j9 l$ g( ~2 O& E
   while 1=1 do/ ]" F4 ^8 J0 b" V9 Q6 l4 u
   begin
6 R) _& }) X/ W3 h   wait for 90 min$ H* ~$ F9 v4 _
   take down R_mC
, }6 b5 ^* I& y8 a  [- Q6 T   wait for 10 min
& o6 G" f8 j' ^   bring up R_mC
+ z- c& {* f0 }   end; N0 v' U0 `! u- J5 t9 |' H
end
7 z& k/ x, K/ }# p
----------------------------------------
' q' S0 K: Z5 l8 s9 h. r+ Q
* _9 G# Y4 y& A$ p8 CExercise 5.9; J* \* r7 Y5 u+ r+ v$ x9 _
% k3 C9 `) ]3 z1 E8 C" E
# ]/ x! _7 `/ }3 s: \
Create a new model to simulate the following system:
3 n* D& h2 }4 G+ j; q% aLoads are created with an interarrival time that is exponentially 6 \/ }7 Y9 @, l9 G( M
distributed with a mean of 20 minutes. Loads wait in an infinite-1 `4 ~# `) t8 [0 F/ m& @1 S8 t* G4 v( `
capacity queue to be processed by one of three single-capacity,
0 X: F( W4 Y+ X* P! Darrayed machines. Each machine has its own single-capacity queue 0 X1 m: _# |$ ]- ?; y! t7 R! Q
where loads are processed. Waiting loads move into one of the three 9 b) v' n3 V" i, n' l( U$ @. I
queues in round-robin order. Each machine has a normally
: f4 S) i8 g; T/ b+ `9 c' C" I9 ]distributed processing time with a mean of 48 minutes and a standard
- X( B# t( H/ |) K  G! N" rdeviation of 5 minutes.4 O) ~% Q6 p2 B& b3 O/ I& R: m
The three machines were purchased at different times and have - g3 b& z: H  M
different failure rates. The failure and repair times are exponentially , G8 ]1 ]+ D5 h( U/ u
distributed with means as shown in the following table:
- @$ [$ K2 S+ W4 f3 ~  D0 NNote The solution for this assignment is required to complete 1 K  u( R3 l6 Y7 C* L) e
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 6 R* o/ u' R5 {0 U2 F
your model.
) Y# w6 }1 }) f+ P3 ]4 M3 N3 a+ {9 a* B$ m! Q: e; z
MachineMean time to failMean time to repair' [' H7 p4 Q4 P, [% I1 E  ]
A110 minutes      5 minutes1 F( q7 `  c: y6 {
B 170 minutes     10 minutes- c  G6 }5 {4 l
C230 minutes      10 minutes% a- `7 v5 H# ]6 f  u
' m- F8 s$ a6 P$ A" s
The machines also must be cleaned according to the following
* Z& k& E# G% R4 dschedule. All times are constant: % k9 _* h3 a0 b1 w

( {4 h6 O0 K9 Q6 I9 X6 @( yMachineTime between cleanings Time to clean# F8 F' I+ [( E* n4 w: p
A90 minutes        5 minutes
8 a8 R1 w/ H* r8 Q+ c2 t: b( aB 90 minutes       5 minutes, s1 @" d: t. e3 z4 ]0 D* k
C90 minutes        10 minutes
- y4 D3 ?9 l$ O. d9 P6 P# U( V* ~7 B3 G8 D" ^* w0 t# e. `) N
Place the graphics for the queues and the resources.
/ |. P4 P  \# N3 x! j6 H6 T/ ERun the simulation for 100 days.
( M2 T5 t4 J( n3 `Define all failure and cleaning times using logic (rather than resource * ], J; i. P! p* x3 f1 y5 F
cycles). Answer the following questions:- }; Z: ]2 W" f4 n$ G
a.What was the average number of loads in the waiting queue?# U& u1 Y/ M) J* o& ~1 s% G  y
b.What were the current and average number of loads in Space?
1 l0 o, W9 N5 a( o: |How do you explain these values? * H1 b! V, {& S8 M" l7 b0 c/ P' ^* D

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉( C/ L7 X. I& f  }$ ~0 w/ y
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 @  r+ j4 G! `! F* |2 |6 O这行好像也不太对,各位先进觉得如何呢?' ]; S( T. e- a0 |

* r3 h! H0 n7 |1 kbegin P_something arriving
1 z% O* I& ]  B1 ?! A, I   move into Q_wait5 Z7 k2 W& f9 s9 M
   move into nextof(Q_mA,Q_mB,Q_mC)
' G+ i+ I; A$ `1 E   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
* y4 k+ p( O) x$ A4 {3 e- v   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) # E# v/ x4 X" g
end
1 n  V; I+ A& ~; b' f+ C  @
  l3 ]% t5 m9 D8 P' C7 Y5 F  Dbegin P_mA_down arriving2 r9 X* u: A0 `
   wait for e 110 min
/ M/ D) y! V& \5 t: S+ O% g   take down R_mA3 ]: P" ~7 X$ D1 @& U
   wait for e 5 min& s+ \1 x+ H+ F& y0 H3 H  C
   bring up R_mA( I6 S0 G. p" B& V
end, Q0 t/ P3 u" ~* ~6 U
) m4 Z$ ?) Q# _# G& e- N
begin P_mB_down arriving
' K! S1 O. c3 I; j   wait for e 170 min( Y' ?6 M/ F* O& m( D
   take down R_mB
  n: k0 ?& N5 o' J   wait for e 10 min: e/ n, L% K& N& ]) i
   bring up R_mB9 d8 `6 l3 D( n4 a2 u' u* t1 w
end
- w- B* J$ ]6 q1 Q  n  z) H, u+ e, w7 C3 n+ o; t, c* @% G
begin P_mC_down arriving6 @. J( d5 z! y3 i7 a7 a, a
   wait for e 230 min2 O0 V8 A2 F; O2 A
   take down R_mC
) e3 U' v& Z2 K) S( m, R6 B, D( p   wait for e 10 min- I8 d" z2 J. |
   bring up R_mC5 y6 P' b8 o, T1 e5 v0 h' b6 r
end
* T" R' M  C/ ?  o" s
0 \5 j" b( ~- O: ]+ }0 y; R; i( t$ X7 Lbegin P_mA_clean arriving# G; Z+ y  Z% f' u1 O! c' y1 M
   wait for 90 min
3 H0 |; e( s! E2 I7 a) Y   take down R_mA. q) U! K. ?! A  K$ G# }, u
   wait for 5 min# m* ?9 m% G! U- T4 Z/ L
   bring up R_mA
6 P. S6 |& n. c$ d  U  I& Send
* l/ P3 r( f, C: F. d: j: J; S+ z) R5 C1 t  E: h. [3 @0 R5 U
begin P_mB_clean arriving
0 e  D; q2 L" P   wait for 90 min
4 `0 h! v+ g* }5 y3 d2 G4 m/ c$ t   take down R_mB
2 s& Q( I' O$ y   wait for 5 min
6 s& l+ a% u& Q9 G" _; y- k' f   bring up R_mB
8 V0 h1 ?4 W( M* S7 P* Pend3 g* l/ g, T8 ^8 ]# ]

5 Z- H! O9 h- @" l- Fbegin P_mC_clean arriving& T, w1 u. A1 s* o* b
   wait for 90 min
; K$ j. X) Q* K, k. }, ~& p6 L$ n& ~   take down R_mC* k# @2 \! ]: G; d: k
   wait for 10 min  I$ N( v. K" c& y
   bring up R_mC2 }) j3 e2 m+ }- a( E' |
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
0 \& K. _. v+ K, N: e$ t5 V   move into Q_wait% i' L# M7 F* @
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
0 E) @0 b4 B5 H3 I8 F   move into A_w% W/ z: g* }5 X, d
   if A_w=Q_m1 then use R_m1 for u 48,5 min2 N; D% h1 O4 e9 K9 \
   else if .....then use ....for u 48,5 min0 `4 H0 l; c* z; }- X9 p
   else if .....then use ....for u 48,5 min  * o- Q( J4 A/ e9 a; L
   send to die
# R, U- Z" {2 Dend. t3 F8 o4 `/ L$ `
. @- f+ I2 X' e* ~  h4 i
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 20:54 , Processed in 0.021213 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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