设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7551|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 0 E# W0 K3 u5 q  F: C, u& a. s* G
! b8 b1 B- p% \2 C$ a; O
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去5 m; j9 C! @" I( x- F1 E
7 P% `5 {$ A! l
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!9 B$ l7 {3 P7 L. b

" z+ O  G/ d  H- |; z  m4 t& B
--------------------------------------------
5 E( Z1 s1 a8 l; S+ g8 K" ?begin P_something arriving1 L/ Y  E$ L+ ^
   move into Q_wait( U+ i2 i& g! n0 k5 z4 n; n
   move into nextof(Q_mA,Q_mB,Q_mC)! [) ~* `6 ?+ M- b7 ^
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min1 Z# _7 T+ a, _) Z$ G; {
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 \3 C. g. p' o( y   send to die2 S3 i0 ]0 Y2 ^$ {* K7 `: ^
end

; e9 a! s: }" G( v  i. _
7 y% i, y% s* W4 K! m" T$ n1 ^) S, Mbegin P_mA_down arriving1 `/ c1 s1 O* O8 c3 T4 t
   while 1=1 do
- M% B! t7 u; i% C& P   begin9 ~7 p5 N1 m9 n! i8 |% B& S
   wait for e 110 min5 q  Y; B. P; t' i7 K- [" J
   take down R_mA
