设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7306|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 % L6 G  M' S/ L1 @" Y" k

' x* w# \- H8 }; Q底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去+ j" K! }( f! O) A- d3 y, v2 r! _
( }; z3 `0 N" q5 @
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
4 G1 a0 |2 g  o3 g- f
! Z. V( ?  M, |0 V: h, j
--------------------------------------------8 x, C8 @- k: G! q- v  J. r& _
begin P_something arriving
) Z. K) v6 s, A0 _- d: ^   move into Q_wait
3 s6 M9 Z5 F  n& _- r5 Z. O   move into nextof(Q_mA,Q_mB,Q_mC)
5 u; N, V" f+ R7 s1 `& }7 W. H   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, c: z" u; t4 L, o3 z4 b9 ~. k
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 r  T* @: G* a  B! }   send to die/ @3 H/ P6 \4 l. `- K
end

9 w0 J$ ^0 j" G6 g, V( R" v
- a: Z* J& d9 D7 F2 L9 K8 ?9 ~, Cbegin P_mA_down arriving- k$ r2 ?5 m" z: `  l# j
   while 1=1 do , q  `2 \6 x  m: K  L6 l
   begin
' D; g! J/ s# [! c   wait for e 110 min# i* i& z, I2 \3 H3 u
   take down R_mA" e' e, L/ w0 k$ |, o& k
   wait for e 5 min
+ }- V0 H% E; [% P+ W( H! P  V   bring up R_mA1 A: Q0 w5 D0 Y
   end4 f0 {# r) O' q( |0 [. k
end
  j6 W; p# Y; B# f5 m6 x

2 m+ ?, R2 ^0 \% V# K/ U, Dbegin P_mB_down arriving( ]& f9 B; W% Q% \& Q4 ~' U
   while 1=1 do# q- z" @" d; H' d
   begin
- A; g. O# n' m, v+ T+ R   wait for e 170 min! F3 Z8 P" p1 t2 q2 r' o: P
   take down R_mB1 _. F' L3 W6 L2 G; U3 i1 t2 P
   wait for e 10 min
& K. L( u, a9 M   bring up R_mB" P) l+ |, F+ ^4 D
   end
1 t/ \7 B  T' _- \3 B5 d- wend
; ^6 d: a+ q1 q, I: C6 h( X# i" m
8 y: _: B4 K3 m5 g% x
begin P_mC_down arriving4 \% Z; Q8 [3 q  J4 u8 k
   while 1=1 do . `# C. c$ |; w0 ^2 M: k& a( y, Q
   begin
