设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8393|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ f, {. W: Z8 [3 J! a. o+ x
9 |. L1 F! I  z$ l" m, M; V& s底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
  g7 e" _3 \& h) _3 U2 Z( T1 z8 R* Z( O5 f1 ]7 }
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
; `, F# ]+ p5 T6 K
# D/ q! P8 V2 e% Z8 Z
--------------------------------------------' \$ \  z8 p* w! A
begin P_something arriving% K8 d' Q' Q! B) d
   move into Q_wait
0 G: b" \1 [$ K, k: D   move into nextof(Q_mA,Q_mB,Q_mC)
5 P: U0 ]6 S& Y. n   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 f5 K) D/ N* \& N5 ^
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, ^: [7 _7 a! X8 {$ x& }   send to die
; k* I0 A/ B% X: |" e& e/ ]end
% ?; z+ L3 c+ N# g$ o4 K* T; J! y
% L% s% A# r4 _5 |, k
begin P_mA_down arriving7 |8 V; T+ I) u" I, `% b; I5 m
   while 1=1 do - r7 L+ x. y# }
   begin
' Y2 O) V$ R6 @8 t' d   wait for e 110 min6 h+ \1 m1 O) @% y2 d- {
   take down R_mA8 {( j2 Q1 d6 j9 K* ^
   wait for e 5 min
. R5 M9 l! y+ s7 F2 e. O5 n, ?   bring up R_mA
- O) S3 A' N  D+ p' w$ |6 W( z8 R   end
8 e5 v% G+ S1 x/ ^5 g1 j' ?0 jend

$ I3 W& ]+ M7 X  X
9 L) p' i% h5 g. x% E7 {begin P_mB_down arriving# \: Q! b% h$ O, m; f& u  H
   while 1=1 do7 T7 U7 C3 u( L+ o+ Y
   begin5 J3 j: G; W, m6 |. q6 B
   wait for e 170 min6 y* Y+ M, B2 D8 x* b5 D6 @! B
   take down R_mB8 T. o0 y1 k1 I! |9 S) j
   wait for e 10 min) [2 M2 J8 d* P" }
   bring up R_mB
% i5 J/ n6 K7 W1 i# z/ J: \" y   end/ q: p# S2 B' G& _& F6 ^+ A9 h
end

/ Q; g; k) _3 M# f- F) b& b . F9 ~+ x5 P# t2 @* b
begin P_mC_down arriving
8 s; V- D+ U: a2 d' V   while 1=1 do
! c0 u+ u  N8 i5 ~$ u& e   begin( Q2 J- E/ ]: q" Y2 y8 Y& W
   wait for e 230 min
: |: S5 y' P$ u9 ?3 u   take down R_mC
4 P. f* W- U5 E! N   wait for e 10 min; G' V3 P. T0 h/ t  A. L
   bring up R_mC  l5 ]1 F8 g$ ^* L. \& i# K7 _
   end0 o+ h  s( ?6 A) F
end

