设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7641|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
/ ?7 D2 g% x/ E+ e/ O
4 K5 h& l. U* \' o' ^( T2 ^/ \$ A8 U* N底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 b  t: T; R& b, k' Q% {8 v- o2 _- U: c1 o6 L/ S
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!, u4 `3 D9 K. f, f9 ?

! g- q/ D4 k1 x* S( d( p% U% ^* G; z
--------------------------------------------
) {' b  X% F. A9 n5 ?" Z3 K' T2 jbegin P_something arriving
3 V4 |& N. f8 O3 A7 D+ h: k/ c) i   move into Q_wait% n# d+ t9 L5 K/ @. w  c# e
   move into nextof(Q_mA,Q_mB,Q_mC)# T5 l, k( x: D! L1 l" K8 [
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 s0 |7 E* T0 a/ c0 r
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- H) f( }+ e9 y
   send to die
  A" E8 T. ^# N* E, u& {end

/ g% l+ _! {% r % d& T/ v# C. U1 c% ?5 C
begin P_mA_down arriving
. v% ^( t5 P) Z. d   while 1=1 do 8 t' z$ B) ]' S, D+ Q
   begin
1 h! |0 ]' x! N9 a+ I8 s* V   wait for e 110 min
0 C+ m+ Y4 I6 u) ]5 u' p: _# v   take down R_mA
& E  Q+ I/ D" _, `( y   wait for e 5 min0 ~/ O; q6 @. k. t: _
   bring up R_mA  t+ o" J* ]: H8 v7 _4 O
   end# e& G. |( @7 T, G8 Y& n
end

0 N8 w: u. [2 w: ?# ?
, _0 x) r& F+ p4 n* U8 {begin P_mB_down arriving
) {2 {: d, w' o/ l! v/ S  L   while 1=1 do- v. x3 |: y/ \
   begin
' j# F8 F6 A8 ?1 H) T; G7 c   wait for e 170 min+ _0 K2 J% B3 o& m9 S7 P0 ~1 P
   take down R_mB
) x% o2 J# A3 m" k1 n   wait for e 10 min0 x0 D2 k6 K0 e" ?/ }
   bring up R_mB
2 M' f5 |, n* ?   end: ~- q7 n/ Y9 z' W# G/ [7 F" h: }
end
  S, c7 j9 S( Z" [
) T: O6 M  k2 {9 K4 r' j; K! f
begin P_mC_down arriving
1 U$ ]) Q; c9 S2 M( Y6 J   while 1=1 do
  d: F! {: }3 ?6 ]1 C   begin
2 T4 Y3 ]$ h) X1 G7 ^. _; e   wait for e 230 min4 C! n0 S: o5 J1 z" Q
   take down R_mC, G6 Y4 _5 f8 Z2 v1 B$ A
   wait for e 10 min
3 N* j6 J& @- i; R   bring up R_mC! i, z3 o* i& P
   end5 Q/ B7 e7 C% R9 l
end
1 I( d5 ]+ O0 K5 l$ g' Y
+ _) R9 N) B9 o4 N
begin P_mA_clean arriving
4 P% u* P) w5 @$ ?6 |   while 1=1 do6 S4 ]& l, g3 y$ I5 l6 \0 Z
   begin
* g) R9 ^& d  o- L3 k   wait for 90 min  a( L- a6 Q" V. h3 r+ X
   take down R_mA% l' a" X5 }5 l5 ]
   wait for 5 min. w+ T' G0 M% E, _2 K7 D& b
   bring up R_mA7 d7 Q. e) Y9 F. ?2 S2 l
   end
9 Q1 h8 y# p% t. ]7 U* b+ Y& Aend

% i& N. ?7 n, K) `
' a2 q3 Y) ?" V7 Mbegin P_mB_clean arriving+ g$ W8 \% I) }' H+ u3 N0 u; ]
   while 1=1 do. P% s1 ~9 Q( _+ w) [! G  v1 l
   begin0 C. G7 H4 W8 b  m
   wait for 90 min2 _* J! t! y/ y  n+ w9 R- ^
   take down R_mB
" C2 m8 U, z* I2 }/ D  `9 b   wait for 5 min
: Q9 \7 K1 R6 o! }! L2 B   bring up R_mB/ q! Z* e7 R7 e% Q- j5 i) X! l+ D
   end* t- G; s+ C2 u9 Q5 T9 \$ J
