设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5040|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
) O% y% N. u8 e. D4 H
" J7 h; q+ C& Z+ [底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. M& a% [5 K7 E3 o3 m8 D# \; `$ E  D* z- V2 C4 z
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 S& n" f  Z, h2 Z5 |" p. M% C+ O' ~( _6 G/ \; f6 V
--------------------------------------------) h6 r* H7 P  @' m
begin P_something arriving
' H, W* p# X" t7 N   move into Q_wait2 W) w/ S7 B' ^/ [# I  s# p# A
   move into nextof(Q_mA,Q_mB,Q_mC)
1 p7 P! X1 f+ T/ I5 H   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min1 R  p+ E- j8 M
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 f$ G( T3 O0 V# }   send to die
* l' g# |" f- y1 gend
( N1 x( n& w% @# N  T& A# C
' e; r6 Y. e$ L/ U. J
begin P_mA_down arriving7 x3 M/ c8 C. h* d2 C
   while 1=1 do : `! {; j1 q$ ^" X5 [$ x1 X4 A
   begin1 X! N4 j5 R  b0 @' |
   wait for e 110 min
( S5 A: o0 i  p  b   take down R_mA- Y* j* r9 d; k. g+ K# _0 c2 o6 ]
   wait for e 5 min
7 {+ g' Y7 ?# M+ p   bring up R_mA' W2 n+ I# o0 J$ `4 ~) G. c
   end7 u: z8 _3 ^- s- d  {2 j: L
end
+ N- g& a* r8 Y+ [- l% F
8 O2 P) f$ f9 }/ Q4 y
begin P_mB_down arriving
, k; S2 u! H- D5 W) ~   while 1=1 do
, w  @9 g, M$ F9 k; O   begin  |( N  `. t! B+ r2 g6 ^
   wait for e 170 min
/ T1 o7 k: [" J" H5 o( U4 f   take down R_mB8 p- B- Y, O2 S* y
   wait for e 10 min( k% N+ V2 D; c# B1 o! Y8 a* b' g5 g
   bring up R_mB, V; |% ^9 h* R- c( m
   end6 m- w3 U1 J8 E) c
end
+ P+ s  l5 L+ E# F! p# u% n$ I9 _5 y
' U2 g& W0 F& \. Q1 S
begin P_mC_down arriving- e: v, h6 I$ n" |$ w
   while 1=1 do 9 p' O! J/ [' A4 c  Z3 R
   begin
0 N. Q* H% N& t' I. _1 E0 q/ E   wait for e 230 min0 Q9 V5 e5 @# ?" D
   take down R_mC
7 v9 S: r* [; `, \" L$ R5 f) F   wait for e 10 min
2 f+ n' B" ]  P/ z   bring up R_mC
  f+ B4 b% h( N/ j   end6 }# C1 t$ ?/ D/ M; Y
end
* s" g( ?3 e0 ~& U5 Z4 Y# N

1 R6 o, E3 i% [7 b& p9 zbegin P_mA_clean arriving; y- F2 ?  i7 C/ M; _: v; {5 p
   while 1=1 do( i6 r. M9 F2 r4 F! |  R
   begin4 _1 K6 ]# l, y7 B  M/ e
   wait for 90 min
: K  J) j# M9 I0 J   take down R_mA
! C* D9 P4 w& z9 `7 t   wait for 5 min( W/ _5 x6 n' L9 s4 `8 C1 S* o; Y
   bring up R_mA
9 z8 i" V  V& K   end
8 m! g. ?6 I# g3 h4 B" Tend

1 m. G) M$ Y/ c# U; x1 z* ]+ X+ h   \4 \  \, x- B  R. b
begin P_mB_clean arriving
5 ^- L- w8 D% z; l   while 1=1 do
5 w! V) r7 z8 O# D   begin2 r% _5 ^) n0 L. L) C' X/ O
   wait for 90 min
- O+ U+ q  }8 U, J- O' H0 ]   take down R_mB7 z. p# O; }) p/ ?: F: h
   wait for 5 min
5 W% _, A( n5 K0 M* a   bring up R_mB
0 r( X* p* i4 k1 X1 w   end
. o, X7 M" l$ V0 Gend

9 m& ^% x+ T4 q. E% A7 B" Q ' H) n+ G/ G3 C- m! Z0 I+ J/ ^
begin P_mC_clean arriving
/ Q7 D- C  J1 J% E5 K) Q3 U   while 1=1 do
+ r' S, a& n9 Q* Z4 S. t   begin
5 }% c3 A! h& ^% F  T% @3 {1 f5 c   wait for 90 min
+ I4 X# P+ o, l. d( y   take down R_mC
% l  f0 j7 A- e' [7 ^+ |   wait for 10 min2 w% R% e; \! [" A/ {' z
   bring up R_mC3 v  v8 f3 F5 n' N* D# R# ?& d5 {' o
   end
* w) a3 D1 Y* {6 P+ Jend

. l3 z6 k5 F" |. ?' F# T----------------------------------------5 B$ ~8 c5 l4 [! z: w) f

7 N+ ]2 m3 F9 v- PExercise 5.9  a( [& }& r! G: g  [

* v* `8 T8 L) o5 D+ N9 T( ~5 U4 c2 _2 }2 k0 E% C
Create a new model to simulate the following system:  i$ M( {) l- |0 p
Loads are created with an interarrival time that is exponentially * C+ ^# z  O4 u9 L. X) {
distributed with a mean of 20 minutes. Loads wait in an infinite-- N; x) g( K9 G8 e" y+ G
capacity queue to be processed by one of three single-capacity,
' n0 s4 k* O! y1 a/ z" xarrayed machines. Each machine has its own single-capacity queue
: L5 t8 ?* N$ w' t6 Swhere loads are processed. Waiting loads move into one of the three % I/ b6 u! }" d/ d6 f! z6 T
queues in round-robin order. Each machine has a normally
% f1 h5 O1 J; ?4 D8 Vdistributed processing time with a mean of 48 minutes and a standard
0 y0 V' B  G% r. \/ l9 gdeviation of 5 minutes.* S/ a* I9 j1 p1 m% G3 r3 C
The three machines were purchased at different times and have $ k% Y  k0 r( j
different failure rates. The failure and repair times are exponentially
7 @8 ~* H' M1 v9 }distributed with means as shown in the following table:
1 G* m' A- E0 T- F' @6 ?; ANote The solution for this assignment is required to complete ; Z( h0 ~, Q4 C( x* M
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of " O  b3 d9 A2 W; ^4 d3 i( m
your model. 6 ~- E! [2 h+ x2 I
/ J; v" x9 h: A) M' B7 L
MachineMean time to failMean time to repair8 m4 V! G3 k) {
A110 minutes      5 minutes! M4 X4 P3 U! r, B2 @2 v9 p
B 170 minutes     10 minutes) ?; m% y; s, C
C230 minutes      10 minutes
& D9 d/ D( I8 u2 \4 b& u9 U0 Q$ G
: `0 ?& R( D; u1 F* z, `The machines also must be cleaned according to the following
2 Z; ~% \& u3 N7 r6 l" p9 {2 sschedule. All times are constant:
. J9 k+ `. w1 I' v6 Y
5 i; q- t1 e- y" K2 }& UMachineTime between cleanings Time to clean8 N6 P9 C/ ]2 w7 Z6 I3 G& q
A90 minutes        5 minutes; Y7 W. x. c' E1 C6 q
B 90 minutes       5 minutes' m1 y( b) J7 ?5 h& }6 @# g% o5 R
C90 minutes        10 minutes
( T% ]8 W6 `  w( Z: F  T  P% E8 c
8 u. ^/ F  O& q7 V- m. Y" DPlace the graphics for the queues and the resources. : Q3 b: v* n5 }# I, n% B
Run the simulation for 100 days.- W5 H& r2 P8 C9 }# s
Define all failure and cleaning times using logic (rather than resource
2 ]' Y6 ?+ ?  vcycles). Answer the following questions:9 G" w. n) [, D1 _& w0 H
a.What was the average number of loads in the waiting queue?
+ p# x# O+ y. {% [9 I5 @. v6 i2 Ob.What were the current and average number of loads in Space? : N$ \  B5 j$ X' z5 P) ~
How do you explain these values?
) ^5 K: b$ a% N/ ?) K- L. P7 E9 x1 T

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 o7 X6 ]) w  z
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); Z5 D( x5 c& L
这行好像也不太对,各位先进觉得如何呢?
, |- P5 R; ~" v6 R4 K% |' _6 N- ]# G1 `1 w% l5 q
begin P_something arriving- P, R5 u' V: m' N
   move into Q_wait
$ |2 m# B: y7 o; W9 o  [   move into nextof(Q_mA,Q_mB,Q_mC) % [0 n  p% I: q" W
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 y8 H5 W- f1 R' M) E4 C$ Q, N. ^
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
  @; b. l  l) z5 A, L5 x1 @end
, Z" t4 O2 ~) Z! b/ o
, ]" |% K( Z" d4 Ibegin P_mA_down arriving4 x+ c, ^* f4 U/ l1 S0 r
   wait for e 110 min
5 D1 C% E$ \% ]   take down R_mA" e! a: Y0 C8 s
   wait for e 5 min+ `/ [4 I$ n  W$ b
   bring up R_mA1 X7 V/ p. h. A4 O5 ]
end
" f  p+ t6 [/ Z0 e$ u( S: {+ A0 L1 M9 Z& c9 l0 T1 }: z
begin P_mB_down arriving+ C( t6 x# F4 @1 l8 w  E
   wait for e 170 min
1 p- V$ \/ ~# j; h3 f+ o   take down R_mB
  ]3 ]! ^. n6 N   wait for e 10 min8 ]. J7 p1 W9 }
   bring up R_mB
& T- O6 U0 _* N. ?) t1 R# T$ Iend* f+ _3 f$ d4 F) \! m5 l
# W# [6 E! Q1 e  ]! ?+ p
begin P_mC_down arriving# d- }% j' `# J5 I$ a- ?7 V
   wait for e 230 min
/ h) D" c( U) i, f* B+ c   take down R_mC+ C) B) q9 m; O( t3 h4 }+ _
   wait for e 10 min
