设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7283|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
" L3 v6 o: P; D9 ~3 w; S: ]% ~  ^
6 g7 G- {1 N7 v3 ?* a+ j  D底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
- i5 Z& i+ A- q3 B6 ]1 e4 K# I9 w5 A* X7 y/ c
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
  d! ?) D* s! l* \+ M' W8 C3 @+ w4 ~, P" b& g
--------------------------------------------
& t  O2 O, H6 \7 R3 G. h3 O) Pbegin P_something arriving! l8 a. y7 ], T: U! d; ]) o% ~+ Z
   move into Q_wait
" U% C3 M& W0 m/ n3 n3 V2 A0 V   move into nextof(Q_mA,Q_mB,Q_mC)" F2 E: s9 @7 P  ?" |. D& }) F
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
& y6 W- l, q1 c( p8 ?8 i   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 A; T" L# v( {; `% {   send to die1 o1 e7 }+ [6 b) _& W
end

1 `/ M/ Y) k  x- \4 o* V8 y - {8 @- i! u: `# C' r
begin P_mA_down arriving
+ W' E/ s8 y* j# s9 M+ Z$ J/ x   while 1=1 do ; f: z9 {7 ^+ o* s3 {2 c; B
   begin" o' b/ t# e3 I2 S7 l3 }6 F7 l
   wait for e 110 min/ Z* w. _# b* x! n5 b
   take down R_mA" c! R; F# Y6 M3 z) B! g: P2 b: Z
   wait for e 5 min% J4 j5 T2 Y4 b  y* j! M
   bring up R_mA# I1 ]8 k- S3 y, U2 S+ P, }
   end: @) v  h: ?9 q4 [3 f. ~
end

; W4 A5 G' @. k. i# k
" N  a7 z! z. \" E$ I+ j5 M- z; Sbegin P_mB_down arriving. o+ F+ B' C- q/ p
   while 1=1 do
4 O! g; Y  W. h" U   begin
; l/ G: K& M. w9 U   wait for e 170 min/ v* K9 k+ _; c; b8 x5 }
   take down R_mB
7 e2 w" u! H* `' K6 y1 {   wait for e 10 min
5 ]7 N/ y; n! Q9 k& v$ i! A& D- R' m   bring up R_mB" }$ l4 [5 H4 x; _* y' F1 H
   end
* Q/ F% Z3 }; A( `+ P+ {end
% j3 l' r: O0 @) K# ?: p/ ^- T# ]4 J
* t" g6 L! O0 e* {/ O
begin P_mC_down arriving
9 {) C. r4 l! Q" x4 t: d( \   while 1=1 do
! P8 k/ ?% x) r   begin
3 d8 `3 I/ f: m) w% v& o   wait for e 230 min' q! }% ]% r/ O7 m
   take down R_mC7 K) A% \7 t+ z/ S) l4 B7 p
   wait for e 10 min
0 d; b$ {) y- I: Y1 K- @5 H! P  g   bring up R_mC0 J# ]* ~: H) k
   end  s1 z/ ?) G: ?% m
end

" w8 Q' ?' c. Y; y# D' P- Q, Z ! x$ I- P8 |: f) `& P" A; z
begin P_mA_clean arriving7 \2 z' v8 k' f
   while 1=1 do; |' ^- |8 ^# h' z, h
   begin( d. `: M9 K* b
   wait for 90 min* N/ d9 u! j- ]/ ~( V5 I  Y: U
   take down R_mA
( o- B- S+ `4 P. J2 u/ F' B   wait for 5 min
# l: ?2 v0 X' q   bring up R_mA
0 r2 }% J5 X; ?# R% K( R   end9 `, {" d9 Z* }* S1 t' l
end
1 L; W2 t* [  @0 K) h- @# u
8 U3 r5 v% }8 Q  o) H( D( C' a
begin P_mB_clean arriving
& F& S4 o9 s2 ]+ J3 [0 q) `   while 1=1 do
/ [. ]0 \$ D& a  p   begin3 h& |$ k# u1 q4 x7 l" e
   wait for 90 min% ]8 f7 F3 k. b% z( a
   take down R_mB  W" R  z6 K6 F# v! v6 Y; [) d7 h
   wait for 5 min: [. ~3 F  Y5 D; E
   bring up R_mB+ o9 i) c! K9 j! {2 H
   end
- I$ F# N, A: aend
; }7 i: a, S1 P2 {6 t

# N6 c+ c4 J2 t7 X+ Xbegin P_mC_clean arriving3 U: s1 O* y6 b3 R# n+ W
   while 1=1 do6 a- w8 G8 v$ S4 r9 e5 L! [" `
   begin
) g# e3 U$ |! D. U" w( b   wait for 90 min  h1 L' t; w% k0 l
   take down R_mC
