设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7230|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
% @# R3 y# S0 l) M& U* f
9 n/ o' B: c. D* T4 h# r底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 Z+ E8 U2 `8 ~2 w

  E; r5 {2 X/ t/ W$ g/ x" H8 ^不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!. P( m' ?* z5 {/ e$ R
! ]# N$ x0 G% E0 y
--------------------------------------------6 j( `2 V& M$ w1 W: q' Q" A6 D! o
begin P_something arriving
0 ]: B/ m7 r7 X% Q4 W   move into Q_wait7 J6 \5 a* U: {% b
   move into nextof(Q_mA,Q_mB,Q_mC)7 Y! c8 R. M" G
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min9 O6 I5 D# \- @/ j
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 e3 k6 k, u! n8 I- w; @' y; f$ N
   send to die5 A! {# p& q) N2 i  d* ~+ x
end
5 s! _& |  G- i& z' S) f

  @& V0 s! ~/ \3 }begin P_mA_down arriving
6 X0 Y% A9 A4 d% N! S8 Y   while 1=1 do # T/ N9 ]* P+ s) Y: j
   begin
, x1 {3 v; }; u& I# ~" L$ _   wait for e 110 min
7 \9 u* x& }; |# N# ~   take down R_mA
# Z$ C  T0 [$ Z5 P: _  f* K( ~   wait for e 5 min
7 b$ }1 }! [! y! x6 L' A5 b0 I7 F, S   bring up R_mA& l9 m" d( A. _# f3 _' Z8 M" c# ?" ]
   end
3 A9 o2 H( a- K1 `0 t: mend

+ p6 [+ C+ o7 b0 R4 c   f2 J4 c, J* F  a
begin P_mB_down arriving9 t- \+ U; X8 h7 A7 V* e2 Q; {
   while 1=1 do
) _: {( L# K% s* l/ d( y/ {3 h   begin
6 \$ ], o  L- P2 Z   wait for e 170 min
! G! E* Y# M  k& {) O8 X5 R   take down R_mB; l  I6 o5 l9 |6 h+ o  N+ r$ h
   wait for e 10 min
5 c8 H' j, b# {/ }, ]   bring up R_mB
+ W1 Z* X, `+ b9 G. u1 b7 Z3 E4 G   end
# O+ o/ p! H, Uend
4 Y" q2 x& D) }/ s& w

+ v5 F. w: {) A6 V: Hbegin P_mC_down arriving. W; G% C; E9 S# d. m
   while 1=1 do
4 W) b- @: {* w& p- m   begin
+ a& ?) g& T$ \- k! J   wait for e 230 min7 d# |4 k( d& B
   take down R_mC
: ?  `2 q% x$ |+ p6 b   wait for e 10 min' i: v" T5 c! O2 t# D! }! H
   bring up R_mC5 G7 D$ V, R- i" F: n
   end
# N9 ?) O; b3 H. Send
# [& q& u) E# c0 H5 j, x

& R; Y: M# J! }0 a" k. X8 ]begin P_mA_clean arriving
+ Z3 b" h+ U3 @0 K5 [3 ^! s1 n   while 1=1 do& h4 J; J* o( u4 ~  ^4 L
   begin
, w; s; \& v' m; v; n8 ?0 L   wait for 90 min
% N  D8 I) m/ Q" ^9 c9 Z" n4 d   take down R_mA2 d/ m' h% D+ V5 m) s! |! I
   wait for 5 min
. f8 r9 t1 N8 S$ V2 I2 o   bring up R_mA$ _! y0 N/ h& ?% w$ r; }
   end
8 @3 ^, t, \6 k9 q# B8 A+ r, |7 ^* b  C. Lend

( w3 \0 r# q" E- O " Z. f. W5 y1 G8 \8 s6 K
begin P_mB_clean arriving
$ a) M0 P# D! ]6 B   while 1=1 do
' n0 M4 S8 g8 F9 [: P( A   begin$ t2 y9 ^- Z( B2 c1 g% q
   wait for 90 min
% Y7 e- K- }' \5 A! c7 \' g/ n   take down R_mB0 h& P0 ?, V. s1 O. z
   wait for 5 min: q7 `; ^; k- L: I% b
   bring up R_mB0 J% d6 o- Y" u: u: r
   end
0 Q) ?$ V* O7 X, _- {end
7 q; |& U  `3 v" ]
! u( a7 M5 ]0 X/ j
begin P_mC_clean arriving
# P/ t, A+ Q2 F6 _1 S3 |  n4 S   while 1=1 do: Y# y/ F3 J1 \1 z' U
   begin
