设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7279|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
: \7 X  ?. u9 P0 N- Q  w1 V1 H2 E& }, u
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 Z# p7 h% S; o% t- k' w
' x% q" ^. Z9 q3 W
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!* F  W( _5 J. w7 u
  t# T( R% g+ M# c5 T+ m
--------------------------------------------
* A- f6 N% \; W& qbegin P_something arriving* S+ F  W! v4 h
   move into Q_wait
% G$ a0 H( Z- K4 e  _   move into nextof(Q_mA,Q_mB,Q_mC)
: Z* l. F! |# t" C6 a   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min+ t2 @# k' e' U0 L& H# e
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- o: j2 O9 D$ R: ^5 v
   send to die9 [/ I( T: [$ W0 B
end
3 \. }+ D6 E- Q1 v& }
; i! u) H* e/ F7 a9 j* y
begin P_mA_down arriving
7 G6 _$ X2 [5 c   while 1=1 do
0 `2 L8 \1 c9 j' z4 t0 |   begin& b3 ^& ?4 A  j9 |
   wait for e 110 min
+ H4 Z0 n8 V/ a- V  A   take down R_mA
8 Z. f4 G( b3 g7 [8 M* A+ [   wait for e 5 min8 A' m' p! o+ C8 L5 ~! Q# c6 X0 c
   bring up R_mA. ?  Q* \- d' Q3 p, b
   end
' A6 H! I6 _# n% Xend

# z6 P  B1 D$ X8 e$ l" G/ f ( T3 ~. D6 N9 w" m
begin P_mB_down arriving: ~! ?% C; D6 r6 R& b
   while 1=1 do: I; Z% s" y3 R
   begin: h% P$ `9 ^& `
   wait for e 170 min; A- A0 n6 V1 ~& E$ R0 d7 G! P* R
   take down R_mB; h- V+ Z9 X4 u7 |
   wait for e 10 min5 h7 |. d( h( ~7 i( P" n7 g8 \1 N& d
   bring up R_mB
5 Q  M- x' E4 a; p   end
. h5 |: ?4 o* A! I5 p. ^8 E1 A4 Jend
5 X! c2 o( @3 O
3 N% F/ H% n% ?: z/ _5 y- [
begin P_mC_down arriving
0 @/ b9 V" |3 r) N   while 1=1 do ( C; c, R2 a$ H& f  r
   begin9 f( u/ K* b$ g2 @* w, a
   wait for e 230 min5 @- E4 z3 c( n; W
   take down R_mC
: m1 b! k* L, U8 E( |) x/ k* O   wait for e 10 min
- X. \" y4 [) L7 o" \- I* c   bring up R_mC7 C; P$ R2 Y" {/ I) {* g' D
   end/ I# V1 V6 ?+ I. n8 H+ m- K
end
! e' I0 B+ b0 Z% A

) p% c( ^6 c* h) _begin P_mA_clean arriving
) B1 h, q# E8 g4 F   while 1=1 do: R' n( W7 A8 e) X& C- `2 E
   begin0 _2 b& n( ~. k9 q( P& _0 B
   wait for 90 min
6 [  c  O5 d# p: k* `& P" D   take down R_mA' L; s2 b! {( [- m2 y1 }% l  b( f
   wait for 5 min( s/ G* i1 F: Z) R' e3 v& V' Z
   bring up R_mA
+ P' b4 l* E: H* W0 Y7 j   end
5 D; D  _$ c. q2 wend
- D0 T$ |) q* ~$ X& w2 Q6 j6 G3 T
( m) w0 d! \' Z$ J! }
begin P_mB_clean arriving
$ j* l2 w8 e' i6 w   while 1=1 do% l+ H  J% J! j$ r
   begin" x3 Q/ z# c4 p& ]( u
   wait for 90 min% x! a$ o2 m! c/ d( P
   take down R_mB4 }  ?5 F! B5 i0 i' ]' d) n8 c
   wait for 5 min
( @/ J% Y/ N6 e8 O5 x% o   bring up R_mB: f; B; N3 I$ O' D" E6 Z' O. C5 ^
   end$ L3 E' m- l  N3 D3 w
end
! }/ g2 v4 i1 _6 K' s) ?
. Q0 M. Y/ M- h! P  r; {* A5 h
begin P_mC_clean arriving
4 n5 m3 C4 A. r6 ?; s; R% m   while 1=1 do
5 b9 [* C; R7 v6 x   begin, n; B" ~! w# C& m; D: F
   wait for 90 min
+ p' ]+ ~( m# z& F( ?   take down R_mC
; X. }4 e/ M  @   wait for 10 min7 C) j5 C4 H8 ~" j2 @6 u( ~9 @
   bring up R_mC7 {/ @4 H3 B2 g8 z" ?* I
   end
$ a6 m2 b4 [. ~end

4 A. f4 L" ~( Y' s0 D* m  e----------------------------------------! @7 J% X/ w0 u- [6 f# D

5 F$ x9 a! K% |2 @+ ]# m; TExercise 5.9
& g1 u! H3 m/ G5 n+ j% E  ^; {* B5 A4 ^3 Z

$ a0 R% J, I8 Y0 W2 O# yCreate a new model to simulate the following system:6 T- l7 `' t4 G
Loads are created with an interarrival time that is exponentially
: C. i* K; b  W. e6 w- h6 b% z% Cdistributed with a mean of 20 minutes. Loads wait in an infinite-
4 g* l+ B3 j7 T! Scapacity queue to be processed by one of three single-capacity,
4 a% o+ b2 [" Parrayed machines. Each machine has its own single-capacity queue
" X2 ?8 h& `7 }: w) [' R: D/ bwhere loads are processed. Waiting loads move into one of the three
+ o# j& @$ `% ?" g& t9 ]$ ^6 b# d* k9 Dqueues in round-robin order. Each machine has a normally 6 h2 U# M/ ~/ H1 p- `
distributed processing time with a mean of 48 minutes and a standard
, v* T2 V2 d* z  a; E+ ?2 Zdeviation of 5 minutes.) X% @7 a  c5 e3 r
The three machines were purchased at different times and have 2 e% ^& z$ U. ]
different failure rates. The failure and repair times are exponentially * Y0 q. e6 F" S* m
distributed with means as shown in the following table:
0 w8 ]+ D0 O* \; y1 |/ @. ~% r0 xNote The solution for this assignment is required to complete 5 T/ r2 S, J9 y% U
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ v" `0 j& e; q* B3 M- k
your model.
# d! `3 w4 ~, }1 ^7 A5 P" F" y+ [! B* @
MachineMean time to failMean time to repair( C" W9 I. X3 |4 n9 T' T
A110 minutes      5 minutes
: r' f2 E) k6 I( c5 A6 rB 170 minutes     10 minutes9 O4 F' |4 P  j+ J6 t* O! |
C230 minutes      10 minutes2 a' p, G/ m7 p. j" S

$ y4 ?4 n0 S7 _( }) @5 {6 jThe machines also must be cleaned according to the following 0 g; L; P) L; }7 l2 }
schedule. All times are constant:
9 ~0 I5 r3 P7 B& _! P2 ]/ x; p( c1 c( q) g$ w
MachineTime between cleanings Time to clean
+ s9 ?2 y' J1 r5 [A90 minutes        5 minutes
: z$ F/ M$ U; m" c- c# DB 90 minutes       5 minutes2 T; Y5 d0 }* f8 K  B; l+ _, V$ I
C90 minutes        10 minutes
3 c# D* l' `* _7 Z8 ^8 ?3 V; `6 n/ ?8 M' _7 t8 T, C9 ~' u" a
Place the graphics for the queues and the resources. 2 w" o, `! Z1 ]/ r9 d: h$ O; j. d
Run the simulation for 100 days.
) e4 [: n4 {5 f/ ^: [Define all failure and cleaning times using logic (rather than resource 0 f7 F2 Z, R1 |9 E
cycles). Answer the following questions:! u* [1 ]" |# _5 ^
a.What was the average number of loads in the waiting queue?1 M( \& c  ~; {: k/ q. ]: K3 i
b.What were the current and average number of loads in Space? / O$ x& L0 z0 |& q+ m# H* }' C
How do you explain these values?
# |  h* q7 B% k  J/ }. |; W$ h; O6 F

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
9 w" ]0 K/ s% Q. n# j7 |( j" gsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); H+ l) Y+ N* D* }+ E+ S
这行好像也不太对,各位先进觉得如何呢?% [. G4 J& Z3 v

7 q8 a4 ^9 I6 i; b% _# }4 Jbegin P_something arriving7 W3 C+ c% ?5 z9 M; x  g( c- A5 l
   move into Q_wait8 c5 }% {$ [& O' O3 A" R
   move into nextof(Q_mA,Q_mB,Q_mC)
) ]0 y2 y1 \1 t3 ]' E   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
. |7 p3 Q+ v# H4 n8 @* d" s9 a6 i   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 G2 f1 d2 I, s  Q. q, cend/ k. n8 Q0 ?2 W
# s$ L$ y2 q2 b1 L4 x
begin P_mA_down arriving4 ]0 y! b8 r/ U) }  J6 Q0 n  P
   wait for e 110 min
