设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7858|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 * v$ z9 ?  N: D2 l4 w! w

1 L0 z- k0 V* u, K; c1 K底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去" {% N- G+ x  @% \7 ^& b. ~

, s$ q2 I# b# _3 i: s- s2 u4 |不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
9 n$ ^! E8 ]' v" x: C5 e& G
% x% g+ U# S7 U# b+ Z) ]  ?
--------------------------------------------
4 }/ X' O) I) O% M: U5 D1 H$ L1 jbegin P_something arriving
! y7 f# p; k  M& D. a1 L0 W6 M   move into Q_wait
% y# `8 p& G1 Z% u: E3 f2 Y   move into nextof(Q_mA,Q_mB,Q_mC)& F, Q/ q" u: y( M% b( P/ G
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
$ }7 e; j# `% c* x% e0 Z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ w0 e! o7 |0 Z5 s
   send to die
: T/ U3 \# d1 b3 J, Jend

" j- O$ c8 o! X" ]  A# i0 g# s0 I " u* x, O9 P: S; s1 L
begin P_mA_down arriving1 S3 Q! c2 x6 c4 G$ Y+ N) a
   while 1=1 do . C+ J5 ?% G2 _1 T
   begin
+ w- b( `6 B0 Y/ x: {   wait for e 110 min! b+ I$ s) m  M/ L
   take down R_mA% @8 g7 a% D; _
   wait for e 5 min: i4 J4 l: H/ A4 C0 T. A# ~
   bring up R_mA$ x) H! ?. ?" C1 ]9 D8 M5 F5 l
   end( D9 Y3 p% |: n% P$ o5 B) X
end

! d3 c# S4 F8 V( }0 l& K $ F3 S  C9 m8 i& X9 |# D9 {8 n
begin P_mB_down arriving9 c! E! o( s: P4 v. F
   while 1=1 do
% S$ b2 F8 n  h   begin* y: o3 H0 S1 J/ O* _
   wait for e 170 min3 y5 W$ I' }% z2 v9 B" X8 L7 h
   take down R_mB
7 Z1 L5 v8 g# a8 a7 z0 h- l   wait for e 10 min8 f8 _/ c) Z# Q
   bring up R_mB& a! n0 z' `5 ^
   end8 O8 L+ Y3 H5 i4 w! {9 {
end
" e# \) J5 U# e! E
( x, _/ o, }" q) ^
begin P_mC_down arriving/ d, r  J9 {3 H, ?9 v" @! E$ z
   while 1=1 do " {3 i7 F7 o7 N* U# d7 J
   begin
5 @) _6 L5 H3 G8 w2 k* W   wait for e 230 min
" s9 W9 X1 s/ A% A7 b   take down R_mC
1 f: M- h8 G' U' L/ u: o- T8 D   wait for e 10 min
) l8 ]9 j! t" T# c# j   bring up R_mC. D1 M9 I2 e) K9 K0 n& a
   end
3 l, I* |3 x% q, G2 `* kend
- @& g7 K1 [$ B# M

- T7 ?# ?/ m4 y$ P; K4 c7 k+ u! Ybegin P_mA_clean arriving6 r# A5 }) ?# C9 Y. K- d
   while 1=1 do
  G* [- X3 b( a  e4 A0 G  q   begin
# N, z) }' p5 M# e$ a# ]   wait for 90 min% [5 q: D8 G+ Y) d* N
   take down R_mA
2 w6 Y1 m+ _4 }5 @- B   wait for 5 min- o) W0 r) T7 {5 t) `8 O
   bring up R_mA! c3 N. c( I- G1 z3 i
   end
5 N" o- ]9 }) [  d2 P7 F" Lend

% A6 S* l( H* n5 F( N, @5 T5 J6 ` ; a0 @3 D* A! a- c7 L; n
begin P_mB_clean arriving
4 p6 l( I, a( \5 v4 Z$ Y5 H, C) s   while 1=1 do$ s* J9 O3 K5 |% {# b8 l
   begin. M! G: r8 y4 d+ V
   wait for 90 min
( ~* G& n6 }4 S5 [2 E   take down R_mB9 M/ H! X( z- `* j5 J$ Y
   wait for 5 min5 l9 D- f) \9 P- O
   bring up R_mB
1 o4 r/ V6 |! i+ M. g4 V   end2 a  ]: |, G7 `( ^& y: v  a
end

3 a) ~0 i8 f9 c0 _  L7 w # X/ G# o0 _, F5 j. A) \
begin P_mC_clean arriving
$ Q9 p, |/ J: z3 K2 n   while 1=1 do
1 @2 V3 I2 j: A" V   begin
, w/ f8 s% E$ o9 ?9 a# ~+ R, O   wait for 90 min4 @8 ?% m. c7 k' m) J/ {* E
   take down R_mC1 `8 x" N) Y% T0 G3 x
   wait for 10 min
$ x5 Z& V- c0 P7 j9 J   bring up R_mC
) |' ~8 M& r; S$ m- a   end+ O  q/ c( e& G; E! k5 R
end
7 R! Q4 X4 B, D9 H" ^3 C+ V
----------------------------------------  S$ @6 K+ S+ Q) |

