设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7372|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
( x1 \, d. }  o+ J0 {8 ~" A4 a0 M, y5 r- I
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去% U3 o3 o2 A( ~# I/ A' Q. }
5 \6 h& w- P& z6 _& L4 o( J
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!0 W) r# j$ k" k( K
0 J: W  D5 M+ [4 Z$ P
--------------------------------------------# z, \2 s+ w, O6 g; j
begin P_something arriving
' Q4 J7 f" [1 L: R. ^) l2 B   move into Q_wait
9 l& s+ W, l0 r# R' v3 J7 S& S1 \   move into nextof(Q_mA,Q_mB,Q_mC)
' |3 Q! [+ ?# h+ Z) X. n/ M2 C   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 o: g( B8 c1 ]' F
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% J. d  J& T. m* e/ C
   send to die$ W! R8 M2 K2 _2 ~4 ?; W# H
end

) O( I5 b+ Y  }, w9 F! a- [3 O * }: I, V. _& S* f  W$ J) q
begin P_mA_down arriving
. i: s# |7 _( {3 P1 L# k7 q1 e   while 1=1 do
- u" f6 s0 Y3 @- Y4 `: P! I   begin# Q; `. o  F% ^- j( `
   wait for e 110 min
. K- ~; E* d4 y) [2 k) o   take down R_mA+ l( e8 Y1 j* c" o- u$ k( u
   wait for e 5 min; t: V9 }% J$ ?1 K
   bring up R_mA0 X0 S7 J: E$ T6 m9 g
   end- t0 q4 C" W" j) f7 d8 x8 a3 o
end

( c  A' H" @( v( {  c, z
6 D6 j8 ]( O" H$ c# q. J4 x3 Ibegin P_mB_down arriving
, D  m3 y2 p  ~4 L   while 1=1 do: ~& e& N6 H* I5 P6 G/ B
   begin
1 R  _& y1 J4 d9 N0 s   wait for e 170 min7 h! `0 t5 S  r( i. P
   take down R_mB
/ }! b4 m9 `" B8 \3 V* O   wait for e 10 min0 E1 G( O! d4 X! U" |! R
   bring up R_mB+ a1 [0 x7 A. S( i0 D4 C; V6 J
   end
* y; l: J8 ]6 f  C) e1 u7 bend
  z- l3 G) ~2 U

. R' c: D& s" P( A# B, Ybegin P_mC_down arriving
# l  `4 y2 @- N" }$ k" r4 Y   while 1=1 do 2 [% c7 `& t/ w6 `, {0 q5 C
   begin