- [$ G0 S" C/ \% ?: G   wait for 10 min6 F) y8 _5 E# R- V
   bring up R_mC
5 r4 L+ Z$ F2 B/ Q8 x8 Z+ s   end/ W6 [6 w, c& `4 W* G
end
8 g+ v- J) f5 m- K/ V
----------------------------------------
  k2 D* x' F2 x
  G: ^; @2 ^: b. D2 ?! P2 X4 V4 D2 m; _0 RExercise 5.9
- [0 P# Z. Q/ g! I3 y: X3 ]; S: M
$ B! t, }7 u/ f! {/ E% S+ Y% k4 Y, N
2 J: k" P* l, g' ~Create a new model to simulate the following system:2 |9 K+ c9 g+ F  z( E  @( [+ k
Loads are created with an interarrival time that is exponentially 3 @8 V1 U) v2 j$ k; w; k8 D; `
distributed with a mean of 20 minutes. Loads wait in an infinite-
: w& E$ F/ P) _9 c' w" E* r2 i- {capacity queue to be processed by one of three single-capacity, 5 d+ B, F0 e% y: j2 u8 q% w, f# m
arrayed machines. Each machine has its own single-capacity queue
  k1 G2 }( ~8 Z' Q( E9 q: W( A# cwhere loads are processed. Waiting loads move into one of the three + b3 C: W) w2 t" {
queues in round-robin order. Each machine has a normally
( J( a- B" I) w7 pdistributed processing time with a mean of 48 minutes and a standard
5 q/ e4 N& R  p6 bdeviation of 5 minutes.
7 d5 g  l; f' k8 R, ?" {; kThe three machines were purchased at different times and have
& h7 S$ a8 r) h# k: [. z& Tdifferent failure rates. The failure and repair times are exponentially ) \  b0 `7 y* |( h
distributed with means as shown in the following table:
" A0 e* N2 y5 }1 y1 WNote The solution for this assignment is required to complete
! z, F1 M3 B; O* ]! b$ _exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
7 V3 m3 }' H% }4 m, B. S5 Eyour model. 7 B0 r, I% K# J: H$ e5 z* ?