: R9 M; F& K7 A  k- X; C' R8 `Exercise 5.9) M$ q+ B0 v; M' I" Z- t

" J2 C4 X, @8 t# P0 v3 _; c9 t) D3 l* Z* _: t
Create a new model to simulate the following system:, W& M3 T* ^# L8 s+ q
Loads are created with an interarrival time that is exponentially
+ u- q' @& [2 x% D" A; fdistributed with a mean of 20 minutes. Loads wait in an infinite-
" u8 K9 V" Z9 S; }- t# Hcapacity queue to be processed by one of three single-capacity,
/ P& Q7 k/ ]. j6 a% O8 Rarrayed machines. Each machine has its own single-capacity queue
! i# E( Q2 _" b+ }. j, @* F- _where loads are processed. Waiting loads move into one of the three
' o+ ^; U7 q3 N7 Equeues in round-robin order. Each machine has a normally
. O6 _: d, J; D  w7 i# r; b$ K. qdistributed processing time with a mean of 48 minutes and a standard
$ C9 ~5 N+ i* @deviation of 5 minutes.
) B5 `9 ?. ^+ KThe three machines were purchased at different times and have 9 B' Y8 l6 a! o, h. a1 Q: q
different failure rates. The failure and repair times are exponentially . H: x4 j- H/ J, Q
distributed with means as shown in the following table:
; ]7 S, w  D0 q/ v0 B* D& M+ f& ONote The solution for this assignment is required to complete
$ A6 C5 `  }) K1 r! Zexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
' t5 ]3 G. p: L5 `, }  _your model.
# W, S3 W" P( q  H) \. Z) b, x
) v: F7 H: n" S5 c8 {$ o! Z- ~MachineMean time to failMean time to repair% t+ t1 q+ _+ u; N' s7 K
A110 minutes      5 minutes
- I9 W8 M2 G0 [6 }% ~' M6 J4 cB 170 minutes     10 minutes
" j7 M/ T' H7 t9 ~0 nC230 minutes      10 minutes4 N% |8 i. j) p) S, x
- ?! S+ l- Q" R  f! M
The machines also must be cleaned according to the following , f6 }, |/ ~" d
schedule. All times are constant:
' F1 w8 D  S- B) V  @# [4 d! A& z
( T4 H# e) [5 g' t3 e1 @1 z; g1 PMachineTime between cleanings Time to clean
/ i+ P; p1 p8 E& t- m# jA90 minutes        5 minutes
! U" ?% H3 ~; g2 [B 90 minutes       5 minutes
0 q) Q; M! [, d5 ^* ^$ CC90 minutes        10 minutes! Z; k; M0 l" k- a# M; `
7 S  P, u$ H8 q' x$ \! X8 `
Place the graphics for the queues and the resources.
8 z0 _  v4 s! b2 M% C8 d) URun the simulation for 100 days.; l: P- c9 x" t$ l( _
Define all failure and cleaning times using logic (rather than resource
: y4 A( L- |3 acycles). Answer the following questions:; U7 R. r' @8 c# D  W$ y' C
a.What was the average number of loads in the waiting queue?3 T3 C5 E* x. v, J0 X- k! \4 @7 S
b.What were the current and average number of loads in Space? . _7 v  M$ P, o! `  m' Z) i. {
How do you explain these values?
& }  A9 X* U, X

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% }6 H) }% n9 E! {% Jsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 ^+ M  U, R' u% ?" [4 w# h7 p/ I这行好像也不太对,各位先进觉得如何呢?
2 W' e' |/ n! W8 M1 `$ |+ n4 `$ b! w2 q' b7 X8 a1 x
begin P_something arriving
) J& x& k! W& k. m+ F   move into Q_wait' f  t; D" c3 |) I9 I' W% ?% M8 H
   move into nextof(Q_mA,Q_mB,Q_mC) 9 w! V' d1 b! V
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& G9 J' R# _1 M+ p7 \4 b  q: I   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 6 W, M. l0 d& _1 y7 k0 Y8 |
end
) K: D- _! {& ]* f- T
9 Z( e  ]: n- O, E7 gbegin P_mA_down arriving8 R, b8 x3 m5 i& ^% j, y! b
   wait for e 110 min
7 R+ K" [( d. N   take down R_mA
% q6 c2 [+ W' O, X9 M& m) o   wait for e 5 min
" e+ j; b/ Y5 D% t5 ?- H   bring up R_mA
- f5 l. A; q$ s( ~end& }+ @& _: h7 @* q; h. t7 F
* K, z3 }2 u" u6 B
begin P_mB_down arriving$ D+ E/ O+ m" O! H5 `9 \4 c% A# I- c
   wait for e 170 min' d* u  M& @/ c1 B
   take down R_mB* W! |" p) I0 f8 z
   wait for e 10 min1 O+ `5 ], X) |5 E9 @
   bring up R_mB
6 O0 ?8 \& t" t! I& Pend" Q  y7 L  j( L2 @7 V5 v
: ?. G4 ^- t( ^: l2 L* O) e  d. J
begin P_mC_down arriving
- q0 ], C* g( t   wait for e 230 min
' ^$ M% n2 M/ u. r5 g# z   take down R_mC/ G- L' h1 E' z- c# B( T8 K4 b7 w
   wait for e 10 min
7 r- N3 G# l! ]: Z& w7 L2 h1 L   bring up R_mC
* l( m! s6 p4 }  [end
; N$ ~  `. ^0 Z$ B+ k9 @' o5 ^* C4 U0 x7 w
begin P_mA_clean arriving
% p$ B/ z, i* \  G0 j2 g   wait for 90 min+ k$ A# d/ c  g( K7 W! Q0 J/ s8 E
   take down R_mA
5 L- i9 b9 r$ _& Z   wait for 5 min# I: f: r' V7 h8 M7 x
   bring up R_mA
+ m  Y, G* U. H1 q: p, Yend0 M8 B0 o; P9 J" V

! P) z1 i3 J9 U" U8 ?. n4 }% Mbegin P_mB_clean arriving
* @: Q. S- ]5 A6 ^   wait for 90 min# ]8 L; Q) \# }; |3 M; t
   take down R_mB
