设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8292|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
; g3 i% {$ d8 q$ S. K! p0 J9 m% u7 v, a  c' [, f
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 g9 A6 E3 Q: k) b# j
: y* U& R; v- b; z/ B' `: ]7 b不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
" }+ {2 y% S1 W; C/ j
" {) F* V; Z( Y. O. m- M' X- ]
--------------------------------------------
) Z1 G$ Q# N; d& t* N, g7 Abegin P_something arriving& t; W" \, p) G& t# l
   move into Q_wait7 q/ C! ]8 y+ J) r* X+ y3 |' d
   move into nextof(Q_mA,Q_mB,Q_mC)
" o# o8 S8 d1 J, p9 n5 m   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
# x8 \- O" `; q! n/ ?   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- Z/ w8 b, }5 }& K! t* e, y
   send to die
8 Z) n3 d) _. `/ N& M, c0 x* iend
8 O. v, W3 Q, ]' S6 a. a& v
0 u) ^& O+ Q& ]! n$ O
begin P_mA_down arriving' T# H; S% t0 E; V$ c
   while 1=1 do / S0 }6 f% s, h& y( q: q- `
   begin3 b! i+ M) \$ ~* h/ g& R- N# B  x
   wait for e 110 min. ?# G$ N+ x! c8 N+ ]
   take down R_mA
. \0 n0 I3 I( M0 C% V   wait for e 5 min) a  H! U4 m3 K2 t9 C) G0 Q" {
   bring up R_mA! u' `) P7 s0 h% j
   end
