设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5017|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
/ V8 ~& ^/ i. d/ E, x) R; T4 Q% `( @, A) V0 k0 t& {" n
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去! X9 K5 ?( ]( E; U6 M6 H
3 ]* F* U, }0 |
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!/ M+ z( w; X: s' ~2 o
; H/ n4 u7 D0 j
--------------------------------------------9 _% x$ j9 Y& J9 z& t
begin P_something arriving- K1 Q* F& N0 G! k# E5 W! K
   move into Q_wait
) h  \2 B" h" ^6 T   move into nextof(Q_mA,Q_mB,Q_mC)/ D7 R2 D' h# y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min+ W% U; Z' H( v9 f) d- t* D
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)# T* C5 N& G# y4 c, L" |" o
   send to die
) f1 l9 A! y* u0 d/ A2 h2 F# d% Wend

! o; I0 E' [* y0 L) h- D ; N+ Y$ W- |6 ?, k/ v( i! I/ m
begin P_mA_down arriving
: f- {) ?; H( X   while 1=1 do
5 N7 k3 a7 v; G; c, ?) _3 C   begin
) G, O! H9 {. N% r   wait for e 110 min4 z$ U7 Q. G6 e' T- \" @
   take down R_mA
2 y) y! y; c- S0 I$ {! o- {   wait for e 5 min
# @! U4 s9 e) {: h9 x5 r0 N2 g   bring up R_mA
# V( D2 x% J3 H6 y  z# S* v   end6 @& J) k8 n7 V' Y/ J
end
+ T( v. k: [" d9 @8 A/ _7 W
( E  V; P9 O6 P+ @7 J
begin P_mB_down arriving
0 Q4 M) r$ w8 n- I5 p- c   while 1=1 do6 T' R/ k: [4 ?5 j. P: x5 o
   begin
) K; h/ s+ V$ D   wait for e 170 min
/ [' [1 l8 ]& {  ~7 y. s   take down R_mB6 `3 j4 w6 G! p5 Q% N
   wait for e 10 min* z8 `$ L# `# Q) }8 h
   bring up R_mB. I5 k/ N; B6 b  d" @( U% s3 L
   end4 [8 ]0 U1 M  H' e0 h
end

9 x5 O! ?# a" [4 w- _ + i8 |& H: P7 a3 O, x/ c
begin P_mC_down arriving
; `  {; c# w, h% y; d$ }3 w   while 1=1 do
' C& V8 J  @; {  M" f, x+ C3 U% j8 t   begin
% `% L4 U( q. @. a/ {3 F   wait for e 230 min
. x( Z! I& N: m% q5 T   take down R_mC
' w7 N2 w  Y* }8 M% b   wait for e 10 min
) |% y0 Y8 [, h+ }1 O6 y   bring up R_mC# I; F: Z. ]9 z* G) e0 |2 x
   end8 t0 z0 Z: i7 V
end
7 J5 D4 T3 J, R; q  r

/ c# D. }- w% w  P" S3 Jbegin P_mA_clean arriving
6 J6 a( j( ]1 ~8 H8 b   while 1=1 do
% z) T, T5 ]' }$ X/ K# q   begin+ a/ [: ?" W9 B
   wait for 90 min3 S, z* i: O8 o/ `7 x, _7 u
   take down R_mA
2 [& ^: b1 }6 U, f3 u: f   wait for 5 min5 e9 H% h3 t$ T/ U  \
   bring up R_mA
: I" I' K/ t- |, u( F! X4 K" `   end# \' h% E% ~, N4 e( D
end

1 ^. h- d  ^- v, o8 w
! ^) o, p* }3 ]  ?! `. Tbegin P_mB_clean arriving
) w7 P( F6 u' `+ i( n! W. i   while 1=1 do4 l! j3 h- o) Q/ o
   begin! ]8 r* m4 C9 _3 i- t, Y
   wait for 90 min
1 ~8 y, i+ n, X  G   take down R_mB
4 B* e. C0 z* W; z+ C   wait for 5 min" A  l6 c. }' c0 S( E& M+ a
   bring up R_mB