$ M* A  _% O6 s$ z5 ^   wait for 90 min
( `5 b' X# L& @+ u2 C7 S! d7 d' f   take down R_mC' X6 P1 x0 Z/ G6 M
   wait for 10 min
9 X; e+ J2 v' j5 ?2 `0 G   bring up R_mC3 o& M; N5 T* O
   end
$ o; ~+ r. d2 L" G9 w3 `end

( l' u  H' Z# M3 Q% |----------------------------------------, z9 B6 _9 ?7 S" O( F9 N8 u

; p9 S" ~% T; wExercise 5.9
* y9 ^4 W% a# }- X! I: `$ a+ v8 k4 A* {  ]4 r/ R
1 B) H, g& x/ F& J0 [1 ]
Create a new model to simulate the following system:6 E- U1 }9 F' X! }
Loads are created with an interarrival time that is exponentially
. k. ?# p) j9 \4 Qdistributed with a mean of 20 minutes. Loads wait in an infinite-* ~0 @- n+ P0 X3 G; X
capacity queue to be processed by one of three single-capacity, ! P9 Z: q+ j1 H2 l4 l
arrayed machines. Each machine has its own single-capacity queue - v3 V" M4 Z# _) b. F  w
where loads are processed. Waiting loads move into one of the three
5 N# I: g6 @: \0 [! Zqueues in round-robin order. Each machine has a normally 2 E& c& I) \, L3 A
distributed processing time with a mean of 48 minutes and a standard
& x. T9 x4 N+ M) i0 v' Q* Ydeviation of 5 minutes.2 o- ?* F' ~- H3 k
The three machines were purchased at different times and have 7 {3 |, E) ?6 P5 `
different failure rates. The failure and repair times are exponentially
6 z6 {( f: n; t# c: mdistributed with means as shown in the following table: 7 F2 W& p, c7 b; G5 \
Note The solution for this assignment is required to complete 7 G- A  C: K3 y7 G
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
  w) N5 [( W$ J0 c* Vyour model. / S/ y$ f: }1 |; Z
% J2 t* \+ U# e" T# ?
MachineMean time to failMean time to repair' X' ~9 v2 W* b) `' a0 b! t
A110 minutes      5 minutes1 h  x$ X* R& Y  b" S
B 170 minutes     10 minutes
; L9 |/ R  B8 @5 ^" \C230 minutes      10 minutes& I0 Y& K& `& x5 E# I
3 b# a0 v6 N3 z/ x! N4 V
The machines also must be cleaned according to the following
# U1 v. r3 z% c! o% P3 xschedule. All times are constant:
* f, Z- L9 i! L) d3 i) d; h  Q6 M0 D! V, }
MachineTime between cleanings Time to clean# ]) x7 ]9 [7 B- H1 o* s, c& C
A90 minutes        5 minutes
4 z) r' U# {, F+ X* q) RB 90 minutes       5 minutes( m' {2 Z5 Z1 E. l. M: G
C90 minutes        10 minutes
. l: U1 j" n' c; D: p/ n- A" I& ]- N# a$ u
Place the graphics for the queues and the resources.
. X( O7 M9 T# ?$ _0 t4 fRun the simulation for 100 days.; h8 i' Q" z% N% l
Define all failure and cleaning times using logic (rather than resource
, i* U4 f' ^8 m9 J) k% [9 ?cycles). Answer the following questions:
5 `& `8 L& B" T' {  E* Y9 m6 na.What was the average number of loads in the waiting queue?
  [# X* x: B0 ^/ a" lb.What were the current and average number of loads in Space? % f' e* @! a+ k) S3 `5 b6 f
How do you explain these values?
' s  W1 E. ?: C

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉5 w4 Y8 u3 t0 |8 g) C/ _# D) z
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* i' F9 x" E: G# L% C0 S, `; i
这行好像也不太对,各位先进觉得如何呢?, |" Q  q( {3 [9 U7 c

2 z& \' O8 z* ?( Jbegin P_something arriving/ X$ J' w  ~3 q  y- _+ V) r
   move into Q_wait- K5 l7 [2 k0 F+ ~9 D4 e1 a
   move into nextof(Q_mA,Q_mB,Q_mC) 5 O  Q% j" m- B* U
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ ^+ I2 ^1 ~7 S0 b5 j; {! w" S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ L$ ~4 c  {' a9 }+ T: T* @6 T9 jend) A6 E4 O$ w% G1 ~0 S' U
1 ?7 w/ g5 r& q& M
begin P_mA_down arriving
. J1 W1 |" v' x   wait for e 110 min4 d- q8 c" X! L( C2 y! _# Z
   take down R_mA# c8 @/ |2 c9 r! n3 j. a6 k% K3 N
   wait for e 5 min
% D' `) B4 _2 H- [& V   bring up R_mA2 p* _/ v# Y6 ?: ]. G1 I. p
end7 h: t6 a& `8 A5 h' y6 |0 }/ \

: s$ U( j) ~6 i2 d3 Xbegin P_mB_down arriving
! }& R) f$ {( C8 t' L; h/ O9 i   wait for e 170 min; R* R) t) ?- ]* J& _$ q$ e6 N% x  l
   take down R_mB' P" d- I9 j% `# g  x( k0 q9 X& E! _  U
   wait for e 10 min
; V* H. |; K% P, m" p+ e! H. i   bring up R_mB) w7 l1 o4 p' b
end
$ L& x( V. ^! B# P. ]7 x, w- \
1 ^! P7 C% X- @( A" rbegin P_mC_down arriving! s5 `: B4 K. l
   wait for e 230 min! u& B, x# C% y7 Z( ^. b! Q  f
   take down R_mC* B) r& R" g1 ~4 S% g" R: P5 h6 r
   wait for e 10 min4 B; n' e# J9 M$ @( _1 D3 q
   bring up R_mC. W/ }& f( D( e( u
end
# M7 q# C$ p3 m( G- ]( U) N* e4 ~; `1 s
begin P_mA_clean arriving
0 F9 I0 s3 O( _# I' W   wait for 90 min! j( q! r5 G: S; w* @2 i" K/ c
   take down R_mA# E6 X7 p; m# }0 K: W. S1 {4 n
   wait for 5 min% w; X  }9 Q. P+ @8 H6 z
   bring up R_mA. [( E- {  w5 y; V4 S3 p' E
end& d9 D2 \; I9 C2 d
7 K1 Y/ k- ]) I. r
begin P_mB_clean arriving
2 r' e2 d: q' u  l   wait for 90 min
2 c4 ^* a" B3 M3 ]% O   take down R_mB
; b! O6 F0 b" c7 p" d. }   wait for 5 min
' Q4 f8 Y; I# J( {  P* Y) W" J4 z   bring up R_mB) `: Y: B5 Q9 N/ D9 [$ l: S
end
; E' @- T+ u; K+ H0 N- _* X% G1 v! ~( H" z* E
begin P_mC_clean arriving
, F! k& U7 `7 C, T9 `6 x   wait for 90 min- b/ e, t5 _* }1 S) a/ w9 |
   take down R_mC
! S3 b: Z' S+ t6 M+ X* L9 J   wait for 10 min
& u# G% {( ~' n- ~$ H5 Y' o4 X   bring up R_mC- b" J+ A/ [* l7 c$ G
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving2 f* A( M# F5 g& x( }9 U
   move into Q_wait# v1 T( ?, F9 ?( }9 [
   set A_q to nextof(Q_m1,Q_m2,Q_m3)  k8 X2 p* R. ~/ C1 k5 i1 V, D
   move into A_w
6 y5 f5 t3 Q, J' \5 a% a$ g5 V   if A_w=Q_m1 then use R_m1 for u 48,5 min% ~. z4 P5 ~+ U# v  ]# G
   else if .....then use ....for u 48,5 min3 c# N% a* K* |
   else if .....then use ....for u 48,5 min  # A4 ]! Q, b& _: b  Q. G
   send to die
) c9 r3 q1 `+ A( W) r" pend* A; r2 W, ^9 \; _: E+ W
6 L( d7 g# ~; M) S# S
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-17 00:31 , Processed in 0.013775 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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