设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7095|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
3 r% \4 D: Z8 I7 D2 [/ ?6 S  `1 Z
2 Z* j! b" U6 T' e, `: t底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去) |) q' s# [  T

" m' p; S  j8 [: L; b不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
6 ^. `* d+ B3 F8 K! Z' [* w8 S* Q- \/ H7 Q" K+ U( s% y
--------------------------------------------$ `) Z6 B% T( o+ t; r
begin P_something arriving! Q4 q) h+ T: f( Y; B# F3 }6 d
   move into Q_wait" D- s: W5 z5 g9 h+ q! y' z. t
   move into nextof(Q_mA,Q_mB,Q_mC)
( E& A3 @$ l9 J7 E/ Z# y3 }* C   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; ~/ x! p7 b& |6 t* \. _( N
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); @* d8 q5 K" P- X( d
   send to die
: c2 _2 p) Z9 b% i9 Pend

! b! S1 C& D3 F9 ^
) j& j$ Y0 z3 x9 s, _% O" obegin P_mA_down arriving
5 W% A  R( d- J1 X   while 1=1 do , f! N$ M, V2 z, ~: L5 r- K
   begin; D- a8 C4 b0 X' E' M; a" y
   wait for e 110 min3 m. F/ P. n5 O( N# [% m
   take down R_mA
8 S( q3 a! v; T" T" V   wait for e 5 min
8 ~0 P/ C" \3 A: S1 g) A! S   bring up R_mA& k0 _0 v  {0 A( ?  C
   end
3 F. Q  [: ]2 s6 k+ k- L% `6 Qend
2 I; ]- ]1 M  N. N) {( N
0 o" W' l. X5 N0 L0 ?0 ~; W: h
begin P_mB_down arriving
3 S1 S4 P. i+ F+ M8 ]0 }1 k   while 1=1 do
# o3 O+ C7 Y& c4 n   begin. L# U, j! D5 ^  O' Q. t8 L: J  k
   wait for e 170 min5 H* H) j- K$ e8 X% J% g
   take down R_mB
$ B' E; d% P( M) U: \/ z1 ?" ~   wait for e 10 min4 E7 d- I! X7 q: a/ r
   bring up R_mB
7 O1 d- Z  h' N% F% }7 n% c$ `   end3 s. Q0 f8 X& d& S* @
end

- }! o# Y# c2 _) Y! ^0 Q$ l
4 Q. n% t7 t6 L2 `0 y, t( ?" \begin P_mC_down arriving
/ d  T/ ?5 ~! r3 n; ]   while 1=1 do & D7 e5 U2 ^* A! @3 j4 \+ Y% K! {0 c
   begin8 t: E; ^$ K/ X' J- u
   wait for e 230 min
' \% W& b% }5 m8 A) [   take down R_mC
* d8 w6 t! U: M) D   wait for e 10 min
* {$ j! p4 F  `) W. }   bring up R_mC
9 [& A" l1 z9 G( |8 m1 Q/ P, \   end' ?) V4 i- o$ H/ A- R
end
% k2 U! w0 S; |" N1 b2 N4 T

9 R* O- Q& ^/ [( a: A7 ubegin P_mA_clean arriving0 ]; ?; T/ L3 _. e
   while 1=1 do
# B1 j1 M. ?' E- O, w0 _! y; c- J   begin
8 L; b: ?3 Z0 v   wait for 90 min
4 J, [5 e$ [+ V7 Z, _   take down R_mA$ a9 ~* ~! @" z
   wait for 5 min8 o, z, Q) M9 `( L0 W; V% Q. X
   bring up R_mA9 V% b/ ?% B, l: L% J! {
   end
4 s$ K& b. M* h1 }1 T8 j% xend

$ k  N% G/ a* ^# f0 O% J5 T, P
  i. _- j6 g2 ]' S% J( Hbegin P_mB_clean arriving4 W' Q# ~7 [$ Y+ m2 l
   while 1=1 do
$ E9 _" y6 y! @4 s6 U9 u   begin
. s5 G) l- H% a( q8 ^, a" u   wait for 90 min, ?$ f2 Q/ N3 `
   take down R_mB; K! Q  ?: A% d5 T8 ~
   wait for 5 min  N. k1 c+ h* d3 J( X& w8 j
   bring up R_mB/ k8 k8 L5 F* _/ K
   end/ `( e4 G# M# a  r3 ^: w9 B
end

# l' O4 x& l. Q7 C
5 M+ H/ @7 K9 m/ ebegin P_mC_clean arriving: w# R" Z& S0 R
   while 1=1 do
8 q3 @) k7 B+ @4 \. ]$ S   begin+ r7 r) S0 R2 `5 C; P: R- Q( s6 K
   wait for 90 min1 C0 F. m, g: Y! j1 J% f) O
   take down R_mC; \) j1 P6 I+ D1 z
   wait for 10 min
( E8 a1 j6 E0 E9 t, @  Z9 \1 }1 t   bring up R_mC
- w1 d2 m: M% p9 X   end. a7 F. t  v+ N$ e
end
; d: C5 Z* L! F7 S, f' U
----------------------------------------* J3 S% I. p" A! }+ {/ `

9 v9 V) X6 b2 D6 C3 `+ nExercise 5.95 h% v$ a1 N& q  t

) T1 P# v( s9 n8 X8 Y
% M, \6 k6 L  P$ u/ h. x2 ]Create a new model to simulate the following system:
+ {. o8 U# w) T( T; w, t4 c  F6 r/ bLoads are created with an interarrival time that is exponentially 9 _4 [1 I( {$ e5 L% p+ ]
distributed with a mean of 20 minutes. Loads wait in an infinite-' F8 I- [; w3 a6 `1 B1 Z( Q# L
capacity queue to be processed by one of three single-capacity,
1 U' W, E" l* Qarrayed machines. Each machine has its own single-capacity queue
  [% _) T4 f7 f. c- I! P6 Lwhere loads are processed. Waiting loads move into one of the three
, ^% h' z9 j  P1 A" ]queues in round-robin order. Each machine has a normally
. [1 ?% V$ Y% K* a7 G0 Rdistributed processing time with a mean of 48 minutes and a standard , I! A% x, y6 w# C! Y  O" r
deviation of 5 minutes.+ ~$ z5 m8 L4 `6 s% f0 V3 A# N
The three machines were purchased at different times and have 8 P1 l: C5 Y# o* _- t/ Y  r& a9 _
different failure rates. The failure and repair times are exponentially
) E4 e, g  r8 T/ W0 d( y) J# udistributed with means as shown in the following table: - u9 n: A' P8 E% G5 S
Note The solution for this assignment is required to complete
* Y7 d3 O1 g, Y4 \exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 R0 N& `: b# M# Y5 q7 syour model.
6 s5 S" J1 i( x# |* v' s- s& m
! p- A. k8 h( u7 c/ kMachineMean time to failMean time to repair
9 W; \% @7 e2 C) R9 TA110 minutes      5 minutes
; g. x, `0 H8 oB 170 minutes     10 minutes% P0 L0 u- `2 L
C230 minutes      10 minutes' s' s# O+ @8 i; {! `, M, @- |! t* ?

" l7 G! @7 D0 ~, EThe machines also must be cleaned according to the following 5 l# W- w( n) C) _& t
schedule. All times are constant:
5 D! J: I7 x6 [/ J5 |  k4 t- ?- o) T1 Z) P, m2 H! |
MachineTime between cleanings Time to clean
4 Q5 r( Q9 i7 V  D9 P0 I" OA90 minutes        5 minutes: ^8 E# G; H+ _4 @, u  q
B 90 minutes       5 minutes
5 B$ S( ?( g5 V# B; S# L, `% yC90 minutes        10 minutes
  p, c# K0 G* w' D# ?* R. A; @# L; Q2 H6 i0 o* s6 Y+ Q( c' k
Place the graphics for the queues and the resources.   q% O# G# Z7 j' P2 A
Run the simulation for 100 days.
1 g+ L- X  @* v2 o9 i! _. TDefine all failure and cleaning times using logic (rather than resource ! T7 C, V- w) Q9 l, c6 v4 f$ {
cycles). Answer the following questions:
( k* D# h2 B7 e8 @2 Ya.What was the average number of loads in the waiting queue?
1 Z9 O8 `0 Y: b9 H, D$ ^b.What were the current and average number of loads in Space?
9 {3 t3 M/ {4 w% }0 f, d2 zHow do you explain these values? 6 H) b, r% W- |$ s: M: D

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
  E1 |' ^4 N7 I" Tsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)( F1 K. @% S9 _3 A* T
这行好像也不太对,各位先进觉得如何呢?
7 l! U' e3 T3 O- ^* n; Y' o
% M2 ]* @. N' d+ d8 P) O: Qbegin P_something arriving4 h6 Y4 t1 j  C3 N
   move into Q_wait6 W) z7 ?, B5 `- l4 F# b0 `
   move into nextof(Q_mA,Q_mB,Q_mC) ( L( H7 P8 Q8 t' K  S
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min! C8 z' R$ F  e, A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
4 ~3 s+ D6 ~. \" v, }end9 e+ f+ Q! l0 m# v

6 r% O+ V) ~3 I9 Wbegin P_mA_down arriving6 r0 X% Q( |9 w9 Y" J
   wait for e 110 min+ h( S" _+ C9 V/ e8 ?% ]
   take down R_mA7 N- V8 V; M; k. e$ \# s
   wait for e 5 min2 O! a2 b) U; K# I% v
   bring up R_mA9 w" O& }* m; U4 ~0 U, U- a3 l2 v
end3 R+ S/ w2 ?( E9 x
, p, h7 {" c/ \! G2 j
begin P_mB_down arriving; R4 B! ?. |  ]+ r0 Q
   wait for e 170 min
. p. c% W' }. A8 Z1 S/ b0 D, `   take down R_mB( ]- m( i* j; W, n9 ^7 ?2 L
   wait for e 10 min
* G+ e; @* i# ?& x4 k# S. y   bring up R_mB: h) a* ]! k1 u  ?; Y+ K
end& L4 {/ i  n; v% T: E) T, L) p, W+ q
) S3 i" b! O/ s
begin P_mC_down arriving/ M  E% ?  U1 d0 x7 v* M$ f9 I
   wait for e 230 min
6 M; G' E# O, Q' T2 D   take down R_mC
: X5 [; q- u& ~$ V+ \# e7 t   wait for e 10 min1 S5 U$ X' q- N. W1 B/ ^
   bring up R_mC
6 a2 ]$ b6 E2 _" p; Wend/ e9 @- ]  i- m# ?& z" j) }3 ]! J
0 @; S9 {! t; Q: O3 {
begin P_mA_clean arriving
( H; f$ L6 A. w   wait for 90 min8 H) I# c5 C$ C* C3 {/ n4 X
   take down R_mA# H; O+ D+ d2 m4 W
   wait for 5 min% p9 H+ b0 A" y& j& F% ~
   bring up R_mA
; C  f3 h8 p0 S; X7 }end
: C' i& z& z- z1 }3 V% k- ?* n; a" D5 [7 j  w$ O( ~
begin P_mB_clean arriving
8 {  V8 ]5 Z/ w7 y  P' M% m   wait for 90 min& X- t+ R' A1 r: G0 L+ z* t8 }
   take down R_mB
+ T9 w) E' R' V3 E7 h- b   wait for 5 min
0 k! r6 g( ]- E   bring up R_mB
9 x9 z% R- g0 C8 @5 bend: A- r4 S" Q5 o1 c( @* h

2 y( B+ j6 {1 o, q+ K. B( mbegin P_mC_clean arriving+ F1 ^& l1 Y, s8 ?- D
   wait for 90 min
  v- B+ [( j% Z, {   take down R_mC( M9 @, I7 M, ~+ e2 q8 b% h
   wait for 10 min1 |7 y3 C. R* y: x% I
   bring up R_mC: E* B" m# Y$ C
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving- ~, k* u! w5 S7 l+ |
   move into Q_wait5 U1 z* G% e2 b+ Z* t1 t- _" M7 H
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; |1 O  p9 }1 {. }   move into A_w5 ]  M: ~$ N' F' e0 y: W% ^
   if A_w=Q_m1 then use R_m1 for u 48,5 min
( S: F6 {& p2 I/ h3 S7 v4 N* m1 z   else if .....then use ....for u 48,5 min
4 t7 N0 [" k" ]9 A8 ^0 A   else if .....then use ....for u 48,5 min  5 H  c  L4 `+ ?5 B' U$ k( G
   send to die
# ~6 g2 n! t! Q- Z5 ]3 B# |' fend+ m* o+ ?% f' [

4 @) m# D4 O; C" f5 p5 ?$ o# X: E7 S供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-29 21:50 , Processed in 0.013185 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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