设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7886|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
) A$ u# c5 |' |
- x( p4 E$ J7 G7 j! ]2 e: @底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去' d3 y3 C* f$ A' H
" H+ O4 J5 G- J9 g# \6 \  E
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
. L) {' H, o4 ?! _4 y6 ?, a: j4 X
$ F2 l6 I# p, g# @: v* l& r& H/ r
--------------------------------------------
0 `' O6 |, k- M- T2 O% K% Mbegin P_something arriving3 J& T; q. W- ~4 f3 x# B
   move into Q_wait
* O4 \) L4 @, U9 @7 n, V6 h   move into nextof(Q_mA,Q_mB,Q_mC)
, X7 u2 a1 S9 D0 Q, y   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 m) K7 G' J- H9 H& s+ U3 b5 |   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" [9 V( P0 e2 X& F) J% a( S   send to die
' D1 n' `& s3 pend

! C4 u& n9 B4 j/ r) h
$ t( I1 r& x% Lbegin P_mA_down arriving
! D+ }4 L0 a. _  z( \# Z# I   while 1=1 do
! F, f* \1 H: v4 t, G! R4 s0 f   begin
2 }/ L: }6 c0 p( {6 g# k- [$ V   wait for e 110 min
6 N0 |1 q9 L% p5 w1 u( G( W* s% o6 _   take down R_mA) @8 B( {9 Q! {' S! h
   wait for e 5 min1 M* j4 I4 b8 k: M( D
   bring up R_mA
9 {% o$ H2 a! Q: R! i   end, m1 A  S5 }& d
end
+ l7 ^4 F) r2 \. [2 S5 p
4 K. M8 y" l0 p6 _! X! R# F
begin P_mB_down arriving# v' O$ A' u: Y8 J. }0 @
   while 1=1 do
5 {. W; V0 s- T, @/ @! n   begin- i1 E8 A% H+ O4 \3 K
   wait for e 170 min4 T4 k* k& p) g2 t7 _- Z
   take down R_mB
8 {& l8 C2 {+ W: B7 D1 W4 t% Z! _   wait for e 10 min2 y! K: g7 V6 ?
   bring up R_mB
( }, v' K. v* p! \) K) w$ a   end0 ^$ L0 S6 ^2 ^4 ]/ A1 W* a4 i
end
& I% N, x* k+ C. w
( M; T  ?7 Y  O8 A' M8 g
begin P_mC_down arriving5 W+ Y. G- H3 [* p  R: C
   while 1=1 do 6 l7 b1 }8 D5 @+ T. f2 D
   begin
/ [5 ~; x* Y! X. Z1 G   wait for e 230 min; \8 @3 _9 z4 W+ ~! C
   take down R_mC- V( G. Y0 |- n. _
   wait for e 10 min6 ~" d5 t8 E, J6 x6 P: B7 r; L' M
   bring up R_mC
, i( [1 C' J! B, T* {   end
4 m) e1 ^: T2 I) b% ^end
6 i5 f. m' }, q2 I

2 G) E3 N! b7 p# [& j0 ybegin P_mA_clean arriving
& T9 l, V& d* s! b& R! a   while 1=1 do2 a2 v# w& C- Z( t. F% [+ A; F9 ~
   begin
& @' q8 v; A8 [7 X4 S   wait for 90 min3 b8 ]8 N1 c- ?1 C8 o. V  U
   take down R_mA9 T! |0 I1 s, G( l
   wait for 5 min4 f$ J: C  Q! X9 l! Y
   bring up R_mA
+ P* L$ U4 r- b# a   end0 y" a$ ]; }8 l5 j; w% ?
end

9 p' @8 L- D+ B% `& g% z  v1 u& Q. M 9 @# T4 f$ N0 e8 L3 ~
begin P_mB_clean arriving' B6 t) j/ g5 {9 ~0 n
   while 1=1 do
5 }% w( a6 H' m3 \% F6 c4 c   begin
$ z$ i4 d! D" T7 y+ g% |. N1 i   wait for 90 min
( s$ X/ f/ v$ F* c3 y8 Z   take down R_mB
, X& e% |- Q2 N$ @3 f   wait for 5 min
4 V" V6 D4 c/ m   bring up R_mB: J4 n/ _2 s  w' p) r5 j6 K
   end
5 z. I# k3 j2 e. d7 X9 V- M" Rend

' E) A2 R# t/ }2 c6 [1 N
) c+ j& f- I, zbegin P_mC_clean arriving. N  Q& y5 f) _6 |, v. r
   while 1=1 do0 q3 y& e: U% P
   begin1 G! ^4 J5 E( g5 H1 u" k
   wait for 90 min
: A* u. @* t( U+ M$ z4 ^/ n   take down R_mC) R; @0 A8 z+ B0 E
   wait for 10 min
7 E+ M0 N) V& N9 n   bring up R_mC
4 {9 q* j) k- z   end
' T, X. @" t, J# v' M/ R2 pend

- J( I) s8 \% w* N7 [- o----------------------------------------# W; }/ \( r/ T* d( w( }
5 t1 U$ M( x# g: U  j, t
Exercise 5.9
7 t" x# g* H' Q: E/ K5 z4 X. b( S! c2 R/ C1 |* Y5 n

# S- l5 n; L, S9 a$ }Create a new model to simulate the following system:
+ W; I! w' v8 Y* YLoads are created with an interarrival time that is exponentially
) g5 g2 e/ a4 Y( m* \distributed with a mean of 20 minutes. Loads wait in an infinite-2 x, X; a- e  {. b
capacity queue to be processed by one of three single-capacity,
% r! y/ L8 w& varrayed machines. Each machine has its own single-capacity queue
; u4 j5 r5 Q! {where loads are processed. Waiting loads move into one of the three
/ f; Y! Z& r. F% ]0 zqueues in round-robin order. Each machine has a normally 5 E; L) Z: D* v
distributed processing time with a mean of 48 minutes and a standard
4 x" W% ~% Y3 T8 Qdeviation of 5 minutes.' J0 W, {2 J3 Q3 X
The three machines were purchased at different times and have - x0 @! K7 P* |3 Q: x' H
different failure rates. The failure and repair times are exponentially
7 L: F- o  @/ C4 Gdistributed with means as shown in the following table:
) _3 K3 C2 {* ~) zNote The solution for this assignment is required to complete 7 w8 R, M; ?. ~8 M& O0 s9 \
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 9 }8 K( q1 S+ n
your model.
9 A  G7 l, C$ s. u; W: D
! {- A  D+ J" wMachineMean time to failMean time to repair$ i+ H% a6 w4 W
A110 minutes      5 minutes( D0 R7 t/ u. s  c+ m6 d0 {/ h
B 170 minutes     10 minutes5 |7 |) d+ a7 ~& P9 t: r; T
C230 minutes      10 minutes* ~5 r: d1 w8 v: ~0 K

3 J$ _- U! M, \7 _8 v3 f, q% KThe machines also must be cleaned according to the following
8 i# [" w7 O2 i4 _4 Uschedule. All times are constant: 5 o0 B4 Y& A3 ^6 v( ^' z

$ ?. s1 t  R8 D+ v+ ]; J5 }; HMachineTime between cleanings Time to clean& L8 g& d1 W! A) t
A90 minutes        5 minutes0 B+ p, g% ~$ v" _) w0 {
B 90 minutes       5 minutes/ ^4 I8 \* P5 p7 H
C90 minutes        10 minutes
0 P8 _0 n# E7 K# m4 o; C* L
. D+ e  d- m, l% D& ^& o% u& FPlace the graphics for the queues and the resources.
1 a$ ]0 Q% M  s6 Z* `1 uRun the simulation for 100 days.* |" Q" k( T, a  m1 y. e: P
Define all failure and cleaning times using logic (rather than resource
2 S+ _4 k* q; Q$ jcycles). Answer the following questions:
, \2 y) a0 R+ f% Za.What was the average number of loads in the waiting queue?$ b3 f. ^6 T* n- D
b.What were the current and average number of loads in Space? % _8 |, K; w' k" y  c' d3 l
How do you explain these values? : w% w8 I+ K5 V6 b" \

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉2 l3 F; @6 d4 ~/ n. J8 P# ]; k
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ o# v% j9 E8 u; V4 V' Z这行好像也不太对,各位先进觉得如何呢?
5 _2 s* i3 p: T
( k$ b- s7 \4 F% g" ?; Wbegin P_something arriving1 }$ T1 F4 `+ o' s" ?- R
   move into Q_wait
: u7 Q4 S# v' d5 r9 \$ M6 u+ |   move into nextof(Q_mA,Q_mB,Q_mC) * `- `8 {% @8 B4 F: S
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min, K; `2 k. W) {. c
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) # [- R) g! I+ M7 _' u1 B& p6 I
end" O6 L  z9 v9 u5 t
0 J  X$ L' J4 D# _6 v+ t1 G
begin P_mA_down arriving6 \7 v8 H) ?" Q/ e8 k0 E5 O/ }
   wait for e 110 min3 Q6 c; l3 c/ y7 m! e& }
   take down R_mA
) n' S% S" d9 j) H   wait for e 5 min
- K8 S9 N2 C. b+ X) n   bring up R_mA" o5 B! p5 f4 D- g5 T$ u" K  }& j
end( d4 g9 h# L% G3 h
0 j. q3 R7 O) q* ^
begin P_mB_down arriving' z4 R, V8 x# m& ?9 t  j, ]+ k9 v
   wait for e 170 min
0 W' h& Z3 q% _3 g0 F/ y9 L   take down R_mB
3 }1 l- X8 ?1 I+ j/ ^; N. v   wait for e 10 min
/ L5 }0 T" N. r( w1 s$ C5 O5 e   bring up R_mB1 }% z0 s$ A6 n0 ~" n+ @
end" X- }0 Q  ^; O# }, c" P

! M, z8 e! L/ D3 Y  V/ pbegin P_mC_down arriving7 P( {  D2 Q# |- O% e
   wait for e 230 min
" [6 |% F: X* D( d   take down R_mC
! `* _+ J  Q3 {, m6 W0 s! l7 j   wait for e 10 min
) p* _0 M( `& ~! \   bring up R_mC
2 P* W( C. \- [$ _9 E6 O5 Iend
; Q' c: Z7 t8 n2 u  I5 `8 h! ?7 H" v8 f+ ]$ j, x. J) U
begin P_mA_clean arriving- @1 Z* _* [* D& G6 ~
   wait for 90 min2 s6 Y$ O; g/ @
   take down R_mA7 P) e3 j4 M) f+ I; d- u# c
   wait for 5 min2 r: p" A0 b9 s+ t
   bring up R_mA0 a% a6 h, p) \6 e$ [" n" v
end6 ], @; l3 \5 A" L5 M+ I1 Y* O0 l
6 ^* [7 H( L5 g0 F; W- n) i' R/ W
begin P_mB_clean arriving' S6 q! C. F) h0 S5 R
   wait for 90 min
8 ~. \# R6 X0 P4 r# A   take down R_mB: v6 W0 j/ L# Z# c* P
   wait for 5 min4 q( w4 A( h0 q% E0 j" H  `+ l
   bring up R_mB
; K1 ~) C& V& g, Vend  ~0 l3 Q. L  f/ A

7 n* Z, k9 L5 c! u. \/ a0 zbegin P_mC_clean arriving
( d' F* V3 T% m' S: v) _* ?   wait for 90 min2 O& l3 G! p5 j7 v0 b: h
   take down R_mC8 y0 L' o7 b6 T) @& _
   wait for 10 min
/ g) o. @" h9 B   bring up R_mC
5 |  a4 g0 x& cend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving, w3 T/ A, j* s& x; ]9 E( i3 D
   move into Q_wait9 k" ]# V4 f* E$ }4 q- a
   set A_q to nextof(Q_m1,Q_m2,Q_m3)! F5 v1 T+ I0 p: s& l
   move into A_w
' X% b) y% F/ Q! J) L% ]  n   if A_w=Q_m1 then use R_m1 for u 48,5 min
1 r2 B, h  o" E9 i   else if .....then use ....for u 48,5 min& N2 v+ A, _8 E/ ~' c9 U
   else if .....then use ....for u 48,5 min  
4 k# {& }9 V8 r/ ^6 O, j   send to die6 x  [: {4 g- Y- @2 P
end2 C2 A2 F4 |+ ]

. v7 c$ m- l* |0 D! J. i, |供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 14:58 , Processed in 0.021022 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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