* g- e. [0 ^, I- Z   wait for 5 min
) f  [) \5 \. n# m! O   bring up R_mB
- P( f$ ?4 q3 i4 {/ Wend4 N+ D% S2 I: D' X3 K

# w9 r# g& H' s0 @( }( gbegin P_mC_clean arriving  J* v" D# R" ?+ N' @4 a. ]" i
   wait for 90 min" t* F7 Q  w9 T$ N" p' |3 y/ v
   take down R_mC3 Z+ e- I+ W% k0 y
   wait for 10 min
& F5 j* U" h+ u" Z   bring up R_mC' R- Q4 C# l" V2 z9 V$ y
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving1 h5 E6 }$ r$ c; C2 @, {+ Z
   move into Q_wait
4 P9 o( D8 `" r1 z4 [; E5 o  c  n   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ l6 c2 G/ V# }4 A
   move into A_w
9 D% [: B& p; [* Q   if A_w=Q_m1 then use R_m1 for u 48,5 min. ]' H- L+ t) H* C% n
   else if .....then use ....for u 48,5 min
; b; j: l$ @" h% N; p   else if .....then use ....for u 48,5 min  0 I. }. Y. @- u8 H
   send to die# E: }" V& j3 T& w, X! ~0 R. ~
end$ E2 J$ T5 x: h% A1 }: Q! k7 \/ K

$ s8 s/ h3 f1 _0 N供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-29 16:54 , Processed in 0.013989 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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