( x7 a5 C6 H% K# \   wait for e 230 min# ~1 d  h! }, I
   take down R_mC2 v6 q$ Z! s' k9 [- p
   wait for e 10 min6 e5 X2 H. ~4 v  ?" @) ]; O0 ~
   bring up R_mC$ Y8 a8 N0 v- o7 d- {' @
   end$ L+ D( m$ R1 R7 x9 m; i% O
end
" v% m7 _. b0 N5 r( G5 H, _
4 ~. t; I7 t' z" t
begin P_mA_clean arriving
' a: x$ c- ]5 L* N; _   while 1=1 do
" g1 Q6 w$ c3 @6 c$ c4 O   begin$ `9 _$ W! _( r* ^3 W6 \  W; e$ @
   wait for 90 min( }0 e, n9 S/ i- @
   take down R_mA' b  ]( s/ @! g
   wait for 5 min" X" J: o, S8 e
   bring up R_mA
; @7 J- H/ P6 _! {2 {( P3 \   end7 u( D5 ^  P( V$ S8 i3 R9 |' I9 J! X' x
end

! k. R; i2 S* g. }, M
) D- P: i: ?" K( C. Dbegin P_mB_clean arriving" {* v0 o1 b- H. y$ L1 M
   while 1=1 do8 X! H* ?9 X, [; H
   begin8 k  R8 `* w& c+ y$ P5 |
   wait for 90 min
& F  t$ q1 S$ B5 x2 `/ N5 f6 O" E, y; J   take down R_mB
0 V2 B: [/ K8 b; m   wait for 5 min8 u- g# n4 \# K' [# H
   bring up R_mB2 Q6 e' v$ b8 z( D9 ?. q6 p
   end' k* F5 s4 f, o1 }
end
9 x( r/ _) v" |: z5 N! V, p& T

) T& h& C- S! j8 o( A+ |begin P_mC_clean arriving
: Z) L6 C) i: E/ X+ @   while 1=1 do! P( t- }2 c5 |& i$ s; ]
   begin
; K: e- S6 @% O& T$ o" h- |   wait for 90 min
3 e: M0 G: H: h3 K/ P& V' b   take down R_mC% m6 N& H8 W$ c1 O2 P9 u3 n6 z
   wait for 10 min3 Z2 }; l$ D* q8 e  n  i& l
   bring up R_mC
3 \! f% X* e7 Q5 A4 i   end' ~! u) l" [: T: x6 a4 M% Q9 }' n
end

% n. Q( d( h0 b  ~----------------------------------------  ]& @. B9 c# J" h
* j6 B0 K* @8 r7 U
Exercise 5.95 k8 f1 s0 O5 j
7 Y9 Y$ {2 A5 X$ w# ?- P) s. m

3 N( x5 y, p0 ^" c2 GCreate a new model to simulate the following system:
9 X7 g! x( k1 L  t$ t% YLoads are created with an interarrival time that is exponentially $ G  C2 F7 t8 y# X: v# y
distributed with a mean of 20 minutes. Loads wait in an infinite-
+ L7 L. e: m) p# @2 V, m7 vcapacity queue to be processed by one of three single-capacity, 0 b* B8 R0 ?& z/ D. Q2 W
arrayed machines. Each machine has its own single-capacity queue
4 ^1 G) U, x& jwhere loads are processed. Waiting loads move into one of the three
8 D0 H- p6 Q9 z* [- S* X) pqueues in round-robin order. Each machine has a normally 6 _8 k4 ~2 d2 b$ H- u4 i
distributed processing time with a mean of 48 minutes and a standard 4 }( S* }  n' w* J" s; j' N
deviation of 5 minutes.) E: g, u$ u$ r
The three machines were purchased at different times and have
: y5 q' C" ]+ G1 cdifferent failure rates. The failure and repair times are exponentially
! e+ L) s% J2 L2 v* }! Mdistributed with means as shown in the following table: * w8 z3 |5 m# J/ B# ~
Note The solution for this assignment is required to complete % ^4 Z" t; Q3 R. d
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 6 w8 U6 d  O- [1 W
your model. * n6 L. }% C% _

9 N; I0 d& ]* c5 N# aMachineMean time to failMean time to repair
! z% B3 `0 k4 Y1 y0 ?) XA110 minutes      5 minutes
/ J/ ]( X9 Z# _! _% f. S, I2 z/ A! DB 170 minutes     10 minutes
$ i/ _7 r  x3 Z8 QC230 minutes      10 minutes
% b# }7 l+ s2 @7 ]6 s# i! T2 c/ U7 T$ e
The machines also must be cleaned according to the following ( z1 Q0 q. V' t1 f% C6 J4 n
schedule. All times are constant: % J* z0 \7 T  F
7 G( T, W$ k3 t2 P$ ]+ Q
MachineTime between cleanings Time to clean; N" T5 A3 Z" f( U7 c0 t% J+ R% i
A90 minutes        5 minutes
  ?6 E- K2 G2 d8 s; j1 w: d* h! XB 90 minutes       5 minutes
2 ^- @1 h) p% K& D2 u6 ?% ~- v. ~% {C90 minutes        10 minutes$ S3 `* s% N. I* Z( q5 Y3 V- z8 V
, p# ]6 T) n$ B( g" l# X9 ], _  o  o
Place the graphics for the queues and the resources.
4 Y, C( g# v1 b& }Run the simulation for 100 days.
5 e/ \/ f/ o; m2 r$ l/ FDefine all failure and cleaning times using logic (rather than resource + Y: @5 B- n3 T* U2 Z0 l
cycles). Answer the following questions:# [+ ^3 r9 H! E
a.What was the average number of loads in the waiting queue?
3 h0 r5 L5 w7 Mb.What were the current and average number of loads in Space? 6 ]2 ?2 B& M" p2 Q/ A; }6 j) x
How do you explain these values? , K: `5 I! T* I0 {. W. i2 u

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
! P6 X+ R* ?4 R. Usend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" F% ^# y4 Y/ T3 U& w
这行好像也不太对,各位先进觉得如何呢?% O* D. Y+ e3 N& ?2 ^9 |& [: l

8 Y8 {  F. o! R6 B3 G3 E$ {) ~& Wbegin P_something arriving
) g8 f: u3 A9 B4 W$ p( h& o   move into Q_wait3 h8 H0 r% P7 v& l
   move into nextof(Q_mA,Q_mB,Q_mC)
, Z% o' [' W+ V4 K   use nextof(R_mA,R_mB,R_mC) for n 48,5 min) `) j8 m- U" G% Y0 @7 T% w
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ I1 I; U$ k2 J2 ~- H
end4 R0 Z. E# u5 ]) a0 J

; z6 k/ K0 i' h+ f7 Dbegin P_mA_down arriving# i. i8 P) N/ c: U
   wait for e 110 min# u2 @- y" {' J9 |6 \* z  J! ^
   take down R_mA1 e' i: Q$ x) M, n+ M4 J
   wait for e 5 min! J2 A  ?7 i7 I; H4 r: `4 z
   bring up R_mA
" x- K; u% j- |% |- h1 k0 ~end! I. V( W7 s1 J% H$ X

+ y" _& K1 i; ?) n; c! U: @0 obegin P_mB_down arriving
6 t# Y, ], }! r4 V+ G   wait for e 170 min5 A6 S# t6 `/ j+ h4 l4 z8 Y
   take down R_mB# W1 w0 s% S' I- ^
   wait for e 10 min
# b' \7 g, H1 m( t5 Q   bring up R_mB) ~* e* Q* P( V* @% c' @! ^
end
' w7 S: ]1 f& J2 l/ K4 X/ H4 y% F1 h/ c3 u1 e) a. R) Y) N8 L
begin P_mC_down arriving& l  {  S# H: ~( k* z! N
   wait for e 230 min
- K! B+ {4 @. X, n( n$ g   take down R_mC
( h- l) P' b2 O4 {) y   wait for e 10 min
. s- K4 \' q. |( R8 ]   bring up R_mC
; Y+ U, _7 C2 D$ Z5 ]end& z' L) K  o& }4 i. X

2 J, r6 u, D5 H' p9 X8 g& _begin P_mA_clean arriving5 c- Q, w  U( ^3 d9 j3 [* h, p
   wait for 90 min8 A4 ^7 k3 j/ v7 {* F' h( [5 X+ F' t& _
   take down R_mA
; ]# n  P5 k" o) B: M0 ]   wait for 5 min+ R  j, ?, E6 I5 \" d
   bring up R_mA9 _& I9 S5 {. d7 n" o4 s# V
end
! V! k0 D4 C1 b! N5 N
4 a( n6 C7 t- U6 `* Obegin P_mB_clean arriving( U$ a, s! u! Y/ z
   wait for 90 min* f0 v& G" o' Z9 v
   take down R_mB
" s# ]5 R  z3 j   wait for 5 min4 z. _/ n! N, J$ ~. L
   bring up R_mB
. G0 F2 b, K$ q+ t0 h' oend6 y  O- E5 _( j* k3 t
& l! ^0 t2 G" ^2 @0 g4 k4 W
begin P_mC_clean arriving
. T) q0 T9 C( N7 U0 U4 `, e   wait for 90 min$ G8 k& s1 O1 W/ S+ J; ]
   take down R_mC* j- U5 \1 L% h. i% N
   wait for 10 min
: z* S& I/ r* r# X; D3 _5 d   bring up R_mC3 M; m3 V& _* k4 v
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving+ F9 |2 A1 ]0 [+ c' Z# f7 V: X
   move into Q_wait
* S; l3 P2 O% W  W6 w5 ?   set A_q to nextof(Q_m1,Q_m2,Q_m3)
" @2 K/ _3 ^" V3 W/ v   move into A_w* f$ f  [7 X( t/ z( W3 K* p! }
   if A_w=Q_m1 then use R_m1 for u 48,5 min! }! E4 x3 O3 L5 q0 E
   else if .....then use ....for u 48,5 min
; Z6 V' Q( ~8 u5 @" Y   else if .....then use ....for u 48,5 min  9 i, C5 ~* q0 S5 L) M% s( J8 a
   send to die
( f; u9 y8 O" ~# Y/ c+ \end2 U' U( V2 ~0 M2 g- H
( }1 J+ {9 B5 u2 `. }: a' V
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-16 19:24 , Processed in 0.022427 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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