设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7639|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 6 Z# w( e+ v& w2 S

5 |- Q$ h* z9 W0 ^9 E0 S底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去0 @1 r+ k2 f: Z, ]/ c
% w1 {# @& J0 L' a: o' e. X% s- j. V
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
, z. P  o' @4 h8 Z" `5 W$ j; A% ?  Y$ E4 S
--------------------------------------------- X7 L7 o2 A  f' t$ `- ~' c
begin P_something arriving
5 D( P* B7 e) y& q, ~+ B: Q; g   move into Q_wait+ Z8 S! c1 P% g; G% ^1 ~# W1 _
   move into nextof(Q_mA,Q_mB,Q_mC)
5 l& ~/ r/ M# a, ]  H1 B   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
# J* Y( S# U  X  {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 B2 ]4 ?; a/ p3 ~+ b" m0 e
   send to die
: ]5 q8 |0 S  n) P) vend

$ C! j/ T9 f0 o4 W- K" x2 }, i - s6 @$ }2 Y2 B2 {9 a
begin P_mA_down arriving
* k! ~6 g% ^; _( [1 d9 o   while 1=1 do , ?, d  J/ d) Q& A  L0 D! O  r
   begin& e' q0 {1 W, ]8 U  u; N3 s
   wait for e 110 min
7 b7 @7 F) Z& @0 F2 c   take down R_mA
7 G; D* [4 [0 I   wait for e 5 min0 v7 C/ g% J# @" p
   bring up R_mA
' H0 ~8 w3 r( Y  A   end
0 U# L# D# P2 L: l4 Send

* z$ M' K7 z! j8 S' ^7 D5 e3 ~+ l   G. T. L, K# G# F$ k
begin P_mB_down arriving
. s$ N( R, D9 V' u5 ?1 p% Z   while 1=1 do
/ C# e* f7 h3 \" e; G0 e7 ^* o   begin
7 v. T0 ]7 \# u4 e) |: J   wait for e 170 min
$ S3 g* Q( r  y- j. I$ x7 j( b   take down R_mB
4 v2 {4 O1 |: i' @, y' Y   wait for e 10 min8 q; j4 @. \- O( S, z' @$ z
   bring up R_mB
* Q6 {. M0 K) j; f   end4 M) o* |) N0 j/ n
end
' Z2 U. A3 z. b: m% y0 B6 s& b

8 v% d. [+ O. N+ Abegin P_mC_down arriving
9 j  P' e0 `2 c: E2 q. c1 W. e: a8 ]   while 1=1 do
( p0 J6 E" @0 Q6 Z5 n0 q   begin# o; G# A' x; G2 I
   wait for e 230 min0 {0 |; ]5 j: |4 Z, B  }) `9 f0 V3 Q
   take down R_mC" F+ E) R  I* r- z, I3 n8 q
   wait for e 10 min$ d$ T, p5 J9 {' x
   bring up R_mC
5 e' @& W. g0 V' U$ S   end
' w9 p8 U: d# g1 N$ Pend
. [* H+ v3 d1 L. D: b8 G" b

0 @, u. Z- s. d/ J9 Bbegin P_mA_clean arriving
# f% p% W* E9 ]. ?* t# T2 p   while 1=1 do6 X9 b/ i# C4 E# P/ }6 J
   begin2 j( k  g4 v2 W
   wait for 90 min
0 X, O% e$ Y1 [; R: X6 I  w   take down R_mA" i  s0 Z8 j' Z  S3 o# H) r
   wait for 5 min
; z$ F5 J9 N1 D# V& b0 G% d   bring up R_mA5 @8 f! n( H8 q! Q
   end' N% Z, p0 S4 Q: S  o
end

; l" F' p/ L$ Q- k' ^* t3 F! H # W1 d. o% q) O" [, S
begin P_mB_clean arriving
+ I- q) n9 ?4 [: u- O   while 1=1 do+ g+ [& j# U7 V( c2 ~
   begin
, o# Q5 c- a! ^$ ?, \9 l+ A   wait for 90 min
2 p5 s: E* z& j* `# x4 V   take down R_mB5 X/ }5 N7 b1 S( G2 O7 N
   wait for 5 min
' A; y/ s  F. g+ \& v   bring up R_mB1 x/ b5 R/ `9 x
   end5 s5 B! x+ F5 h) p6 v9 d& i
end
6 e- a) K+ ]8 y( h' Z6 q) g
: t; z. D7 ^* O3 f
begin P_mC_clean arriving
/ p8 R! q& D1 W2 C8 k& G   while 1=1 do" ~) w5 y! C( d# t/ G, c
   begin  C# I, i5 h/ H+ A- T: y) }
   wait for 90 min
/ p/ C6 R0 s0 u" W$ C   take down R_mC
1 u6 O: N7 s; F  U' P   wait for 10 min
- ]0 ~- Z/ y  X   bring up R_mC
  g5 B# @  }# Q8 H  h) |' j9 n   end
3 _' c% q0 w7 V% L; {end

  k% E+ k' N% S9 E----------------------------------------; I6 h3 J: K" J  M; b! E, K
+ z+ I" p1 N2 j, E+ z# U9 I/ W
Exercise 5.9
6 g: Q" ?) ~5 |1 U/ t) Z: S' R# S: m/ ]9 q6 `2 b6 D

/ B! k) H" V  G$ V* }Create a new model to simulate the following system:% r! q6 R8 \+ I
Loads are created with an interarrival time that is exponentially
% Z; m0 j6 I4 b) R, d( q: ]distributed with a mean of 20 minutes. Loads wait in an infinite-: s# }$ L/ W; d* c- g2 E1 }
capacity queue to be processed by one of three single-capacity, + h1 Z6 A; I/ m
arrayed machines. Each machine has its own single-capacity queue 8 U: T9 B! \9 O
where loads are processed. Waiting loads move into one of the three $ n% n3 z6 ?! |& A  [4 J
queues in round-robin order. Each machine has a normally
/ ?. }- H4 N% W) vdistributed processing time with a mean of 48 minutes and a standard
' k' z6 g# y% J" `/ edeviation of 5 minutes.
( K+ l$ c" X) m! V0 kThe three machines were purchased at different times and have
" S/ ^3 K" g4 P$ ddifferent failure rates. The failure and repair times are exponentially : \& c5 r; c3 Q! J0 E0 w
distributed with means as shown in the following table: 5 h- D: D$ [0 {. T/ z2 E& z
Note The solution for this assignment is required to complete 9 T: y- V5 `5 M5 B5 Z
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
; o6 r- `( f! a  lyour model.
! e3 q, {" S% O1 U6 g
$ L) u! s% B! b) R) gMachineMean time to failMean time to repair$ g  }6 a. z1 S: x0 ?( L0 |
A110 minutes      5 minutes
" X3 h( T# d. E) I* vB 170 minutes     10 minutes) y( r* m: ~" S
C230 minutes      10 minutes* C) T  Q9 J8 E$ _1 K& v

, r. n6 \- l9 w* i( l$ H8 S, BThe machines also must be cleaned according to the following 4 U* p) k; W4 b0 j; g5 j3 s2 b
schedule. All times are constant:
5 f4 Q2 b3 d+ S5 f
% Y. U0 y, u. M- X# [MachineTime between cleanings Time to clean
% `# N& k% i1 P5 S) Y1 r7 a+ [A90 minutes        5 minutes/ J$ \+ S8 D8 Q) n  o, L9 n
B 90 minutes       5 minutes' X' @0 |* `* C7 y, O
C90 minutes        10 minutes7 g1 q/ I, g+ ~/ O( x$ L: g
, O8 }$ y* x5 J
Place the graphics for the queues and the resources.
! o$ J2 H1 C1 ?+ W. A+ E' U8 ]Run the simulation for 100 days.: o1 W5 z5 {: D
Define all failure and cleaning times using logic (rather than resource + m+ @8 s9 R# J9 K
cycles). Answer the following questions:5 z( G$ m' Z/ a" y
a.What was the average number of loads in the waiting queue?& ^% \& S2 g, r2 V% u" @' C
b.What were the current and average number of loads in Space?
# ^. U2 m  }. \; q6 K6 dHow do you explain these values?
3 \% k6 i4 f. Z( G* b0 `

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
- b4 i7 _9 d8 jsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ e: J3 O: @" _& ]$ e& v
这行好像也不太对,各位先进觉得如何呢?
7 T( c, L0 ~2 d% z3 t7 J
' P; C* M. N% X' J% n6 Vbegin P_something arriving
; z5 U# T5 C4 R# I   move into Q_wait0 p& ^) z5 h5 Z3 S* `" {
   move into nextof(Q_mA,Q_mB,Q_mC)
5 I- S, F( J* T8 X& m   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ V8 ]- p1 `5 k3 X: C, k
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 c! l* c6 x6 O( N+ q4 x6 gend0 b/ ~, A' I- L& e, h
+ e' v/ u' a4 C2 T5 l& T
begin P_mA_down arriving- Q$ W! g6 ?$ B( @2 k# @
   wait for e 110 min
1 Y* m  ?% r+ l   take down R_mA
9 ^: ]. @4 r  F4 R. t0 g, l$ I9 t   wait for e 5 min: y3 h8 D- M( V+ h6 d. R
   bring up R_mA
* I$ x7 J7 K1 B# X! Bend1 _6 T- g4 M) x( m8 D
2 ~: J, O  M# i+ t: Y1 U
begin P_mB_down arriving& i4 Q. I9 o, J
   wait for e 170 min1 r! Z) c9 J+ G, v) Q; |
   take down R_mB
9 Y+ M, x0 }# Z, K: g* d9 W" X   wait for e 10 min) P* K: C& C/ S" G
   bring up R_mB; [2 A- |- M* _, @. m( ]
end
! y- W+ |3 I0 H( `
+ C0 a5 O# N# l( A, y: ^, o. ]- Qbegin P_mC_down arriving
- m0 Y2 o& }! f- u' P- a   wait for e 230 min6 y4 ^" B7 ?/ z
   take down R_mC
' b7 _6 L2 f9 z3 H   wait for e 10 min
/ U& A/ Q$ O3 C, d5 A2 m6 X   bring up R_mC! W+ d; c/ d2 L% P$ e
end
+ H3 W6 Z- ?0 H1 K8 p$ P1 s
9 W5 b; ^9 q) C# |  M) J8 v* d7 obegin P_mA_clean arriving
6 A9 P- ^( _1 f8 |! ?% k' X5 Q   wait for 90 min. p. @( k1 b+ P. r+ C
   take down R_mA. f, v( J0 W% B$ U6 I
   wait for 5 min0 `/ c. c* Y8 M0 N: Q6 \  |1 Q# T6 I
   bring up R_mA
- Q3 P* @1 E3 ?7 c* h8 _' ?9 ?6 I6 Dend
. e) W; ^8 f0 m7 i/ @! c* B' k- p8 Y2 }& X4 B8 X4 S
begin P_mB_clean arriving
# D+ d" ^. y$ x% L0 D& X4 ^  R   wait for 90 min9 T8 M$ ]; \6 @5 s4 n. w9 H
   take down R_mB& Z3 o: g0 N4 E$ @: q" u+ Y% z
   wait for 5 min4 l3 Q, U% I' _# I0 i7 F# y
   bring up R_mB
- K- E& N+ Y/ O2 M" Dend. u9 T# i3 e( V# }0 Z: ?

2 u5 \6 e, G5 Q$ U3 obegin P_mC_clean arriving
; u" f; e! R6 _   wait for 90 min
6 R- H( ]' g' R; i" m+ m  w   take down R_mC  [( |$ Z! J! i& B) B$ z
   wait for 10 min0 }/ e. o  S4 v, V: ^# \9 I
   bring up R_mC: s! U+ ^* r& f2 G! Q1 ]  K
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 b& k" I5 V; }, z
   move into Q_wait9 p, D1 T  i2 }0 E( [) u; i4 C
   set A_q to nextof(Q_m1,Q_m2,Q_m3)& [4 s% m6 v0 q$ i  r
   move into A_w
( y1 p, Z# ~# r. @' i   if A_w=Q_m1 then use R_m1 for u 48,5 min
; T( _4 N8 [! p( E0 a; d' x5 u   else if .....then use ....for u 48,5 min
' O: T" }- g. H! x& J5 ]/ \# B   else if .....then use ....for u 48,5 min  
/ ?( c8 p: @4 x) e9 ^: O) L   send to die
% R! V* C. k% l5 Iend2 R% G. f: E0 [5 o) N) e
$ N. `* L# g0 \! C
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 17:27 , Processed in 0.017611 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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