设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7277|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
7 _4 Y! ~8 s' `( o" q5 e
, \. P' ^6 E8 m& R& r底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
7 r6 _/ [+ g4 S% P6 o9 c' P; Y# k7 Q# [
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!  _+ w. b6 N$ X/ f, M) a4 c
" J' U7 K! o5 F
--------------------------------------------; E; d1 o2 K" I6 x
begin P_something arriving7 f, I4 N) K: \5 M- d5 W4 b
   move into Q_wait
9 `7 Q- ?: e; r1 @5 R0 }5 k8 Q   move into nextof(Q_mA,Q_mB,Q_mC)" W; Z8 ?8 @  ]! M/ j" T
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
2 N) ~/ O3 @; @/ f' O: Z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 Z# v( h. m6 \. a) H$ v
   send to die
. V9 Y4 i* r7 ]- B* z2 `end
4 x' d" f8 A$ c0 `( O+ {& d
! S3 I; c4 j* P, |" l
begin P_mA_down arriving2 a9 Q8 y9 f4 Q8 S8 v
   while 1=1 do 6 z$ a7 [& @3 T
   begin) w& \2 T( c5 w" r7 i. L
   wait for e 110 min- c7 H( \: ^% a% v% `& h- g
   take down R_mA
, ]5 C6 S. T( z2 c5 S# t   wait for e 5 min/ k4 m  s" o$ B$ Z/ X( A" u6 e
   bring up R_mA6 e7 x. L+ `/ ^; Z
   end: Y0 I/ ~. g% e$ P$ d
end
4 R: A  O4 B& P7 ~" k
' T. \4 w+ L5 V( o( G: f
begin P_mB_down arriving$ k& w' i1 e: |/ O
   while 1=1 do
$ e, }; o9 M& c' }" S   begin  T* _! g; k' ?( m6 s/ D* o
   wait for e 170 min  C- i$ _$ _' Z6 z
   take down R_mB' _; t' l! @: i4 T# A, R
   wait for e 10 min
; s8 B) o. @# q3 K3 C, L   bring up R_mB
0 {: k/ N/ q* Q! ~/ a   end
+ K8 C, y/ e0 yend

6 `6 p3 \/ ~( J! w1 f7 M* P% |
% M$ ~  T0 [: P* p) @! K( Bbegin P_mC_down arriving
$ \. W7 e5 y, U! F   while 1=1 do
) W6 U2 N* A# D4 _6 C   begin
4 |/ f& Q' E' h   wait for e 230 min  d5 g& D' }" k+ p; I
   take down R_mC
8 C: K3 E: Q& v  C9 i3 {6 v   wait for e 10 min
# m* f  f* C) j' G   bring up R_mC1 b9 B2 {3 J3 H3 {& z  N+ M. H! n
   end/ f8 |+ |" f, G5 v
end

4 c% y5 |& y5 I9 X7 f+ Z. s$ `4 ? 0 a3 u! I7 T6 V& O  j; j4 \' W
begin P_mA_clean arriving
5 z+ m8 L' `# ?5 @7 Q$ _   while 1=1 do
% U" C% x3 j2 }9 V0 ?) M: l   begin
& [$ V! B6 i- G3 E$ Q   wait for 90 min
. ]9 ^+ A/ }4 E5 b  \   take down R_mA
7 `# K6 H# E) s/ z   wait for 5 min
" P5 q4 \3 q  {" q) Q. V$ s   bring up R_mA2 W, ~' E8 L* H; A1 k( J; Q
   end
' |# J* l; g* {end
5 }( C! x* f( o: I' e% J
4 L6 j: y# t8 t) Q9 Z
begin P_mB_clean arriving
, V5 c* m' ?) C5 F   while 1=1 do2 ]7 z* e8 Q4 x9 H0 K$ R% h2 }
   begin
+ N' }; K; X6 n6 d3 q) p   wait for 90 min! F8 [" V1 w% a4 n1 T
   take down R_mB
  U) e! O, q0 ]( V! A6 Z   wait for 5 min
( X0 h9 P1 p* O9 j/ o% T0 u   bring up R_mB" ^3 j8 ]# y! j4 R/ ]+ s, c
   end& [2 m+ A% d5 x! N% ~0 F9 h
end

3 j+ s) f( M: y- X) P' \$ b
0 C* d4 K, Z' e7 ]% W7 ibegin P_mC_clean arriving6 \/ j3 [1 R' O0 M+ ]( y- {
   while 1=1 do
& k: @7 y1 k6 h( P+ Z& `0 o   begin
8 ^- Z0 `5 O: `  L4 w* s/ ?/ R   wait for 90 min! Z8 C7 \3 J2 ^4 E( t" P4 b
   take down R_mC& o7 n* |) ~. `1 k8 d
   wait for 10 min2 w1 R5 p8 o2 o0 a9 z
   bring up R_mC
3 T' P# {% G' S2 q; F1 b& P   end
9 @6 d( I8 d% y8 _* bend
8 A$ @& k/ n+ i" y& v* B
----------------------------------------6 h/ H" O  v) h  X4 l

  d$ ]- c: L2 k+ P. CExercise 5.9' B' q9 ?, y& d
& y( ?3 w! B& o4 _# Z% U4 J: P
! w' l9 w; Z3 T: {( M, x7 a
Create a new model to simulate the following system:
& [$ n% _- _3 E3 B' \8 _. SLoads are created with an interarrival time that is exponentially & z( f" D5 U1 _9 \' E! l% }& M) ^# O1 O
distributed with a mean of 20 minutes. Loads wait in an infinite-
& g# |. j% K! n) @capacity queue to be processed by one of three single-capacity, . G, J# \0 p) r4 x3 U. c" U
arrayed machines. Each machine has its own single-capacity queue   ?+ d9 L+ x) W' j( q
where loads are processed. Waiting loads move into one of the three 2 e3 ?' C7 I  f. O9 O" `0 k$ |: s, t
queues in round-robin order. Each machine has a normally 8 A/ e8 ]( w" N; {/ l
distributed processing time with a mean of 48 minutes and a standard
$ T6 ?& W  F* x, h) y; z' j5 ^deviation of 5 minutes.
* T+ O5 N9 u: F  `/ ZThe three machines were purchased at different times and have
7 {* F. J' I  E0 n- u; K8 w9 Kdifferent failure rates. The failure and repair times are exponentially 5 Z9 ^3 N, P& Y% k
distributed with means as shown in the following table:
: B8 p+ s1 L# KNote The solution for this assignment is required to complete
* F6 o  l6 P! }+ J9 gexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
% M% k9 {' l3 iyour model.
/ m3 b% c6 \1 n' e' M9 V( C7 E7 H3 c; N" O& }
MachineMean time to failMean time to repair8 W; m) ]& y; D5 V
A110 minutes      5 minutes
5 L  ~0 G# w4 {/ X2 C  SB 170 minutes     10 minutes
5 `5 l- a1 j& M$ A. `' PC230 minutes      10 minutes
: {8 F% C" ?: C( ]1 f5 H5 s) D! _
" ?% b$ j( V  O( ?! ?1 QThe machines also must be cleaned according to the following
- [4 k6 [7 P- y9 m7 n. Gschedule. All times are constant: # ^) m+ m( h* @; u/ S
! r) j# X+ Z  v# p! t) Y7 I
MachineTime between cleanings Time to clean' R/ z& c% [4 a- p$ l0 ^; Z
A90 minutes        5 minutes
" B8 z3 ]3 V- ~# S( zB 90 minutes       5 minutes- k* \2 D6 A/ C* N/ g
C90 minutes        10 minutes  U$ |& g' O* W* A/ w
; x& N, F$ p# b9 O8 f
Place the graphics for the queues and the resources.
, h8 N4 V' z2 r* d. U8 wRun the simulation for 100 days.) A3 Z) ^8 U& v
Define all failure and cleaning times using logic (rather than resource ( ?$ ^( I) n3 v! D3 b
cycles). Answer the following questions:
; V# G( W6 p" s! k1 Y  \a.What was the average number of loads in the waiting queue?
! Y4 `* X! n( N  F2 T8 ]: h/ H& L# ob.What were the current and average number of loads in Space? 6 D3 w; i0 g# H# J& q
How do you explain these values?
, t* |6 E; O  c8 R" }

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
0 p2 X% @7 y7 A4 z" n5 C# A$ ^; W/ isend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% o4 J; }( A: y+ p这行好像也不太对,各位先进觉得如何呢?! ~( Q, i+ F# w: U7 U
0 y- t" @/ I+ x. F, W8 I3 w
begin P_something arriving- e- [! Y9 {& m0 @* u; }
   move into Q_wait8 h4 I$ s5 L0 \7 G  y$ g0 }
   move into nextof(Q_mA,Q_mB,Q_mC)
