设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7287|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 4 e1 p+ m2 E) W& h
7 N" ?, s- n& x& ^( g& \
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去7 i; H6 {6 ?# B7 e

" i3 P; G4 h* U8 r) s! X7 k不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!1 M2 m+ E1 @& p% l; P
5 q7 ?3 {0 d$ o
--------------------------------------------+ V  W/ ~! u+ p# ?% p/ I6 K& }7 @
begin P_something arriving' |2 l- S9 X* ]; q) u
   move into Q_wait/ S& B" K7 J- ?$ |& {# J) z1 K0 x
   move into nextof(Q_mA,Q_mB,Q_mC). X+ X- R0 d: D, f6 P0 i# l- K
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min' C: X: M5 H* J# T- o; D
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ V2 `/ ~- F/ K) J: V3 H
   send to die
* B9 h, H4 @3 e/ [. [% t" ~0 Wend

  s$ f# f1 v4 ]7 Y1 r7 u
  z6 ?+ r& F0 A. \5 N1 Obegin P_mA_down arriving
% Y  n2 o+ G6 s4 T) _1 D" K   while 1=1 do " \0 w$ _: L! ?& A* x, r1 x
   begin8 I. E; t, M6 U# k2 a
   wait for e 110 min
$ j( V. Y1 X: ~7 \, F" n   take down R_mA
2 T! K! l9 D: |, h2 c$ K   wait for e 5 min6 w7 u' s( D. P! t& A2 v+ b
   bring up R_mA& V, w9 s+ [* O9 K" p* ~7 h
   end% |7 E; F  v+ k0 ]/ Q
end
4 R) J# o2 h# o( j

* |  t2 ~3 B# c: `. D5 jbegin P_mB_down arriving
  w, K; j6 T0 t# z" V6 g2 }   while 1=1 do( `& f( k1 p6 Y  V
   begin
  o3 _! `8 b. U2 A   wait for e 170 min8 B; G" S9 p# x% S6 U  x  ]
   take down R_mB8 v! w! M# n+ I& V4 {
   wait for e 10 min
+ J  k% r( q6 H   bring up R_mB6 y6 }+ m7 e& j2 q0 |
   end, z. _) p# N$ k5 f& Y3 ]
end

: u$ S9 I. t7 p+ B
7 R* M+ P/ Z: ~' Qbegin P_mC_down arriving
5 Q$ l0 r7 d. |* b, ]" N! c* A- y   while 1=1 do ! W& M) w' H. E" u. Z7 q
   begin8 R7 f( [  b! r
   wait for e 230 min) F" S1 W6 B6 ^7 K# o8 ~
   take down R_mC7 W; C4 ^8 P  `" ^! {4 Y3 \
   wait for e 10 min
1 p4 T! @* E2 d4 {2 v9 H. Y: j   bring up R_mC
" ?6 I8 @* U$ O' f& y8 E   end
* I8 U8 g1 Y3 _# O# [end

: n; ~, k; I! T
5 Y; h7 y! p3 t' ]begin P_mA_clean arriving
6 }' E5 B) v; h/ X, q/ V$ K* `   while 1=1 do
4 ~6 t9 q0 {6 q8 H& T   begin2 h4 G5 L7 ~) L! |" `
   wait for 90 min' B" y/ n" `5 p2 `6 N
   take down R_mA1 N9 Q3 c8 F2 N! j. b+ p0 G; r
   wait for 5 min
, _: `+ A" J7 S# E% ^   bring up R_mA
$ r  T2 H7 _, [/ d; H( b   end# D4 g% E1 T- m% y8 b
end

) B# Z7 @/ e& K
% ]- _% p, X, U1 {0 D* `begin P_mB_clean arriving
* M, a; |0 S1 _- z4 m. @  v# i6 Y: s   while 1=1 do. f: z' l) k! b, e4 p) P" S! r/ r
   begin; Q8 a$ A6 {2 t3 g9 H. {
   wait for 90 min
: r% g: T% o& i3 a: R- y: V  Y   take down R_mB! _0 Q' g! W# o7 i; R
   wait for 5 min$ @) l# v% s; h+ A1 X) t3 b
   bring up R_mB
  u) u" ^# f7 L& X0 F- H5 u   end
! _6 A) |' t) z: f: V; Oend

