设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7281|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ! p+ G" o0 l/ G) f# F7 H# y( Z* Q
, E# ^0 J" L3 D* x( f) Q" K1 A5 j/ ?
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
/ c2 I( k0 _8 v/ S" X. ?' Y7 F! O' F1 I$ i( c$ ?' ]& m! P
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!  ~* D% }( r7 F* G
% k. V- l- `' \
--------------------------------------------! ^- O5 O* {! [) O. @4 V1 g- }8 O
begin P_something arriving0 v; T5 Z/ t" _8 K3 `* z
   move into Q_wait
9 P# @* m% O: b. p% O" v   move into nextof(Q_mA,Q_mB,Q_mC); j( j) I/ U2 ]1 H6 z4 {: A  H
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min' [9 h! q2 {1 S4 h- f
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% r  K' y6 ^. J  I/ S/ K8 E5 y. L   send to die
. H3 W5 p2 c, p. E2 a- x/ ]  Cend
: N2 g6 \2 ~; ^/ K8 p

/ c2 m8 c% k3 a# S3 ebegin P_mA_down arriving
, M- U0 ^9 K! b- Z2 X   while 1=1 do
  I/ R" t0 v' [& T7 M   begin
/ r* q% s! i" `8 o5 @: U0 b9 U   wait for e 110 min
) m& {0 Y* V6 o+ ?' d' h2 d   take down R_mA& G, ^4 J: C9 [* n
   wait for e 5 min
  Z+ S$ X" f7 I   bring up R_mA
$ D6 `  b+ c8 @* z   end' w% @, l) J$ A$ [$ c  k; ?6 W( Z
end

2 s0 Y  J: q! Y ! U% y: w& B7 a, q* t* w
begin P_mB_down arriving
# ^. h; b/ Y% S9 T. a   while 1=1 do
4 W4 _7 `  ?" g  U+ i   begin
( c7 w1 H7 T, Z   wait for e 170 min3 X2 g/ \% I5 R1 |
   take down R_mB
7 r8 |1 N7 b1 c) Y9 \+ O   wait for e 10 min/ ~% |  l( K. L% c# v: B( u, K
   bring up R_mB6 K3 u% z9 m+ @7 M' F2 b
   end+ G' O8 g) ]8 T& p0 d4 u
end

3 D. f( q( v- v- u5 s $ H1 N' C7 I& C  j* @# K
begin P_mC_down arriving3 l" H9 P: M$ W% E- W- b  o
   while 1=1 do
6 w* _3 }9 t6 O& \6 F1 i9 p/ `- d   begin6 A8 y# F5 y. r2 |$ k
   wait for e 230 min- b. X& D! x4 x, F# j! k- f2 J
   take down R_mC
8 P+ z6 D7 s. W   wait for e 10 min
# Z4 h! }, Y. K" n   bring up R_mC
! t7 ^( x. |& ^; q0 W# r. |+ p   end
  F7 [0 P& h7 o5 a9 X0 b7 oend

/ G3 l% \# y8 z/ B; u4 i! @
' W& _4 c% }  E/ m; h4 Pbegin P_mA_clean arriving
; f) [7 Z' t: _2 d. ]3 f   while 1=1 do
! T0 B3 C3 R8 Y7 u   begin
% K$ w( S& y" p3 c4 m$ C   wait for 90 min# N  J' c5 J! {8 v2 F
   take down R_mA
# x# s7 `3 W% s& Z8 x3 w   wait for 5 min
" J# Z$ z+ s  f: Z! f   bring up R_mA
( C+ y  j) [* T0 j. |6 e" l   end$ D+ z9 K; x& \$ `6 E% w
end

( x0 [4 w; y, G  n" W. c( l/ A# s
9 V9 p  u4 ~2 A1 e* fbegin P_mB_clean arriving  U: b% k# X1 P6 Z( i, ]2 l
   while 1=1 do
& T! F6 t; Z' _) X4 s8 D& p6 C   begin# c% T2 o& W- @9 u0 j: b
   wait for 90 min& F5 J* v4 \  \7 M$ j) t. J, B3 H7 ?
   take down R_mB
$ o9 ~! M" [0 k5 b   wait for 5 min# h1 e: n  Y4 z8 k
   bring up R_mB) b8 i" N% n, E3 L
   end7 |3 O3 A: q7 I3 k8 G" h
end

% ?+ R9 t: a/ [8 e9 i
; A+ L6 k! M# }  Zbegin P_mC_clean arriving
' f. ]8 g4 r/ V2 K0 K  o  X   while 1=1 do( N8 U  y; Y8 Q0 A# d4 x
   begin
$ e' m" O1 _3 D* t! |   wait for 90 min
" i3 ^, `; P6 N   take down R_mC
! ]' G4 L, h* T# c+ D   wait for 10 min% V# P2 C/ }9 m$ F
   bring up R_mC( I% G* g$ X3 A1 k; _
   end
0 h+ C- k, C# G1 u5 l- D; D" Vend
2 I9 q& z1 |. n0 Q& u) B- G
----------------------------------------
) G$ D9 i9 b2 @* U9 n$ o' u % h$ O' I7 M1 V; G- |4 _: n
Exercise 5.9
6 t. m& c2 u9 f) X
/ m1 a9 T! `2 ^) N2 J- n, p- s7 L* f  ^* I6 M2 ~: c1 B0 N
Create a new model to simulate the following system:/ P) U1 r% q! k! P# {
Loads are created with an interarrival time that is exponentially * S1 j7 j4 n3 R1 s+ B- B8 X" n$ C/ y4 U
distributed with a mean of 20 minutes. Loads wait in an infinite-
1 S9 V2 J" E# @1 z5 X& J0 Lcapacity queue to be processed by one of three single-capacity, 4 a+ l, [; E8 L. v) A: L
arrayed machines. Each machine has its own single-capacity queue & s) [" F2 Y% I$ I$ G# }" X" t
where loads are processed. Waiting loads move into one of the three
6 w3 d; f+ p0 I9 r- _queues in round-robin order. Each machine has a normally 5 P' X& V3 ], J2 a# J# ^
distributed processing time with a mean of 48 minutes and a standard
) J& }' H5 T3 r( i7 C2 b# K2 z  k- ideviation of 5 minutes.6 S+ y, H# p/ B$ D- U7 m
The three machines were purchased at different times and have
- {0 T$ W( j0 r' [1 Vdifferent failure rates. The failure and repair times are exponentially 3 P1 o# O* f9 I3 b, s! @# Z
distributed with means as shown in the following table:
$ i# ^4 x2 D/ P8 g( @: X" }4 u$ w1 JNote The solution for this assignment is required to complete
7 Z& r$ r. p9 ^- Qexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of " c" {+ w2 _0 |: r
your model. - _1 q- i; H2 h) b; N  p8 m6 \
+ s/ i: \. N0 }, Z5 X, [. X1 @- B
MachineMean time to failMean time to repair
- N' P- Q+ J3 ?. w! OA110 minutes      5 minutes
$ ], d; I' I8 R" LB 170 minutes     10 minutes% D2 c. `( F7 u6 c% q" {
C230 minutes      10 minutes- b2 t2 `/ ]7 a/ S/ \, G& d
! a  Z( Q9 \5 J5 T$ S" h$ u0 {5 D1 ^
The machines also must be cleaned according to the following 9 `! L8 O: |- ?/ r
schedule. All times are constant: $ Y' v8 W' p; D; i% H- r* q. H

# O6 ]3 F5 P5 m# I- u3 MMachineTime between cleanings Time to clean2 R# D) ?; K& I% V; @2 J
A90 minutes        5 minutes' X' i( }4 U% I5 t" F' m: S
B 90 minutes       5 minutes  F- d. y" K7 K8 t
C90 minutes        10 minutes) x' z* E6 E: m% J- L: p

! j+ G. J( j9 rPlace the graphics for the queues and the resources. : Y- y* x- x# W
Run the simulation for 100 days.) r5 A( a( u4 C2 j6 e" K" C% C& @
Define all failure and cleaning times using logic (rather than resource
2 Y! K: G5 o  h; h& hcycles). Answer the following questions:: v5 X5 W) k0 ^3 w/ s
a.What was the average number of loads in the waiting queue?
$ O8 d( r2 A  N% v/ F$ p  O* C8 ob.What were the current and average number of loads in Space? 4 b' S9 }1 p1 L1 ?# E( u1 L- ^
How do you explain these values?
& V$ V- n, o( W6 h! t" q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
7 j+ P! m. f1 u" fsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' W9 p2 O9 a0 l2 U+ M7 Z
这行好像也不太对,各位先进觉得如何呢?: \, c" i7 d1 G0 Y5 |
- Z4 @) l) m, O9 E# t- J) N7 X
begin P_something arriving. p& G. M% t8 ~
   move into Q_wait
; w/ ~, u, S6 h% ]   move into nextof(Q_mA,Q_mB,Q_mC) + C. p/ v, \9 l- p
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
5 o/ z% v1 O, P$ J! t. t   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" E0 v2 w* w1 n: v$ p2 qend6 P  b+ k& |4 W2 T2 Z- t
' H# u5 p5 f( i: S* \: {
begin P_mA_down arriving
+ _$ T: L* H- ~: w   wait for e 110 min
/ b3 E1 ?" k' l) X, X* @- K   take down R_mA" D2 [9 y& h. P' r) z# w/ w
   wait for e 5 min
, u6 R  S* u/ q   bring up R_mA) x" B, M! R+ O* B
end8 `6 ~! f/ c6 F. c  S; O1 O' H

. ]! D  A3 s8 {$ rbegin P_mB_down arriving
2 g' S. {0 ^2 ^! V' v   wait for e 170 min
0 x, h3 A0 J1 h4 d; a9 |   take down R_mB
9 W$ C8 ^" c) {" e' H& y# x7 i) y1 `   wait for e 10 min
. z, [" ?( w' V" T  e" G, d   bring up R_mB! T$ W  H/ B4 l2 h, X+ Y
end, A& L2 s& h3 Y6 v7 X3 [. R
; R5 |* L" p  k
begin P_mC_down arriving3 b3 l& E' Y, }
   wait for e 230 min
2 G% P7 b3 A9 v& F4 A! B/ A! I   take down R_mC6 a: `" F7 K8 j+ P& f, b3 z
   wait for e 10 min" @- o' z8 K- M$ n$ o: }
   bring up R_mC' _# A* z( X) U+ |! y
end
1 c! d7 W, h1 Z" P6 ]# X+ Q$ u9 i' I# [
begin P_mA_clean arriving' b6 i% i. L; t+ _1 W4 `# B. I
   wait for 90 min
- L% z6 p& Y, D+ {. ?   take down R_mA+ G2 ?: Q( ?" u! ?3 c9 e2 @; Y
   wait for 5 min
( ?8 b8 [0 |! G! H, m% Q: T   bring up R_mA& O8 h. {9 y# o: ^
end2 K1 K+ N2 B: o* u1 g& K

' T( K6 Q% Z1 M5 Gbegin P_mB_clean arriving
/ K2 r" `  L) C   wait for 90 min
; _! Z/ Q$ G" u" q   take down R_mB9 {( _" h# L- t! w
   wait for 5 min5 _0 M" v3 v7 g0 F6 }6 b
   bring up R_mB
: _+ z, g! [9 kend
2 J9 B1 U0 `* w$ H( h  b; y3 e! t2 o% ~
begin P_mC_clean arriving6 y- k) q9 ?! m5 r( d# q6 E
   wait for 90 min" E4 I+ z: d6 \9 k) I' ]) R' t
   take down R_mC
% v8 W# H2 G' m  o. p! B9 `   wait for 10 min
" T: u; V# T  p5 j0 K, z   bring up R_mC
* w/ K7 u& c, _% H5 H; {6 uend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- F6 f4 M3 ?2 y% t8 `# W   move into Q_wait
5 H) G9 q6 E; ~& x3 d; q8 `   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( u! b3 k& I# [0 p; P   move into A_w
! f4 e! Q6 Q+ g" u3 }: _5 }! |   if A_w=Q_m1 then use R_m1 for u 48,5 min7 H( l* x: ~$ y# |, X: Z6 t
   else if .....then use ....for u 48,5 min" J  [1 Y% L& d% ]' y2 Y
   else if .....then use ....for u 48,5 min  
5 n! `. _) r4 x& o+ V4 L   send to die
. ^/ a4 p4 y0 Z' P$ Mend* ~$ U: I0 u! l/ P+ Q+ [, |
, O! ?- q+ H+ Q8 _
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 03:38 , Processed in 0.015585 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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