设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6522|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
4 @# @- c6 i  w) |7 g+ C# [% w7 B  P$ T- ^8 L: }) u
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
+ s2 ?' S' w/ U6 T: D6 A, Z* O9 o3 ~
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
3 k8 l5 n  J& a1 y- @' j! U/ {: h6 C% Q
--------------------------------------------
" ^' Q0 i- ]# B7 j5 G8 pbegin P_something arriving( e% |0 T4 H  U( P  N2 G9 e1 e
   move into Q_wait3 m( K' @4 g4 V( A. m
   move into nextof(Q_mA,Q_mB,Q_mC); M( A( |# V) A
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, n+ [0 b: v: n- N
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 ?- |8 [5 R' N$ ~" |  A5 o% n9 [2 B& Y   send to die( {9 z& N& V( I+ h1 ~0 q7 {
end

6 {' N" {6 o2 L" |+ Q6 y # X6 v  e" l7 e5 g, Q: h
begin P_mA_down arriving
' X5 o( u! h2 u   while 1=1 do
; t8 F" n1 M5 t% M; Y4 \8 a   begin
( f; ~' T, W/ c  X1 G   wait for e 110 min
" A2 `3 o/ q3 E; ?6 H   take down R_mA2 H* c3 Q4 L6 Q, Y2 S
   wait for e 5 min
1 L! z7 I' a: x; X& |# b1 d   bring up R_mA+ T" u% ]" @7 B  T, }
   end9 E/ q$ P! J9 R1 K. s3 I4 [
end

& Z/ ^1 N4 _* Z& r- n2 m" @ 5 g2 r; N  u: L! g" q
begin P_mB_down arriving
1 b) `, Z7 q/ E, G  x   while 1=1 do
* |' `6 ]* Y# D6 T   begin* f( ^+ K/ J9 l5 L- G
   wait for e 170 min
' [' m! D3 c3 y/ @5 n% m& E   take down R_mB" |8 U6 }8 a9 L3 V' U  W
   wait for e 10 min
; N/ a' x8 A, [* _3 g& }   bring up R_mB0 U- f6 \# w$ s  F8 D+ i0 e
   end; Y& M3 Y6 N# [. ^* ~5 f
end

$ _5 S' Y2 R, u! o
8 k+ [& t; ~+ |9 o: i) q4 vbegin P_mC_down arriving
" l; M) ~' B6 `8 D   while 1=1 do 4 [, o2 [3 v! J( I
   begin5 `7 Q, A" B' J2 k" @' p4 M7 D
   wait for e 230 min; M! m2 B$ d2 {; f
   take down R_mC
& g$ v! c0 b6 J. c# m, G: b   wait for e 10 min
2 ]5 v7 D( l9 l9 O  U% ^5 W   bring up R_mC
3 e+ Q2 }1 e  n) u8 g% i   end
$ A  A9 A" u/ i! ?" P7 |+ ~5 p  |end
% R. [$ j. o' p+ _% d2 s
: Q! Y! ^" y: c3 ?( f1 w
begin P_mA_clean arriving
* _* b) a' {( Z- u8 I+ g8 _2 ^' W   while 1=1 do
5 U( n% E5 \" i6 @   begin
1 [: b. ]' ~4 P5 ]; e! w% p   wait for 90 min
2 V/ e4 e, e" U( X   take down R_mA" |3 L0 w! ?; r0 a2 z6 i; v
   wait for 5 min8 Z$ b& ]1 k$ a8 W$ n( I0 N$ H
   bring up R_mA& |( U2 F7 l' l: d$ v/ M# {; J
   end
0 v6 b5 I$ U1 Z6 \end

2 L  F4 ]# Q# n+ [, k- i 3 v: T/ D5 E" |9 t
begin P_mB_clean arriving
! u& t; y  M7 ]2 p$ {7 ~   while 1=1 do9 A/ E; ~5 F- w
   begin
6 U: ?- z7 o0 Q' `+ t- Q3 a1 d- g& r0 }   wait for 90 min
- Z4 ~1 m& T5 C9 m$ O- r! q3 m   take down R_mB
+ d& ~$ k: ]$ n   wait for 5 min4 F0 X: P; O- u1 x/ e% s& e9 v* ]
   bring up R_mB
2 C; h2 D. F* ]   end
# I, _. [8 M' a/ Lend
9 ~! l! q% \% W
5 Z( A, p7 |+ C0 g9 j2 O8 C
begin P_mC_clean arriving) L: R4 N0 f+ {1 W; R
   while 1=1 do
; ]$ D/ v9 d# o* R% b   begin
/ ?1 Z! h  W: t* m6 @5 Z! {3 X; X   wait for 90 min
* V. ~! d. ]: ~0 c& ?2 w) C  ]1 Q   take down R_mC
/ i4 T7 G) f* l4 k3 }   wait for 10 min$ \) B# L3 p; L  ~9 f0 k# o. f
   bring up R_mC