0 M0 d4 ~% H: }, o' N# u" T. Y ! J, M9 C! e" O  T+ e) N4 \
begin P_mC_clean arriving
% W$ z% j5 [4 l& r8 r   while 1=1 do; A$ @! B" P# L! F+ G/ d
   begin5 q) s% `: {9 `/ d1 P. J
   wait for 90 min8 _% N; w5 S% l0 @5 ~7 _
   take down R_mC
+ m2 K6 h% r+ W1 O. K* E) z   wait for 10 min
! S) z" M* ]2 l7 t5 y; L, g   bring up R_mC3 e/ g: K5 h3 H& i5 k% l* x
   end
& Y& r* o/ V7 b. Wend
! _9 g# @9 n6 L0 P& ]4 U) R# f& P6 y$ f: b
----------------------------------------
( R6 d+ e  G5 y$ b3 |9 l+ x
& p" f0 S5 |' I7 bExercise 5.9
7 \  W' T# K" T2 U
5 y1 P+ v& P% W
: o& z4 b; o& @' D" t: HCreate a new model to simulate the following system:' R8 g: [" r7 N) |
Loads are created with an interarrival time that is exponentially
$ _$ a! x9 K/ K, E. |  G& Udistributed with a mean of 20 minutes. Loads wait in an infinite-
. p$ X9 H" L, M6 fcapacity queue to be processed by one of three single-capacity,
1 e! S8 ?. S2 U) m6 W* a8 f5 |) C! x* Qarrayed machines. Each machine has its own single-capacity queue : Q) }8 G% S, e  c& J
where loads are processed. Waiting loads move into one of the three
( W. `' R& K5 A( |- F3 ~' Pqueues in round-robin order. Each machine has a normally 2 f0 f1 n% [% m+ W* e+ V
distributed processing time with a mean of 48 minutes and a standard $ J/ X: g# t# Q4 B. @
deviation of 5 minutes.
0 ~  C$ S- x. D! RThe three machines were purchased at different times and have ; {1 O2 Q" G; K+ o1 }& y9 k
different failure rates. The failure and repair times are exponentially
$ v& y. `6 }+ U5 Z; f; q. Y" ~distributed with means as shown in the following table:
% m2 _2 r/ z+ M* ?# ENote The solution for this assignment is required to complete
2 J! \" v; `' e# J- J1 ?exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
4 Q0 Y8 u6 i/ |) ^& c' A; {your model. # L4 L2 ~) a0 t' t