: Q* h4 Q; L& a4 S; f8 x- f   use nextof(R_mA,R_mB,R_mC) for n 48,5 min0 f8 T0 B8 w1 \* C) T6 n
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 b& m1 [, s1 T- Z8 lend
, @4 h% n( W1 f) m& x* a8 }  _' u  }
begin P_mA_down arriving
- M1 G. {9 H& ?+ x; |   wait for e 110 min
: m: w4 z% j; `7 `: ]   take down R_mA
7 a" h+ _9 ]1 G6 J  u9 }   wait for e 5 min
( w3 t3 E+ N4 l8 x+ x   bring up R_mA
+ j1 O% Z9 M4 G6 o" O2 e  Bend3 ^! Q. }5 S, U" n

) w, ~7 ~6 ?. Z% M" ibegin P_mB_down arriving2 h5 ~& T  U9 C5 k
   wait for e 170 min# l" ]. g/ L5 d0 C+ M4 ?" m
   take down R_mB4 w/ ?! M: J  n! ~
   wait for e 10 min+ ?9 M9 A7 g- F2 [; k
   bring up R_mB
; D# S) |5 r: U" s; iend
; Y. H% j9 K8 ]
" _% p0 o7 N  r0 E( c6 b' Vbegin P_mC_down arriving9 a) T* q5 y$ t) V/ p
   wait for e 230 min