# n; P. X$ e, e1 y& L- }  O$ K3 |! b   wait for e 230 min- \( O- o5 |+ z$ v$ C8 b/ |8 k
   take down R_mC' y+ {* W9 t. E' J7 h( D
   wait for e 10 min
: m7 e  U# f; n9 A/ x: R' U   bring up R_mC
4 Q" J; i$ A3 w; i- j   end) d! w" _/ e! w6 w3 v! C
end

: }" K% h# O! e' k; Z. m
; n/ p( M8 e. {+ T4 y& _begin P_mA_clean arriving/ s2 i& W' h9 {" c
   while 1=1 do5 O4 \9 A: W6 e2 R
   begin! c: M! V- \) J6 B$ n2 U7 A8 {
   wait for 90 min
4 D: H/ d( R4 y  X! Q   take down R_mA
) W4 u" C2 d! ?% H0 C& e% C1 G, m   wait for 5 min# Y; [: H* W- S. H/ X0 {
   bring up R_mA
4 ?+ V6 f# G( t  t  Q1 ?0 b6 e   end
( g1 V% T' b2 d% ?% Y; f. V# kend
9 Y6 u0 B# H3 ^
% c& v0 y$ ?7 _( h7 r7 x, o5 E
begin P_mB_clean arriving
& q; \/ L+ F* J   while 1=1 do5 g. M  v; t3 K7 ?3 o' y$ @
   begin4 K( j' U+ r' G! X% J. \1 T' O
   wait for 90 min
5 I: ~% X- {5 H0 S   take down R_mB7 v: O0 J, g0 u% _) Y, C& s
   wait for 5 min0 h1 Z" M0 d% P4 S- x: T8 O
   bring up R_mB' j) V5 X5 _/ Q! u, ^) W
   end
& S* s7 k. E. O1 ^% J' yend
8 a5 m9 N3 Z3 W: k0 Q9 c9 r( k; A
" I7 i  N. t6 Z9 p
begin P_mC_clean arriving  x7 I+ a( {' q7 ~3 u' E
   while 1=1 do9 T! i6 O/ S  Y! F+ b- I) y( D' ?; `% F6 r
   begin% A) B" L# M( x+ s( {
   wait for 90 min1 @" q2 k9 X8 t- c# z' A- a. |) q- C% p
   take down R_mC
6 x0 |" G: u; l5 s  c   wait for 10 min# M5 ^, }- C7 C4 J6 ]/ E8 C8 u2 ?
   bring up R_mC% S. E8 F7 H7 J
   end
# t& I) T  k% c* Z% {) Lend
4 O- K; @! O: s! H1 M5 e
----------------------------------------
/ b* ^8 a/ P' s 2 T: v% p' c3 a. T; F5 N3 D$ Z
Exercise 5.9& K/ |$ E& P! @
) m: A/ X/ A! a' l3 r2 T

  E  l! W8 l" ACreate a new model to simulate the following system:
+ k5 H6 j$ q7 J' r4 Z6 B8 K  mLoads are created with an interarrival time that is exponentially
3 G; M7 B; ?2 s+ G/ @distributed with a mean of 20 minutes. Loads wait in an infinite-- `  }( i# o& r1 C( A
capacity queue to be processed by one of three single-capacity,
" s; o* v- Y, ]arrayed machines. Each machine has its own single-capacity queue
( Q: O" L2 K' o7 I1 p5 l3 s% ?where loads are processed. Waiting loads move into one of the three   W* ?; P, j) a4 i
queues in round-robin order. Each machine has a normally 7 y- T+ q) J6 C( X- K# p9 J$ M) k9 F
distributed processing time with a mean of 48 minutes and a standard
+ n" f  z  u; d5 Wdeviation of 5 minutes.
3 J+ {8 h2 i6 H, j; R: vThe three machines were purchased at different times and have - Q1 d3 Q7 ^7 e, s
different failure rates. The failure and repair times are exponentially
2 X0 e; ?& _5 N0 cdistributed with means as shown in the following table: 7 e$ o" |% M. x2 D+ x) H
Note The solution for this assignment is required to complete
1 j( c, W% J( }8 _2 g# aexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of , v5 F" C3 D9 s. \. y7 u2 e$ s6 Q1 o
your model. $ v; X3 W. H, E3 e$ N1 p! w
: X  [# n( D, I3 Z2 t* j
MachineMean time to failMean time to repair
: [5 f6 M' m7 V% _7 }' {. \A110 minutes      5 minutes- _4 {& p3 z4 H, Q
B 170 minutes     10 minutes
3 I" j! {$ b1 \2 E8 u6 ~C230 minutes      10 minutes) D! M# d9 M! T. ~8 O

5 N( t" B2 i7 W. wThe machines also must be cleaned according to the following & B5 m( J5 S% ^2 \7 V0 [# b
schedule. All times are constant:
3 o6 [2 M3 E8 |
' R0 w7 D* L) J1 PMachineTime between cleanings Time to clean
7 w( Z2 l1 r+ T5 l/ Y! xA90 minutes        5 minutes
, W: N6 C! B2 n- h. ], W, V5 WB 90 minutes       5 minutes
: z, z& q! i7 i& s3 s2 nC90 minutes        10 minutes
& g9 ]6 O3 X1 u8 |8 o3 P8 h( |- q! ]3 ]7 b( I
Place the graphics for the queues and the resources.
' D* r3 B* N9 Y( D  f% N6 HRun the simulation for 100 days.
9 ?% P/ o/ R+ V" PDefine all failure and cleaning times using logic (rather than resource
( f7 k$ I; Z/ e; J# e8 W7 xcycles). Answer the following questions:
/ g& `" h4 P* H% u: g4 b  E$ ma.What was the average number of loads in the waiting queue?
7 j2 w+ \& `4 C7 Mb.What were the current and average number of loads in Space?
& A3 V: M: U8 ]/ r% YHow do you explain these values? 4 i8 T0 \# r# @: g0 }6 ]* J. a( O

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
1 i2 `6 P! c1 O  Q) V6 osend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 z9 _' D2 e& W" Q6 z
这行好像也不太对,各位先进觉得如何呢?
5 M( Y% Y+ t8 D* E" Z
- T! q0 E1 P4 hbegin P_something arriving
6 k( o5 i6 y* N* I0 l2 o   move into Q_wait" {1 D& b" D, D; k) M9 p: `" o# w
   move into nextof(Q_mA,Q_mB,Q_mC)
. o1 N+ Q1 N! A. S0 R   use nextof(R_mA,R_mB,R_mC) for n 48,5 min) y' _2 ?  [3 @) ~: \: q% h  n- y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- y  ^- y# A8 ^  h8 qend
6 F5 i% B. _6 u4 z  ^: S- h2 b4 m3 E; n$ N* q$ x8 Z% A
begin P_mA_down arriving$ h9 s/ p& R% v) N5 W
   wait for e 110 min
; g1 T: l  R* ~   take down R_mA( l' ?6 }" ^1 h# D6 g
   wait for e 5 min1 Y9 c3 i1 m. j6 u) C& l% I# `& V3 F5 Y
   bring up R_mA
( M' G7 @/ t5 K, m$ gend( Y0 `6 ^8 _% a
. J) Y" q7 o9 g" i6 X8 Q0 ^
begin P_mB_down arriving, y' b& O6 p* g/ p) g! X$ V
   wait for e 170 min
2 H# m0 O8 ]. T* Z   take down R_mB
. `$ K9 H' c6 i5 @% m   wait for e 10 min
7 g8 M( O4 u( a1 }& ~) f# c   bring up R_mB
- F( k$ Y/ r6 Pend; f' J  e, W( ^$ u
* ?+ t0 O! c- P' V5 i. t
begin P_mC_down arriving, S5 p& F* V& H
   wait for e 230 min
! G% |  r3 ]7 q: j- _   take down R_mC
4 @1 E- O, R1 B1 t! ]& b; E   wait for e 10 min
, H' N6 q9 N  Y( q3 s3 |   bring up R_mC
+ g: o# m4 N: _# E* f8 Pend
  {" i* M$ o' C+ A2 Z
+ k8 L7 E2 K- P+ H3 ~9 U5 Vbegin P_mA_clean arriving
% f/ `+ W) L/ v+ n( D   wait for 90 min3 H6 z! A8 L0 i$ m2 y# H
   take down R_mA
4 V2 Q2 c8 B3 M8 L0 m1 s3 q   wait for 5 min
& t$ @/ H1 `  m! C  d# P3 @   bring up R_mA5 M1 y( _% X& A' Y5 ^$ Y  F7 R0 N; E
end
- K5 u0 I- Z3 d( p
9 ], K1 ^% U, W! i5 C* Kbegin P_mB_clean arriving
! K  Q9 u& }+ o7 u   wait for 90 min( H; s0 l4 l; d8 l5 J$ ?
   take down R_mB2 F2 L5 L  f" x) c6 F
   wait for 5 min* G" p0 q, O, E$ o' |! H( H
   bring up R_mB% M! Q  S- k$ f9 J0 X
end
% F$ Q+ g6 _1 o, C7 n+ R8 Q9 I' y0 Y* W/ T
begin P_mC_clean arriving
; w! R# u& Z6 [+ _   wait for 90 min7 f0 M3 l8 t4 s, Z- s0 l( M& `
   take down R_mC
  u# C! ?- m) ]& l  v. }7 ~" a   wait for 10 min
# j2 \4 ?8 |( `) I- w   bring up R_mC
0 s* I* J" j9 \! ?. m% ^end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% o2 K& D8 l" X: f; \+ R4 X' i
   move into Q_wait
! b% w" `5 A/ q8 P# r+ S' x   set A_q to nextof(Q_m1,Q_m2,Q_m3)6 _* I. \+ `* O/ @0 [  }3 F
   move into A_w# K7 `2 m: S* o% ]2 k
   if A_w=Q_m1 then use R_m1 for u 48,5 min
3 x6 x) [7 i1 n4 s   else if .....then use ....for u 48,5 min: p9 V; N0 U2 {- x- W+ r/ e& r( }
   else if .....then use ....for u 48,5 min  
1 z: l9 A* }1 b4 K" Y   send to die
$ N* M4 ], P( E9 {end( T- v% ^+ @$ \9 _1 W7 E3 ]

) v* l+ n0 g2 [; x  e- M9 z供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-29 12:35 , Processed in 0.019376 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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