设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7820|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
4 _: t. p0 h( b+ S' {
, C6 ^! C/ V' l2 Z底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去9 p. h# R' E8 N& f% N, D- ^

+ y6 R" B% O5 z9 C/ j) s% i不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
# x5 b' N2 }: ?4 g. X9 \. d
5 k& E! X& H5 P% A5 G) h' U: @
--------------------------------------------. E: U' R6 w* i! m
begin P_something arriving
1 r% }5 C$ Z. K" x7 q1 i   move into Q_wait& O% u0 L4 r& }3 y
   move into nextof(Q_mA,Q_mB,Q_mC)
! m+ `- I5 Z8 ~! b. y   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min4 Z! u$ C  k3 f2 d9 ~3 Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ h: w8 o4 M7 X5 Z0 H2 \& [$ X
   send to die
! P, W' r: M5 fend
, d; \8 m) w! ?# @6 K

2 Q: V) ?5 E# ^0 dbegin P_mA_down arriving3 @6 G( a9 `8 N& U
   while 1=1 do * q% [% H7 N3 V
   begin4 M, X6 J/ \! [
   wait for e 110 min
0 m4 H# j8 }7 R; i   take down R_mA
/ U$ b7 F! L# X0 q; F  ^+ o4 c   wait for e 5 min
. x. u/ n! f$ Q+ |; D   bring up R_mA1 _9 G9 H: A4 J% a
   end* z" w- M2 \" @, k* [' Y3 N
end
4 n+ z5 k2 w3 F! S# Q2 m5 v" j

/ f. n' v  Q! Y, B1 {. C5 d6 Jbegin P_mB_down arriving/ U- {- C2 N: Y" z* H, Q2 u" K- Y
   while 1=1 do
" T6 M' n' ]" w( D, V   begin! o$ z1 \& J% x' z
   wait for e 170 min
6 D7 F* N# d( c1 _# S   take down R_mB' t# b5 \4 A* O% \
   wait for e 10 min
' C0 B' u/ u" x   bring up R_mB, f0 V( h8 Y: ?: E
   end
1 a7 a: x, J0 }" o3 |4 iend

5 q0 D( b1 G2 L5 Q; R0 c# n9 T 4 o# r! m2 z7 |; W7 M
begin P_mC_down arriving/ `: ?0 X' `; ]2 I# m# g5 s
   while 1=1 do : i2 s# @; j% G, V
   begin
" O$ D; Y. f( G8 c& a  W# {6 f; @   wait for e 230 min
  y8 I: [* O$ o$ X9 A7 ]; r  t3 N2 Z   take down R_mC
( t- A, K& f: }7 p5 [. @   wait for e 10 min  L- V8 G$ t& k# ^' ?" f0 H# \
   bring up R_mC
& x% b" G# f1 i2 y( n   end
. r* L+ G+ y$ X9 d9 R) f" ?end
3 g) P$ ]8 n0 s6 F

1 Q3 W# W6 _+ m# Qbegin P_mA_clean arriving: R9 |$ L% d: a' I2 j( V
   while 1=1 do
: o7 b  ^6 C' Z   begin* z& K( m8 [5 p  F
   wait for 90 min
