设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7250|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 " o8 h% p; P/ S1 ]7 J

: _4 M, h7 U" W3 f% X8 S# q4 B4 N底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去; K9 s" k" D6 u+ V

5 X, [5 J% N& n0 E8 Y8 I不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
, m0 q' @% A+ ?& U+ q/ T2 X) [6 Y* c
4 x* k1 ?) ^$ Y8 f) o8 P% O4 K
--------------------------------------------3 E2 ?) ]: N3 W, r* j2 ^- {
begin P_something arriving
5 I6 b2 @8 j7 H) ?$ L% m0 a! K9 L   move into Q_wait6 E& B0 K$ w& G
   move into nextof(Q_mA,Q_mB,Q_mC)
$ j  }( ]: K* i   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ t4 S/ \$ ^* i! Z! t   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% q0 n7 X" {5 ^& R   send to die
) W% a- j0 K9 q( w1 l* {% Mend

# ^% ~/ c6 J0 s, r$ U  [( H # [7 f% m4 l5 W! o( L. R
begin P_mA_down arriving
7 G( D( u) \  b+ W. y   while 1=1 do % M5 I" d- F+ [6 Q/ C" x: r
   begin/ @  ^6 [0 }" d" X/ m2 m) `
   wait for e 110 min  z: D0 Z& [+ K1 z0 X4 I
   take down R_mA1 k" t  r) e" M% R1 t5 I
   wait for e 5 min
1 z9 r. X1 S, W% Q/ T$ s# E; V   bring up R_mA. c; b& J4 E" i/ @8 }, p9 O; J
   end
, e% k( O( T1 _$ V9 s3 xend

: w) l. L: I( v" {
  _& V4 R' g8 J3 c  n2 |2 a' {: Obegin P_mB_down arriving4 n% \/ [3 u) i* W$ q
   while 1=1 do; ^5 E3 g. S: K" J* @; u2 z4 i
   begin' u, H1 z3 Q  S
   wait for e 170 min
$ ?6 {8 {2 l; Y   take down R_mB6 v  C! H' B. F+ V
   wait for e 10 min+ A4 a# R) x1 t8 Q
   bring up R_mB
0 T' S, o' @, S3 Y: F2 D* S   end1 {# ]) g" ]/ t: e6 `$ r
end
. a. c& {, p% \& f. i

# Y1 ^% u6 b* bbegin P_mC_down arriving4 K5 p0 \7 [# P
   while 1=1 do
6 s; B: C5 D5 W   begin
2 J# H/ H& u  t! i   wait for e 230 min: H. `' R( e# m5 D4 X, x5 v0 f
   take down R_mC
" r. ]1 D2 [# P8 E   wait for e 10 min
% J4 ~+ {- P1 F   bring up R_mC$ W" I9 C9 X3 I
   end# w" m  i6 J2 P( @% a: G
end

& D6 }+ m4 N, Y $ W1 [' D' U4 D) K9 ]
begin P_mA_clean arriving8 X: q- }. l4 J
   while 1=1 do
0 ~( _3 y; q  j/ [; s" F   begin
6 w+ C+ b/ L) i5 M% j# i2 u. C4 k; S   wait for 90 min, i. _$ X1 N5 S  x, q
   take down R_mA
, q& s7 N! e) R0 m" W' Y   wait for 5 min
6 k- b* b2 s8 M9 z$ d. e   bring up R_mA
3 Y* i* k3 G5 c2 \4 n# t5 u" f   end8 n3 q8 W+ r) |' |4 b8 x
end
5 i- B1 k* c7 v. J' g/ P

5 Y% _; d' a6 H$ y; G- Q0 r. Nbegin P_mB_clean arriving
8 b+ d# G4 t. Y$ O# T  h   while 1=1 do! G& B7 R0 L6 {% G, F
   begin7 v& b" Y. T$ @8 ]; h! ?" ]$ i' d
   wait for 90 min/ s  c  u( E7 w7 `9 z9 p
   take down R_mB" {# J& u+ X4 z4 Y4 T; \+ M! K
   wait for 5 min3 B/ I$ e; }. r# S
   bring up R_mB
# a: \, w! @, Y2 A8 W) }   end
. W6 n" s' t1 Hend
5 U) O( X+ a7 Z. o5 G$ A

6 v3 t, _" Y" x  Z0 y8 g  W8 A+ Ibegin P_mC_clean arriving
8 m' l6 ?+ y0 z   while 1=1 do  l# m$ X; w7 q3 m1 |/ t
   begin
% y( X* {- t+ H' |( P5 t   wait for 90 min
4 e( L( B! ^& [" X9 v! e: Y) z   take down R_mC' e7 [! {# h% a2 a/ X* ?
   wait for 10 min
# X9 S, R2 A6 ?9 q0 C   bring up R_mC
6 m) x7 ~6 c' A6 ~/ l' H   end  A5 X5 w/ t3 O/ O
end

9 F0 V8 j# n, N1 ~+ S2 }----------------------------------------
  k  }5 s& G" l% v( g / K0 B/ H3 q$ F2 u1 S; k8 I. E- X: l1 a) H
Exercise 5.9
2 ]/ d# @/ A  Q' x4 d; ~  N
6 T. g8 |+ Y/ a3 \  a) c# B  j) x) l) I- _3 T* `
Create a new model to simulate the following system:! M* v  }' K4 g; U' _
Loads are created with an interarrival time that is exponentially
- s# g5 }+ B/ Sdistributed with a mean of 20 minutes. Loads wait in an infinite-3 S4 U* g. }. E4 P
capacity queue to be processed by one of three single-capacity,
( c" y* ?, F' @! v/ qarrayed machines. Each machine has its own single-capacity queue ( z  \2 B; N; S
where loads are processed. Waiting loads move into one of the three
- X- y! E' e/ s" ?5 Y; aqueues in round-robin order. Each machine has a normally 1 w6 Y! @6 S) Q4 C+ n
distributed processing time with a mean of 48 minutes and a standard
: C0 `1 b5 I$ x6 jdeviation of 5 minutes.+ ^( N! _$ W; y! C% b2 {' r
The three machines were purchased at different times and have
+ p7 F1 T( A; z6 O! t; Vdifferent failure rates. The failure and repair times are exponentially
+ @# n9 o' z4 idistributed with means as shown in the following table: + s$ o" U/ o# d+ B) C/ e5 @
Note The solution for this assignment is required to complete + E, f0 c/ A1 j
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   h* E/ x* A& O- h) B7 J3 T% x
your model. ( k# h* Z% p( {3 Q
" D5 H1 ]6 @# J* ]+ I4 e; a4 j( w
MachineMean time to failMean time to repair
( e8 i( M1 d' [# b' bA110 minutes      5 minutes0 H3 B$ v1 I8 X
B 170 minutes     10 minutes
; l9 |  f9 v5 {' x+ O' M  _" }9 bC230 minutes      10 minutes
5 w1 Z' `1 C, c' ]- r, G$ a* I$ l! p# E( d  p9 t# l  N0 z
The machines also must be cleaned according to the following 6 b* |" a7 ]# ?" ?3 n: i. g' u! w7 m
schedule. All times are constant: 0 m, ?1 ^  s5 Z6 ]" C
1 ^& V# w- G8 j% k- T
MachineTime between cleanings Time to clean
6 M8 l9 N7 `0 z+ A: N; r+ G3 JA90 minutes        5 minutes# O8 L+ N6 ~4 r8 y& o/ J
B 90 minutes       5 minutes0 Y. _" x; b) m
C90 minutes        10 minutes
  N7 b" S% r( v. V+ q! Y/ k# I. l/ _7 \0 N8 ?
Place the graphics for the queues and the resources. $ x% d9 K" A$ Q) s& w$ {4 O" I
Run the simulation for 100 days./ K# A8 k" e$ Q: H7 M
Define all failure and cleaning times using logic (rather than resource
/ h( F9 V8 M) C* j2 tcycles). Answer the following questions:
' t; G7 B; |0 ^2 R- Ta.What was the average number of loads in the waiting queue?. c$ ?1 z6 R7 B, e
b.What were the current and average number of loads in Space? $ O+ F1 c9 K. S, ^
How do you explain these values?
' X2 }4 G( F" A: A! [+ a# B

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉% U6 k; Z$ a% Q6 K  _7 |
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)5 L6 k& R- m8 M$ Y3 s
这行好像也不太对,各位先进觉得如何呢?
% T5 R6 y1 C/ H$ p" x- m; s2 z1 Z9 y4 S- W
begin P_something arriving
/ c! w. S: U+ K0 T, s& n1 X   move into Q_wait
/ _: T. B7 e) ?3 R   move into nextof(Q_mA,Q_mB,Q_mC)
" t/ [8 K. D8 \* J# ~8 E3 m   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 v% g" J" J0 ~; t1 Z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 3 ^/ ?) g3 [$ w" |- k
end
$ _4 k; O: h- K: A) N. `8 G0 A; r" x' Q2 m7 o7 Y
begin P_mA_down arriving
4 x! V4 O+ e' }: n; K9 @8 d   wait for e 110 min
, N/ Z9 I& l' o7 ~2 s, M   take down R_mA1 |9 E! J  M! d( z9 A/ j
   wait for e 5 min