! p+ ~# }6 O) x' `  m  j9 l9 z  lMachineMean time to failMean time to repair
. g3 a( ?$ S3 R9 B9 F* qA110 minutes      5 minutes8 `9 Y* e' L3 U8 g/ }$ o6 K
B 170 minutes     10 minutes5 Z/ t5 y4 I( i4 X
C230 minutes      10 minutes
6 C& `4 h8 w* m! r, p: {: s" ]5 Z+ y
The machines also must be cleaned according to the following
; _+ t% k/ x* Z7 Hschedule. All times are constant:
# j. X$ |9 ^6 s' B% c7 B- C; O* l, {/ z- O
MachineTime between cleanings Time to clean) ~7 Q7 r, h) N8 {0 |3 M3 I/ b: Q
A90 minutes        5 minutes) f4 N& ^( l, N% C' x1 E" \' d
B 90 minutes       5 minutes
& w+ w6 K' o0 ^! o- VC90 minutes        10 minutes
9 O2 A# s# J- b6 S5 {) V" f( r$ z% Q& s5 b4 H+ a1 w
Place the graphics for the queues and the resources. % W' V6 L( C0 {% `! \; c
Run the simulation for 100 days.
1 t7 ~- A6 G) mDefine all failure and cleaning times using logic (rather than resource
# V" ^6 q1 i8 }4 Ecycles). Answer the following questions:
- w- F3 a2 y! _) I8 Wa.What was the average number of loads in the waiting queue?
5 D. s3 `* Z- P  Ub.What were the current and average number of loads in Space?
1 r: _- K, {! G% }* D7 mHow do you explain these values?
8 G  _3 z. j7 i/ B" I

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉  T5 Q9 C8 k, Y- D' Y; D3 l
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 R1 F5 i) ]4 }* V1 U7 f这行好像也不太对,各位先进觉得如何呢?
: D: G4 O5 d, A$ k: L. B5 h0 x
; `5 Q$ q; E" E0 q$ `2 B  z9 Kbegin P_something arriving
' G) ?2 o" b8 V+ x& t# C+ \' |$ B   move into Q_wait, `6 C5 h4 j( t, v& @5 a/ s$ [
   move into nextof(Q_mA,Q_mB,Q_mC) - O$ y! P: H  w- @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min+ H% d& A0 s7 f8 I
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) . }# b: Z( O% {2 F
end
; r0 I# n0 K) V- G. e
0 q  Q5 e  ?' Q: l: Abegin P_mA_down arriving9 T1 V% Q! N! x/ v; A+ z" ~
   wait for e 110 min& K9 V9 D7 u% x1 Q  R' H
   take down R_mA' K3 t" P& x/ f3 [; F6 t7 s
   wait for e 5 min
) j2 `8 A) W- a   bring up R_mA
$ b, A7 D9 T9 m: q0 A. D1 ?' send
' }) i* W7 I' P% g' y7 t0 O, n
5 p$ \; C# j3 U8 r0 ~( z1 k1 B  Ubegin P_mB_down arriving. C  g3 k9 ]3 S0 {
   wait for e 170 min# s9 U1 ^7 s/ M" l
   take down R_mB
$ L* x/ r& x1 u7 X' z: R   wait for e 10 min4 B3 s3 l' q" C/ ]$ E& Z
   bring up R_mB, K6 Q5 S9 W& x5 n$ V, u  }/ R2 P( E
end
7 H: u- `4 y# i' r3 f& z
" T2 V- Z' H8 Kbegin P_mC_down arriving
, {2 }2 s3 W2 e% G8 a( T   wait for e 230 min8 l% k6 a5 ?' p
   take down R_mC2 l1 h* }; I  Y" d3 E7 U
   wait for e 10 min* I: y) T1 j) @, w) ~+ o
   bring up R_mC0 Q' G& a  ~$ U& C( l* `
end
9 A$ C7 G! U. W: Y! O$ u
1 N) D- Q9 }; l$ ?begin P_mA_clean arriving; X  G  k% T7 B9 I+ J8 k  x
   wait for 90 min
7 @7 q7 n' |4 K   take down R_mA
3 T+ x: f% Q1 T: G2 X   wait for 5 min% y, V6 l! m& Y5 i
   bring up R_mA
" T" E6 f: K% ?/ ?" C3 [end
0 j# l7 l+ f- D1 n3 g5 n/ ^
" }$ i& n8 d0 k1 G+ `begin P_mB_clean arriving
! M( G+ F2 O  Z+ `) c( g   wait for 90 min
% Q5 F3 N8 o$ H' j( ]! ~   take down R_mB
. s0 l( s( N/ O7 L  O  D   wait for 5 min
6 b+ P. c9 F2 @" {   bring up R_mB8 R3 u& |  j/ u( P: D9 F/ [
end. s* u6 v+ \) q6 l
) M- [: `  _  p6 t8 |0 o% \
begin P_mC_clean arriving$ m: n! \4 J: }
   wait for 90 min6 C% U" b! ]) l6 R$ g, H: H
   take down R_mC* F2 ~6 T: A" a2 m9 f, L1 J! ~
   wait for 10 min* k" I8 v9 ?- k
   bring up R_mC; q! N) h5 {0 Z6 C
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
* ^3 ~4 S. ?1 e* P# H6 c   move into Q_wait
8 \0 l4 j7 X2 D" ?( s# v   set A_q to nextof(Q_m1,Q_m2,Q_m3)
% s" s' x  j/ s/ e4 c! Q   move into A_w
% M. x& J* `% i5 Y! ]   if A_w=Q_m1 then use R_m1 for u 48,5 min4 `1 Q5 G* U- f0 g+ D4 C
   else if .....then use ....for u 48,5 min
) _* Z( e3 g' F0 s   else if .....then use ....for u 48,5 min  
  u+ U. X0 Q' L2 S+ i   send to die
# q8 I: |5 P% o$ p  O3 Jend
) r" F3 b- y* z5 A6 D+ `
/ K- E' ?: \) a$ m# S供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 17:38 , Processed in 0.016767 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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