设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7288|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
- S, F5 c7 C/ h1 Y, W0 M" [4 g/ ?" Q, K! ?+ X% U
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去' }& ]! D# U1 X* w

' P8 |8 b3 I' L( w不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!$ i8 \) `% q3 Z  m! g
, ~/ j# V7 ]$ v- T
--------------------------------------------8 ]1 E/ X, }% p( }/ u0 y
begin P_something arriving' s& e; A" y+ t; O! E7 w5 ^3 f
   move into Q_wait
" C+ d$ j; h+ |' l   move into nextof(Q_mA,Q_mB,Q_mC)
; f# R) j, }/ I: h  `% F3 r   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min  n+ V* w( ]2 S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- q! |# B8 d* b, ~+ X
   send to die
, @4 I+ [: f% g. ?) h, G) Hend
. V. p( H3 a& k: d1 i
/ n+ x. D3 n; j- T
begin P_mA_down arriving* |/ D" l0 w% T1 ?5 _- Y
   while 1=1 do
) M/ X7 d0 z4 a) |) k& g! a. \+ g1 O2 M   begin8 W  t' C6 _- \( a, y) F/ E
   wait for e 110 min7 i7 L$ z- @! [
   take down R_mA7 T" @% K$ M6 c. m  s
   wait for e 5 min9 r  ]6 |) T. _# L* G: d0 A
   bring up R_mA" l1 x. M7 S8 N
   end
9 d* m. ?3 f4 R, lend

! L3 F$ e6 c% q. y; N6 @ 6 Y5 O+ u5 B% `* O
begin P_mB_down arriving% o/ s' z) a: K$ L, f) D
   while 1=1 do
3 [$ ?8 ?: ]* o! V: x6 Y9 t" k8 I2 @   begin. F' ~4 l- w$ a% K9 n
   wait for e 170 min
# Z' S3 `: I5 \, w   take down R_mB2 a* l5 _- V  Y  F# Q4 u( r1 h  F
   wait for e 10 min
$ j4 A$ ^2 _  p% d4 b: u. T0 Q   bring up R_mB
+ N# P6 g+ v" F5 c0 t   end7 ]1 P, S! ~- F0 e
end

+ o: ]) o0 q  y7 O( C( m' q
0 Y  }7 l* b0 ^, y; Xbegin P_mC_down arriving) I0 G, [2 C. V1 p# O2 V
   while 1=1 do $ M& O2 \2 b" l9 w. _' M
   begin
6 b" m6 P* c# v/ U$ \, s   wait for e 230 min
# }( a' j3 s& z/ l; I7 `) z   take down R_mC4 d* }4 H! T9 K
   wait for e 10 min  T+ n7 L3 B6 V8 |
   bring up R_mC) _. N$ f  n8 a/ f  N5 G; @
   end) }, F8 U/ I; s- X
end

, x. F6 X1 P3 }, \( |
6 }: ?+ Y: c7 \/ H0 r# jbegin P_mA_clean arriving9 I  D+ h- v( o2 m& i' f
   while 1=1 do$ H" D8 ^0 c, i7 v
   begin
4 y6 ?" ^' K3 y+ v& p   wait for 90 min, s, l: B# t- X  o8 ~8 g9 d0 {; \
   take down R_mA! j. m+ t3 M4 w9 T- q3 H4 ^. V
   wait for 5 min
; |% x! E# V$ i+ B' m1 ?- g4 A/ m+ B0 a   bring up R_mA
* E% K  P; i2 R# i& p6 G7 j1 O   end
% ?- o( m+ `' Q& Q& y2 Lend
4 e  e5 A  F+ j6 Q1 N" `
" H+ G  m! r0 O/ N' {  C
begin P_mB_clean arriving
5 A) W- G2 m- Z8 X+ b7 p" z, _   while 1=1 do% b' z* f% C" P1 R
   begin! H! N8 {3 r5 |2 D
   wait for 90 min: }0 q" N9 p5 j" O# c
   take down R_mB
4 i3 P5 j/ _" S3 Y   wait for 5 min
  C; v6 b3 ~0 R+ T$ g! l   bring up R_mB
3 K( k7 t& P! @) T   end$ f' ~3 b$ M! F4 x
end

