设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7613|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
; c5 O9 `' O: n# M9 H5 H& I3 h8 x7 x8 s+ w4 S: o: E4 L
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去3 N/ U. ]6 m: [

0 D7 T5 d* V! @! i; ]* J6 V不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!- C8 F: Z) y# L9 s

- y; E: V4 d* j" P% `8 E
--------------------------------------------' V" X2 `- s/ e  J  V' Q
begin P_something arriving
6 m7 A  l. H1 _# }! g* W   move into Q_wait
) i& a" E2 I+ q8 `   move into nextof(Q_mA,Q_mB,Q_mC)
& ]/ m) n0 g+ Q" i4 y   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min8 P( A9 @6 e' D7 K3 h9 z. _
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% ?+ p" v  @8 z* m) A2 [   send to die5 Y8 c  U8 [5 X4 _, l" I6 n
end
4 L, Y- _+ L4 R/ X' a) g5 M
5 _. ?7 P) f. t4 T
begin P_mA_down arriving
/ N' t- d; p! b" p$ }9 b2 }   while 1=1 do
" J6 N: {: `9 J+ ^, V& I   begin
7 @5 a& L- A, l6 z1 ?3 @   wait for e 110 min
8 q/ j0 d6 ], Z* M4 l$ j; |   take down R_mA6 C3 I4 S3 b( ~, Q* m
   wait for e 5 min
, z3 q: [2 x+ W  S& Q   bring up R_mA3 R7 R* u, K& D; ]6 b" v$ J1 H
   end0 D2 {& p* H$ @$ n' ~3 m
end

4 \) ]( d5 ~6 V. Q( U# g - a; ]/ @# y' A' U. G2 I
begin P_mB_down arriving5 U" @" @, i" D  T) N1 K! y
   while 1=1 do" C( r5 g# X, T
   begin
8 P" O$ }/ y0 ?2 b   wait for e 170 min/ c! H0 B  f/ d' N7 h) U) g+ n
   take down R_mB2 g5 h9 ]0 b& s$ t, K
   wait for e 10 min  f* U4 L1 q" u
   bring up R_mB+ q! y, b& ]& Y8 o
   end
. }# w$ f3 E2 J( \+ R" `1 v# v* Uend

( x- C4 [% @5 ^) ]# U
, p+ m- s! C0 ]6 V4 F! l& e9 x5 x( Ubegin P_mC_down arriving& E* Z- R8 U" h" g: r; G/ D
   while 1=1 do , b* q3 m! O5 w$ t8 j, w
   begin
$ K) x6 ]7 m4 }/ `0 H   wait for e 230 min
+ N7 {- E" h! n   take down R_mC) z. p8 i3 @$ N5 Z& l7 G
   wait for e 10 min
! x& e  F7 K& |! {2 a   bring up R_mC- x/ ^% V, l8 F3 V
   end
" L& t0 b! D9 w9 M" T4 k# z2 u) Eend
. s9 w- s% l( L! Y% I, q; F3 W

* ?9 ~7 C! Q# E* G! e2 Sbegin P_mA_clean arriving0 t- A8 G  Z. C8 `
   while 1=1 do
6 i- p! ]0 o( a   begin* u6 U. F# e# ?! m
   wait for 90 min0 k, Z' I, L# X; D
   take down R_mA* l* }+ F. v: Q; R  l
   wait for 5 min; S" Z6 G. Q, S- J' ^4 a/ A
   bring up R_mA