8 l& z" u: d2 [) J# P3 n   bring up R_mA6 u8 N6 A" H" X; u2 y
end
' o3 l6 G/ ?4 d- V: H% j! x% o% `0 n) b& w% Y/ P
begin P_mB_down arriving
+ w( P6 v) e3 J( f3 x( [' L/ d   wait for e 170 min. C3 z8 k4 ?' M, Q
   take down R_mB
" S/ Z  y; Q$ ^   wait for e 10 min
3 l; [: }1 x. K   bring up R_mB5 r: x$ E$ Q! }, i6 E% G6 T/ F8 R
end
: \# v' `: g( E! ^0 a0 a. S9 u
begin P_mC_down arriving: L0 x9 E4 y: u8 m
   wait for e 230 min# Y' _! s: p  y  G4 u
   take down R_mC7 r3 S- ~/ f1 o& C) s
   wait for e 10 min
: \' `1 i' v( w7 O9 F   bring up R_mC
' O( Q$ m& A& `, u" N- R" R) Y5 {* send
0 P% w3 i* Z; D0 {& H
, n3 _6 w2 H5 q9 j6 F# o/ g; G6 M5 vbegin P_mA_clean arriving% \9 K# E! G8 N. L7 D# }8 X' O
   wait for 90 min" o" H( N1 q4 {6 \! E5 x
   take down R_mA
+ V+ }- ~3 i5 r2 ^. Q7 S6 ~9 b   wait for 5 min4 M4 C+ H2 f7 G! ?/ N1 b: J
   bring up R_mA6 g! K& U6 k3 _) j4 j0 F" {0 K
end. G' |) [9 E3 x6 t
* ^9 _) }' H9 V# v" z: N+ r
begin P_mB_clean arriving& C: r: E: u  D: z
   wait for 90 min
" b, h" p6 x% t8 m2 G' h   take down R_mB* V# k+ ]- S( k# T9 P8 o
   wait for 5 min0 I! h; O) ~" ~% G( G1 D- s
   bring up R_mB
9 S9 Z) {7 {* gend
3 X0 |+ r* P5 D) Z" \" W! y. ~$ [% Q! ]" H$ y% L+ Y, a
begin P_mC_clean arriving
  s! j  E- D5 V$ N5 f/ c   wait for 90 min
0 a/ V3 h. z# S' y   take down R_mC( ~. b9 k/ @( Y2 C: l6 [
   wait for 10 min5 y; q4 j: G) H1 D
   bring up R_mC
1 I9 u+ R! @+ t+ H: ]/ C. \end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving$ ~+ D# c% Q1 A
   move into Q_wait0 z' F# ]) q& H
   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ e( d: l3 x! G
   move into A_w
* n2 W+ q, d7 t1 f/ X$ {   if A_w=Q_m1 then use R_m1 for u 48,5 min, g  M3 t9 \. G; Q& g, [
   else if .....then use ....for u 48,5 min5 B: `8 p! v+ I/ l+ b
   else if .....then use ....for u 48,5 min  
" {/ g0 g# t- L" n4 ]* F   send to die9 K5 L& u( N. a
end
$ o2 z# @7 ~3 [! A6 S; C9 b
- c8 J1 z7 {0 S% m供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-19 14:46 , Processed in 0.016271 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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