- i- @2 s& O' R# I
0 C& g! U9 [# Q6 tbegin P_mC_clean arriving
' `1 l1 a- j6 v9 `) W8 Z   while 1=1 do
; n: z, H0 G  b2 ^- ]9 m   begin) j7 j1 }2 [* R. j
   wait for 90 min
- ~6 `  K: a9 Y! g4 o   take down R_mC
3 f1 K( Q+ d9 L( F6 L0 [   wait for 10 min
# j) j6 d5 v5 _3 }5 @   bring up R_mC$ o% d; p3 u5 m% M5 m9 M
   end
; P1 z; [, F, F( y' X9 kend

" U# a) x1 j4 d+ d! O----------------------------------------
* |; x/ H8 u7 X9 U. Q6 r 9 t, s  m5 }# d& N0 u) u6 N
Exercise 5.9+ L7 B* y2 }0 j  E

, M0 Z/ ^. n# d4 x1 {0 V3 b# ~( [* [7 L5 C
Create a new model to simulate the following system:$ S& ~- E5 T2 R  q5 |
Loads are created with an interarrival time that is exponentially 0 \6 \# B( ^# H9 V' j8 }. Z7 o
distributed with a mean of 20 minutes. Loads wait in an infinite-7 k1 T) V6 H; L0 [
capacity queue to be processed by one of three single-capacity, & L7 i7 J. v' D) r' z% v
arrayed machines. Each machine has its own single-capacity queue " K/ t/ X" ]7 @2 t
where loads are processed. Waiting loads move into one of the three
3 ]. _* @- s5 yqueues in round-robin order. Each machine has a normally ' }. @' o' A$ \; _$ ~1 W# ]/ m
distributed processing time with a mean of 48 minutes and a standard
/ b( W2 i% F! y' n$ @' M' rdeviation of 5 minutes.4 L! j5 F* b6 u9 G( {
The three machines were purchased at different times and have % n; B/ z0 l' j4 s
different failure rates. The failure and repair times are exponentially
1 l# E! @0 c0 E& P+ m- T- k& y* v4 M6 P- S- Hdistributed with means as shown in the following table: 4 `$ k. E# l& r- u( A7 L  M9 j2 Z
Note The solution for this assignment is required to complete
4 H; l/ [! b  k. l/ texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of / }0 [# l$ u1 g0 B; X
your model. 7 C6 ~% @5 |+ P: R* p& h, Y! J

0 n4 e6 }& B! A9 m9 m1 ?MachineMean time to failMean time to repair
' A7 ?3 B; s9 l( WA110 minutes      5 minutes/ a, E+ S6 E# t  y2 W: W/ m  h* |. n
B 170 minutes     10 minutes2 P( C* d5 ?, ^" u+ }! U1 P
C230 minutes      10 minutes
6 Y, J/ n! B* L# u/ O+ ~, w2 ~3 i; H6 m
The machines also must be cleaned according to the following 3 o* H$ M( S, [( K) ^
schedule. All times are constant: 5 y+ }  v$ v# J/ \8 \
3 }9 `( T. m0 i& K% x
MachineTime between cleanings Time to clean9 m5 v2 Q9 c) l1 [8 A
A90 minutes        5 minutes
3 f4 ~$ t) d. UB 90 minutes       5 minutes5 M: e, e  }( R; `$ A' N) q& U
C90 minutes        10 minutes
+ h1 z) w6 @- a, E0 x7 J+ n
. h( U7 B* f7 |, PPlace the graphics for the queues and the resources. 3 ?4 O+ D5 _: U+ e" @/ @' K4 N  Q' L
Run the simulation for 100 days.9 }$ R' K* l& G' u4 `
Define all failure and cleaning times using logic (rather than resource
$ @8 C& C! m+ Z5 H( `4 v# [cycles). Answer the following questions:
# I4 c# O. f& _. C- J! n6 v7 k5 Ta.What was the average number of loads in the waiting queue?. o; ?4 w2 C* t- @1 r9 x* j
b.What were the current and average number of loads in Space?
; t; f- K, I. b3 \7 [8 oHow do you explain these values? . n5 A) B: l+ }$ V

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 [. \: {+ ~5 U, h  R2 w1 a+ e/ H2 _$ F
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- s5 u( y' ?9 ~
这行好像也不太对,各位先进觉得如何呢?
3 [, C- T+ s8 x$ [( K- Q4 q& b8 V3 O( T; d
begin P_something arriving, n: D0 u- n4 R, K# q# k8 @
   move into Q_wait3 J! g2 J" i8 C9 ]
   move into nextof(Q_mA,Q_mB,Q_mC)
3 E, n( \! v0 j* g3 A2 v   use nextof(R_mA,R_mB,R_mC) for n 48,5 min. o$ r- U3 f- D& s% F" j4 ^% x
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & s8 ~4 }7 b: ^5 X: L. H- }! M7 [
end/ S- R9 ^; X/ a/ C% M" M9 E  k3 t
1 G$ S! Z0 F- i- e
begin P_mA_down arriving
" I5 s6 g7 y# Y. J! I, W: k   wait for e 110 min
9 W2 `) N7 h3 H   take down R_mA
1 t+ w0 f' L4 S; l8 o0 R   wait for e 5 min! k9 l  H4 k4 R3 |: u5 k
   bring up R_mA% J0 x! q5 p" D! M7 E
end* ]  S7 H& O# t. B

6 Z" ^) V8 N9 H6 m, [& ^& dbegin P_mB_down arriving
. W) }5 ^: f' `# C' |   wait for e 170 min  R7 n5 y# q+ r9 G- f
   take down R_mB
5 D5 B/ f0 E# @  T0 |( e2 M   wait for e 10 min# v3 ]& [- N* S0 _( o0 G
   bring up R_mB
' c$ `. X. u, U7 Rend
, }* i5 Q2 \: M4 a3 ~' m7 a. w: J5 B6 b/ M7 R
begin P_mC_down arriving
, q$ W) E+ N, D( O   wait for e 230 min. c$ x' V  f* f, J: m  i% e$ k
   take down R_mC) ?/ R  r  C, C/ d+ k# N7 e
   wait for e 10 min
# W* L: e. @1 L# U) {   bring up R_mC
. @. V- b( s" c) @* m$ p! ^  Gend: Z- ~, U3 E4 N8 r' ?
, X3 }' P! _4 K
begin P_mA_clean arriving
* D1 a  q# g; U8 m( P% T' K   wait for 90 min
: A# ^* m6 `0 o4 x) o   take down R_mA
6 Q" B* M! H) a2 V4 B1 v( f9 Q  ~   wait for 5 min6 D7 I; V3 T/ G& K
   bring up R_mA
$ j- x3 p3 w$ Zend6 x0 Z/ s  G! {9 N" z, m3 ~9 ^4 m

9 y. g6 {. Q% W3 S9 U3 \$ cbegin P_mB_clean arriving7 N* g; R% r) Q# O7 z6 V, R
   wait for 90 min
5 @# z# g# d/ {; I/ B   take down R_mB6 m) X, U' {- `1 g; ~0 V! ]6 t# b
   wait for 5 min3 A1 {8 o; W0 Q
   bring up R_mB
$ P' l' m0 c& A1 Y9 x5 Tend
# ~  j' l- L5 M. f$ F2 ~7 ]7 S1 z8 G- _4 y6 K- I: c6 |9 |
begin P_mC_clean arriving
* ~6 x7 |' l5 i$ I   wait for 90 min+ G$ u% }  v; ^7 D5 d+ a
   take down R_mC
4 p5 x# s& S% c& C6 F" F   wait for 10 min
7 R+ @0 I; t6 g9 |* O   bring up R_mC
/ G! _7 a; i2 D7 @end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
$ S: ]& w. W: |% i) C   move into Q_wait
! y% P, W+ |6 b5 d* ]   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; U) M$ ?8 v3 p. c; w% @& H" _' k   move into A_w
7 W* Q* O2 j$ G. J8 r# K   if A_w=Q_m1 then use R_m1 for u 48,5 min
! D4 ]/ X+ E* ~   else if .....then use ....for u 48,5 min9 P2 A) }! T4 L$ w5 r; w9 K
   else if .....then use ....for u 48,5 min  
9 X) M! `7 r: X' q$ c   send to die
: _3 V4 m  K3 f% z1 rend) U0 K+ q7 D8 X. l. u/ a0 v* I& }! O

% w* ~+ O* T6 e4 X0 f3 L供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 22:29 , Processed in 0.013702 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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