; R7 B9 P  B; q- Z% x   end, C0 }. {" k' f% X; J+ o, r
end

+ f( }& s* \( @6 ]1 k. y  ]0 G) i% e8 U' D ( {# z. h" h2 _
begin P_mB_clean arriving
& N+ p) i# I2 d8 K& E) E   while 1=1 do; K! @7 N9 J, g$ I* l$ g
   begin! U' A2 X5 k) Z: L( f) `2 _
   wait for 90 min1 [% z9 _9 L  ^1 H
   take down R_mB
9 d: N# |: e* u& i   wait for 5 min
/ d7 x6 Z8 |; ^  p5 S   bring up R_mB
' ]% e% [) y7 u# d: w, h) z8 s8 @   end
. h, G3 `6 C7 Y6 send

8 ]4 g% d% y$ m% [; N7 g. \
6 I6 b& L; M/ h/ e1 M6 sbegin P_mC_clean arriving$ _. I- M2 v) h* C
   while 1=1 do
+ e' o3 n( x) P: {# k: O1 L   begin
: r2 Y  J$ G" L. v   wait for 90 min
& E8 o  W/ e6 A$ h/ c   take down R_mC0 j" }# u  M( K& B. ~1 _
   wait for 10 min
' t8 e/ h9 N8 Q6 H! a8 Q, Z1 n- y   bring up R_mC# o( s  W+ ^1 O- x
   end! A2 R5 C8 m: o3 U) L& R
end
. g6 ]( R  s1 d+ Z* b' J2 Y
----------------------------------------! T- E- ?) u( i  [% H2 y

0 |2 N- w$ w: _6 I9 L0 `Exercise 5.9
5 J( e( p; Y* [& E
* ~7 I4 _, y4 ^4 W
( X* k& `0 t* e$ ]5 X/ [Create a new model to simulate the following system:
; ~2 o9 A5 _" G8 @4 y* DLoads are created with an interarrival time that is exponentially
6 ^& l1 o2 @9 T4 K2 D: r2 A) Ydistributed with a mean of 20 minutes. Loads wait in an infinite-
3 Z4 u' k* m0 \capacity queue to be processed by one of three single-capacity,
. v  g7 Z/ q, k  {+ C1 @arrayed machines. Each machine has its own single-capacity queue " a2 F; n9 J6 ?* F$ {* V6 D; V
where loads are processed. Waiting loads move into one of the three
1 M  l0 U+ m4 tqueues in round-robin order. Each machine has a normally
2 ?  q1 P8 A3 P% @3 D. s2 g* cdistributed processing time with a mean of 48 minutes and a standard
$ ~2 w/ X9 c2 e6 l7 M2 udeviation of 5 minutes.
" E6 E$ E" T7 S# D, W# HThe three machines were purchased at different times and have 6 V: z0 r* W% c, i) d/ ?8 @7 B' ]
different failure rates. The failure and repair times are exponentially
1 r9 ^6 _2 Z- ~$ G% Adistributed with means as shown in the following table: 5 ?7 C5 m0 ~7 m) L7 g" P" J
Note The solution for this assignment is required to complete ) h1 |) q; S3 ~0 Q
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % [* ^( c" i- a. P; }+ ^3 O
your model.
& L" O6 e: u6 l9 m' e
- [) q7 Y$ x: z1 OMachineMean time to failMean time to repair  Q4 y: @) r3 R0 ]
A110 minutes      5 minutes' k* a( }5 Z3 J! `/ r6 `
B 170 minutes     10 minutes* o0 G4 y. z- n# {8 C6 |- C! f
C230 minutes      10 minutes
/ n, I1 G3 K0 B& ?
6 W: B/ f. {/ p8 g% H' KThe machines also must be cleaned according to the following : c$ o$ Y5 _# ?8 |5 |, c
schedule. All times are constant: 0 q+ L+ L# j3 m
1 ?0 ~5 `4 e5 ]: B4 ]7 J! c+ \$ N
MachineTime between cleanings Time to clean9 I( T/ \9 W, ?, `+ M7 ]
A90 minutes        5 minutes. G0 y. v  f" @' t
B 90 minutes       5 minutes( A. m- L! q, S' R
C90 minutes        10 minutes
9 P0 d8 c9 `, I# I$ r
" a7 s$ z& J4 O4 K  YPlace the graphics for the queues and the resources. * J& z+ w0 F) }' w! D% b
Run the simulation for 100 days.6 f" @5 D) j4 ~# x7 `7 b
Define all failure and cleaning times using logic (rather than resource   _: m0 C$ l: u- |
cycles). Answer the following questions:
1 c: M- d+ t4 }a.What was the average number of loads in the waiting queue?( s% u/ |- G$ R9 B& r! \
b.What were the current and average number of loads in Space?
* q- K3 S5 N8 g; C" uHow do you explain these values?
) U6 V8 W7 k, t8 y; G/ \- Q. P6 z

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ M( A( f( Y0 `4 W" s) ^  @
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* W! s: F% \# G  k3 H) S
这行好像也不太对,各位先进觉得如何呢?
# z; a$ i1 r! A" V2 p4 S
; Q) D$ ]! \/ V8 c& |. cbegin P_something arriving1 b( ^8 k! }8 u) L% h. U+ J5 [' r2 y
   move into Q_wait. H6 }  D, v+ E& K" \
   move into nextof(Q_mA,Q_mB,Q_mC)
+ ]% b/ u$ c  I   use nextof(R_mA,R_mB,R_mC) for n 48,5 min- M( d3 w7 Z4 v+ X
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) * \. E) V3 `: G9 z- }
end
% K$ `* C  R& x! H* _) y1 L2 d4 ?2 E' M$ `
begin P_mA_down arriving
. @! J( q. q! t   wait for e 110 min
& K9 K" l; m/ ~5 P1 k2 {   take down R_mA
& [/ Y  T/ n8 H/ P' ^) f* ]0 v   wait for e 5 min
5 n# Y: O# A+ Y& [7 L, i  P   bring up R_mA0 O) C8 ]6 b- [- ~$ @
end
. Z2 `4 v0 C$ \/ _9 S7 @1 \. P# ~5 t; W0 U+ i9 |9 b- p* M
begin P_mB_down arriving8 e3 O: X/ x/ x
   wait for e 170 min1 {# z  n- ]/ p
   take down R_mB
3 I# V: i: m6 C   wait for e 10 min) A  M0 V# N( V2 I
   bring up R_mB
( k* }: b) p% F& v+ Wend
/ U& B- i. x. N% j, Y1 ]
& o- g" K0 R. M6 c" d' `begin P_mC_down arriving9 u' m5 z3 Q9 F6 v
   wait for e 230 min4 h3 K+ k: R/ k+ K% u
   take down R_mC
. w, J2 }! ^- a6 V5 F! z3 _   wait for e 10 min" B  V* c5 i) h2 A) Z% C
   bring up R_mC& K1 k; V- N, ~2 q& K
end
4 i% C: f5 c$ T' U; }% n
% a( K+ U8 O, ybegin P_mA_clean arriving6 K4 }9 A* E2 o
   wait for 90 min7 E1 S8 O$ _+ Q+ O$ _! [
   take down R_mA: ]! H3 h8 i# F
   wait for 5 min
$ D7 X4 o/ ~2 B   bring up R_mA0 @; R( k5 l: t2 R/ H5 i
end
+ h$ @. y7 H' q5 q8 Z3 N  `9 m+ k7 `; ]# @& e
begin P_mB_clean arriving7 O7 P5 ~" N; l0 ]$ B; J
   wait for 90 min# B5 k$ r: _1 Z
   take down R_mB. e6 l7 ]" ^# \$ _" i, U' `
   wait for 5 min
/ R( a! y8 h% A9 R! _- h   bring up R_mB/ {% \% \- T6 I  t
end
9 f, U& Y$ J+ {9 W6 Q3 v
; g; X; Q3 c# _; k7 _; n, d3 Cbegin P_mC_clean arriving6 a- g) W! J+ m4 l5 Y+ L) D& j" r
   wait for 90 min- m. H5 I5 J6 ?, q2 ^
   take down R_mC
8 w6 h: U" C/ k* e   wait for 10 min# }* w* y/ y0 C( S' u  b, v
   bring up R_mC
% [, H, Q7 y! p# \end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
/ A8 E9 R, k/ M% o2 c" [+ Y4 y   move into Q_wait
6 P6 U* k2 R' |7 ?   set A_q to nextof(Q_m1,Q_m2,Q_m3)
$ D) @9 Q( m1 T9 V   move into A_w
- ^; |  `* g) ?) {/ y$ ?/ ?   if A_w=Q_m1 then use R_m1 for u 48,5 min
4 _5 T/ H) N2 `3 a; e   else if .....then use ....for u 48,5 min
" H, W; l  ^$ Q( E+ l$ U1 }   else if .....then use ....for u 48,5 min  . y1 K% J! M3 e1 T$ Z# D' }
   send to die9 Q( K0 e) m1 q0 ], \
end7 n( Y, A" a4 A/ l4 k1 I
9 q+ X- ~  N. m9 o
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 14:04 , Processed in 0.016377 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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