1 i4 \7 N) z5 k9 ]9 Z   take down R_mC
+ S$ `" s0 _+ o% N* _1 E5 z; V: u   wait for e 10 min) j% m7 _/ ~. H4 }. U
   bring up R_mC
( M& l  l3 l+ c# J/ E& X) send  f1 m7 K, ?! V$ i
. n. u& p3 z$ I8 M$ b5 b+ X- ]8 b
begin P_mA_clean arriving
5 N* n6 ]. {* s. U' @2 P; l1 A; [   wait for 90 min" z; M' ?; s. ?9 j$ k4 q
   take down R_mA
+ Z4 h3 I2 P& C! B0 p' J, m   wait for 5 min
0 M$ `9 n$ X  t% ^# L   bring up R_mA
) ?) ~4 W9 [3 `8 M# iend( M& D. I  q. Q8 [

7 ?( x# |" r. ybegin P_mB_clean arriving, [/ l+ L5 B( x8 x0 v. c
   wait for 90 min& B8 U+ a% S6 `% A# Q& s9 b
   take down R_mB, m. w1 S' E6 z. k1 I7 k
   wait for 5 min% m4 f& a: G4 i, K
   bring up R_mB
4 i6 U0 F! s+ N9 H* @6 Send0 @% f# [  e# M& z( C
" ~9 Z0 h# S7 K( C: k% V9 z' D
begin P_mC_clean arriving/ A2 ^" _4 x& R  U. W
   wait for 90 min' C0 f/ k" P3 n
   take down R_mC) a. a, _: h/ r" z! h. c! H
   wait for 10 min
' f( C- t$ A3 n3 h, `2 L$ q1 g   bring up R_mC7 I0 B8 t6 p  }! S
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving) {5 W1 P0 D  a0 d3 A
   move into Q_wait- v4 T7 P' u, M9 z! S- f
   set A_q to nextof(Q_m1,Q_m2,Q_m3)2 d5 a# t0 `( K: m1 f+ G& {# w  y
   move into A_w" {9 D; N% _2 g* Y" A
   if A_w=Q_m1 then use R_m1 for u 48,5 min, E3 p/ j! L) ^, }$ q( v
   else if .....then use ....for u 48,5 min  C/ a  m# y5 e2 h2 w
   else if .....then use ....for u 48,5 min  
, @# U2 h. o" T/ O2 E& M* J$ B  j   send to die2 h4 o* Z% Y3 |! m6 g; u$ G
end
% }: z* c* c# Q, Q* v9 G" K' _' D( ~' G
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 07:21 , Processed in 0.017047 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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