. ~2 C  _$ \& p( p: M( L  P3 K   take down R_mA
2 A0 L  |- g: g6 x+ {   wait for e 5 min
' L# b* \7 p4 B& C5 E8 H   bring up R_mA5 n  L5 A1 j8 I6 U9 A$ K
end$ B9 S$ O5 q+ Z8 _8 e5 q
7 J5 U2 X6 s% k# [: }( S. W* g% c) y
begin P_mB_down arriving4 ^1 A) a( c9 O' b) q( ?' p. D
   wait for e 170 min
- A; }9 g3 _; [, K5 h5 w   take down R_mB
% n/ f: K  W3 M2 @6 Y+ x   wait for e 10 min
$ Q# ^3 W- u5 |& c( r% {   bring up R_mB
4 S& {3 ^  c7 s& u) X0 n# n! h( F, Rend
  h4 n# G# ~) Q7 w
( l: o8 Q. o- G* Ybegin P_mC_down arriving
$ L& W8 G+ o7 G! n/ L' K, @, `   wait for e 230 min
$ |0 x0 Z$ X' }: T   take down R_mC9 H' F+ B* Z7 r- L3 a8 R
   wait for e 10 min
) Z4 V+ D# D+ D9 ?) }! u5 X: l   bring up R_mC- w( g# M% }9 [" E' \- ]
end0 ]$ _% ^) O' v3 \+ n" m
3 \3 \! ^- c6 B( T' [2 i
begin P_mA_clean arriving' T, J' r, U  x, k+ m
   wait for 90 min6 W* {4 @) o4 E  V. y! r$ y
   take down R_mA' ?1 N3 b8 p% Y& d% k' k7 ^- E
   wait for 5 min' n3 J6 t" i8 c0 R; m: i8 d6 v) O
   bring up R_mA7 Q! k, [4 p; W- i
end7 \) O, M1 u* y' G% N

1 _* a* r0 j) l3 E& N/ Hbegin P_mB_clean arriving
4 d  E8 H" D2 N! N! m5 o   wait for 90 min
0 p' {+ u5 O( o7 V+ K   take down R_mB+ Z+ Y5 I% g2 f$ I5 L
   wait for 5 min
" C/ y1 z  S6 ^" ?4 q; P( @   bring up R_mB1 }5 Q$ ]2 o5 C! q' I8 w1 g
end
; U* f: w! e4 b5 n: v8 l
! ]- B5 ~$ B! Z# V7 s! Kbegin P_mC_clean arriving
, o( d7 W" u+ h) I4 V   wait for 90 min
- D) \; Y8 `1 _) K   take down R_mC
6 E+ j& [$ B, W: x( E" C+ b   wait for 10 min4 X/ ], N3 T/ V% M. B6 m
   bring up R_mC
' R# x6 ]1 k4 `end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- S3 g  H2 c4 m8 x# o3 v2 n0 H   move into Q_wait& D3 t2 b: @7 W; K* i3 L4 D
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 w( X  G* n, X4 o   move into A_w
1 g2 D2 {" X& {0 m   if A_w=Q_m1 then use R_m1 for u 48,5 min' e! b! _% H# q- r
   else if .....then use ....for u 48,5 min0 d5 @8 d. z" g7 C& ^$ k; a1 l, n* b
   else if .....then use ....for u 48,5 min  - n; h7 ]1 y7 f, E. ?( j- V% x
   send to die+ _- d9 R. v  _+ g% V. L1 R& q5 v
end% N  g3 j# h0 A$ v# X$ N

- `5 P+ G- B9 v+ ?供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 15:40 , Processed in 0.015966 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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