设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5857|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
1 q8 W0 u( C% a( z% I+ u' _7 _0 E# S
3 |* A, J/ k0 V& t! R& y0 W底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去+ N: ^4 P3 x: b
6 z. T9 L9 v* h
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!* e8 [8 S. k: o) Z" T: ]" C8 e
; A* m! e6 p7 W5 L2 g8 C2 e
--------------------------------------------9 d* p! ^/ z+ {
begin P_something arriving
7 n% v' K+ }* n( y" C4 ^2 B8 e  k   move into Q_wait
5 d' t9 i1 }& z3 {" }' _   move into nextof(Q_mA,Q_mB,Q_mC)1 [% I# W% g5 J& D0 A
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min% F) M7 h4 p. R) x, S6 t- C3 a0 X
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)5 ~7 ], |& E( [9 W# S6 I
   send to die+ N; ]/ H0 m* Y4 L' z: k
end

5 J8 H: l6 c! Q# _2 d2 t' m# J, `
2 n1 z5 h$ C6 Z# f% ]! w+ Hbegin P_mA_down arriving
. ]2 `' p* C4 `* r' o' x   while 1=1 do
4 Z6 X7 a( L; j! c% `   begin( o" }/ N+ X; `! E  i6 {- a
   wait for e 110 min' u; x1 t7 k% C. x: N8 w, c) R
   take down R_mA
# ?( s) q5 b5 ?   wait for e 5 min
. f5 t/ x/ K( ?, M   bring up R_mA8 g, f' n; ]* e
   end
3 @. i* b# U$ b$ G3 a, e- {end
+ e6 S% P* N/ ^+ t1 w  o

- L" M( H: S/ u% Ybegin P_mB_down arriving
! h: x5 K# t# W  a$ X   while 1=1 do8 d% D+ H+ |1 O
   begin
( [* u) o) c# @  t   wait for e 170 min1 e6 _3 \6 Q6 i" F1 H/ x6 \$ }
   take down R_mB9 D2 d. b) O+ n3 c
   wait for e 10 min
' Y- z, B5 G$ ^1 |" I; J   bring up R_mB
6 ]" ?9 D" |0 b   end4 I' V# Q9 F- e
end

9 D) W. c4 f+ n, U$ _$ i6 ?8 x
: {8 w2 |9 W# i+ ]# _5 U) Xbegin P_mC_down arriving/ d$ w  k. `. E6 p7 E! R5 [
   while 1=1 do - l0 X2 X, C# F# I# p
   begin$ A& y% i6 c& A; j1 d
   wait for e 230 min/ r% Z% Q! h5 x. z4 o% x, ]7 P* ~! _
   take down R_mC; ]+ y7 T" _. B6 J3 K
   wait for e 10 min
1 Y7 f0 [' E+ }" c' l- U2 y   bring up R_mC
) ~3 D6 O0 u2 v) p* Z% k/ {2 a0 ]   end
! C$ Q! v0 r0 d" a5 _' R  j, l5 kend
% a  N  z+ x9 J7 v" Q
, W0 C' a  u$ G+ e2 N: X6 V
begin P_mA_clean arriving7 }$ q) |# [$ J/ L9 i
   while 1=1 do
- C" o2 g) D4 {8 O) t" Z) J5 d0 W+ V   begin4 u; j' k* S9 I; |' e, Y
   wait for 90 min* n, ?* h# P0 X4 L
   take down R_mA