$ I% d' x; O3 A& R* z4 z   bring up R_mC" @6 ?0 ?4 Q7 Y' ?4 h, N. Y4 t; x
end
! q' A, t. h" `( A! ^9 W' U. G/ S; \
begin P_mA_clean arriving
6 D. k3 s1 I# j( b  U/ h2 t5 K: U* b' w   wait for 90 min
; |" A: m% ?1 S0 D   take down R_mA
$ h7 F9 @4 m/ ]: R1 F! h6 w   wait for 5 min
/ C- \; x' E2 J6 T1 E" R  Z6 U  P8 A   bring up R_mA) c/ }: ?1 `7 m* z# _
end
, y2 n" d2 Q& R) ~: R, |  C
8 f$ _# v& e, [( e9 Mbegin P_mB_clean arriving8 O/ }% k0 X/ _5 Y3 Y
   wait for 90 min
1 |  i8 K  @# m  S3 ?   take down R_mB
+ x5 x. E, V( k7 s5 [/ ?2 g   wait for 5 min
  R0 B) K6 N& n3 `: [" G4 F# T   bring up R_mB% V7 H, `  a3 P: A4 U4 |
end
" A5 c1 f  q3 U# H. R" ?* q2 d: k( m5 S
) a5 L$ @/ h+ @# J9 c2 r  L' Vbegin P_mC_clean arriving
( o& \) I( I9 F5 H5 I   wait for 90 min7 M& R, Q2 P/ Z4 u' m# Z  U
   take down R_mC2 }0 O# `* J$ y2 d6 [# T& v- b* ~
   wait for 10 min9 ?% C3 Y) q- U* R% g# n5 |
   bring up R_mC
7 c2 t$ x& `* M3 \3 Nend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 L$ [$ G, ~- F2 J4 n: ]2 E
   move into Q_wait6 q4 I" U/ F  o$ ~; N
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ Z4 M! `! g* `( V, b   move into A_w
$ q6 K* J4 r8 C8 K  J* U! ?0 e1 w   if A_w=Q_m1 then use R_m1 for u 48,5 min: J! \2 X, w' X5 U1 S
   else if .....then use ....for u 48,5 min  H! m8 d* A4 `1 G0 B
   else if .....then use ....for u 48,5 min  
, |/ j" ^$ [1 Q) n" R7 @   send to die
' Z7 ?, ~' `" e4 r$ @4 l3 j9 r0 {end
' ~, V2 R$ \) K' i$ n+ t- {/ c& U& l4 n4 G1 {( D
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-4 08:47 , Processed in 0.013010 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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