设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7192|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
# T: o# J. U! M) }
, ?8 ^, P! v" d3 P$ j底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. ?9 r; a' |2 h) E" ^# r1 M
- E% m7 T7 H, e6 D2 W% j不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!1 j, f) A+ B: ]/ k

) }; A5 E$ @0 d2 _7 g
--------------------------------------------" p4 N# }( `6 g+ y( M7 y
begin P_something arriving2 b% m9 A/ Y" O5 k0 o+ K( U
   move into Q_wait
% t8 V, P; b0 P" {4 M/ t8 c! X   move into nextof(Q_mA,Q_mB,Q_mC)
, C8 m( U' Q" y8 h9 l- R   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, |* ?+ f) ^& F0 u6 B7 o$ ^9 H
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ {6 o8 C0 x+ t; [9 G# i$ f   send to die
; D2 m* x: U9 p& Aend

. |+ F( u2 @9 w+ w5 a% x8 \ 1 }& t* c. J# O6 b
begin P_mA_down arriving- [: A( h1 k* j. B5 Y$ O
   while 1=1 do 4 M% w0 U8 S; ~6 o, v: U$ E
   begin$ ~) ]8 h+ t) e3 u7 W- P" J" b( E! v
   wait for e 110 min
- _  Z' ~( y/ y7 ?4 U   take down R_mA
' S# s. B- P0 q   wait for e 5 min5 g  R1 y' T2 B$ @
   bring up R_mA
3 c. @) m4 |# g) v6 `/ v3 |3 g- Z   end
" r  j: H. h! E$ v( G  {end

* ^! s/ Y8 U: }0 X3 g, `$ g! y
5 v) |2 T+ |8 ~, N8 U3 ]* Lbegin P_mB_down arriving6 Q$ z+ x7 t7 g6 m  H) }
   while 1=1 do: z2 V8 q; @9 H% U
   begin
1 G+ ~! {/ t: h8 w   wait for e 170 min
' J: T) S/ t3 M   take down R_mB
+ _& T, ~& i0 r& K8 m   wait for e 10 min
+ N* T+ X7 y: x   bring up R_mB
( A2 B: L2 F: B" a6 C7 N   end. {) J; \7 N2 S0 _. j% n0 A
end

1 ]" m# J5 J; N9 d$ z 4 n2 A: r; d5 @. ^
begin P_mC_down arriving
6 x! n; T0 _8 A- b( I   while 1=1 do + q# R3 ^8 u& x" h! I+ e. p
   begin# j  \: O) A" j6 H4 s; K' e
   wait for e 230 min5 L" b1 ^$ y6 m. V$ r
   take down R_mC
0 a7 _$ O/ `/ Y% K7 e8 t4 X   wait for e 10 min
" E2 l+ g. P! e- u4 D   bring up R_mC
: v1 e# w4 F* x- d" r   end& D" u6 I& q  A0 l+ \9 @; t2 D' ^
end
$ k; v+ Q. A4 F2 ]( X  C1 P4 F7 X

  _: G: ^* d) {begin P_mA_clean arriving  `6 e  L/ c' N7 ]
   while 1=1 do) {- J7 S1 C& ]) ?1 }& B
   begin
. a4 B% B9 B$ Q   wait for 90 min4 z0 l! z) s, r3 f
   take down R_mA
( V- M* _% I  G   wait for 5 min6 i/ [$ ]1 X( p1 y
   bring up R_mA/ ~/ o1 `9 ~5 f1 N; H4 g1 \
   end
! y6 r2 s# {" D  }- pend

# E# h$ t2 L8 u$ ]0 L( b4 E: p
* {( R4 s" b# M1 Nbegin P_mB_clean arriving! T& i) ]8 E, Y7 ^# K
   while 1=1 do# H0 r* y% h2 i
   begin
' l" g! L' m% r   wait for 90 min# a# ]- J1 ]/ N
   take down R_mB
7 X5 B2 D- `  E! f! S6 H4 _) S   wait for 5 min, i$ J0 x( Q) _# \
   bring up R_mB
0 [" S8 |( D( l5 R' D0 K   end0 M, X$ ~* z& u' S  `. W
end

0 E% i( g0 V8 H$ C) e; d
2 j- V' o0 {+ R% ~% |4 v4 c1 X) Ubegin P_mC_clean arriving0 P2 M9 O! ?- U$ W; s/ x
   while 1=1 do
1 U5 m# r4 J* z, t5 I8 a: ?   begin
0 M2 q# A) P' o+ O   wait for 90 min
6 D! G0 x9 [/ n, X   take down R_mC8 B, e1 v1 p/ i4 i# S
   wait for 10 min
/ q6 ?4 a# \7 X: X7 G3 [$ e   bring up R_mC: `& P% B9 u& d2 u1 S: }) [, b. a6 _
   end
9 o( |7 S5 {# d1 @! Y; }end
5 l) s8 o% `- W% @* N
----------------------------------------- t5 M1 F+ @4 m, W
& c6 G0 W) C3 s0 \$ C
Exercise 5.9
) [7 `/ g9 X3 Y
# F  y+ M' r1 K, h6 _
4 r  U" b3 L. i# M# B( KCreate a new model to simulate the following system:
6 Q$ m8 u- x* s3 [$ p6 yLoads are created with an interarrival time that is exponentially
$ ?3 f! a! W; t. ^6 cdistributed with a mean of 20 minutes. Loads wait in an infinite-2 Z0 F$ f- ^& s1 k! v! D& `1 j8 A
capacity queue to be processed by one of three single-capacity,
$ G: G8 K% i# Uarrayed machines. Each machine has its own single-capacity queue
7 r: z& L6 P- Wwhere loads are processed. Waiting loads move into one of the three
6 \" ~' i3 r$ ]( h; s0 V% tqueues in round-robin order. Each machine has a normally * F5 }3 p) `) ?0 P
distributed processing time with a mean of 48 minutes and a standard ' n7 Z+ p7 f1 {. n' ~
deviation of 5 minutes.9 G  Q& z) k( y0 m5 u
The three machines were purchased at different times and have ; c" j6 y0 ]- Y, b
different failure rates. The failure and repair times are exponentially % k0 i& M1 J, H, h/ b
distributed with means as shown in the following table: " |! R+ ~5 M) f1 a8 ]; p
Note The solution for this assignment is required to complete - F6 b7 e! P8 d3 Z" L% }
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 n7 d1 X& a9 t5 ]' Vyour model. # t5 k% H4 Y) j/ z$ M- Q( K) L) m" D

* f( c- N# _7 l7 ~4 t) oMachineMean time to failMean time to repair1 E' \4 _, ~& S
A110 minutes      5 minutes
! c! [. B, M+ \/ T" ?5 [B 170 minutes     10 minutes5 G& ~* k- u/ |$ F% o6 n
C230 minutes      10 minutes+ P4 e5 F- R" K, A+ L( f
. f% v6 T; V! H* `5 ~3 `# I4 T
The machines also must be cleaned according to the following 5 @8 z2 @5 ~5 I4 U4 C9 ?- Z
schedule. All times are constant: * J1 N# D, D9 ?+ i; l7 f6 H

' r+ J+ q. t  W& C! b$ i; gMachineTime between cleanings Time to clean
2 v+ G! G5 D9 t% hA90 minutes        5 minutes
/ V% @5 T1 U2 ^6 c. u$ W5 ]B 90 minutes       5 minutes
" |# I* C8 W( w) B. C& Q3 v, dC90 minutes        10 minutes
8 s9 E4 u& V" H% b
! y0 S$ F) D! i5 H/ qPlace the graphics for the queues and the resources.
; f' l* l# N. W# x' G8 iRun the simulation for 100 days.8 [  p. [! {5 I) T+ H
Define all failure and cleaning times using logic (rather than resource
% \  t9 Q' ?& g% ?cycles). Answer the following questions:& P7 x% b7 c! G( K* G  A
a.What was the average number of loads in the waiting queue?
5 W6 y& Q2 B8 z: @, }9 ?b.What were the current and average number of loads in Space?
8 B: [2 k0 \3 z# nHow do you explain these values? $ w  n! D& K% k3 r1 k

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉8 v) `4 T) }" s3 ~
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
. J4 I$ }: d4 C% D这行好像也不太对,各位先进觉得如何呢?$ Q  T, Z( Z! I6 p* X7 }
1 [& C+ G( v$ E) C$ ^8 K
begin P_something arriving
" b7 `$ U& f* s* |4 ^( z! }7 t   move into Q_wait
5 Q* }0 `; t/ p0 a$ h( V( H* x   move into nextof(Q_mA,Q_mB,Q_mC)
3 z! m3 k  c. B% X5 e& F   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& N! l+ @, U) U0 K$ Y' N# d   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% i2 M% G& o7 yend
, }" {; K5 v$ `; C- P; u
" n5 x$ W/ H/ O+ S2 R, kbegin P_mA_down arriving
; n! d4 }9 h) r" m0 Q5 x   wait for e 110 min# M/ Z; z/ k* o: A+ x: x
   take down R_mA
* p( u) Q2 R, q# F   wait for e 5 min' Q7 W. ?, i2 u* I: w( W
   bring up R_mA# t6 D' e  E! b' n4 s% b- L
end5 ]' f& j& c( j

; n) J+ E0 m* Y0 S& i0 i" w4 mbegin P_mB_down arriving
1 K3 c( R1 Z* z2 [$ Y  X* p" J1 _$ {   wait for e 170 min0 U- ]5 ~2 s% x$ P3 j
   take down R_mB5 S! j3 v  f  ~; l# N, x
   wait for e 10 min& j0 g5 r' n* _4 A( v
   bring up R_mB+ v* |/ `7 G1 J; B
end
  r! N* n; m6 N0 o* E' d2 y; g& N
3 v' j( a" t) n2 m0 Sbegin P_mC_down arriving
6 |7 e) X* s% p) _7 X* K% U   wait for e 230 min
. a/ B% s6 k- W8 m9 `   take down R_mC3 K( ~4 I0 ~3 F. O& }% P" N. A$ N
   wait for e 10 min
% W+ u' D* n# G7 P1 {( j1 ^   bring up R_mC
* F- y% f3 d0 p# \% E8 vend0 j$ a. ^2 l2 V6 [" e+ n# U
0 T" ]- \! \- `" e2 r
begin P_mA_clean arriving' Z' A, }0 W8 @- r/ ]
   wait for 90 min' p$ e2 P+ B# X  `+ x$ ?
   take down R_mA2 N: Q+ N6 [5 }" o9 ]
   wait for 5 min
5 s. M( u* r  E4 C7 n1 ~   bring up R_mA
: f- W# f& s* \( k, U5 Bend% Q+ c) U* j/ q' g, p

+ ^- B) t/ E/ \  ]' G2 g$ c0 nbegin P_mB_clean arriving* [& @, T1 e, H" U: w0 c
   wait for 90 min