: v& N& M! w8 g! J# ?2 R   end9 E; }" H7 g  n0 \9 g; P8 ?
end
+ k3 `/ V; d* W/ E7 H+ _+ v
----------------------------------------
7 D" [0 H$ t; A" D6 d6 q; c 4 f! Z5 a+ d! G/ W- D5 f
Exercise 5.99 n5 h4 Q, Z" B& v

/ P+ k# _: X9 l% K' F' v* A, T$ _7 G( q1 k+ k& p. k
Create a new model to simulate the following system:
4 ~" U# V" y* ?0 z% |( ?0 B, aLoads are created with an interarrival time that is exponentially 9 K" X7 R8 `/ q: b; ~1 M  n, d
distributed with a mean of 20 minutes. Loads wait in an infinite-
0 v- A6 s  X$ [7 x; a' k7 {6 icapacity queue to be processed by one of three single-capacity, % `7 i6 K9 C% b2 t0 B( [: P
arrayed machines. Each machine has its own single-capacity queue
" m. @6 [5 S$ w) A. t7 c/ cwhere loads are processed. Waiting loads move into one of the three ; K0 \8 a) z. W8 e; J, g9 z
queues in round-robin order. Each machine has a normally 9 D; ]' a6 z1 D
distributed processing time with a mean of 48 minutes and a standard & Q2 y* z' v+ e* w! E
deviation of 5 minutes.! d6 M) D0 k+ w; j
The three machines were purchased at different times and have
* `# F, @- j/ r2 L- v1 m' k$ u9 rdifferent failure rates. The failure and repair times are exponentially
8 ~8 e# D$ `( A! }! \, adistributed with means as shown in the following table: ' @% b* L6 V) w/ P/ H/ \, V
Note The solution for this assignment is required to complete 2 q! g- z- W9 m
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ; e) C3 X( i+ V; j! w$ ?$ q* s4 G; L, ^
your model. 9 U, B/ V2 ?/ S- G) _9 A8 f3 h9 ^