; m$ l/ n4 |5 I& E. n/ X9 j   wait for e 5 min- i! k3 d( e6 [
   bring up R_mA# H5 H' q4 w2 N$ ~! b  g0 D+ O
   end
  B$ l0 |4 v3 m  ~- Qend
+ L: T8 f! {/ q& r* A. n9 V  h# H- z4 C. w  E
5 N/ l3 b# h5 R' R+ v( y: O
begin P_mB_down arriving
0 T4 i" {* i# V2 n   while 1=1 do* R2 ^2 o9 I& Q, z3 ]8 u# {1 W1 m
   begin
* ?- l3 a. ?( s7 B& t+ C   wait for e 170 min/ x5 g, Q8 `1 }) S& q
   take down R_mB
" k8 ^) z/ i4 P7 d# a1 T   wait for e 10 min$ m+ e( m- K( q& J/ V, F5 E
   bring up R_mB
/ k- z7 n! P* J0 w   end
! |' a7 E% \- R7 f5 bend

% M! Z7 k. ^' j$ C! O + b- |& {3 D+ ^$ b) o
begin P_mC_down arriving1 N0 @; a4 J9 m+ ]- q% V0 h
   while 1=1 do 3 A$ e) g( Y. k# R+ G, T2 K8 }
   begin1 Z: R* M' _) l9 {
   wait for e 230 min$ @) X4 x  d5 N- n: G
   take down R_mC
$ t/ H+ N6 N! Z0 e' }; a$ v: P   wait for e 10 min
  N( n% x# K# J4 _* {   bring up R_mC1 L3 w. Z. r* ~3 n! e
   end% A+ F4 f4 m9 ?8 J% P
end

5 C, _' v, w# e
. B3 A# t7 L, B& w- a. Rbegin P_mA_clean arriving5 H" k) h& {$ f: `  M5 n1 i( V/ ^
   while 1=1 do
+ i% H0 m. @8 s6 W9 c   begin
0 e( f; @2 C1 v7 p' A' l   wait for 90 min7 V; J. @# \3 s/ P. b
   take down R_mA
0 f, f7 G) L: w1 u$ W   wait for 5 min
7 M* f4 A+ p  S0 B+ c' \# z   bring up R_mA$ A& i. I7 s0 `- i3 h; S( i) y/ Q9 t
   end
  ^5 E2 E6 g' u& aend
+ T3 s8 b. ?! E" r6 ~

6 R: y* P/ o9 v( r: vbegin P_mB_clean arriving( x  \% D8 [* R4 t
   while 1=1 do
( U5 v, e7 F; a! p   begin$ a8 f! Z4 A9 Y
   wait for 90 min, a% u6 s" w8 m1 p. s
   take down R_mB
7 d: X9 u( i( C2 u) u$ [4 D   wait for 5 min8 E8 x! w* l4 k" D5 a5 Q
   bring up R_mB: X. N+ K: T6 @8 A& x; T' n* R% [
   end
7 R7 e; _! Y$ yend

" E( z- p  {  g& Z: q6 S
! d1 E5 Y2 h) o- D+ lbegin P_mC_clean arriving
9 A0 {( D- a: w- P; i   while 1=1 do
; u. V+ Q# s2 U5 ]6 J   begin9 n! _- o( f" X4 P
   wait for 90 min
$ z5 A8 S( z  \& h7 t9 G" Z) C   take down R_mC  x/ b/ a2 S( _# {, m4 p& h
   wait for 10 min* v; X& d  r- m- i+ ^
   bring up R_mC, j; z. q2 u& {3 }
   end) B  B0 u! S7 {# z' M( j
end
, c* e& a  \+ `; `4 D1 V& Y
----------------------------------------& Q: C9 A" e" O6 o

) i3 X" i8 _9 {Exercise 5.9; L4 R- q- ^% C

* b* T" V6 R& M" V& A+ S  X  K8 ?2 w% X% N" T
Create a new model to simulate the following system:0 w' O  g  F6 N/ x5 N) f3 X
Loads are created with an interarrival time that is exponentially
( G5 y, ^6 W& B) I$ ~8 Ldistributed with a mean of 20 minutes. Loads wait in an infinite-0 B/ V4 Y- G  s+ |' o+ Y7 I
capacity queue to be processed by one of three single-capacity, & z9 q7 E  C7 H# N5 D( G
arrayed machines. Each machine has its own single-capacity queue
' q; o+ A9 O: j' `4 S6 @where loads are processed. Waiting loads move into one of the three + `8 s# ]) o' w: E4 |
queues in round-robin order. Each machine has a normally ; G" v& L2 g4 v) \
distributed processing time with a mean of 48 minutes and a standard
" H* e# y7 J/ n9 fdeviation of 5 minutes.. q  `. F/ l8 @$ I4 @3 C% B. }
The three machines were purchased at different times and have
* h2 N! A9 m4 x4 o* b0 r9 _different failure rates. The failure and repair times are exponentially
6 G& |0 k9 o6 Z: T/ z2 udistributed with means as shown in the following table:
0 F8 I, c5 [4 `/ P) NNote The solution for this assignment is required to complete
2 [, n9 a& j2 B; ~: S# u+ mexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
4 k* G9 I3 e; g. D+ |' [1 Wyour model. - B- T# Y* a  Y$ }4 T

& P4 H* p$ u4 r, `: _MachineMean time to failMean time to repair
. n# W: S( d( A8 cA110 minutes      5 minutes& @4 ?$ }) E1 R& F
B 170 minutes     10 minutes' P+ c. ]7 z3 ^1 ?" J
C230 minutes      10 minutes
. O! E5 g0 J2 g( C; h4 ^# e* ~2 d+ v
The machines also must be cleaned according to the following   ?& K: H( C- m9 {0 i2 F
schedule. All times are constant:
: O3 A. W& \$ \! N/ X
& W9 ?. |6 E% d1 V) wMachineTime between cleanings Time to clean
, q: @7 K* q5 f5 D5 _6 @A90 minutes        5 minutes
: ?7 N4 [. K4 X5 t$ AB 90 minutes       5 minutes  D; g" w/ s0 w, [* \4 |: d; J% w
C90 minutes        10 minutes$ }& t5 v0 N7 J6 k4 P

' _8 V( P/ Z2 ?; c# c8 |Place the graphics for the queues and the resources.
, W# Z) P9 K+ t. ^# s9 v  `) dRun the simulation for 100 days.
" j: J8 c) v6 ?7 n8 s8 t) }4 `. }Define all failure and cleaning times using logic (rather than resource
" h. Z, ~. y5 i; r! z+ n7 zcycles). Answer the following questions:
7 M& T2 I  L0 `0 i8 n/ G% G( ^a.What was the average number of loads in the waiting queue?) A/ D7 @9 t6 F$ g  `1 Z
b.What were the current and average number of loads in Space?
. n9 D+ w8 P3 ^0 X- y+ s1 ~3 Q3 THow do you explain these values?
; l" t# O% V0 q+ F! M. h

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
- Z" l8 a9 }7 S; \' \send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& d& l0 c& _, X1 Q! R- G这行好像也不太对,各位先进觉得如何呢?$ l& S) y8 d+ s+ K0 }" Q1 k" w

- Z, q/ M! t/ b$ r1 x: a- Obegin P_something arriving
: T7 ^# V) [2 }: n1 {' {7 s( E1 j   move into Q_wait
+ B8 V4 b; ~  s; K$ K6 f   move into nextof(Q_mA,Q_mB,Q_mC)
* Q* n; J5 C" V# {   use nextof(R_mA,R_mB,R_mC) for n 48,5 min- J. W% k. v4 p( B
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ; P' R: z0 {% u! R8 P! l3 @
end
% J& s6 B$ O% q- n3 Z& v, n, H
1 \" V3 Y! R) J- B6 pbegin P_mA_down arriving2 l0 m% l2 D. F, x3 T
   wait for e 110 min
& I9 Y+ E+ v' B8 h/ ]   take down R_mA
* K* L5 J% N0 }   wait for e 5 min
6 |: j" Z" R- ^5 L( E1 b   bring up R_mA
# K# E9 P3 I. F0 P9 q  Cend
1 Q* A2 ^8 d9 W4 X4 J6 f2 h( G* ?
( \2 x) t# j3 C: P4 X- t$ ]begin P_mB_down arriving" c) C; e/ u6 p- N1 K
   wait for e 170 min' s* t7 ~1 r/ [8 _# O
   take down R_mB: z  g0 O( a7 H* A& w7 s$ u
   wait for e 10 min
7 b0 n4 b( E; v( p/ V) B   bring up R_mB2 O- G; A: B8 X
end
+ i2 B8 j9 L7 a* c+ Y5 ?  C" s" i1 z. w% t  F) x9 ]; \
begin P_mC_down arriving# Y+ H4 d4 Z) u9 h
   wait for e 230 min( i, b5 F2 `- f
   take down R_mC4 c. p" Q( }; V! @) E* R
   wait for e 10 min6 N# j0 [7 O5 }7 X0 O1 R
   bring up R_mC
. V4 \9 o) a8 Z! yend
1 ]" z  g% Y" J2 u* U( [7 n, N4 g! P9 U! V( c5 `2 z9 u
begin P_mA_clean arriving$ N8 j( f( W7 ?2 Y
   wait for 90 min: m6 u- u9 [$ F
   take down R_mA
5 c: X$ V4 X) d# r4 h   wait for 5 min+ a. U8 V1 M& x& K
   bring up R_mA
3 |- V* D, m2 U& }4 G1 {end0 P, m+ W( j' U  }) ^: v
+ p" V4 b* i! ~+ x: |: Z
begin P_mB_clean arriving. b# ^- ^/ R! T8 f7 ~" W5 A, ?, l
   wait for 90 min
4 V, C! b$ h: G0 k) |& ~# C* [3 y   take down R_mB
' [1 F6 D$ q; M1 N   wait for 5 min# p( V$ S/ y" R; N' i
   bring up R_mB
8 Z5 Z& e# F+ }" F9 W4 t2 V9 h" V5 [end
  w* k8 V% F8 `
# T5 M: G6 c/ i, `  W9 lbegin P_mC_clean arriving
. ^- c3 ?4 _- K% h, e   wait for 90 min
8 g% Z0 A8 H4 E   take down R_mC
' ?: Z. e# S! u   wait for 10 min
# V% r9 ^6 ?& Q) M   bring up R_mC* Z8 Y( i( _; p0 q& d$ j
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
0 S4 W& b- V7 E, J9 b% a$ i" [: ~   move into Q_wait
9 j, S/ Q# Q- I   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; \! L4 |6 y% b! `   move into A_w. K5 P( C, Q0 j1 o" k& |) \, I* o
   if A_w=Q_m1 then use R_m1 for u 48,5 min
* c& X% c, l- `& l% N2 k' c9 K   else if .....then use ....for u 48,5 min
1 M' e) `( Y; Z  e0 I$ |2 Q  h  L   else if .....then use ....for u 48,5 min  ; o# p! j7 i. {' a) t7 U8 U! a# m
   send to die  B, V% `8 O: y) p% d
end
) E' Z  _0 ~! ]7 W/ w( [1 m8 b8 W# O% o  g+ D
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 01:29 , Processed in 0.013928 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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