6 n+ `0 h8 _& a( w9 f  t# Q5 a   take down R_mB
! Q6 D- f. O, _7 U( ]/ m, c; P   wait for 5 min
2 J8 O  b" s1 {  ]6 ?# f* j) K- \   bring up R_mB
- D( R) F! G- b# g* _# @+ o4 dend. ~7 j9 h  o: H6 n& \
) g* K: ~& x, ~
begin P_mC_clean arriving0 G: ?5 B; @! B; h% [8 r
   wait for 90 min8 u9 K* g; \; D8 W+ j, }+ v
   take down R_mC. k7 q) `" |0 t( p3 n. r& f- F1 [
   wait for 10 min, Y7 c6 [7 g: j1 G8 Y
   bring up R_mC
0 B, _8 Q. @5 x( h% Bend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
2 B$ `3 w/ |5 k2 E+ N   move into Q_wait
7 a7 X2 i8 T6 |: S1 c! K' \   set A_q to nextof(Q_m1,Q_m2,Q_m3)4 ~% i6 }( ~2 U7 P8 w2 S
   move into A_w
& m* N( \; M9 ~1 G7 O" q9 ?   if A_w=Q_m1 then use R_m1 for u 48,5 min) d6 ^1 y9 R2 N9 |0 g
   else if .....then use ....for u 48,5 min+ R: E/ B6 A; {; s  G
   else if .....then use ....for u 48,5 min  
4 a) w* A6 E5 Y0 o" u   send to die
5 f: h' f, i4 U' [; W/ D' U' M& l) Eend# b) p, u! T6 E% q( P

1 z2 A* u' o" ~" x7 Q/ r6 W$ _2 W供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-13 16:11 , Processed in 0.013502 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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