设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7308|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ; c' ]$ J- D- }& Q

7 J" f' i2 s) Q. n8 O: Q底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
6 I! P" Y/ c+ u9 E0 e7 b2 o8 }) b% Q% d6 n
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
) Y+ a) L4 }9 n8 {* z. x7 i2 K* I) a. K1 ]  m: F; N& b, ]
--------------------------------------------9 V3 U' H+ @# ?0 O# {8 I
begin P_something arriving/ o2 j5 o* U+ r" M, i( P
   move into Q_wait
/ |0 \, e! S& x9 V4 l   move into nextof(Q_mA,Q_mB,Q_mC)
: Y% h6 z$ q" e4 b1 D2 }; B   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min. p8 e$ U2 k9 ^4 ]9 n
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ H  D% T; |1 P. I& k" s
   send to die& h* {& m  m" Y  ?/ J! ?
end
2 _8 [# c$ W6 i' C! p+ @
9 w! p+ k/ V; j5 G
begin P_mA_down arriving% `( I% p# O2 w/ l1 a
   while 1=1 do
: u; e. i) H% B- P) ~5 |   begin
# r  I5 A( X0 F6 F3 C   wait for e 110 min
) b8 s& k5 H' O: T  _+ H   take down R_mA- g* [4 m. y# b5 Z/ J
   wait for e 5 min
  [$ M! K5 D1 M' o* \/ g   bring up R_mA8 `+ l5 u3 Y" a7 n; k( X
   end
1 P0 A3 t- x! v1 ?. F7 qend

/ I, @+ n& |+ `8 y! E" Y2 w, c ( B6 h. Q' G" v+ Q
begin P_mB_down arriving5 b6 x' G5 ?5 v& c8 A( W
   while 1=1 do0 T7 \4 w; @* ?. s9 O. @/ l
   begin( N0 K7 n+ G; D+ z% @% g
   wait for e 170 min0 |, O  S5 v2 O6 P7 r, {5 v
   take down R_mB9 e, `& w/ E5 R0 h% D& \# }: R- T3 e! \2 F
   wait for e 10 min
4 D! H# F8 C5 p0 P6 Q+ s% |   bring up R_mB
% b' R8 s7 t" Z# E   end
( n" P% t/ w7 cend

  K9 n% S. A5 q" W, Z9 {" ?1 I ; m3 t) Y0 n! w, l8 z- \3 m
begin P_mC_down arriving) e( \8 E4 \  n  ^
   while 1=1 do
/ z! F0 N) L) e/ H! H* ^& e# k   begin/ d0 l0 k4 D! e5 u6 N/ \4 [# W
   wait for e 230 min& G8 t. I0 j3 O% X
   take down R_mC
% t& X8 b- i: T% T* G   wait for e 10 min
" J! T( v! E+ \/ V   bring up R_mC9 `0 I4 R7 |8 r9 o5 f: m
   end
' @" j! f7 J2 W0 wend

5 U4 Y$ t5 ~6 e
! w6 `( j8 [: \7 Q: K9 H' K) Zbegin P_mA_clean arriving
5 U: \# \4 Y! [: D   while 1=1 do# {+ V( A6 E" Q
   begin
9 A6 r: }+ ], @7 M( q: Y7 |7 i# W5 m   wait for 90 min% M1 r: `' U2 r0 a- f# L
   take down R_mA
1 L# V1 X& Y8 z, w   wait for 5 min6 q9 e" Y/ Y4 e" }. V0 U3 T
   bring up R_mA+ p9 Q1 ~% h6 f; w
   end& N$ E5 c9 f' \+ x" u
end
, W$ f6 y1 p4 x, q) y, J# k

, p4 k+ s+ T) ]% \0 E4 ?5 obegin P_mB_clean arriving
7 `! D( [+ E) G0 L5 ]; |   while 1=1 do8 y9 `+ ~+ X# f" G9 r6 e9 E! G
   begin
) p" d% L- I+ |   wait for 90 min
( S) k3 I+ F0 O6 L3 x$ S   take down R_mB" N7 j+ j" D9 f2 b4 w2 A7 t+ W
   wait for 5 min6 l! f, I" E! I7 v0 F3 b
   bring up R_mB7 ]1 C* v! |8 o% n: Q
   end
2 D9 \7 i: M% w; ?- i% }' Hend
" s$ j# e; r* E8 Y3 U& y6 S& @

