设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7246|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! C9 X! Q9 }! u* \& c2 }" p1 c1 K
+ |8 S1 T1 ?2 k9 A& V7 Q底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
; m8 Z) Q# M4 O# g9 }
+ ^: i( `( l- W4 n不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!' S! e2 W7 o1 @
6 T( O* x- J) Q0 J2 n$ O
--------------------------------------------
$ X' W7 ^# R' T" K. a5 ^2 zbegin P_something arriving( |1 A+ t6 a+ ^4 L0 H: V! N9 W
   move into Q_wait5 ?; Q# J1 g1 r. i  u) ?
   move into nextof(Q_mA,Q_mB,Q_mC)
( J$ ^& u! n) Q( H$ u% D, u) `   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min/ e/ V7 Y! p* D+ d. I  A* ]6 P
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). P" z/ J1 ]: Q1 `/ Z
   send to die
$ B. V8 [! O& `$ xend
; ~- @3 K; A! h$ d% R2 h5 H* o

. `* b0 W, B- F- p# K" Dbegin P_mA_down arriving
3 M% S, ^: C2 o& y) u- }   while 1=1 do
% @" @9 v% S; a" U. A1 [   begin5 [. R3 Q' V2 N% c
   wait for e 110 min
8 ]5 j" R+ p! c. }9 e9 d; A! ?* Q   take down R_mA
0 d, N2 T( H! p  Q   wait for e 5 min. E" a8 I4 r  H- F! w; n" r; x4 }
   bring up R_mA. m& A/ P$ E) ?. @
   end
$ b6 ~3 N" ^' j/ uend