4 ]7 U0 e% u3 c& I   take down R_mA7 C/ R# \6 l) k9 m9 F, h( D, Z7 P
   wait for 5 min5 N# B/ ^' a% Z2 x. D6 a
   bring up R_mA1 {9 V7 o& h" t& w. Z. _, Z5 V4 q
   end
7 K; i8 F* c9 U8 V: }, O. G& I$ Oend
6 {7 @4 b0 l/ v& [6 g0 _# |9 ?
0 x9 X) a/ j9 t; E  [
begin P_mB_clean arriving+ v, d. n( ~. h, z+ S6 m
   while 1=1 do
) B  s: h4 A4 g; E$ t4 O0 b   begin( I, R" q! ?/ e! `" R) s
   wait for 90 min2 J' G1 _" g9 A' Q, h
   take down R_mB8 R7 \' O6 Z9 U5 b9 k
   wait for 5 min
6 w' K0 o5 u& r! M6 y   bring up R_mB
- n( D0 I' T0 L7 W   end
3 J0 ]- S, r' p+ \/ E4 Aend

* w0 s( x4 T  U- p& Z
! @" b* J# {  {" nbegin P_mC_clean arriving3 t# [# g; o4 K# Z3 N8 }  @# O
   while 1=1 do
4 x$ @# A, C: p8 d0 q) }* Z   begin
- P) H5 P* F, o7 o. t+ |   wait for 90 min: I8 U) k' j% ?. W3 v( U
   take down R_mC
" P3 E# |9 z% v. z1 a# f   wait for 10 min' |( W6 F0 G" u6 g/ L/ S
   bring up R_mC" m1 ]3 Y% T, Q  e' {
   end
5 c/ {. b$ O% b. v" _' j+ d% Tend
0 N* x* N5 Z" g+ ~& v
----------------------------------------
7 p8 Q2 ]& \! q$ n
! E( f6 j, L; E* Y7 jExercise 5.9, P3 Q- V5 \' ^( Z0 M

- J8 P1 J* u. I7 W9 c% A' }5 w# {/ t
" J5 ]3 O; h1 a* d* f/ RCreate a new model to simulate the following system:
$ K- }( M7 v! ?5 E2 _% jLoads are created with an interarrival time that is exponentially
( A# }/ Z- b1 a9 n* ?distributed with a mean of 20 minutes. Loads wait in an infinite-
4 u" L6 v& o, A# [4 N4 Q3 q8 bcapacity queue to be processed by one of three single-capacity, % Q7 K+ g3 ?' S' R1 s
arrayed machines. Each machine has its own single-capacity queue
! R" Q  I: T+ k, A' ?1 nwhere loads are processed. Waiting loads move into one of the three 9 Q& Q( U" Z/ b5 j8 H
queues in round-robin order. Each machine has a normally ) z0 _; c/ d$ T6 M1 t3 Q  N; p
distributed processing time with a mean of 48 minutes and a standard * W- D; n2 Q6 u- t
deviation of 5 minutes.
8 m; u9 u7 C/ ?: S- NThe three machines were purchased at different times and have 5 a9 S9 P: ?" d  q& |& S' |6 R7 v
different failure rates. The failure and repair times are exponentially
  X6 ~: O4 Y' _; ~distributed with means as shown in the following table:
1 h: z- @7 {4 b6 `$ r" n6 M  J% ENote The solution for this assignment is required to complete 9 z' j  n% U6 W; F
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ' n3 P4 o" q7 y9 b
your model.
5 J# r' Q( {. N1 x; L" H4 I8 i9 G5 X3 ~* G# x
MachineMean time to failMean time to repair: [/ }( Q8 z' I. [
A110 minutes      5 minutes
/ H, a. O/ v( N) NB 170 minutes     10 minutes
6 B* A( p- l9 _6 ]. j: OC230 minutes      10 minutes
9 C4 [4 t" [" D. v1 k6 k" r( _+ ^' l9 l2 n
The machines also must be cleaned according to the following
' f2 j& A+ r. X! }8 J! ^schedule. All times are constant: 7 j5 B% C7 T; S3 R$ m
" I% s; i7 w1 w, {& W* B& f
MachineTime between cleanings Time to clean
- W3 J, g  U: UA90 minutes        5 minutes% V. \; G- T" _. W
B 90 minutes       5 minutes5 O, O) D* P* U' z
C90 minutes        10 minutes) r( R  e; _) P$ m* q1 e

7 g5 L( o; ^) B4 Y0 M/ b! [: I( nPlace the graphics for the queues and the resources. , {/ v9 }, W( \0 w- o
Run the simulation for 100 days.
0 w: E1 [8 [: `/ a5 t# @0 I6 dDefine all failure and cleaning times using logic (rather than resource
2 B( \$ W! Q9 D% q8 }" q$ mcycles). Answer the following questions:" [5 F7 |9 Z: N( w- M& Q
a.What was the average number of loads in the waiting queue?* [8 F% K* Q* e1 t
b.What were the current and average number of loads in Space? ' _8 h% K0 o' F6 q0 a5 u
How do you explain these values? + r9 Y9 b/ u" j# G6 s- t4 @  k

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
" f+ B3 j: N' ~; @send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& v1 x8 g9 D1 h" Y  f
这行好像也不太对,各位先进觉得如何呢?
' n6 y" \  z& h  p. {7 [9 Z' ^; v4 [
) K. l) D. O/ |8 K8 J0 pbegin P_something arriving7 [0 M( q% [4 g+ R4 t
   move into Q_wait
% o; H# }8 O# H0 u7 F5 v0 |2 a2 K- t   move into nextof(Q_mA,Q_mB,Q_mC)
# ?7 L$ o3 w4 P3 ?% x   use nextof(R_mA,R_mB,R_mC) for n 48,5 min" |5 D! T9 l+ r
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: y# u7 i! M3 r" t! Tend* D+ E" W! O8 k% u( M
5 t( [1 y. Z, g* X/ N4 x  `
begin P_mA_down arriving- r( U% p6 W. E! @! ?$ |
   wait for e 110 min! Z4 z) ]) x4 F
   take down R_mA5 G' I1 D1 r/ H. s: ^
   wait for e 5 min
( F* I6 P* Z- D) p6 ]) F" t/ m9 `   bring up R_mA
  Z5 ~- b) R: m* q9 Vend% d6 v) r" h6 A5 q& i( _
0 |4 w0 g' t# ^  Q
begin P_mB_down arriving
3 O4 f8 G" T# y& j$ i: H* z   wait for e 170 min& P! v' G7 G3 y$ o" ]; B$ H! {+ s
   take down R_mB0 F2 r  k, r% Z) Q" h6 q
   wait for e 10 min: u# v  n! o4 A) R. Y
   bring up R_mB
5 O4 _) ?- \# b) L+ c: gend
' B9 C9 r9 F) O# J1 n5 ]
* G* E7 h. b& S: a7 |9 Fbegin P_mC_down arriving" Q7 K4 T7 {; }  C3 n6 Z% l  C
   wait for e 230 min. {& R; k( B; }
   take down R_mC+ r$ ]$ l0 Z2 R" j4 {2 a
   wait for e 10 min1 @+ _( ^( f; x. P$ a8 l6 t7 x
   bring up R_mC
* x$ ^) U, a" }$ j. @" Oend
, q; F0 V" p3 |  r( j9 r4 x; Y$ d' _7 K  U0 P" D
begin P_mA_clean arriving
& v) _, r+ [  m$ f5 u8 P7 P   wait for 90 min
4 i, T" A- h$ V   take down R_mA- o& y7 o- a$ e/ O4 K3 R
   wait for 5 min4 d1 w/ e3 {8 l( \: G! L
   bring up R_mA
0 H0 G+ }+ a" eend
: k4 N/ b; ^, j3 b7 c4 P
# D& s- D2 v3 N! ^" ybegin P_mB_clean arriving& s' S% L, ?! j7 P" Y5 \' k& E) M( U
   wait for 90 min
; K& p; L- R$ |5 O" S( i6 u1 R7 c+ a0 s   take down R_mB
/ h5 J$ V0 M. a# J$ ?   wait for 5 min% O+ ?3 b; S% u( _  D# d7 a
   bring up R_mB7 ?5 N0 ]4 r. c- @: [% e* A& I% A
end4 {6 P, ~, d) I% F  a8 a, r) ^

8 t& v4 A7 }- D7 G# Bbegin P_mC_clean arriving% M: _9 D: i& V9 M: O
   wait for 90 min# ~: o; A% m$ ~/ v% J
   take down R_mC& d. \0 G& j1 O2 h5 f
   wait for 10 min
  k( Q: b4 ^' h  C% O$ c8 Z7 R   bring up R_mC6 T. O- x6 j6 J. S/ _
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
2 e; L8 o" O% W1 L+ q   move into Q_wait& b3 ]  o7 Y) C: C6 `8 G! Y
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
, B0 d1 W2 T" }0 Z, {/ ]) W   move into A_w: y# A! S- e+ d' Y& |# j9 p; M
   if A_w=Q_m1 then use R_m1 for u 48,5 min
, u3 g# b* O9 F. w) D1 F4 n( P   else if .....then use ....for u 48,5 min& \+ ]& N3 p" @, H
   else if .....then use ....for u 48,5 min  
- {. \+ s1 A. k4 u: X6 X& `4 z   send to die
% x' U1 w9 k! v  b/ Jend3 F: r: e) Q1 |/ n, S7 _; c
: k& m8 q; H' ^
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-22 02:05 , Processed in 0.015140 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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