* E/ r) }+ v; {  A/ F  {/ X( E) CMachineMean time to failMean time to repair: w/ q1 U8 r; o5 Z$ x
A110 minutes      5 minutes
1 `' i' C, e6 E5 k# u5 xB 170 minutes     10 minutes% F% c. f5 I" w" X( [
C230 minutes      10 minutes
  [/ T8 z7 w5 a( U- o; ~1 A- \) R- k/ R0 l2 s( i  F1 Z4 S, b9 z& I( q* v+ F
The machines also must be cleaned according to the following
' w4 x  U4 r! D  h" \0 Vschedule. All times are constant: ; j3 F  |, x7 }* b: D  [2 h

, t; h. V7 P" Q" v/ KMachineTime between cleanings Time to clean
; s0 Q% g8 G( B  X$ z. WA90 minutes        5 minutes4 T7 W' R, {! g9 h4 k
B 90 minutes       5 minutes
1 `8 M5 h- e% c  `# @C90 minutes        10 minutes
0 B; \' K3 j) p% i8 Q8 |0 A6 n" o7 B- i$ t& e( N
Place the graphics for the queues and the resources. , x3 d' w7 w0 ]/ ]! o. [8 v
Run the simulation for 100 days.
9 O; I* {1 q& K) q1 {Define all failure and cleaning times using logic (rather than resource
& ]" `; ^* ?  J* W  r6 fcycles). Answer the following questions:* K0 t* p" e% p# _/ R1 n* K6 L% S, M
a.What was the average number of loads in the waiting queue?
; L& a$ q$ Q  `+ J6 q$ zb.What were the current and average number of loads in Space?
+ o" N- }$ f; b! \7 s: Z6 B1 c5 CHow do you explain these values?
; W/ `( i; D/ i/ U

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
- O/ ]- g! |8 I# ~7 Z! x9 Wsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean): j5 b0 p) Z" l8 g6 ?3 `$ z
这行好像也不太对,各位先进觉得如何呢?
0 z7 m5 ?+ T# p- s5 U0 m; b# n) E. Z/ S) F$ b' n- w
begin P_something arriving
& W/ {# C/ t7 J, q   move into Q_wait3 t  u8 |6 a* D4 x! e
   move into nextof(Q_mA,Q_mB,Q_mC) 2 ?$ {7 l  F! K# q1 E, ?
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 a5 E/ a, b( [, K, Z% x* F   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- P( {0 d  {8 h, fend
* d$ h* }- |3 I" e7 t
( b4 H% g& {; {' l: dbegin P_mA_down arriving0 G- ]' n/ ^- d* X: K" `2 w0 T
   wait for e 110 min0 U4 I5 e; [$ o6 M# `! g4 |
   take down R_mA/ b: {6 [4 t% P3 A
   wait for e 5 min4 L7 U  Q6 L" Y  L- @& \
   bring up R_mA% e  ~% P- i6 ?  c& Z8 ]+ T0 U8 W
end3 l8 e' F$ {; p' F. R8 Q  W
: i; n6 ?8 o5 G# k, ?' J7 f
begin P_mB_down arriving8 q  G- n: T/ P- W1 Z
   wait for e 170 min1 z/ B! U$ ]2 `0 w7 e! y2 k6 C# E
   take down R_mB
( i/ Q/ x* J# ?. B8 m# Y6 B   wait for e 10 min
% F, v2 O7 Y4 q7 Z# I   bring up R_mB/ D& ^( }3 G& F+ w( l
end$ u( U9 V! Y/ W8 E6 z" \

' _0 X7 V- R8 P5 Dbegin P_mC_down arriving) k- v" Q+ H2 b
   wait for e 230 min
9 c1 _( P2 p/ n! a   take down R_mC
7 O  D+ ^3 F7 e: I   wait for e 10 min7 n! o7 n% L. u7 ]) z% Z5 \4 o
   bring up R_mC
0 m0 l5 I1 p& Tend
4 n% Q$ o$ \- Y  D. B( D
6 F( `" J( D* `4 s% `1 `  o1 ybegin P_mA_clean arriving" ^; `4 S. j- m3 Q' Y" R2 ]" m
   wait for 90 min
* V2 U3 c+ x: }2 q   take down R_mA
$ I3 w$ W' M% [   wait for 5 min
4 S; ^+ m: K" I. h   bring up R_mA
. k/ N1 A7 J6 Q6 F! T, x3 r( {* gend4 ^. t4 s- b' y5 i# F
7 j. I% [- Q$ m; g9 [( R
begin P_mB_clean arriving
  ?! A3 f/ i2 k2 ]   wait for 90 min7 \9 n( m& Q; z! }( g6 c
   take down R_mB
" I  h* N& V7 n$ }: C6 U3 \* g   wait for 5 min" A0 i& k: A4 |) L
   bring up R_mB* l1 F* T# V% G$ T( r
end
, o0 W4 ?8 D9 e# |3 g7 ^2 y6 e& I/ D+ ?/ A3 {* J2 s2 t
begin P_mC_clean arriving5 c6 |4 L- K5 v* X
   wait for 90 min, W! D& |/ a1 ?8 M$ f
   take down R_mC
2 w1 I5 h* X! Y, _1 y3 C   wait for 10 min
, x/ F! \. g: n, J* M# B" d   bring up R_mC6 r8 H4 |& H8 X$ s: g
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving1 g+ Q1 U# m+ b; w; r0 V0 @5 g+ ~
   move into Q_wait
6 r% `, |( b- P! w   set A_q to nextof(Q_m1,Q_m2,Q_m3)9 ]3 L- `  l- v  P/ x
   move into A_w
% V6 d4 m7 ~: R0 r* e0 U2 H   if A_w=Q_m1 then use R_m1 for u 48,5 min, Z: B, r! w# P+ k) I
   else if .....then use ....for u 48,5 min
2 M5 I6 N  Y+ N- L% G5 ]   else if .....then use ....for u 48,5 min  1 l) J* I, F6 ^6 y/ q
   send to die/ t3 i9 u: t+ C+ I/ K. K
end
3 R5 b+ S# G8 A9 k$ {2 y$ Y" p" R& [
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 09:41 , Processed in 0.019627 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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