end

! P2 S- Y( k- f+ m$ l' Q
# R6 A9 b( x. Q0 r5 ybegin P_mC_clean arriving% \9 ~# ^1 S% E* t9 t
   while 1=1 do* F$ `$ {0 F; [  d' @+ l
   begin# s* ^- `5 I5 X) z) ?0 E) T
   wait for 90 min1 z: b7 }3 I: U, I5 H
   take down R_mC3 \! h! e. g" F3 i1 R- e5 ?! i
   wait for 10 min
5 _! t: u2 `0 M, |: z% Z/ G   bring up R_mC  C$ F4 Z1 V5 R9 ~
   end
& k# A+ K, h. Iend

- C5 Y2 w/ C' ]: l. K8 m9 m' s/ r----------------------------------------
& b  o( G0 m9 z% w( B5 M 8 _' C$ p( N% i1 _& _4 Y( S
Exercise 5.9& w" _1 d$ j, V

2 S3 F2 M& j; e- Z! A$ g; m+ |  p: U$ j& C0 W1 {8 E
Create a new model to simulate the following system:
) y: Z+ D9 @# O9 ZLoads are created with an interarrival time that is exponentially
1 F2 u3 \( c8 }$ t, @distributed with a mean of 20 minutes. Loads wait in an infinite-% Y* ?( V) H! U& R* ?
capacity queue to be processed by one of three single-capacity,
/ ?$ c3 U4 N, T: Earrayed machines. Each machine has its own single-capacity queue
- P7 s& ?# G, O3 r0 Pwhere loads are processed. Waiting loads move into one of the three * X( ^- z  V$ ]; E8 h
queues in round-robin order. Each machine has a normally 8 X/ x/ U! @6 ]& X; k
distributed processing time with a mean of 48 minutes and a standard
3 l, x) T5 I& Ideviation of 5 minutes.9 k  r% f0 ]# y% f9 z" G' k! m  s6 }
The three machines were purchased at different times and have
! d$ G6 p6 K1 L: _different failure rates. The failure and repair times are exponentially ! }) T+ U1 I% E" X" J4 s
distributed with means as shown in the following table: 5 {4 }$ V& `' P8 Q3 G- P
Note The solution for this assignment is required to complete
& ]0 [1 j0 e2 S: u5 lexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
; o3 K+ L8 C7 ?6 Qyour model. - r! {$ X0 W! n% p. I, [* }

- n* z; E! {! MMachineMean time to failMean time to repair
( Y% N% B% _1 F/ M# }! A# ?& H1 ]4 t$ sA110 minutes      5 minutes1 L( ?/ v$ x: \* Q6 y4 ?
B 170 minutes     10 minutes* D( W! O( O5 g# o( Z, X* a
C230 minutes      10 minutes4 X+ {4 ]' w8 Y# P6 i

& G! K# R" x/ L4 X9 s- PThe machines also must be cleaned according to the following * y4 C8 W# e) z$ G+ {
schedule. All times are constant:
4 F; Y1 b8 U% l# U6 s$ }  F  `  z/ g0 e* z$ P" n
MachineTime between cleanings Time to clean* Q6 b5 ?5 T/ M% Y1 g
A90 minutes        5 minutes2 O+ w- ]/ x/ n
B 90 minutes       5 minutes
7 `' {# ~' r/ C5 g; n, o  QC90 minutes        10 minutes
5 C4 V6 a# Z- _, [: K$ ?1 [
% y2 m2 t4 Z0 qPlace the graphics for the queues and the resources.
5 W- @4 b/ e( \, JRun the simulation for 100 days.+ Y& u6 P% @5 K" O1 D* E) f" t
Define all failure and cleaning times using logic (rather than resource
! H+ U) G: o8 r. v4 zcycles). Answer the following questions:
# Y5 H2 v  [) [9 d% }+ \$ Pa.What was the average number of loads in the waiting queue?/ t4 l& J) s: @/ p: D2 K$ u; M/ f
b.What were the current and average number of loads in Space?
# J! @% f1 _- ~/ gHow do you explain these values?
) V# @5 L* `! p4 g

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉3 W4 N3 }6 G4 b3 E+ @
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), N' P% V' L$ ^9 X4 O8 Y
这行好像也不太对,各位先进觉得如何呢?
4 _( Y  [5 Y& k( B$ v8 C, y: q  h. ]3 v# \% g* F0 X  b0 l( v8 [
begin P_something arriving, B* ]5 y+ h0 r2 m
   move into Q_wait; S& i" }9 [5 K8 s. V" |$ o% O
   move into nextof(Q_mA,Q_mB,Q_mC)
1 s" o) J, a. m% U* h4 C/ Y3 q% L' L- S   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ j9 `8 \- m9 J
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" c; T" O. B3 G( d# J: cend& @& }! p8 s$ f* |+ G3 V" w0 Z

' z( z+ i3 A' I- `( Vbegin P_mA_down arriving
0 t' @1 a9 {& J5 z, a   wait for e 110 min0 u  j, m- ]  s8 d  O
   take down R_mA
' z+ s5 H7 d& B. ?4 s" b   wait for e 5 min
1 U/ Y; k! F8 [& ]: k. C1 M   bring up R_mA
  g# t3 W- W5 P" Uend
" r7 z2 @3 b- j& \% |5 v2 h; _! {0 w3 C/ F$ s, p  N
begin P_mB_down arriving" U' T+ v4 q# m1 w
   wait for e 170 min8 V+ f' E' D% @$ n, e
   take down R_mB1 M1 }0 j+ ?$ m3 m2 q6 N
   wait for e 10 min/ X  V. H. ], K6 W0 m
   bring up R_mB4 u  k& B" h( I2 I6 Y
end! R& [0 f9 X$ |) @3 r$ X* u$ K0 z2 z
% n: `2 J+ Z! a
begin P_mC_down arriving
3 e# b3 D6 H% d: O7 x! Z   wait for e 230 min5 o) Q+ W% a& A8 q, }% ]
   take down R_mC
& H* V- K. e. I; G) s. Z* ^3 [   wait for e 10 min
3 n( v$ F( }& o" p; x   bring up R_mC+ ?1 U+ k% k( l3 Y
end
* C- G7 d1 ?* d' A6 l/ V1 d
* w7 L4 b/ F$ `- Rbegin P_mA_clean arriving
- ^" w+ O# u0 a" k+ S   wait for 90 min
9 g, \) Z3 H  `1 ^' }; R0 R' }   take down R_mA
6 x: l8 c9 k8 @8 y   wait for 5 min
6 c! I; h4 U: J' P) ^0 @   bring up R_mA! r' y& v+ G2 y# z. X) b
end
' k4 p- _- r* C3 J* i7 r& B
0 }$ d- r& e3 Z/ Z2 m- u4 Cbegin P_mB_clean arriving4 ?% R4 X* V! V6 E3 M
   wait for 90 min: }8 l9 a5 d- C3 V, ]
   take down R_mB
4 ?7 }5 J9 E3 q2 S: I   wait for 5 min
( S1 ^. N* m. s; u  j   bring up R_mB; {; ^; M/ {! y: K
end
3 D% U- C1 ^; q. ]: z  n. h- {4 K- x+ B) U
begin P_mC_clean arriving
0 O  q& O2 N$ {: {* T& ^8 R   wait for 90 min
0 |, `* t8 u7 v8 Z  M4 z   take down R_mC9 a# u8 R+ V; y; Y5 m
   wait for 10 min& p  |+ h% M6 l0 ?" m
   bring up R_mC8 {) D9 ?# L7 p1 b4 K: n' s5 e
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving1 D2 {& N" k3 w3 X% L! S$ s
   move into Q_wait
1 F4 [, f; U6 Z9 l1 B3 y5 H( g   set A_q to nextof(Q_m1,Q_m2,Q_m3)
& m" t( P$ @( [8 ]& y2 t& t   move into A_w
3 y/ }" m8 x* r   if A_w=Q_m1 then use R_m1 for u 48,5 min5 `2 c4 B. N  I( `/ r/ ^+ c
   else if .....then use ....for u 48,5 min# s1 k) p- s5 ], \0 A' R
   else if .....then use ....for u 48,5 min  $ F: \8 d: K: ?3 r
   send to die/ N) D9 A" U0 v5 E! q  K
end
# s7 I" W; I$ d; Q
8 e4 m6 s. H/ e  p+ @( M/ j8 c7 b供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 18:58 , Processed in 0.017420 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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