' u; ^5 t: W2 J' Y* Y$ m( R+ N8 N0 `   end
' g8 D8 M$ z8 F. y- uend
4 F2 @1 @1 Y0 }! t
2 p! H$ ~- |: X+ I) e1 a" U/ ^7 l
begin P_mC_clean arriving
0 @8 l+ P* ?  n: t! b$ A: f! j/ H$ b   while 1=1 do
- i$ o  [. C0 P' t9 n   begin
$ s' r4 c/ w; a7 C) c   wait for 90 min
, D% v+ ~; R" B* @+ K: k   take down R_mC* c0 V) i8 w* M
   wait for 10 min
% n* B3 d4 W$ ^" O   bring up R_mC
. Q1 m% v  ?9 D& ^% r$ z7 o' \   end
6 W2 C- `. s+ X" Y* u8 ]  ^. @8 Zend
; r! r( U: ~0 S9 ?* j
----------------------------------------
8 y6 k, W6 j, u) K
. A7 }! O: x* {, RExercise 5.98 b3 C3 q9 `7 y7 @+ j
4 f- p+ g" B8 H
8 Q3 j' O  A. d! [8 G5 E
Create a new model to simulate the following system:
  V6 R% c' }2 {6 E4 U) zLoads are created with an interarrival time that is exponentially
5 U+ D2 z% }6 m$ h, z% tdistributed with a mean of 20 minutes. Loads wait in an infinite-1 @* s' A  W7 K! w- o+ c/ X
capacity queue to be processed by one of three single-capacity,
$ P7 m; B3 f3 T* yarrayed machines. Each machine has its own single-capacity queue
( Q* H3 v' A3 O% Mwhere loads are processed. Waiting loads move into one of the three 4 @$ G, D" B6 g
queues in round-robin order. Each machine has a normally
, n$ ?* x: ?6 K; J4 ^& Z2 }: ]distributed processing time with a mean of 48 minutes and a standard 3 S- E7 E1 T, X  c/ [4 J
deviation of 5 minutes.
. W& u+ a' E3 w* M: EThe three machines were purchased at different times and have , q3 S) ~9 |: G3 b) i( a
different failure rates. The failure and repair times are exponentially : \1 U+ t  x# r* `1 ^
distributed with means as shown in the following table: 2 K) N+ s' T; ?- z! g  I* H
Note The solution for this assignment is required to complete ! D* |" o: O, v  M
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
7 R1 j0 Y  r# e9 Syour model.
! Z/ b" E6 l( Q( `/ K, [* [1 A4 N7 k) o3 ^* ^* W; \+ Y' M2 q0 l
MachineMean time to failMean time to repair
1 x" J9 }. h) j# X+ {A110 minutes      5 minutes
) }: e! e+ ^8 z, S6 AB 170 minutes     10 minutes4 V4 u$ ^" q) _9 n/ i
C230 minutes      10 minutes
2 }4 ~: _' R7 W1 b$ B; @3 {+ ^9 z6 {: X
The machines also must be cleaned according to the following ( \5 Z  C' a4 |% ~* ^1 j8 \
schedule. All times are constant: 9 p# l/ M% @. @" _; i. ^
+ U4 w% ~8 ?9 I% i5 t0 U
MachineTime between cleanings Time to clean- _! ^, f& o% K0 j) C$ g, D3 [
A90 minutes        5 minutes7 x0 k$ @9 r9 x6 D
B 90 minutes       5 minutes& B1 V2 P3 r% [7 t% c8 `! @9 w; o
C90 minutes        10 minutes3 V  [7 h4 P5 e0 W8 ?4 p

4 s' S2 m( @+ u) B* }+ i4 j# APlace the graphics for the queues and the resources. 4 t9 G' h  l: r9 B; h
Run the simulation for 100 days.  V3 q. G4 }, u  ]* I
Define all failure and cleaning times using logic (rather than resource
3 ?1 F2 }! H! }8 \! fcycles). Answer the following questions:+ |6 w' ^. p2 N+ w6 \
a.What was the average number of loads in the waiting queue?( i9 N+ n7 `" F5 A3 l
b.What were the current and average number of loads in Space? " _% U8 U# ]8 _$ ^6 K6 ]/ C. b; u
How do you explain these values?
+ k( {( M3 r, E2 @3 g7 x

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) J& H5 Q; d3 K6 U, C1 y6 R2 i" A
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ h/ ?- A; I+ |/ r' Y% H这行好像也不太对,各位先进觉得如何呢?
6 T3 q# A7 x- N2 R$ v1 `4 F$ [8 f9 S' O4 C1 b% Y1 L& \
begin P_something arriving! Y2 K' D+ a/ q: i
   move into Q_wait5 \/ W: n+ Z: z% x2 \( L1 h
   move into nextof(Q_mA,Q_mB,Q_mC)
# F7 B3 }0 j: Z   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
! o$ w6 Y2 z5 g3 O% J: F. N) W. z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 R" @% W, s) }end
! n. h! n" d' j# Z/ u/ |* X7 h6 e+ D. D/ W
begin P_mA_down arriving
& ~, [+ w( d3 q+ j+ Y   wait for e 110 min* F: B' C: ^2 W4 {! `+ Q; U: ?" @' i
   take down R_mA
, d4 A" _" a9 a( s- `9 t$ P% d   wait for e 5 min
: z9 A5 `) p$ O4 ^$ S3 s+ G* k   bring up R_mA
6 c0 t, b6 ?, z4 a# R% Xend* r6 _9 c- C4 p0 E' W
3 B( D  G9 i* S0 w3 l4 T6 w
begin P_mB_down arriving
" N: _9 O: I; X  s6 m   wait for e 170 min
3 t8 G4 O0 o) W9 O   take down R_mB
; d1 @) E- h1 ~1 K% ?7 E) ^   wait for e 10 min* I4 y0 l+ w& E5 ]* F( q/ D5 F/ J
   bring up R_mB
) I- z1 K0 D% t$ z- Uend4 t# Q  x) y- S7 K% A

" Y4 P  w) a  _; }# pbegin P_mC_down arriving3 U4 x, U; I5 U! x2 J
   wait for e 230 min. B8 q; z# M% \( P& U, f$ i
   take down R_mC
& R. s$ C8 [, M' m9 ^   wait for e 10 min7 K; L" O9 w% P, d( U. @. ^% |
   bring up R_mC
2 f% ~0 G5 u  E& q9 L; m0 S& v7 c  Gend
5 q0 a+ I1 v; J4 }5 z4 c5 _" k4 C% c' \! l2 H
begin P_mA_clean arriving0 r: k; B  U$ T
   wait for 90 min; @; r0 e3 W2 x( f2 j9 N+ G% o
   take down R_mA  d- m2 h6 Q1 w  D9 D* o) ?/ s
   wait for 5 min! i" z0 Z. W( r: r
   bring up R_mA
) u! G! A- N6 @+ y. Qend* s; ]; W7 ]. P% Z

