设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7195|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
  v: |9 j% |+ l1 q& E
% x+ z" U7 y6 r. g5 j底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去/ i3 {3 d, N. h% k% t' B5 \, A

' v; X& q  H( ^3 G- L不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
% B5 C* h0 y4 j: ~% _% Q6 W# x  l8 M6 s2 L; U- j3 S; y
--------------------------------------------
& ~; w: q# W+ z$ C6 _. |# r% Y: ibegin P_something arriving
& ~9 ^& W' E; T. v: b/ l/ I   move into Q_wait
+ X6 h5 p" p, @# B- Q3 N) ^! [' f3 k0 |   move into nextof(Q_mA,Q_mB,Q_mC)
" ?. Y& e" Z) t; W  K   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
: n4 }$ m+ U- b1 q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 O  {4 z' M( A3 J$ \4 Q* ~
   send to die- ?) j, F8 O4 `0 ?% z/ M# m$ D
end
" X! C  Z. W. z

% Z$ i& E- Z, T- qbegin P_mA_down arriving0 p2 ]1 O+ f4 N" K5 J+ H# [3 m
   while 1=1 do 1 w. [4 Z! a3 h
   begin- N0 E/ s, K1 I7 E" \, f5 t8 ~
   wait for e 110 min+ N; ^7 G' g- J( E
   take down R_mA
7 `9 y* p" l- x% H# h2 J* Z   wait for e 5 min
0 ]3 i, j( s, Z! l   bring up R_mA$ A3 ^, Q8 M7 P2 x1 w2 k/ f
   end- W: A$ l8 A* T$ I" O8 E+ g$ F
end
& f6 |! I2 g- i+ l
. m! I: A0 c; t# `" u: G$ Z
begin P_mB_down arriving5 O$ i2 f: F  @9 F
   while 1=1 do
1 ~: ?* s6 r0 p# H6 q$ u) Z8 ]   begin
0 s$ [& e/ F0 M2 u' `   wait for e 170 min6 Z' ]% J& v8 F9 A1 _( i/ G2 `
   take down R_mB
& L* H2 n5 U, V   wait for e 10 min
+ q( a; F9 x: o6 \   bring up R_mB! @; y( Z2 D3 e/ B: t
   end
- p# x9 o: ^0 ?. e- {! {) q+ L+ Tend

# A2 X* i8 {& m0 b- n ! m3 Y" b0 U$ g/ j9 I& I4 a
begin P_mC_down arriving  P" w: m; @5 O4 H
   while 1=1 do " H& {% w" v. B
   begin
/ n! q* e8 \5 N$ F$ n   wait for e 230 min1 h( ~2 T; {  d
   take down R_mC
( e- D( E8 r7 i/ l   wait for e 10 min. H3 d8 ?+ T$ K7 f
   bring up R_mC
7 N8 `* W- P# M+ S( L0 Q   end1 z# v9 n! a& b5 `
end

9 X; d( u6 m0 ]/ } / Z5 T1 S$ S$ ^8 j; ^9 _; L
begin P_mA_clean arriving
6 N/ p) M9 z" p0 J   while 1=1 do
1 P# P2 ]4 S- p, t   begin5 R9 a# Y; y; ^
   wait for 90 min0 f+ G9 b9 ^+ c" g# K
   take down R_mA
) \' `$ ~2 k* b( B   wait for 5 min
8 V1 z6 G: B  z3 s# [   bring up R_mA
/ u2 L) `: d: T   end
8 W. W2 l4 B9 m: aend

/ z: W8 L3 ^) Y- e8 b/ f) t % K7 f! W2 Y- v6 ?) }
begin P_mB_clean arriving% J1 W8 g. n. U" F
   while 1=1 do! ]6 w  R. h- I' W% s
   begin
. G' h3 w; H- N- \( y   wait for 90 min3 W9 @% H( `( |  N! w5 N, `
   take down R_mB! v) R/ P) z# k' W& ]( Z3 H, Y' @+ X
   wait for 5 min" q* q( r7 C1 O* G5 j8 y
   bring up R_mB
# i1 [5 |  b- @   end
* }0 {4 B3 M% A6 ?- m9 hend

4 t1 W' h4 w' k, g. U7 [# @, i 0 [8 l0 ^2 O* x% x
begin P_mC_clean arriving
6 P* ^% E  h4 C% R   while 1=1 do9 M0 g  S8 V1 {
   begin. s( g: X- L! G+ i% `: {% u" T
   wait for 90 min
7 j  `2 Z5 e' X4 O/ {* E: x; Q! A   take down R_mC2 A# k9 B7 P4 f+ {% e% e, A
   wait for 10 min, k; i% H& T, n# Y( o; Y3 T% G( n6 {/ ~
   bring up R_mC
6 `+ H; t9 f* x1 K: k   end
; F' u0 `1 N- T$ {! oend

6 @" ]- T% T1 Z  W4 k/ P3 J) p1 r----------------------------------------( I. `. l( c) I$ `* h; i; B+ w
; M: d6 N( g7 f4 f
Exercise 5.98 m; k. R, K, ]' g' ]7 G) ^
; |( Z7 p% ^  ^: l0 s. {# R1 L

$ K' G5 I5 e, n& d9 N: `/ \% fCreate a new model to simulate the following system:! R3 ~3 g' c3 \, Y* v' n( B% [- j
Loads are created with an interarrival time that is exponentially ) O/ {% ]# ^& y* H$ [# A. s* [% N: y4 G
distributed with a mean of 20 minutes. Loads wait in an infinite-0 n  x3 b- m, z
capacity queue to be processed by one of three single-capacity, / V2 ]* y2 o9 x  ?" G( G2 C
arrayed machines. Each machine has its own single-capacity queue : K  X1 b  _: x- }3 o" p
where loads are processed. Waiting loads move into one of the three 2 |4 ~2 O$ q8 R3 ?" Z. X- i1 y6 y5 Y
queues in round-robin order. Each machine has a normally
$ ~+ t" r% g) i; v& o) Ldistributed processing time with a mean of 48 minutes and a standard
5 |  t- \: z. m6 \7 H6 T; F2 ?7 m1 Zdeviation of 5 minutes.
7 q" t/ i# Z% W; n6 R# hThe three machines were purchased at different times and have / n2 r' O7 t. Q+ J& }, a
different failure rates. The failure and repair times are exponentially 3 d, D  k+ b7 D* m1 d2 |. A/ ^. S
distributed with means as shown in the following table: , F6 v  E+ }3 W$ h/ Z: N
Note The solution for this assignment is required to complete
9 @! _6 l2 I9 ^- d: y# ~1 A( N* f. texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ' W: V( t, n$ W$ o/ |6 Q7 E5 y; p
your model. / l+ s# x) T+ V
5 t; G' r! n* X
MachineMean time to failMean time to repair* Q) O% J( u7 w+ g
A110 minutes      5 minutes: k' y. M6 a+ t. n3 T8 t
B 170 minutes     10 minutes
+ D7 ^" b% c/ Z9 Q+ `) fC230 minutes      10 minutes
" x9 C& S7 C2 ]& B5 l. Q9 B1 M( c1 `
The machines also must be cleaned according to the following
  l3 r1 x. P$ wschedule. All times are constant:
3 U  E3 T6 H$ v, r$ I: }5 T! h  q# ~& j
MachineTime between cleanings Time to clean
/ C+ _; G+ R9 @6 HA90 minutes        5 minutes
+ K' x$ Q: g; F9 u: |B 90 minutes       5 minutes
) O  W) e! R  X( pC90 minutes        10 minutes3 {' \; l5 P! r/ {* R$ T

9 ^/ W  L5 i6 jPlace the graphics for the queues and the resources. ' P1 y, ~$ Z8 Q$ X8 n7 n& L
Run the simulation for 100 days.' @. ]/ _" U1 {0 A- F0 @
Define all failure and cleaning times using logic (rather than resource ; t9 ^3 h1 {9 a" L; \) P. Z
cycles). Answer the following questions:0 h% l3 S! a2 F! v0 |& C! y' a: R
a.What was the average number of loads in the waiting queue?
4 K3 V" P, f0 B, r( w! s: w0 @% kb.What were the current and average number of loads in Space?
% e9 `) s0 U) c, `6 h# N! J- pHow do you explain these values? & U# F9 i1 L) B8 R' a

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 [2 I, f0 C% v1 o( @4 _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ _0 w2 K( R% P7 P, W, }
这行好像也不太对,各位先进觉得如何呢?9 {! W$ P- i. _8 y' ]- M
! Z, r- D3 H: B; F- F/ G  [
begin P_something arriving
* v: d" ?4 N3 ]) I/ v6 e( n- s   move into Q_wait9 D& a  g9 z: g. W- D! N2 W' y
   move into nextof(Q_mA,Q_mB,Q_mC)
8 Y. u2 Q) ?9 d* E8 I! H. x3 |   use nextof(R_mA,R_mB,R_mC) for n 48,5 min- l0 x9 [+ x; O+ _3 u. J
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# Q) a; F2 G9 P, k7 Cend  i( {% T" v$ C. y1 {
7 P4 z3 N% Q: t
begin P_mA_down arriving7 s1 [" O0 ]' r$ s+ e% n0 y
   wait for e 110 min  y) C5 h: y- V. Q; |3 \
   take down R_mA9 \- p% H6 Q" {6 \5 S. ~1 L
   wait for e 5 min: C6 c& _2 D0 J4 i9 m
   bring up R_mA& }) M2 E* S2 Q' W9 o# l3 {3 n# k4 n
end1 U  B0 Q! v6 Y

0 e' B/ z: }7 B/ T. f" Bbegin P_mB_down arriving' e3 j4 O: X$ J. E; ^! V: B3 A
   wait for e 170 min
9 V5 h+ J! q$ f& G% J' K   take down R_mB
6 `) u1 R3 v/ ^+ n& ~! P   wait for e 10 min
2 \8 D7 p) A& Y& w   bring up R_mB
" O; @) e# X0 [+ b) V( s: nend) {$ ^  ]$ e  W* D$ W

; C8 ?4 \! x4 X. dbegin P_mC_down arriving
% A* X) o; v" {, i! Y0 Q   wait for e 230 min
  i  L# @2 k. M" P) r, H   take down R_mC  L# m+ j0 s) `0 @* C
   wait for e 10 min, m0 }1 ?( g* j0 ?! g* S( P# Z0 S
   bring up R_mC$ y5 D6 V7 c* Z% k! W
end8 k% \% l! X: y' A2 _: _/ U
& E9 G! A5 k5 ?% l8 J
begin P_mA_clean arriving
' f9 ]' c2 u3 A% T" R$ t, Y! O   wait for 90 min$ N9 ~5 ]) I' N& L. O4 i
   take down R_mA
2 P$ b, r3 S6 \( A3 \4 H6 f" F   wait for 5 min" u) _+ j# V! r) K$ h  l4 X& P
   bring up R_mA
1 Z/ i# X2 O) F" n5 q5 w! k$ c. |5 T: Mend# u/ E6 H. s4 K7 `5 T' G) U7 F
) z( H$ v* n" g6 s* S
begin P_mB_clean arriving% p7 ]# p8 v* i' q/ \. F
   wait for 90 min
0 \2 I' d' j9 n+ T   take down R_mB, D, A) E" i5 T, e. V" S& D
   wait for 5 min
0 v! W- U$ N8 @! e( \7 e2 G9 }   bring up R_mB
, B1 B7 c& p' O1 b5 g1 qend
4 y4 E) v5 h5 k  O+ c3 Y8 k5 |6 w- `+ m3 H2 Z7 S; x
begin P_mC_clean arriving1 L& o2 v- j, n1 V' S
   wait for 90 min. ~& M: M. b  g1 J  H( [
   take down R_mC0 ]+ i0 ^" G3 R
   wait for 10 min
7 M( h$ ^2 g  m   bring up R_mC
8 g) O: h, B# m5 w5 dend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 v6 z# X; F$ R! G& Y   move into Q_wait
9 W1 f. Q( X( h* _6 [, m. I+ M   set A_q to nextof(Q_m1,Q_m2,Q_m3)9 [1 _; t% n0 u$ b. e" _
   move into A_w
  m1 c3 G. Z" |3 v( W7 ~& y   if A_w=Q_m1 then use R_m1 for u 48,5 min% r: e. Z0 q6 u
   else if .....then use ....for u 48,5 min  m( T6 e1 J+ ~# B
   else if .....then use ....for u 48,5 min  5 B& E& V9 X: F& k; b$ _+ h) a
   send to die
. @: A1 R, v. _: C3 Hend5 {3 z. @( g) W2 U+ r6 d
1 L% H$ o) f7 d1 q; G/ S
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-14 08:28 , Processed in 0.017892 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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