设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8013|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
. Q) a: f  J+ ^4 V# Q2 ^
$ O  M7 O  U! X1 V# {底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
# j. q- j9 E  ~9 ~+ e6 C7 [8 h
( d. V/ A' H6 m" ?/ h7 r. E- ?& W1 A不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
( g; N/ m+ K/ W9 T, E4 b0 G1 d; v% x+ o- Q' k8 v
--------------------------------------------% j+ H+ y. y! ~4 m# j4 C. u
begin P_something arriving" Y. n* ^/ p0 o. ]
   move into Q_wait( N5 O! |, e% `1 z7 q" {8 w+ j
   move into nextof(Q_mA,Q_mB,Q_mC)  |8 F) y0 ]- u$ l
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 F  ]2 q9 u5 K8 N& E   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ l% b9 I$ N2 E' _. [9 c   send to die: f8 g/ l6 p% f6 P9 s
end

4 z8 F' H5 M% ?6 f) j9 W. P/ V 2 p, r  m3 P, V4 u
begin P_mA_down arriving
2 z  `6 h' H, m0 Q7 d   while 1=1 do
. q- ~" D3 r$ B+ g   begin
% C: S( u' Y6 H! ]" ]  R7 K   wait for e 110 min
; E4 f3 g! S+ g+ Q% {7 j   take down R_mA0 |; y2 J& \7 @# J
   wait for e 5 min
/ i3 P3 O, a% X5 H1 J   bring up R_mA6 u/ p( m. b! c; x0 A, V+ {+ m, l  q
   end4 o1 F2 ?( S, L: k. }1 p- L$ q
end
% i+ x; b8 P, m! S& ]

! v, D( Z* h. N/ [: H4 Lbegin P_mB_down arriving1 Q* S  q# K1 K% P/ J
   while 1=1 do
; N+ t8 Q/ ], \+ i) i! j8 A   begin" n% Q0 y( L) b8 M3 E& E) g" Q
   wait for e 170 min4 d4 J( G0 s/ G3 z$ h7 |9 E% B7 |
   take down R_mB7 M; M& ~1 {9 I' o
   wait for e 10 min% I+ Y, V6 f; M  q" c9 s1 S- M. Y
   bring up R_mB
. x9 O+ n6 B% Z: F1 K6 t   end
, h# m  b- G3 l3 V7 dend

# ^% @+ P. y" c7 ]% b# \4 A
. V# m+ A( u0 A  Z$ {begin P_mC_down arriving
6 N, L5 e1 `9 t2 F% E   while 1=1 do
5 A7 f6 O6 y' L* F   begin
: c* V, P2 e0 a   wait for e 230 min6 [3 C! `: n0 ?: x
   take down R_mC
. I; |; r( E5 m   wait for e 10 min
( p# A" A: r% K; i* _7 B8 t   bring up R_mC
  R- v. U/ C1 U8 g   end
+ ]  \6 _0 P  v9 nend
" a+ W, x* L- }; g, e
2 ?) p$ y1 Z2 F0 z0 O' I5 f
begin P_mA_clean arriving+ b- \9 Y& S$ R
   while 1=1 do8 S# i& R, o& `  H- x
   begin3 |0 q5 C/ i) p$ z$ L+ P. V
   wait for 90 min
" j( |# l1 |: a% M+ [" x$ w, ^, U   take down R_mA
$ Q4 S* @- i& z4 H1 n9 O5 A   wait for 5 min6 {4 ]" [5 ?2 C' z; e+ J
   bring up R_mA5 q1 B; I' U" N# h2 m* `% i  m0 V# m
   end
5 {, [  R  Q: v% G  A8 J& n0 _6 Kend
+ R7 x0 H5 r$ F/ z

0 W5 D: H( @* Gbegin P_mB_clean arriving+ X4 O% H% J) h9 z
   while 1=1 do
  R8 B9 T/ @' q   begin6 D. S/ h0 Z, K. o9 U6 V
   wait for 90 min, T' j2 ]. N& N8 ~) z8 [
   take down R_mB
: j' F# \/ W# W0 f+ E( f4 p   wait for 5 min4 t7 J$ V; F% w  H9 V: p
   bring up R_mB
' y9 o$ s, I# T5 |8 m   end
5 N8 G) G5 m1 [8 Qend
. r, F1 X. H. M" O5 R

$ A9 x7 a+ F# J! ~8 ubegin P_mC_clean arriving8 x" G- D, H9 F3 ~, \7 f
   while 1=1 do( R: g4 j; @5 M. t4 z' F, a
   begin
3 q! w7 z: o4 [1 M5 D  [   wait for 90 min9 O* e7 @; s: @1 i) O9 M
   take down R_mC
3 R3 M/ i) V- B& t- c8 i$ ^   wait for 10 min
2 o+ [. ^& R. B; ?# x8 p4 h   bring up R_mC
" Q: X( G, Z$ K& E% n   end
6 Z9 L- T# A1 T# \end
2 F4 Z, R, T3 @
----------------------------------------
* e, x/ }. o7 y % q/ ~" T- `4 K/ B3 x
Exercise 5.9
" I) M! S8 \9 b) }* n
+ ^3 _% c6 P! H; q9 o; y
* m9 S4 x- A( W- ?Create a new model to simulate the following system:
; H7 \2 L& ]; a# y& w0 K# _5 r, r( G, Q2 eLoads are created with an interarrival time that is exponentially
& s& j. a6 T8 _, z8 p2 n! cdistributed with a mean of 20 minutes. Loads wait in an infinite-
  @- }: [# y4 R" U6 lcapacity queue to be processed by one of three single-capacity, : `. N6 ^* p# w) |) {7 M
arrayed machines. Each machine has its own single-capacity queue - p" D3 {, M4 m2 a+ f! Q
where loads are processed. Waiting loads move into one of the three
6 \" t4 n1 d8 s- S4 G2 n: U: tqueues in round-robin order. Each machine has a normally 1 i( Y0 P" c: i. Q6 q
distributed processing time with a mean of 48 minutes and a standard
. @6 P& s/ Q9 D/ S: ]deviation of 5 minutes.$ {' t% f  [& d: t$ q
The three machines were purchased at different times and have 9 ]$ W, E2 j3 w9 ], d
different failure rates. The failure and repair times are exponentially
: l  Y% n  h, ?2 r2 c, [2 Odistributed with means as shown in the following table:
$ k, x. y, H7 e/ BNote The solution for this assignment is required to complete 9 l2 M5 p" V2 i5 J- j
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
" |5 f( Z" ^4 P9 p- g+ Zyour model. * q$ J0 h% g2 h4 d$ X% C
" A' q% B; ]6 t) N/ |
MachineMean time to failMean time to repair3 \% B2 k1 t% Y4 ^
A110 minutes      5 minutes
- d2 Q1 ~4 i7 ~; }" R, kB 170 minutes     10 minutes
8 G$ v# M. ^# l2 x! kC230 minutes      10 minutes
( e  N5 [& _3 @9 S5 F3 o8 i$ E' `  D, z1 i# f4 e
The machines also must be cleaned according to the following
$ P- t0 {, F7 V2 \schedule. All times are constant:
( [6 J5 {/ ^  j, H0 A! ~! Y
5 W. j' \# K1 D9 A3 n2 O: ]MachineTime between cleanings Time to clean
- n" w, _% K, w, _/ VA90 minutes        5 minutes
2 x* _" Z# ]$ Q1 P2 k3 H/ ~1 SB 90 minutes       5 minutes
: D  Z! g1 E3 p" j8 D* s. K, fC90 minutes        10 minutes
$ ~& m- L9 ?3 j- a6 m
/ u7 F3 Q+ e1 UPlace the graphics for the queues and the resources.
4 O/ r) n, J7 d4 H& _# j9 v" @Run the simulation for 100 days." D2 D# E- i7 k4 f8 P( s
Define all failure and cleaning times using logic (rather than resource
; v- z9 R% h1 Y4 bcycles). Answer the following questions:+ k5 x: A( u/ N% R: U$ E
a.What was the average number of loads in the waiting queue?
/ M* m( f& B. a+ Qb.What were the current and average number of loads in Space? 7 {- Y' h; z3 S& G+ a$ X5 E
How do you explain these values?
( t7 W5 N5 E& D" t; z) m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) J# q' |! @, }! c3 J- F
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, T) [3 v/ q$ A8 M, J这行好像也不太对,各位先进觉得如何呢?  v( W) I# p3 C4 }" \
/ X* a5 b0 C2 g4 Q7 V: w
begin P_something arriving: M) i9 j6 G5 f( g% U/ q
   move into Q_wait
) J' t8 x1 ^* t3 e; S   move into nextof(Q_mA,Q_mB,Q_mC) 1 K( l, N2 W3 L2 |; Y
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 ]1 m( E9 U- V' S; m* Q3 [- R0 k- v. D; S   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 0 X6 I7 `$ T# Q/ _! a$ Y
end. r+ o' N% Q! ~9 R- \4 ~

7 b0 }; P# x# Qbegin P_mA_down arriving8 [/ S1 e8 T6 L5 Z; w5 {
   wait for e 110 min7 q0 e" L, R" Y( H' {# D! y5 a
   take down R_mA( I' {# T8 G9 d# K
   wait for e 5 min
! p0 U, R9 ?0 l+ T' b   bring up R_mA% O5 }: N% `- L6 l( g
end
6 i  I: W9 X8 ]" ]
/ z) [! ~& ^, c9 t* obegin P_mB_down arriving
; I+ z6 @8 x* }  j) C- z: G   wait for e 170 min
- X4 p9 K: g; J/ C  u1 F8 {   take down R_mB
# k+ y8 d* a+ ]; r% q   wait for e 10 min
& }7 s# K- v# t$ J+ T   bring up R_mB1 F0 ^4 u! M( @' {2 r
end
! H: }8 p4 `, U/ N& r' I, D( V) h+ A! A
begin P_mC_down arriving' }6 ?, ~% ?5 m- S* T5 V/ _# H- \
   wait for e 230 min
8 R$ Y8 Q) s+ e$ G   take down R_mC5 {# `) B: `% B( L3 Q; m
   wait for e 10 min
0 }0 S4 U# C9 ~) T* f( |6 N   bring up R_mC* r2 i5 E, S2 R3 ]) }" n* d1 s
end
8 y9 N) C  [) e5 R% x" w3 q0 K8 N  P) O! i8 h# `+ T
begin P_mA_clean arriving& t9 e* c) a7 ?
   wait for 90 min
: t6 D+ _4 @% K& n   take down R_mA/ M" H' r0 H+ x! b
   wait for 5 min0 g- b- [4 H6 G; {1 M4 H
   bring up R_mA+ ]" p- R) L  R) W' Z- i& j
end
3 R; X4 ]7 ~- a1 X8 [& w) i4 _9 Q
7 b- M3 U; \, [  }# ^$ Sbegin P_mB_clean arriving
% `. p* I6 O" b0 a0 q   wait for 90 min6 y' ~9 g7 h* h/ O
   take down R_mB
+ }/ R0 r6 K. d   wait for 5 min
1 r0 A# p/ T5 S   bring up R_mB
& ^; N9 @7 p! e4 nend
& d) Y9 c# S' {0 r0 d( ^- c: U- \% g% a" O
begin P_mC_clean arriving
1 A4 n3 R! N9 K& V6 I7 A1 o   wait for 90 min
. P2 G$ O) g* R# [+ F+ W7 f8 q/ r  ]   take down R_mC
3 d! L$ x+ `8 d/ {9 ~% G7 P   wait for 10 min
: Y) Z7 j5 @% W) `; B' `% [$ V# k9 J/ R   bring up R_mC
6 g6 N. }% Z/ l: eend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! g9 o0 X2 q( k, v9 `6 p0 l* a% Q   move into Q_wait
6 j7 P, E3 g$ r   set A_q to nextof(Q_m1,Q_m2,Q_m3)  }4 W. {( e/ }8 S
   move into A_w
* ~5 y! w& ^: Q( Z$ C& P& I9 S   if A_w=Q_m1 then use R_m1 for u 48,5 min2 A2 K9 d, ^, P5 H) A
   else if .....then use ....for u 48,5 min( e* T& t2 g  A& r% i
   else if .....then use ....for u 48,5 min  
& j+ a. [+ g  Y, t7 V: Z* U3 t   send to die
$ E7 j( G. x; J  e: I3 }end  p4 y: H( s6 v! L9 v: S! J& s- M: ]( \

  Y+ V# w9 ]: ~4 u% w# v供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:18 , Processed in 0.018857 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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