- J) y; ^3 @8 Q# e" a" @- ~ , [: r5 e- @) Z+ q
begin P_mB_down arriving+ G+ W  S) v; C9 t( y' t3 W/ f+ G
   while 1=1 do' a3 i: s+ S6 @9 q/ l
   begin- Q0 ~8 R% \4 L5 K: c
   wait for e 170 min
( i9 N7 q7 O% ^. X9 F0 E* u   take down R_mB. U) P" B( D/ T* l: O
   wait for e 10 min* `' L- V$ s# x9 b
   bring up R_mB) M/ `2 e, _, P, ^
   end$ H, `# ?+ o/ n/ Y7 H
end
  k) A( `; `9 |" z. X# P5 F
* D( s: I$ Z+ ]5 z
begin P_mC_down arriving
9 v7 u7 _2 G, i. K6 ?0 F   while 1=1 do ! B9 D* A  r1 \0 l2 {, r5 j
   begin
  h7 ?! }; ~- F2 p   wait for e 230 min
  A+ Z) O( I4 R1 |7 I+ s! b8 f   take down R_mC
$ K4 |' ^6 s$ K* W   wait for e 10 min* x. m0 S6 [, i3 ?: f: Z  g, p
   bring up R_mC
! Y" X5 g# a9 t2 e5 i   end
7 P" e. a9 U; D+ s+ h8 {4 R6 hend
- _1 p' R! w+ N; B* G# [2 A

0 u0 K: v$ C$ a$ `8 [, r7 j/ K  kbegin P_mA_clean arriving
. N' _) f5 L' J( ~$ T3 _& f4 i, Y   while 1=1 do1 R8 b5 r& x/ H
   begin
' x5 N" X5 Z: B  x   wait for 90 min: F  ]( a" J. A
   take down R_mA
3 q1 e5 \0 t6 O   wait for 5 min
  p3 R$ }" i$ o2 C6 Y1 S   bring up R_mA
, f8 S/ A* |) s/ l   end
# r' O# e4 I7 f& E' Y$ y: O3 Nend

! l5 B1 s/ o! g; c5 u3 p
' N' W; i1 _2 V; A- j' Lbegin P_mB_clean arriving# p& |% ]  s9 O" N
   while 1=1 do% m$ L' c  f! {) `$ J
   begin
1 o- Y0 _* s& j% Q% m. E" O   wait for 90 min
* h1 _) M& c! X* h* S( W' C   take down R_mB
2 c4 J! i& L% q" K   wait for 5 min
3 k8 L& U. ?" r( n; I  t, J   bring up R_mB
) {3 N3 f! p( k5 b; h, u  M   end
" X7 k9 J) c8 T; X" uend
( c" @' Z( s3 C  f/ h
! N' s( P! i  ~4 \6 s
begin P_mC_clean arriving' X5 e4 |  A; ]* r, z8 K. [
   while 1=1 do
6 M. h1 n; {7 l( O   begin
" u% i) s8 c2 V   wait for 90 min+ j* m+ _) p. r; ~
   take down R_mC3 N& c$ _7 B1 V* g* O; _
   wait for 10 min
/ O) z5 Q2 \% y% T1 R) }   bring up R_mC; R9 }  I" i4 e. L3 A: x" h/ X
   end4 k, S' Z  k/ d8 o
end
/ ~2 V. a" s# S# Y7 N+ k. }0 S2 }
----------------------------------------
- A( j/ w/ g& S, s
! `! m6 j, G1 r+ }Exercise 5.9; F  s: m, R( H3 ^( ]( X9 I3 ~

% I% U) Q6 I( c7 J$ z$ t
2 N% U( {# u8 L3 R: uCreate a new model to simulate the following system:3 s3 H% `) H( y; d* ^4 {
Loads are created with an interarrival time that is exponentially
7 ^4 E+ r) ]; e6 a6 ]5 w8 udistributed with a mean of 20 minutes. Loads wait in an infinite-
4 n) V# h2 t# k: q, `capacity queue to be processed by one of three single-capacity,
2 ^6 U5 ^3 Q, R4 M: m9 r& B1 Qarrayed machines. Each machine has its own single-capacity queue
" H5 Z, Y( V3 L  {% p/ i7 Ywhere loads are processed. Waiting loads move into one of the three
9 C* l( g  J  M, e" @queues in round-robin order. Each machine has a normally
/ a- _" V8 X, o; b  O5 ?distributed processing time with a mean of 48 minutes and a standard
- P1 s. V7 y5 F$ g9 tdeviation of 5 minutes.
4 `5 @' |; g9 k9 z6 MThe three machines were purchased at different times and have
3 T$ Z4 B7 g, j" H1 @different failure rates. The failure and repair times are exponentially . e4 x8 @2 d* Y$ K
distributed with means as shown in the following table: ) f2 _. d! ?/ G0 g& m% B
Note The solution for this assignment is required to complete 7 W, P7 q% \3 F6 B; z
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of " K2 Z8 B1 v6 S4 ]" y' M
your model.
" k  P: }6 B1 c5 C: ~; m- G% F9 r. z5 s
MachineMean time to failMean time to repair
) |. z) z8 t0 k  XA110 minutes      5 minutes% G+ U8 K" i2 m/ o! G
B 170 minutes     10 minutes$ u4 _2 L) ?: Y' O8 B+ q
C230 minutes      10 minutes
2 U  A) [/ N. Z1 T" N, V& R8 x: k' d" ~% e
The machines also must be cleaned according to the following ! I! V* ^! s' D' P; k
schedule. All times are constant:
* R9 }! @& w3 l2 Y
- u+ N$ M. M2 W( gMachineTime between cleanings Time to clean! y9 v- f6 ^, f0 ^' n
A90 minutes        5 minutes
/ b/ t% M5 G1 s* AB 90 minutes       5 minutes
/ [9 V9 p' n- J, ]# GC90 minutes        10 minutes
1 i' a7 N" ~; n% ^! a, Q  e8 S* [' s( o
Place the graphics for the queues and the resources.
; d- _" k5 x4 C4 XRun the simulation for 100 days.
; [: B! r/ f4 j" s4 K2 p* E" _' y/ oDefine all failure and cleaning times using logic (rather than resource   F8 H0 {. ?! @% X7 ~
cycles). Answer the following questions:
" t8 @. `) h4 V5 @. o% B# oa.What was the average number of loads in the waiting queue?
$ Y0 ~: B2 g4 _; i  {b.What were the current and average number of loads in Space? 7 H- F3 ]% D' _
How do you explain these values?
5 a2 m- i1 y9 x

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉1 c* @- X- Z  o9 w+ d
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 y) ]& T, t) P0 g. r. r: E
这行好像也不太对,各位先进觉得如何呢?
# @: X0 ^, k2 i& j( ]5 x' ?. i
) Y( H; D$ W8 P# \% p) u5 M/ ~begin P_something arriving
$ B5 @! I% t, U8 C5 U3 b- ^  @; u   move into Q_wait% Z6 O8 H1 G# a3 ?8 y
   move into nextof(Q_mA,Q_mB,Q_mC)
9 \9 [* Z6 X$ S( r1 {8 {   use nextof(R_mA,R_mB,R_mC) for n 48,5 min. r: @3 H: Q4 ^- Y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 c0 a5 F( A& h$ ?& {* l! Rend$ e6 m3 W  {9 `
$ d: U( N  s) B& c& h6 f) f6 a" U
begin P_mA_down arriving8 o' [+ W$ r8 L! S+ o# E; v
   wait for e 110 min
7 v1 w# ~+ P  F7 @; s% E   take down R_mA! r* K, q2 a; n& A5 p
   wait for e 5 min& T' K2 `9 D4 i/ A. e1 o6 ^
   bring up R_mA( A- i0 a' s; c: k
end
" B: |  r( Z1 V2 ^& t7 F. M5 H1 k' x! P9 O& B" x# ^( m
begin P_mB_down arriving, \% s+ q9 g$ z" Q5 y' Z& d& M. X
   wait for e 170 min
& J( ]; O9 |; `8 Q   take down R_mB
  l! b1 Q5 n( R& `- e   wait for e 10 min" t6 s; E& H, \& U
   bring up R_mB
# w! G  w- R+ L; _/ v% Cend
+ b+ i, y5 a+ ~( L7 O
9 b" x- Y: n* D' mbegin P_mC_down arriving
5 A  ^; r$ U( X. g' Q4 n   wait for e 230 min/ K" X. y$ j" C) d1 ~$ k" n# x
   take down R_mC
  j& ?2 s3 N2 c- M, u' A   wait for e 10 min1 z0 `2 G' V5 ]6 K2 H2 P! t
   bring up R_mC6 q7 J. y$ }. N' `4 D7 b
end
3 i* u2 _& p: {; U  z+ e/ [! ~" w: n. R' P
begin P_mA_clean arriving- k1 C9 S* d. z: M5 H7 F& \
   wait for 90 min
9 e' y9 w4 [4 k, X   take down R_mA
$ X9 a4 l+ b. o3 a2 @) f   wait for 5 min
- L5 \% Q" }  \% B   bring up R_mA2 b- S, x* x7 z! I3 i  m/ J0 i% h0 G6 E
end
( l: v; ~9 ]9 B7 R/ L8 J1 N
7 K$ d0 d% {. o  @& h: P: fbegin P_mB_clean arriving
7 `; j5 x2 {+ ]7 C$ h& d$ O   wait for 90 min
) [  A7 J5 x  k# s$ @& p, J3 h   take down R_mB
, ~* N- ^9 t8 d% Z( ~   wait for 5 min
; q  J4 `& s, W3 e" i   bring up R_mB
  G- I: z7 U; X) fend3 b3 e- `5 v5 _$ ^
: Y' A0 k' x, F2 ~! p9 Y  _
begin P_mC_clean arriving1 R; a9 I, U2 a; i- T+ r1 L/ J# _
   wait for 90 min
! K. y+ T2 Y' s3 O! _9 J$ M1 R   take down R_mC
6 l) g! m1 l% F; [/ ^7 F- L- ^5 S- [   wait for 10 min. G1 ^; t! }) y0 a+ u1 |# }1 u) v6 U9 e
   bring up R_mC
5 q/ ?( d! K; i' v0 eend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
3 G' ]: q& I% l8 k( O   move into Q_wait0 W+ H% T. R5 f  p
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
) x. v# `! S, W8 }+ O/ E   move into A_w
. N0 K9 R/ l( p, ~: e- G   if A_w=Q_m1 then use R_m1 for u 48,5 min
! G! \; G) W! d! f) B   else if .....then use ....for u 48,5 min
+ i' L; s& w1 a9 _. Q; v& V+ x   else if .....then use ....for u 48,5 min  ' p: s% n* j6 _
   send to die  h- _! G3 F/ Z0 f2 A
end' Z+ s9 j5 Z$ I; O+ n. G( q

; ^# M" W6 d) c& D供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-18 15:39 , Processed in 0.018902 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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