& `6 Y7 x  W9 J, ?5 S' W
* L; L1 `% L! wbegin P_mA_clean arriving8 X( I( I* Z' S
   while 1=1 do) a8 c: `7 f6 k1 o
   begin
3 J7 F0 |- A( o9 G* C  R% t# O$ p1 U( x* y   wait for 90 min
! W3 x; V. n9 @3 @* P3 @9 _   take down R_mA+ j' l# a3 q8 _9 A/ @
   wait for 5 min
4 Z9 y& e1 L- n: n& ?9 S& ^   bring up R_mA  q, w& m: z5 |) p+ U) d6 g
   end
, m( X4 K/ P# N( V' `end

1 ]2 {7 l4 G% J) a5 E
6 Q! A! w9 Z' d3 |2 O) jbegin P_mB_clean arriving. `/ k1 R$ d' \/ [# k& B
   while 1=1 do8 r8 |! i5 U; @% j2 L/ D
   begin
1 |3 G9 L5 I, V) ]3 d$ `. |   wait for 90 min9 Z' C; x$ s- L0 _2 X$ |
   take down R_mB
6 o( h( f! i: j# B& M   wait for 5 min5 \1 I( \' L) J
   bring up R_mB
. M- r0 m7 }; f7 c1 h6 b   end/ y/ D$ A( A& {2 B4 L. ]
end
7 a8 K" b) `2 n4 b2 S1 k( ?
* w) L2 u' }% a6 Q7 F; T8 a
begin P_mC_clean arriving
1 {( {/ I5 M% K/ i* L   while 1=1 do
: e. k! A; o+ u, G) t7 ~   begin+ L1 x$ j0 _" v- O( R# }
   wait for 90 min1 V9 N/ w2 M1 `; R5 w! r$ [, B
   take down R_mC
# T) T, \/ I4 v' _9 l! e0 C   wait for 10 min2 ~" n2 W& _( H8 Q( {$ c% I5 m4 W# Y; j
   bring up R_mC
8 `) `" |$ c1 [2 j   end
, D$ G1 _* X: D! ~9 Vend

/ j; B5 B* k3 k# B8 t3 Z----------------------------------------
7 T5 a: D  G) L, X
5 A1 b& M0 K  m0 wExercise 5.9! v" F/ w6 \6 o% Y8 L. o- _4 s

* e0 W/ ~* @% E" u( v
+ O$ v8 o1 T# v$ q; hCreate a new model to simulate the following system:
* ]3 k( G: `: l+ H% SLoads are created with an interarrival time that is exponentially ) n  W0 Z, i  h7 Y4 R. I
distributed with a mean of 20 minutes. Loads wait in an infinite-
0 o( D, A% L: Rcapacity queue to be processed by one of three single-capacity,
' b8 p: [4 P; g8 N7 Warrayed machines. Each machine has its own single-capacity queue 6 O4 R4 W8 Z: n; P" B! ~7 M; t: l6 N
where loads are processed. Waiting loads move into one of the three
6 p8 X) A+ z; ]) Cqueues in round-robin order. Each machine has a normally
# o. r2 l5 O9 U6 b) ]5 x: I9 }% ~* Wdistributed processing time with a mean of 48 minutes and a standard
7 t; U, ~9 R- E, e5 N5 r- G3 Pdeviation of 5 minutes.
/ e  ?8 X- H4 GThe three machines were purchased at different times and have + o3 w; z- M% s
different failure rates. The failure and repair times are exponentially 9 v' {7 D! I8 v  J7 J7 D; A1 V; s
distributed with means as shown in the following table:
. D. K. _! {4 c# v  i: zNote The solution for this assignment is required to complete
- r* I$ y5 d' i! {exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % ?5 Z& e! \' v& R" k0 i
your model. 5 X0 @0 _6 C( H: C
' z" K2 v! B& E# z! K5 O* _
MachineMean time to failMean time to repair8 A/ o# i( ^+ r
A110 minutes      5 minutes
5 h0 @) {6 @4 T5 f7 f( }9 ~, zB 170 minutes     10 minutes
* u: x7 Z: B( m6 E# I; AC230 minutes      10 minutes  c5 L: W& D, N0 @% ~

% E& s: T4 |& l- vThe machines also must be cleaned according to the following   C8 e" w/ L8 I  l# }+ K
schedule. All times are constant:
; ]* }& Z0 s# \: U$ O
( {" \! g2 z+ R' ^2 C6 CMachineTime between cleanings Time to clean
9 k7 u  P/ l) V; e" cA90 minutes        5 minutes
/ e. A+ l! t- l# j1 [6 K* _B 90 minutes       5 minutes* n  x- ]) q5 `# P+ J7 n# y' H8 k5 I: c
C90 minutes        10 minutes
+ s. n; c; X. g, R- I& f/ }0 P+ l5 Q, N. {& @$ n
Place the graphics for the queues and the resources.   U4 o) f) K4 b- P" ^# K
Run the simulation for 100 days.1 z7 G7 T: F9 |5 H( r+ O* }
Define all failure and cleaning times using logic (rather than resource - C% `- d8 F5 x$ [( m3 c
cycles). Answer the following questions:
& H/ J4 R! k9 \) ya.What was the average number of loads in the waiting queue?% u1 O7 v9 B: Z
b.What were the current and average number of loads in Space? 0 Z  \- ~, C0 E4 N+ u/ b8 V
How do you explain these values? 3 r8 M2 U4 u3 r! _; f* X& u* E- m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% R. k/ `7 F: {3 X# Vsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 K- V8 \8 ?# X1 H这行好像也不太对,各位先进觉得如何呢?: U0 H8 Q! \* J" e4 D
) V$ X) X" O" I+ r  b. |
begin P_something arriving
6 ~% x' }, t/ y( V8 l   move into Q_wait
. K9 b' K7 V6 O' f0 {+ w0 P/ L/ _1 {* q' o   move into nextof(Q_mA,Q_mB,Q_mC) ( e' |* C3 U5 ?5 a8 g
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
# w5 D0 T) k/ w+ {, J' z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 9 ~( T6 O& p" M) y$ C, e; a; k
end) B' m2 R  ]! d: }
) E0 z6 n8 S: q: x3 N; Y
begin P_mA_down arriving: x" ?! j. i* f  X$ W
   wait for e 110 min
