设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8043|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 8 \) {1 k( d2 q0 M' u3 |

4 s- Y& W0 P6 l! s- j底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去  `0 O, m$ j. Q4 H) g
! |5 l3 s; C( X: v
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
; j9 K' h, J: j( H( Y4 P8 i3 ]- w2 ~
--------------------------------------------
& Z2 X& A! L4 C( G6 @begin P_something arriving: b8 I2 }( p" P- X! c
   move into Q_wait
# D* |, @, O1 |- T  g6 {   move into nextof(Q_mA,Q_mB,Q_mC)! ?- g0 V. G9 `6 m  p1 m* r9 \
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min$ e/ R0 }5 d) A3 W
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- M/ R0 Y  `) [/ Q3 P( p9 E   send to die
( D' U" y% b0 Vend

7 ^" S6 K$ @5 I; L. H( O/ V# ?9 I # P! W& T+ m7 O! `6 L3 p& c$ V+ G
begin P_mA_down arriving
9 j+ }  ]4 l0 E: \' L9 H# ^* [   while 1=1 do
$ h6 F6 h# W* r! y; c, x3 |+ \   begin) }7 Y6 c3 \) l( f  y2 n( E. L% a
   wait for e 110 min/ @: T& t. i, G9 d: _- N
   take down R_mA# f( N5 y& P& k0 c, G, U$ E% \/ X# u( u
   wait for e 5 min4 i8 g( l: ~2 H' T
   bring up R_mA
- Q3 D/ b5 r# ^$ k6 f4 e   end
$ Y8 W4 l% h' G" T$ b- ]end

* m( e, X) _) u; C% W, Q 2 c! C' T2 v/ f3 c% E% z) d
begin P_mB_down arriving+ R+ B4 d" m% h/ }) i
   while 1=1 do  q& G; Q* b0 A$ h  t
   begin