! @0 P& x, e! n9 f/ Bbegin P_mB_clean arriving
+ j( x$ h( J$ v2 R  y+ U   wait for 90 min! p( T0 @& ?4 t' u) D& j
   take down R_mB
" q5 Z! e+ _& Z/ _   wait for 5 min
1 B7 y- e. T7 z( r5 r   bring up R_mB1 Q# y+ |! T6 {
end
# ?% _, B( q3 O# n( i  z% q" h; x
begin P_mC_clean arriving
6 i! k/ e: {4 E4 j$ A) U) s$ E   wait for 90 min5 D8 T7 o5 K" U$ U6 [# h. J' O
   take down R_mC7 v3 a8 n$ w3 f# J1 e
   wait for 10 min  |8 ?# |: k8 O" z- i! f: I: O
   bring up R_mC$ z- S/ b, U  x4 l9 \4 r
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 U. T! u' W5 I* t" X   move into Q_wait
: q9 A" G0 y$ X$ j$ K   set A_q to nextof(Q_m1,Q_m2,Q_m3)- ~" C3 v/ V3 H# p
   move into A_w9 p7 s/ W/ B$ {$ ?9 t* t
   if A_w=Q_m1 then use R_m1 for u 48,5 min
& q: W/ X& F! J5 l, L2 ~   else if .....then use ....for u 48,5 min
6 d% N$ x1 l, B1 i' M   else if .....then use ....for u 48,5 min  , Q6 W6 m- C9 z2 Z$ ?! u5 p
   send to die+ U8 o5 U  X" N1 [2 z
end
$ [  t' z# o, l* t, [+ Y$ _8 S" t6 d( B
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-28 02:33 , Processed in 0.013076 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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