设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7819|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ; e$ i, z0 Z- z4 S+ w
' ^* `8 |$ G. A" x& Q
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去3 M5 ?* f% F# C/ f; r( J2 I* n
+ N! z+ m) F$ R. E& I! ]2 p% M
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!- y( q" B$ D( A7 x7 w$ \0 a

4 t7 m6 v& Q+ l
--------------------------------------------
( z- D9 }6 Z' ]! e  |begin P_something arriving: p. X1 y+ [* u  M9 E8 Z
   move into Q_wait/ \0 j- i3 L) }
   move into nextof(Q_mA,Q_mB,Q_mC)  \' f  _+ \! `4 F9 }: k
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 t) {7 T) M. O; B: `
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)7 L6 e3 Z) w3 w
   send to die: i6 {. O1 b. B9 u% ^2 c1 \
end

/ e+ T  I, d4 s
& }+ @; Y' K. J# K! e2 \begin P_mA_down arriving& `, I- }6 i* A, ?7 q, I' ~8 O
   while 1=1 do
% @5 d  o" }$ z" X+ n   begin; c4 _6 a& o1 T- ^* f  x5 i! R& c* M
   wait for e 110 min
$ i, _& D  L9 a( s! h4 h   take down R_mA3 S) u4 Q6 n2 u( U" V
   wait for e 5 min
& S  d- s" r% J2 B* r- E) l   bring up R_mA& _- f) E2 ~/ O6 G2 |3 i, z8 {' `7 I
   end# U- ?# U' A. f/ ?) s% P
end

, N1 Y7 m/ s9 s8 |( _# W $ d; X$ G+ `- y# O9 H" f
begin P_mB_down arriving, {5 \& G' W* R" q
   while 1=1 do
( r8 M/ v5 t3 w0 p: r   begin( h& p0 y8 c* Y' r8 G
   wait for e 170 min
4 L, P+ j! o( F   take down R_mB
0 x+ c2 E/ K/ m) I   wait for e 10 min5 |' p" h, ^5 Y
   bring up R_mB) e8 O" P  w6 i4 G( w& w6 U' d
   end' X: W& V* w8 q3 e5 E
end
' u" g' T0 q1 J: G3 c$ S& [

7 {8 F9 f; }9 G& ~# @2 qbegin P_mC_down arriving& q/ M6 z2 y) \$ R7 y/ w
   while 1=1 do
: s9 \1 C4 R" i! Y$ T   begin( `  ^; |1 S/ g* J: m
   wait for e 230 min7 o0 \' i9 B9 p  u
   take down R_mC
4 R5 {  J7 I# l3 C/ F0 ^$ A7 Z   wait for e 10 min1 k2 C8 z$ Y' f( M+ J' @) O2 l
   bring up R_mC4 N7 C" r0 E0 m! F$ ]0 _2 t
   end& d* f- u7 Q6 W5 o" m% G1 Z' q
end
& f1 A& Z( g0 n
- |; l2 b% r. U; ^# m: F8 C
begin P_mA_clean arriving
5 o4 S* _5 \/ x/ @$ _   while 1=1 do
8 k) V, U2 {* s6 N' b7 {5 C3 W   begin4 ~; J6 s5 B% @; ]
   wait for 90 min
1 o0 `& b3 d; W0 }( c5 A! r" E9 w9 N   take down R_mA, t8 D! a6 |" K5 ^) L; {
   wait for 5 min# A8 H* ]1 x3 n! l" y, ~2 Q
   bring up R_mA. ~& G4 {' M3 k  i2 V5 ~! |( T- R
   end3 i4 S, r& B8 X$ Q9 O
end

) i/ }- L$ g' A; s& `# \  j  ^: y
6 d1 y+ e9 q6 A; B( C  Nbegin P_mB_clean arriving
/ _6 a2 X( h, }, C8 t$ _! K   while 1=1 do$ ^' Q+ z0 a: b$ A, i) _5 L
   begin
$ h# W' G! g+ V) t9 {0 k2 o   wait for 90 min
3 D6 B: j+ Y" q/ w   take down R_mB% W' X; U- ]) m$ f
   wait for 5 min
2 X' G+ B, J3 h   bring up R_mB# Y: W' d8 }( X8 ]' ]0 R" A
   end+ p9 t3 s5 \9 U5 L6 E1 c5 w
end
2 \( U4 ?3 q9 e) `5 j6 W
; E! R% _; K/ [+ E, X1 d) a: [
begin P_mC_clean arriving
( j5 o8 s, t& M" c. @5 v   while 1=1 do3 k1 o! }2 F) A7 a: J. d
   begin
, F% a# ~) [7 I' ^1 R$ U# n- k- U   wait for 90 min
, W8 V& @1 n4 b* g  O9 R* q   take down R_mC
; [% t8 |1 \4 {1 J   wait for 10 min
! ^; H. K/ E% u/ f' I$ s) d   bring up R_mC6 X& h5 C: `- s" f9 I1 L4 v
   end! v( n9 o: h: o% v
end
) z* g4 R2 m* e6 k
----------------------------------------- K  a. x! L' {9 u6 C: Q7 V

5 P# [# o1 S" M1 g1 fExercise 5.94 B0 g" |5 h* ^9 Y7 _% I- a; F

2 r& n: |) E: B3 q
/ w1 P8 E" r4 W  k% d0 _- r9 d) p& _Create a new model to simulate the following system:6 w" r$ e6 v4 J$ e7 s# n
Loads are created with an interarrival time that is exponentially
! E/ m, v' ~9 P# h+ v) J: _! R$ ~distributed with a mean of 20 minutes. Loads wait in an infinite-
# k* q4 W4 Y; ^capacity queue to be processed by one of three single-capacity, . ^) J" f7 f! i+ z3 i+ _) {2 _
arrayed machines. Each machine has its own single-capacity queue % S9 i9 Y! K! G' I; D: ]5 K5 U
where loads are processed. Waiting loads move into one of the three $ B& b3 [4 H+ Y% J' K3 ], D/ s+ R
queues in round-robin order. Each machine has a normally 8 p$ |; Y9 l+ h
distributed processing time with a mean of 48 minutes and a standard 9 f$ }6 _0 R. q* j
deviation of 5 minutes.
4 e$ R- K1 ?# ~7 TThe three machines were purchased at different times and have
) K* H" Q8 X0 Rdifferent failure rates. The failure and repair times are exponentially * O# c: H7 c9 K; s' l7 [/ D
distributed with means as shown in the following table:
# X; Q7 S5 Z; w( _& UNote The solution for this assignment is required to complete
$ ?1 K" \; C) ?9 C" Hexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   M; C2 K* x6 w4 P! a0 U# k
your model.
/ K2 [6 {" D8 {2 ^0 F8 z4 `$ q) F! S2 K7 j
MachineMean time to failMean time to repair
4 E$ M* [3 Y, b2 g' rA110 minutes      5 minutes
$ |2 c: A+ C8 ]) t& sB 170 minutes     10 minutes
8 s5 S. _- `5 s5 i. B8 ^" b0 FC230 minutes      10 minutes
) E7 s9 s9 d; ]( }. i$ f% Z: p
! r# A# \# {6 g0 JThe machines also must be cleaned according to the following
1 P( a- D0 L' ]* U$ Hschedule. All times are constant: . F9 y% G' S8 X; a4 ~3 h2 C
; t( ~: O' K8 B* \$ {1 {1 q# k; R2 w7 M
MachineTime between cleanings Time to clean/ e3 F8 ^6 F7 o, I9 Q+ M
A90 minutes        5 minutes- l8 C3 A1 [+ G1 S& N3 C" p9 O- O# Z
B 90 minutes       5 minutes
1 s% _3 E8 M% K* a) aC90 minutes        10 minutes/ y- v7 k. }- g1 k5 m# F( `
- m: \, T# e$ H( X- A+ Q# z
Place the graphics for the queues and the resources.
% o4 O2 ^- A4 W0 YRun the simulation for 100 days.
0 u1 p" _) x6 ^, GDefine all failure and cleaning times using logic (rather than resource
: E5 L) V* [' _5 X$ G1 U. Rcycles). Answer the following questions:3 |3 u, z8 c: f9 W# _& G8 z# O
a.What was the average number of loads in the waiting queue?
) p# F7 [% K+ i" @7 b) ]) Db.What were the current and average number of loads in Space?
" `  v& V" s; B0 i  w5 y/ \) WHow do you explain these values? 3 b# ]- }2 q/ h( k& E) D

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
0 R6 t3 W; ]! e* Psend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
  A/ P; o1 e. n% ]" A+ _这行好像也不太对,各位先进觉得如何呢?, @  w( G, v" e* r/ g5 y1 v

7 f7 `8 n+ {; X6 A- a/ Fbegin P_something arriving& l/ r$ M  v( H3 P; I* \2 J: ?7 L# i4 j
   move into Q_wait3 T" D& @; T9 b$ d* k1 I! N  X5 {
   move into nextof(Q_mA,Q_mB,Q_mC)
: V  _! B) }, q5 h; V+ H; ]   use nextof(R_mA,R_mB,R_mC) for n 48,5 min! y* B0 y4 O! s' M# f
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) " Z; i& m! K! A. w) ?
end
9 l% c! J! |5 Z5 L2 r- j8 e& d/ U1 u, B; F7 ~1 l1 @' R; U
begin P_mA_down arriving& b6 B- i3 x3 o6 C; J. n% @
   wait for e 110 min0 _. k2 Q( X' Y$ T
   take down R_mA4 _9 I; k4 W" ^. }, C5 s
   wait for e 5 min
: e! {) }* h1 d: ~   bring up R_mA
* R" O6 d1 l- M' J& X7 Qend! ^4 B7 P; Z- Q+ }8 Y. w
) y3 L' i- o7 G
begin P_mB_down arriving) M- v: z5 p: _$ ^2 |  c$ ?
   wait for e 170 min
6 f/ A' K0 `2 J7 s   take down R_mB
# L1 @! l  O* y+ K9 }6 ^   wait for e 10 min& c+ ]5 y5 e# f! X9 d' b9 F
   bring up R_mB& z5 O" h, l+ ?+ ]" `9 ]7 y
end
/ J% @* i" d' c% u( B7 p% D1 ~$ V$ w' {, C3 ^; s0 c/ e
begin P_mC_down arriving( q% f1 R5 W9 O* X
   wait for e 230 min% }0 [5 O5 t+ g( m7 J; V
   take down R_mC
$ Z4 x" f2 t; E* x   wait for e 10 min
! i' x0 ]( G' y   bring up R_mC/ V8 d. F! @1 t/ H
end
1 x( K& r, J3 _2 G- X; s  d5 z8 r/ m* J' r, Y
begin P_mA_clean arriving  s  W  D) Z: {2 t: O
   wait for 90 min( }2 M% f. R5 @( b: K, \
   take down R_mA1 }2 w& t$ l0 m& K
   wait for 5 min0 E# G% x2 H' V7 ?  c
   bring up R_mA
+ ~5 |  q, H6 w$ yend) e6 A" z6 y& {# J- q) J$ f4 p
2 Z" q2 X4 d5 d. e
begin P_mB_clean arriving
+ d( J- @- G# g- d) V* U+ K   wait for 90 min/ l% U9 n% c! R+ `
   take down R_mB0 m# Q# e" a- I0 X- ~
   wait for 5 min& y$ x9 _1 v4 D
   bring up R_mB6 E$ Z' i3 a) f5 R+ ?9 i
end* K( [/ Z5 Z% D! e  }4 I
$ l, g- k5 z: R
begin P_mC_clean arriving
! b2 {! D( s. j8 u6 A! D   wait for 90 min) l! ^: t6 o, r# W' J
   take down R_mC
: |, G' _5 `, a) ~2 I   wait for 10 min  L# ?5 f4 F3 A5 W
   bring up R_mC) }. ]% }9 G5 a8 W+ k! |( j. M; e+ }
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving' y4 D' E" L2 I8 r8 z" m9 W
   move into Q_wait6 a7 A) A- l0 J* T8 K6 F0 B
   set A_q to nextof(Q_m1,Q_m2,Q_m3)( c: e/ e6 }% R0 M: k
   move into A_w/ u: {" ?: J9 E1 W9 l& C4 n- n
   if A_w=Q_m1 then use R_m1 for u 48,5 min( D* F, g+ M; O5 t/ e
   else if .....then use ....for u 48,5 min& {2 Z1 |) G& z$ T) ^
   else if .....then use ....for u 48,5 min  
* E. O# f7 Q' B# }: n6 M( N' ^   send to die
! {! Y1 |: s' u* ~, k  r0 f, nend$ N" ]4 ~2 t1 o% W
; t; B& w% M. {3 j
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-22 02:01 , Processed in 0.019490 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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