6 j0 T$ R* J0 kMachineMean time to failMean time to repair+ {/ d6 H5 A, t, ~# B! r9 O6 o, |
A110 minutes      5 minutes
/ Y( ?  T$ K, f/ mB 170 minutes     10 minutes
6 l5 q3 T# q3 l) kC230 minutes      10 minutes9 b1 i0 S; K% |! Z
. J) ]2 f* `) w  p6 a7 n
The machines also must be cleaned according to the following
: L. |4 @4 [# r; Bschedule. All times are constant:
/ o* U0 a5 k* Z. W  E
! l8 G* P% f. u4 g5 X  J$ FMachineTime between cleanings Time to clean) z' y3 r3 o. L, e) c' a
A90 minutes        5 minutes: d3 m+ U3 c& z/ v* K6 f
B 90 minutes       5 minutes
7 z0 i7 g% w% E( z! r. ^: A: i' B$ v9 v" ?C90 minutes        10 minutes
/ X2 Q; \* ?& d& D. M
6 `) Y' _9 F9 u* F  \Place the graphics for the queues and the resources.
4 ?8 m$ A9 J/ _5 _) iRun the simulation for 100 days.
* S5 N  ~9 f0 A9 q9 NDefine all failure and cleaning times using logic (rather than resource " U, U" V5 O% A
cycles). Answer the following questions:6 O, p9 @$ x4 v$ {
a.What was the average number of loads in the waiting queue?
! l2 H# T( o4 tb.What were the current and average number of loads in Space?
- a& t. ]5 V. @" r2 ]: BHow do you explain these values? 7 R9 {+ Z* H$ ?

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
( l( {9 I  h& Y0 r+ ~8 m4 _send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 o* k" P# T# g0 V7 S0 N1 r. P
这行好像也不太对,各位先进觉得如何呢?3 Q: ~: v* `/ ~" B8 V  K* j
- j4 U5 @+ ?) E$ s
begin P_something arriving
* ?6 ]* a. y7 A5 a5 V+ l   move into Q_wait/ P. V9 M, O, s2 u% b
   move into nextof(Q_mA,Q_mB,Q_mC)
: A' o( q( ~4 j$ Z, j   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
1 L2 p, s: i0 V& P   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% q0 b( |, P) \! ?) `. z) ?  [end
: B& U+ e$ k' T. k$ ]3 U1 g4 A% y0 L* t7 R: m, ?
begin P_mA_down arriving
7 y  G5 o+ S( O7 W   wait for e 110 min
& w2 [+ K5 z) h- F$ k& A  _   take down R_mA3 ~3 s6 y# u6 [5 r, E" ^
   wait for e 5 min1 G1 M: c7 R1 A2 W/ k  K; `/ }) V) U
   bring up R_mA
# u' `5 Z. J0 M! x6 {: Fend/ O& x& Y( e; p, ]6 u# C
( T# p6 m# d; |% S* U
begin P_mB_down arriving# o. @+ Y0 {( W$ M
   wait for e 170 min7 J9 l; {" @) Y9 V( d
   take down R_mB$ n  C: N* p5 T5 K
   wait for e 10 min5 ~6 a8 N7 r! q
   bring up R_mB
, h2 |1 I+ T2 E$ u1 z$ }end
6 @0 i8 Y2 ?9 C4 S
  m3 T' R. n9 z$ ~; M% xbegin P_mC_down arriving
5 H9 y9 |1 |& `8 ]4 w8 M4 y% y   wait for e 230 min
3 z" t2 T7 T" R* k: @( G$ J6 ]   take down R_mC
6 _, v8 ?) {* f$ M' p9 }6 }   wait for e 10 min
2 C# h1 l% ^$ U9 U) b5 R) }   bring up R_mC% C  j9 u( A# T/ G1 H$ i8 o
end
0 @3 W$ H5 r6 p. q7 ^0 K; b
! w- }* |7 m! [$ U" hbegin P_mA_clean arriving
3 \% e* O: K, `' ]$ c0 y$ K) S, i   wait for 90 min
% X; O& O2 H6 o   take down R_mA
! d# j6 e, e. H$ h. P5 R   wait for 5 min
, U' F# D: t& z" k6 R+ V$ {   bring up R_mA6 ~, {6 w1 }! E( g
end+ z2 `+ C2 @3 m4 Q0 ?

7 f$ I7 R) Z0 G, L5 q" g" e, Xbegin P_mB_clean arriving
3 y- Z7 t& ?0 u8 S* B/ S4 f+ N6 v* j- f   wait for 90 min
8 e4 {% r' e& z# \" Z% [3 q   take down R_mB5 D9 Z' b, ^& u' F. P
   wait for 5 min
. g& ~9 v0 I4 `; ^   bring up R_mB/ L1 A' E+ V- F
end6 E5 k# u: G% a/ u( f

3 _8 g9 h# a7 }# A  @* }begin P_mC_clean arriving, c  I8 [- \9 @9 E5 o+ i5 L
   wait for 90 min% y( y. c; E3 I4 L6 T7 q# q* ]
   take down R_mC
+ v* \, K: w3 n! }   wait for 10 min
- m" M8 y) e2 U' q$ G9 i# b   bring up R_mC
* Y5 _% F5 |; ]. F$ |1 Oend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving$ h/ Z4 a5 ^$ S. ?
   move into Q_wait9 \# D7 y7 ^* c/ R
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; z0 |; ?. d4 `! Y9 j   move into A_w& L* s7 Q, |$ ]3 ^
   if A_w=Q_m1 then use R_m1 for u 48,5 min
% O* J0 E. N% W& P: L; F% |   else if .....then use ....for u 48,5 min8 Z4 U( C* g" I, h8 Z) R2 ^0 S% B" Z# W
   else if .....then use ....for u 48,5 min  
" O! X* D: V' g3 R1 t! l2 K5 q1 g   send to die; \8 u, {# X7 L7 _! J) e* V
end
8 v; d  I; L) R9 s7 h3 l( ]0 {& A/ P" Q9 _/ x( S: p; X' W; }. s
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-4 04:44 , Processed in 0.025496 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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