& [2 w" b" a+ Q0 h9 s   wait for 5 min9 ^% i1 K* Q. p9 m9 e
   bring up R_mA8 z9 Z! L$ H: l8 d
   end4 p8 [- O7 E+ `+ N: J) \1 f, V1 p
end

. r4 t. l6 p- X ( S  ]8 S2 Z' ?' U
begin P_mB_clean arriving3 E0 {% c8 K- `! |& {& q4 K
   while 1=1 do
3 y* l1 W( t! ^/ m  n   begin9 T/ `4 `& c9 [& E: W+ B
   wait for 90 min
, v; }1 U1 `% s' _3 U9 A5 t   take down R_mB
# e- E5 Z$ X1 H+ }9 \0 ?7 ]5 r7 A5 ~' w   wait for 5 min
& N$ P$ `5 g1 S; Z   bring up R_mB
: f) i* D6 t% ?, P; l   end, J: w6 [( O/ q3 i1 O% x
end
1 m8 x$ i5 z8 o

8 q+ V0 Z  M' g# U: ~3 pbegin P_mC_clean arriving
, M* X8 f. k! ^8 u   while 1=1 do6 @: {& R1 t. L7 ^! n6 S9 F) U  ~: i
   begin! Q6 J5 {8 s# y
   wait for 90 min
' j) y' p1 \" g# m   take down R_mC5 P' a. Z- t- l. @
   wait for 10 min
" P, I; {0 B6 W   bring up R_mC: {: T, p& |# K/ Q6 f
   end
  M$ d- o1 B7 f, o# ~end
& b9 C7 G# i1 h: g
----------------------------------------% m6 y/ K, u1 x# \- P9 o

6 b9 Y2 w" D1 [, f. ?" cExercise 5.9% ^" V6 e7 ^; W0 r' }- h
: p# J; m1 t" x- S4 ?, ]

5 q' _' z* w: T0 [* WCreate a new model to simulate the following system:
$ f% d* b0 }6 D3 C% K! {Loads are created with an interarrival time that is exponentially 6 ^" m6 v: J6 K- h) j
distributed with a mean of 20 minutes. Loads wait in an infinite-
6 H5 W1 X# T/ J% bcapacity queue to be processed by one of three single-capacity,
  n) E0 U, n; f' X# _/ W0 P; b7 u% ~arrayed machines. Each machine has its own single-capacity queue ' m% O2 O$ g' y9 x' B& E
where loads are processed. Waiting loads move into one of the three 5 ?, g0 z6 j# n) T
queues in round-robin order. Each machine has a normally 9 y3 J" ]- Y' F* {3 ]; d/ v9 X# l9 D
distributed processing time with a mean of 48 minutes and a standard 1 o3 J( D$ k, A. p1 k$ i
deviation of 5 minutes.
* i4 E7 S; s5 t8 P4 [7 p. XThe three machines were purchased at different times and have
3 ]( a' E$ r6 `- S+ V* Edifferent failure rates. The failure and repair times are exponentially
( s& Y  w9 M/ C) z; x: w, {; _+ N* Mdistributed with means as shown in the following table:   p  z, N) V/ U: b
Note The solution for this assignment is required to complete " |  q& ~' x3 G( J' m0 [9 a6 ?0 i- `3 p
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 L0 \8 X4 q, h4 B6 D' f4 s  H
your model. 9 z- M& [5 ^# {& V3 {" j4 A
4 t$ H8 W" h: u4 P' s
MachineMean time to failMean time to repair* R5 ]# v1 ~; d' p8 D5 \
A110 minutes      5 minutes
! l$ e- u7 @# s; _, @B 170 minutes     10 minutes
# L& l2 e3 m4 M/ H: p; m; RC230 minutes      10 minutes/ U; `( S2 Q+ S: o  M: F
& z3 q1 T( L  q/ A& y4 n9 Q
The machines also must be cleaned according to the following - m) \' X1 b" z
schedule. All times are constant: 3 A5 T3 N# t/ w
& ?- j5 u) t! L7 C( `9 ^" p& l- w
MachineTime between cleanings Time to clean
$ k4 |6 _1 {1 L4 e1 j7 NA90 minutes        5 minutes
0 h9 F* p" k) Y; |* U; t$ [# zB 90 minutes       5 minutes
7 x" f2 j; z" X- ~0 w! w3 e7 F! eC90 minutes        10 minutes' E1 E% ]* H; u* E$ \" N2 V# |

0 A* d- _/ x" ?Place the graphics for the queues and the resources. ; X) m8 b1 U4 L7 G0 [) x+ ^
Run the simulation for 100 days.
; D& \0 F5 M# P& |6 vDefine all failure and cleaning times using logic (rather than resource ) j, B* l3 p* @- ]+ n% T
cycles). Answer the following questions:- p0 ^6 d; T! m7 ~2 C4 W, k2 b
a.What was the average number of loads in the waiting queue?
3 o' }9 O7 ?' ]  H0 Zb.What were the current and average number of loads in Space?
9 [3 Q) K9 B) q* ~5 T% S8 XHow do you explain these values? ( i3 m4 L7 [7 |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉' B; n. z; z! a9 I
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)# r* w/ B$ w) {2 @6 z4 R1 v, V* k7 ?
这行好像也不太对,各位先进觉得如何呢?
2 G4 q. z! o' f" b8 _" K9 \; f7 a( l. t
begin P_something arriving
/ ^7 T/ B5 \" v, Y/ z8 ~- [   move into Q_wait& o& T% Z# e0 F) e1 U1 |* ?
   move into nextof(Q_mA,Q_mB,Q_mC)
9 r7 \; F% K% S( u7 ]   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 Z2 \8 O8 \' F$ R
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) - ~, U: R$ y2 Q2 }
end* S8 [" v2 J% z( R6 ~/ q0 F$ Q
, R$ v$ l; S1 n5 R
begin P_mA_down arriving- ^7 @: G, j6 Z
   wait for e 110 min
) ~! v, p$ \/ x: ?   take down R_mA
. f+ R( I% {1 R5 Z8 K   wait for e 5 min% y4 J; l& G2 ~
   bring up R_mA
6 Q2 K3 J2 i& Z) @. Q( x# T( p% ]end
5 W. l0 s7 U+ ?  Z  u! ?4 |- j
% q. B6 b. K3 m) c9 D( p* K& E2 S$ Wbegin P_mB_down arriving
/ z5 F, w. d. X' I3 w4 _4 N2 y   wait for e 170 min
4 H8 i  g3 U$ _; I   take down R_mB* I' i; g: m0 P. @
   wait for e 10 min
/ X( _: w6 f: z* Q% @# R8 P' k   bring up R_mB: }9 Y, g* ]& [4 E% Z1 Y" J0 M4 M
end! `% i9 @- H( L0 Z$ e7 A5 |0 _
9 F* x+ p( _, ~6 d6 G
begin P_mC_down arriving
) k5 N' t* ~. L9 |* A' v3 T   wait for e 230 min6 F% G$ i. G, t, D$ a
   take down R_mC
5 O4 F' h$ L, |5 @" D: v   wait for e 10 min( ?! @- {+ P4 n6 U$ @6 a# W* _" F
   bring up R_mC/ r; M! s7 x- g  D
end8 [) }, n+ B1 d0 A0 z; e2 q

3 m; H; Q, ]1 R( `7 S: zbegin P_mA_clean arriving3 }9 [9 T' V1 l, m9 T' H# @
   wait for 90 min' H3 s5 E: h/ n: X1 e' {5 s
   take down R_mA! j4 o2 K+ w0 J
   wait for 5 min6 w2 D* V" X) j$ [  _; p
   bring up R_mA' |9 Y. T  T) L9 J: U
end
8 w; |0 y& F9 N# ^$ E* b" |( {
0 V, W* M/ C. \( K0 u' Bbegin P_mB_clean arriving+ N$ u* g- o- |
   wait for 90 min
- C6 h, T8 d6 y0 ^: d. e   take down R_mB: g, K$ M$ C4 F" t/ X8 a1 a. E
   wait for 5 min+ ?0 Z  r" ~) m: a" ]
   bring up R_mB- k; I# ]' \! W- {( l8 {* G4 \* X9 e
end
9 A3 }, a% R: C: |3 j5 ^# v5 ~* I5 f3 ?* M, t2 @" {) O2 L
begin P_mC_clean arriving
$ e' r0 ^" w9 L   wait for 90 min" [) T, ~/ S+ R0 c9 v' L& _
   take down R_mC7 j$ j  P8 m5 e' a# h6 @
   wait for 10 min
8 Q7 O8 l" p1 m  g& S; v: ]+ i   bring up R_mC  o% H8 n$ N7 u
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
. Q  U0 I( D# G" ^   move into Q_wait' }( B: T! g, ?
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 h; m) z2 ?9 I( @2 h   move into A_w- b! n/ v0 r( d3 I
   if A_w=Q_m1 then use R_m1 for u 48,5 min) }- e# O, O- E5 i8 [" G
   else if .....then use ....for u 48,5 min
* [! g" N0 x; x6 x4 d  c# C   else if .....then use ....for u 48,5 min  ( r2 Q0 K8 ~- _% T! j2 w1 z
   send to die
5 w- C5 y3 l* ]0 |0 Zend$ j3 X) a! p8 Q
1 K6 ^+ r7 M( w& r5 b( `! E. C
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-2 03:51 , Processed in 9.556220 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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