" x# o. `0 r% D/ \3 i$ z# w8 Z6 Q9 p   wait for e 170 min% L$ d" G6 w4 U4 h9 |2 M9 \
   take down R_mB0 i6 i! h+ r+ [
   wait for e 10 min
( a5 K; N  v9 t' ~   bring up R_mB8 F- N) P4 M* {7 ^
   end# v& P* ~* `! h, k. t6 n1 }
end
7 l: l! i+ U( F% {
4 ?+ N3 U4 ]- o4 s/ C' _/ k6 t
begin P_mC_down arriving2 D5 E2 h$ V$ a& i. |+ a/ K" V( s& ?
   while 1=1 do   w: @7 ?6 W: {) J
   begin7 }4 c) M; N. q8 p
   wait for e 230 min& r( p* E( ]* q3 V. C7 V1 V
   take down R_mC
' l& ^$ d4 l; L. q. [  D+ R; k   wait for e 10 min
3 @' z* A. a, g0 K* @( h+ `2 Y   bring up R_mC" x: E6 Y4 f+ M
   end
! S# q) D3 s1 G, C  bend

% h: q3 O$ Z% b8 T. ^5 {9 P 2 k0 G# d5 s5 c& [
begin P_mA_clean arriving. B, F! |! {( x! J) B/ Y/ Y% ~
   while 1=1 do
1 |+ W5 a& H4 C4 g+ m. O   begin/ M0 W% \* s- T! f. ?
   wait for 90 min
/ X( ]8 i* y& [9 j   take down R_mA
. G0 q) p/ S- e1 x. N* g4 }% C% N   wait for 5 min
& s  f0 K7 }) n9 H$ Y- g, q) \   bring up R_mA% ]( Q, c6 t5 t* `
   end% N4 I6 }6 E1 \
end

! Z4 h4 k" K1 e9 e/ l( f( t2 Z7 I
) z$ f- X$ @9 T+ b( k4 Cbegin P_mB_clean arriving  t* Y2 s+ ~# s6 Z/ M
   while 1=1 do5 B; \9 {# s: M
   begin
$ i+ I- Z! b( n7 H- ^9 s+ J   wait for 90 min
0 }6 k1 V' C5 V+ R  N" {' ?$ t   take down R_mB9 Y5 f+ d" v- S$ [8 ^
   wait for 5 min$ l: C- X& I) q
   bring up R_mB/ H5 N+ @/ c3 u) K. d
   end  g- |7 ~0 K! k. A4 v! j
end
# b- `5 w/ {- _; d
1 I' f, @2 s$ S3 h2 R! O$ H
begin P_mC_clean arriving; [* Z9 Q) B# Z* y7 g
   while 1=1 do
% q0 S+ k0 G4 |   begin
, i% b0 U  D9 S+ V3 C8 Y, v   wait for 90 min. P7 K3 b! A4 `. w  @2 S6 d/ z
   take down R_mC
7 z$ i* r6 x! s# `! f7 A   wait for 10 min
, ?7 Y6 L* C$ I* Y6 [% Z( I3 ~5 k   bring up R_mC+ t  ^# o7 k7 z8 _9 P
   end
3 L* ^2 V6 l5 |$ K& M* qend
: |4 |5 b' \% [  ~, q
----------------------------------------( l0 l  K7 X0 A% M; c- ]- i/ P
' Y4 m& H7 J- p6 `
Exercise 5.9; x3 Y7 N6 \# C- s9 H  v/ |: ^
* X7 d* `7 E# E- Q3 A' F3 c6 I
3 ]" n" x) J9 ]" o! A
Create a new model to simulate the following system:# ]6 d. o9 t4 n$ ]- g8 B
Loads are created with an interarrival time that is exponentially 8 e5 y! {8 ?3 ^+ d* Q' l. b. {8 @+ D* A
distributed with a mean of 20 minutes. Loads wait in an infinite-
" r7 F3 |' b2 {  i, P; M* Fcapacity queue to be processed by one of three single-capacity, & P) j5 m$ n% T3 _$ s; P6 ^
arrayed machines. Each machine has its own single-capacity queue 1 i1 ]2 h. ?$ n( W* h
where loads are processed. Waiting loads move into one of the three
1 ~7 E4 k0 F( ]# ~% {queues in round-robin order. Each machine has a normally
9 W) N# S1 k/ z9 o! m; Fdistributed processing time with a mean of 48 minutes and a standard
8 k( }  G) D2 y' P0 H1 odeviation of 5 minutes.$ ^, z& ^3 Y6 ~
The three machines were purchased at different times and have 7 z# i! A8 s8 t% \, u
different failure rates. The failure and repair times are exponentially
4 o! t! B& V" f7 H- \' d9 I; Rdistributed with means as shown in the following table:
& w3 m7 s  _5 o' sNote The solution for this assignment is required to complete ; \1 w; o3 D: v! [0 }" U+ A
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
$ e- V% m. g0 V" E# y5 y5 tyour model.
+ _! L' m7 r8 \8 n0 G" [+ r+ r/ i6 d+ x, I5 k) `5 O, w
MachineMean time to failMean time to repair
- N7 l  d2 t8 E8 oA110 minutes      5 minutes/ P0 H# \5 E; X2 y/ }
B 170 minutes     10 minutes* D; U5 I9 J% G2 Z3 w
C230 minutes      10 minutes
; N+ T- A: s9 O: h- [+ [) H$ }
The machines also must be cleaned according to the following
6 c7 d3 [: X2 Y2 wschedule. All times are constant: 4 C% C! {% s! S/ v" \1 p7 e
. s" D+ w, ^9 ~
MachineTime between cleanings Time to clean
/ v3 s/ U' W( X' DA90 minutes        5 minutes# j: p1 ]) L7 A* e
B 90 minutes       5 minutes! K5 d6 {9 O- d- v, J  @
C90 minutes        10 minutes0 t2 g9 Q# ~( \& Q+ c7 v) \" _# z/ n8 R
9 g* J/ ?# ^/ V/ i& H8 b: N
Place the graphics for the queues and the resources.
5 z5 S, t# j6 L1 w3 j1 b: NRun the simulation for 100 days.( \; v, Q( ~7 k/ V
Define all failure and cleaning times using logic (rather than resource * ?: P' K9 u7 _
cycles). Answer the following questions:
- K9 W% }1 I/ o: H# |a.What was the average number of loads in the waiting queue?
3 Q7 l' x) V8 i/ G6 @' \b.What were the current and average number of loads in Space?
- q3 V) ^) d, s! UHow do you explain these values?
8 k. h, r" X9 R7 F6 n5 i3 j9 i

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
* b' A2 B0 ~* Y- Ysend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 M  x& s4 t4 E5 B! M
这行好像也不太对,各位先进觉得如何呢?
3 T+ c- J, n! C, G
: }8 h0 i! |+ V- k1 e' F$ c$ x  Lbegin P_something arriving
4 u- s4 q8 R. p8 D8 Z   move into Q_wait+ T& E, a( ?6 G& [
   move into nextof(Q_mA,Q_mB,Q_mC) ! ?( ^' L, Y# K) W! z$ m
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; @, s# A' d7 {( s8 a/ v8 K
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) & Y' j' w8 I9 _  S1 w2 N# n2 `& ]
end
* c' N5 a6 ?+ I- c) X
  e, Q2 `' j$ X2 y7 vbegin P_mA_down arriving
6 j2 q( p6 t4 |7 O: q   wait for e 110 min$ D! p  p4 o* d' T4 `
   take down R_mA
& ]% l9 ~5 O+ f3 E   wait for e 5 min
/ }- c3 _: S1 S$ `$ o) N. Z   bring up R_mA
, P) l$ C# {4 ~* Zend
) @# v! E% O6 E& u8 h
) A" B9 J8 n8 F7 @8 _3 g; m% _' f5 nbegin P_mB_down arriving6 @/ t& ?2 \3 q
   wait for e 170 min
8 X0 C4 e* [5 b   take down R_mB
: ?7 r7 H$ n* B% K! z9 V   wait for e 10 min% k- s& f, f! z1 c& }7 l/ J$ t% }3 e
   bring up R_mB4 r. G# c( @  U/ z
end
0 Z. d- @8 V; ^1 n) O. e6 U
* V3 b+ }) u9 n8 {9 b/ @begin P_mC_down arriving
% s+ i0 d- T* v. p* m' `' `1 e8 H   wait for e 230 min; a( G: t( V- k  V/ U1 P" J( C
   take down R_mC
+ y% o' L( C# e   wait for e 10 min
. J& x! Y5 j+ Q( |4 x( R   bring up R_mC
. E# E' [4 h/ O: {. m1 Nend
7 _% J; V  s; q2 \5 o1 l& U
$ q7 v2 W" \- j' i- Ybegin P_mA_clean arriving
: G. P: ^' j$ d   wait for 90 min/ Y2 O1 N8 Y% X# q' D
   take down R_mA
, T) `6 K6 L6 N7 y" }4 m. G- `   wait for 5 min
  R8 S, e! m" [! b5 y6 @8 }   bring up R_mA
+ z% C% p6 b- Z* r) I) Lend
  O4 T3 ~" ]" Q5 s; W6 ~* A
/ T/ a9 p( y8 E2 I0 G6 N0 r2 Cbegin P_mB_clean arriving
2 k. c2 Z$ ]# [9 K6 @   wait for 90 min
5 k0 f* a- l5 G6 z- }* z) J% [' w   take down R_mB
6 c  n, @1 R$ j4 W) A" f+ q6 D   wait for 5 min
8 X- X$ W: W, K0 ?0 _   bring up R_mB
/ Z1 B1 Y) e% Eend2 `. R6 B- Z+ [- e+ e. ?$ a1 w) ]

( B6 L1 T0 l, Q- pbegin P_mC_clean arriving
( T4 [1 S7 Y: s+ S. Z' H   wait for 90 min
0 y4 Q/ h) F4 f: a: `8 y   take down R_mC
) i" f- r8 z/ O& [! M   wait for 10 min' x& l! Q5 y/ u8 P
   bring up R_mC2 \6 i9 g7 C! N' v& n* v
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving' \1 F( e4 Q0 U: k4 D
   move into Q_wait
  J, [* e& P8 ]  t5 M( c   set A_q to nextof(Q_m1,Q_m2,Q_m3)! C9 o+ g6 j( u
   move into A_w+ H( X+ R( x' Z5 }3 N
   if A_w=Q_m1 then use R_m1 for u 48,5 min
% {" c8 J4 K- l; |; |   else if .....then use ....for u 48,5 min9 C$ S9 X/ v7 e) c' S
   else if .....then use ....for u 48,5 min    T/ s* P8 s9 q9 F* x, N
   send to die
% ~% {* Q% a2 j# A: \3 eend
% A7 ?! V7 R+ Y( X
! N- T3 p6 {, w3 R, A1 Z供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 23:01 , Processed in 0.011619 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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