, n$ N. `, h1 V; X8 D" D* D. _end

, b! p7 y3 L% l" w( W) N 4 J6 O' l6 h8 k, x% `; [! d6 R' R
begin P_mB_down arriving( x% c6 U! f# l* `7 M
   while 1=1 do* S* n. O, g% k' e
   begin  I6 F: q3 s$ `) L- p8 N" i
   wait for e 170 min' x0 L% [6 o3 F( P8 [6 k
   take down R_mB
4 J/ Q- J$ {& q8 \( @9 {   wait for e 10 min
8 v6 Y+ x5 B0 R# ~   bring up R_mB
! \: {+ s/ Y. u5 w: |+ u/ u  l  a   end6 ^' t& Y1 |3 J! T- {# n
end
9 M  J( x- N- W' U8 X
  W. q) p/ o/ u" F5 F% r8 t
begin P_mC_down arriving
* `6 W( _2 O1 B' ~   while 1=1 do 5 H, K2 j: @* W: i8 I3 A8 E
   begin
$ ?3 n8 V4 h' H3 }   wait for e 230 min
3 V- ^1 q# [& ~% r% M- i. o   take down R_mC; e7 C0 m0 E) R; }" f/ _
   wait for e 10 min& R( A, R2 Z* y! V6 L8 h
   bring up R_mC
$ n. {- l1 r' @3 F  e- _  ]   end0 T; Z: c% s8 d
end

# T  p3 A- W1 P+ F1 d6 o' w
# v7 Y2 i+ U% P: [begin P_mA_clean arriving( f) s) n$ V- F% h- d9 |: o
   while 1=1 do5 \. g! g+ |2 N9 _3 x) h! F
   begin
5 n0 X* D% a; C5 F2 m" t9 h   wait for 90 min
& }- w. a' C$ \) C   take down R_mA) Q4 J. p- u' D* ^
   wait for 5 min
! q+ ^9 c" _! X2 t   bring up R_mA
/ P5 m; x% Q3 ~$ O2 h8 D   end& F4 Q2 \  W0 Y! H
end
/ v6 i8 \$ A& S- b! Z" g, N6 H: x6 {

$ b0 Q9 K( [4 t- X# C, I9 `/ B/ bbegin P_mB_clean arriving2 ?: \8 Z7 J, g+ H: k  P
   while 1=1 do
  f$ |# T  P" Z; L   begin
2 p" ^  ^( {- h4 ?3 d) q% {   wait for 90 min
# J: i' S, S, u   take down R_mB
% H5 b1 i2 U3 X) w4 C& y8 @   wait for 5 min! J" l8 p$ _, V5 ?* s7 |. A+ D8 x
   bring up R_mB6 K5 f$ E4 }3 {2 |. B% _% R- D; ^
   end0 c7 r- U) a" A# h* u- N. C' K+ j
end
" K) a. O. }- g$ _+ I" i5 n* g
. C% }5 {0 \7 R, y$ Z5 a6 o
begin P_mC_clean arriving
4 d* V. j$ u5 g% f- H2 [$ o) j! }   while 1=1 do
6 b5 C0 R, L9 {6 j( q7 K+ g- K   begin- h$ B4 K  ~7 r( ?) ]
   wait for 90 min  s. w8 B# l; c% o
   take down R_mC
/ ]% Z+ \: X: y) x; n( i# ~   wait for 10 min- I/ p, _: m' N. K( A, x) s8 u. E
   bring up R_mC3 W- P  w" U/ w5 k4 \. H
   end& @) D( K* _! z, l$ U0 j  g
end

# A: G; d# }  l----------------------------------------/ L& |6 g/ y- R2 g  [; i

  [3 {, _4 J2 `& f+ |/ v  r& {Exercise 5.9+ h$ _% F2 f- ]; ]& O) a0 X

, B! o; M9 H# ~' Z! ?: t  r: N0 u4 g- n) U2 a; ^' c
Create a new model to simulate the following system:3 D) F+ l& \. T0 ]! _1 l' I7 J
Loads are created with an interarrival time that is exponentially / ]/ u; d4 B4 ?, ~- l
distributed with a mean of 20 minutes. Loads wait in an infinite-
) `. }9 x% O. L: h$ u5 ]capacity queue to be processed by one of three single-capacity, 7 e# @/ _3 K$ |* W( ~& E* C
arrayed machines. Each machine has its own single-capacity queue * P6 c! `- ]3 \0 B! X) e
where loads are processed. Waiting loads move into one of the three 9 ~% |! p# r2 i5 D: s# E  J
queues in round-robin order. Each machine has a normally , O3 X: c$ k7 r. o) n
distributed processing time with a mean of 48 minutes and a standard 9 F9 l6 X. C. e, ]
deviation of 5 minutes.
/ [7 m; z  K' F. cThe three machines were purchased at different times and have 9 s7 t  D; E" S# s; Z
different failure rates. The failure and repair times are exponentially # ~  c2 D2 `' O5 U2 Y
distributed with means as shown in the following table: 7 t% j2 n3 X- w! C) t6 {4 a
Note The solution for this assignment is required to complete
# @3 k3 E& q- X: w8 t) K* Hexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
; h4 }1 @( B4 C& d) S7 K0 Tyour model. " P" b: V8 j* y

- C0 j2 s3 z& K: p# }MachineMean time to failMean time to repair8 H% G, E0 x' q) Z1 F
A110 minutes      5 minutes* N- `# k. D  T/ B7 f9 \4 _% ~# `! s
B 170 minutes     10 minutes6 j0 b* K/ d5 D4 g- E  ~7 F
C230 minutes      10 minutes" q6 p4 j9 `# i

- K9 g. @3 R& T( @1 U, {The machines also must be cleaned according to the following
- d$ q9 ?- r' Jschedule. All times are constant:
5 m+ L( Q! ]9 K+ R( G& a) y% ?- v2 j/ ~* R% Y( M  _
MachineTime between cleanings Time to clean; U# v3 O# _" a- p& l5 z0 |% r3 M
A90 minutes        5 minutes( @. K* p0 x% _* `) L! E
B 90 minutes       5 minutes
) c% y; O: ]( [" C& M+ b; l1 u8 ]7 I! L. xC90 minutes        10 minutes5 B; R0 X) R; o8 |
4 u" r; u) s) u; V
Place the graphics for the queues and the resources. - y5 A* ~0 p! r
Run the simulation for 100 days.
7 Z, m5 \, _4 c* v# `Define all failure and cleaning times using logic (rather than resource
: D3 P+ i  B, ~* V4 G, V# W) p3 {! r) ucycles). Answer the following questions:
, @, n) k4 T/ F. ja.What was the average number of loads in the waiting queue?  z2 y. s0 J6 \& n( S8 u$ p+ O8 d
b.What were the current and average number of loads in Space?
! L5 p! [1 Z* o  JHow do you explain these values? / _, \, i% z1 t: c" W

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉1 x& [" @3 l6 ^; d6 |# X. |
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). M' I% R% m  q/ W4 a/ z
这行好像也不太对,各位先进觉得如何呢?( Q5 {) o9 I$ C5 v

8 s" K/ V; H& [( s' {4 ~3 Ebegin P_something arriving- l$ ?0 ?  H0 v! d/ @3 v6 l3 k
   move into Q_wait
1 ^  _3 u) m: s- F( o   move into nextof(Q_mA,Q_mB,Q_mC)
* {& Z- m, ~" |6 H1 \   use nextof(R_mA,R_mB,R_mC) for n 48,5 min6 B+ i# k* N1 d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 K' H4 I/ e" gend" K4 \2 a1 g1 |7 {

* @. a- Q, N; d9 ?3 r# t( `3 Dbegin P_mA_down arriving
' j7 k9 r1 @" s1 v0 g: S   wait for e 110 min0 d( q- J) {# k2 l4 R
   take down R_mA
# V, v9 u+ L' R+ C7 U  F. a   wait for e 5 min1 Q3 I( ]/ }* Y" A) u3 y
   bring up R_mA: S. `, k9 t; b& U
end
+ F# i: \! z$ e# o
/ e3 X4 a0 f- P# q( Bbegin P_mB_down arriving
/ M( @9 g( d* }. E1 L; M   wait for e 170 min
; J/ l1 N' g- T2 t/ j9 a- f. E- v( S   take down R_mB8 r$ G5 g; D7 d* F2 `$ A  o
   wait for e 10 min
1 U% b6 I$ f: o; n   bring up R_mB3 G9 x7 }7 }1 }" [  [) z
end+ Z+ J7 B  r% L

3 P$ _) Y9 P' T# _, H: Mbegin P_mC_down arriving
1 S! C7 j& `* o+ ^) L* m   wait for e 230 min/ j8 A5 X1 Y# N0 `6 ~  C+ Q5 R
   take down R_mC
* D6 A) u) ^3 \# i& _   wait for e 10 min2 p( s+ x- P" V; L  Y& V8 l( [9 G
   bring up R_mC
- Q" q/ F5 ~0 r! r8 dend
, Z  b- j# f, T; Y" A; L& @6 S5 N- A7 T: B" r) X! e2 @2 }6 I# C
begin P_mA_clean arriving4 w2 I1 y5 @2 x
   wait for 90 min
  v* C( y* N  k/ K* s   take down R_mA$ T7 _* }7 o* {4 d' }- p* }
   wait for 5 min
7 s- i, F( I$ N   bring up R_mA
, A2 N+ c$ l/ Y  q4 D/ ]end" t* f0 `( t& Q, @0 a& i3 o# \

! x6 G4 x& s) ybegin P_mB_clean arriving
3 B4 j& b; Q; V7 s   wait for 90 min+ ~5 h, V3 d2 c+ a; Y4 M. Y
   take down R_mB
' y) [9 j  X) U8 l6 o5 H   wait for 5 min0 n$ s7 S! y6 G" w# Z: Q; B1 k2 c
   bring up R_mB+ w) N" w  h. b
end
: P$ r# d7 C' P" T- l* [. _
3 K% F+ k8 t/ M# c0 Hbegin P_mC_clean arriving: ]' `8 T3 t- E: `& l
   wait for 90 min
: Q7 j+ a, I# k9 j   take down R_mC
: u7 A, E2 Y9 k# W0 z+ F   wait for 10 min
  i( n( x+ ~; P% `7 A   bring up R_mC1 ]( T1 M8 W) b# m0 t; L
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving7 `: d, y8 n" G6 N1 b% S
   move into Q_wait
5 n$ I; K4 p; v- y6 m   set A_q to nextof(Q_m1,Q_m2,Q_m3)2 K0 ]5 b* l) o! o' }6 `
   move into A_w0 `* `3 R1 _9 _2 V# b
   if A_w=Q_m1 then use R_m1 for u 48,5 min$ i. e& L: \. y8 U1 T4 s
   else if .....then use ....for u 48,5 min/ k7 o5 s  n) W7 W2 j2 ^
   else if .....then use ....for u 48,5 min  8 {$ F- P5 n$ L2 d) o/ r+ t/ W$ }' l
   send to die& i1 J  `3 A% J
end
3 M' p6 m( n( G" ?# \" H2 g
, N: V* u# C. G1 V供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-6 23:26 , Processed in 0.014537 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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