% v1 `& u- j- b0 W- ~- \, Vbegin P_mC_clean arriving$ Z" R; u' k* [& V3 S# w/ l
   while 1=1 do
, H; N+ c- P$ U1 W   begin& ?+ C0 t4 f; O7 \
   wait for 90 min
9 P1 Z( z. h( ?   take down R_mC
% I) ?6 B" n$ x- o* Z6 y0 e. D6 Z   wait for 10 min
+ \! ?, f7 ~  i6 K! g% K* l; S   bring up R_mC
) d8 C& ]8 D4 Q  {# E: o   end
4 I! ?9 F! ^  W: X$ N; [9 jend

3 r9 o% \) o" B' ?% H+ J2 o! `8 g$ W----------------------------------------, T$ T- F  F$ `9 N* D; N( K
6 i; i/ k& ^( Q: F: ^
Exercise 5.9( m+ h% ]$ i5 s" ?

4 G8 q4 x. d$ o; A: R% D
/ S6 }& f1 y1 U: }2 xCreate a new model to simulate the following system:0 H2 d/ C* h9 U. q" s3 S: ]
Loads are created with an interarrival time that is exponentially
3 j. ^- ]: h* w, p# j) }distributed with a mean of 20 minutes. Loads wait in an infinite-6 p8 U, Q# Z: q6 ?* v
capacity queue to be processed by one of three single-capacity,
9 M$ W, U' U$ L0 ]) m# Uarrayed machines. Each machine has its own single-capacity queue
) w/ `, G+ l  }& F# Wwhere loads are processed. Waiting loads move into one of the three 7 i3 r& U. |) C; j
queues in round-robin order. Each machine has a normally
% M: g! b- l  m. Z: U" e/ {$ v9 u; `distributed processing time with a mean of 48 minutes and a standard 3 ?) t0 w7 D$ O% d
deviation of 5 minutes.& ]2 V3 D0 g  r3 N
The three machines were purchased at different times and have
8 a3 m+ U- o7 O/ M: _# K, Rdifferent failure rates. The failure and repair times are exponentially * m& g* l7 t. k" P/ B
distributed with means as shown in the following table:   y4 b, ~8 s! M% R8 @  g9 m6 l
Note The solution for this assignment is required to complete ) Y( q5 W7 j4 u2 C
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ' O3 `6 O% a4 J6 L" F  R2 h) A
your model.
2 K: B/ a$ ]$ t! O8 w6 r# r) F+ G, ~* n- E
MachineMean time to failMean time to repair
: y. j: t  z4 eA110 minutes      5 minutes0 O0 u$ X, n5 ]" c
B 170 minutes     10 minutes! {# |6 k" T9 S+ R0 M* b
C230 minutes      10 minutes% Y+ h3 W3 ?9 L" m
3 T) m0 j" U! F+ L
The machines also must be cleaned according to the following $ J- |5 X! @7 t4 s  Y4 C* E
schedule. All times are constant: 3 U4 d7 o4 b* x& @+ L, I, V
8 c- A7 [6 s0 S; a" U" I# z
MachineTime between cleanings Time to clean& e% v# L& B8 O8 C- R& u
A90 minutes        5 minutes
4 h% A* B8 Q, ~5 }B 90 minutes       5 minutes1 z; z& b( h1 ]2 d0 f( M+ l2 z/ [
C90 minutes        10 minutes8 n2 {( n& y/ r  G0 }' S+ L
  {: I$ B! a2 K  a* B' n+ e$ D6 L
Place the graphics for the queues and the resources.
5 D9 v% X2 s3 C3 [% t8 s) _# tRun the simulation for 100 days., B3 E  b+ w9 o+ N3 g# u0 D4 r
Define all failure and cleaning times using logic (rather than resource
: B- r1 V! C, G# @" u4 Y4 }cycles). Answer the following questions:( T% w4 S& Y4 N$ Z/ c' v# S
a.What was the average number of loads in the waiting queue?
3 z8 j$ u5 o5 G/ Z% r4 v5 ?b.What were the current and average number of loads in Space? # ^7 n0 F1 a# h0 o* K& Q
How do you explain these values? # K  p; z5 t9 F2 K5 q1 e

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
- v! f3 s& O# X6 h3 f8 Psend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- c: q, g+ F: F, z6 k6 S+ o
这行好像也不太对,各位先进觉得如何呢?; D% H: Z% V$ w9 K1 K9 T1 l
* g, w& v! s+ {: i" ?* r
begin P_something arriving
  o5 v  Z( b: [0 s/ U- P   move into Q_wait% {6 L5 k8 k! u7 N* ^6 _" d( I
   move into nextof(Q_mA,Q_mB,Q_mC) ' x- d9 q7 r4 q, F9 y, P% T' K
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
5 M6 [: M* D! W8 N. w   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ \, Z7 m5 J6 v4 t
end
! V: }) B# V5 J7 `1 [8 W. a) W5 u( H" X
begin P_mA_down arriving1 J* P; t- Q: y  x6 F) w: m& x
   wait for e 110 min+ V- C* D; P* U' a  m
   take down R_mA; p+ J3 G5 U4 u) {
   wait for e 5 min
' t& x' b2 j; @. J+ f5 L. p   bring up R_mA. \6 F, S/ f" \6 H! O) T
end
6 }* r# u0 }# ?+ D+ n' l1 ~2 a  ?4 ^: b4 h, k9 f
begin P_mB_down arriving4 O" T+ V- S1 C+ N' G
   wait for e 170 min! c; |* P4 O6 P- Z/ ~+ v8 h. R
   take down R_mB# Y! E  l6 A4 Q5 i6 i# G  E
   wait for e 10 min) _# y  Z- Y" P4 c7 X, Z  |
   bring up R_mB% {9 o: ^4 F. Q! m
end
  s( w7 e$ X4 ], t2 ]- _% d
( I0 z, z% t& Vbegin P_mC_down arriving
. N1 Q5 E( i( B0 E/ U) o   wait for e 230 min1 Y. a1 u' `& W5 @: M9 E! K& s
   take down R_mC2 X8 `0 r- t0 S! t7 I
   wait for e 10 min& P& ]7 {7 l- U& P2 M$ C
   bring up R_mC' k) M  J5 L6 d$ w) I4 D/ R3 ^
end4 f- a' Q3 {# |. O. W1 }2 _# F
1 i# ^  D! p7 Z9 O3 v- J' a  q
begin P_mA_clean arriving+ l  }. F6 [# S% K3 J; J; {
   wait for 90 min
, c& H' _/ ~# w5 n% y   take down R_mA8 r0 R6 e7 I6 m+ z- Z
   wait for 5 min  l  H2 s  |; y
   bring up R_mA
3 f8 `6 @) v3 @' }end9 Y' b% h% y$ `( @8 R
9 c8 ?4 Q0 k/ l* ]2 R/ e
begin P_mB_clean arriving. E( g* o* v# W$ R6 R5 d
   wait for 90 min7 m+ r- c" y$ p  w, a# d
   take down R_mB. \* w$ W) R! \# o2 [
   wait for 5 min
; K+ ]' ^" D* n' Y   bring up R_mB0 L6 H( B* _' p1 |3 T( \2 w, W
end
& a, l( t) m! K0 t2 `) c7 W
) u# S( j  J6 R; xbegin P_mC_clean arriving& e' o* t0 `3 Y. x/ I9 V' c
   wait for 90 min0 {- t2 N" K0 c& A- L* ~
   take down R_mC3 F4 ^, K! r+ e( F8 x# z( d
   wait for 10 min
' j/ N6 k  D% L* k4 }/ k$ [. f7 c   bring up R_mC
; z! D4 z' Q: s+ o* B5 b1 N" @end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
8 s. G5 a5 [/ ~   move into Q_wait
% d9 q+ v* p' `2 x5 ?   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( ~1 l& X0 t" b9 M8 b   move into A_w- H% F9 C4 p7 w  X( z% C1 i& H
   if A_w=Q_m1 then use R_m1 for u 48,5 min8 r, s% ]; I) i# |" G
   else if .....then use ....for u 48,5 min" j* b% x6 M7 `. R" k; o
   else if .....then use ....for u 48,5 min  # z+ J' Y2 _" {/ h" V8 J
   send to die( Q- p$ X- d9 D) K. h! H2 n
end
8 `; k. u, Q8 V+ a! d$ Y3 D  j. q& U/ C, W' R  t. O
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-30 00:46 , Processed in 0.013927 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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