9 ~* N9 G, i2 u" [) s   take down R_mA
: ]* i6 Z7 U( U2 J) Z% b+ q, ~   wait for e 5 min2 J. I) B1 x/ n5 ~$ y
   bring up R_mA# I% Y" i5 U" y) D- D; @
end
' a9 N; f( f  L4 n) @
; L5 w& S6 l7 b/ o% V# nbegin P_mB_down arriving7 I+ S6 D8 Q' _& K) Z" e
   wait for e 170 min
4 i% w; J$ t+ C3 d7 v8 _3 I4 w) @+ ^  Z   take down R_mB
# Z6 s4 z* F/ F* Z. }   wait for e 10 min6 f& g/ Q# y+ _* D+ ]- R# K
   bring up R_mB
' v3 y! Z9 f, C, `. Tend6 M( ?/ t/ Q1 ]$ L+ P# @+ O

5 g2 F8 o0 O2 q' i- m* J3 x* N% fbegin P_mC_down arriving
7 }: E# L' P! p( v0 v+ q* g   wait for e 230 min4 X  F( l" I% V5 e$ w8 ?: c8 \
   take down R_mC
& H4 b8 k  t; l1 N   wait for e 10 min
$ \' x: U$ A# g; k1 g# Q* X   bring up R_mC
& A% e+ r7 K. z' Zend
" N- s8 m8 N9 a6 Q8 y
& N+ E% _. i; h8 |begin P_mA_clean arriving* G% t4 a/ V1 x1 \
   wait for 90 min3 G* J: E# u4 a) C; {0 i5 K
   take down R_mA
) p9 M4 Z/ u/ t4 d& Z   wait for 5 min
+ y7 F( V- C* x% w% M/ u6 b   bring up R_mA
" j4 x1 S$ K, Kend2 {! K* F3 n" Q

- ~0 `* G1 p7 I3 j2 vbegin P_mB_clean arriving8 D6 j! M' E# d
   wait for 90 min
/ [, O' f6 C  T; V; t   take down R_mB
" n# f2 x2 \/ d) q$ I   wait for 5 min0 n/ _$ E6 W; h: s
   bring up R_mB8 Z# {* O1 j! y$ N2 V
end3 u; a9 L- [9 I, r

" g) e, S, K( r. _begin P_mC_clean arriving
9 H4 W- u* \& e3 V$ M   wait for 90 min/ r( i3 ?9 j9 {+ d& v
   take down R_mC: G& w6 i, F" r+ g
   wait for 10 min$ V# m/ \1 H1 |) R8 _/ Y6 {4 f
   bring up R_mC
% ^/ }# e" \8 s; g; G6 Mend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving  z( S, g& I$ U5 w
   move into Q_wait7 R3 U/ U8 \8 N1 m
   set A_q to nextof(Q_m1,Q_m2,Q_m3)) Z3 M' U6 R5 d6 k& {9 S
   move into A_w! M! w& c; ?7 {0 C7 P# j3 ~
   if A_w=Q_m1 then use R_m1 for u 48,5 min1 z  ~( X# r+ @3 [
   else if .....then use ....for u 48,5 min
9 p4 F2 I& _; o, b/ N" C$ b   else if .....then use ....for u 48,5 min  
7 L+ R  M' X* y5 j, \+ `   send to die
" Y6 t. p$ @. T, ?5 ^7 J9 Fend
  S2 [. P* Y- r& I8 I7 s( G" r
  p  u% n4 N- c# G% e5 E供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-4 03:34 , Processed in 0.013410 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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