设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7096|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 # J1 n6 r* u& p1 V& [4 @# a
0 F) w+ z/ }3 \3 ~
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
5 Z  J9 u" S. b! D: S+ q; v' U1 I0 _1 G: `
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
- E2 v& O* k( ^7 T$ L# {, A$ w2 Y/ x& m( ~' q
--------------------------------------------; X4 u1 a% Y* D4 [0 G9 T
begin P_something arriving) \8 }' D# \2 K4 D# ]8 J
   move into Q_wait7 e4 j6 w1 f0 m# H: B7 P5 u
   move into nextof(Q_mA,Q_mB,Q_mC)# N& X/ [# l& A) I
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
, d  e, i2 T9 n* i" Q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- Q: {% h9 i! M
   send to die/ ~* l# H$ U, Y
end

$ N# c3 w5 r" d6 j. t
7 s4 g7 O  w+ N0 kbegin P_mA_down arriving
5 W4 O4 @( T( o& L2 v) t   while 1=1 do 1 A+ d% U) ~# O4 T# M' @
   begin
2 [) M! k# d# I6 |1 h   wait for e 110 min, k5 ?$ b3 I1 Y* N1 P/ O# [
   take down R_mA! i/ p' ]( @  `1 D  _" p2 {
   wait for e 5 min
4 W+ ^/ }4 d( P* m% d   bring up R_mA" o0 K5 ~- Y' S* D6 ]
   end
7 H/ S9 i- h$ Y6 B: Xend
5 _, V- s& R/ `& ~( d0 B: _

- S  j4 [/ w6 O6 ?0 D6 l" F4 k" {0 ebegin P_mB_down arriving1 s  ~% y7 M2 t9 P
   while 1=1 do) O( w1 v+ [% {* u# ?9 H4 D! U% m8 m+ ~
   begin0 p8 p4 i4 w1 q" g3 Y3 T3 u
   wait for e 170 min
6 V' B/ C4 U5 r2 a  d   take down R_mB1 t: y. j  O# l/ Y7 m2 O
   wait for e 10 min" K$ b. q4 c- K) m" I
   bring up R_mB
! f9 P' u$ M! S$ c8 C8 g: v   end
3 b8 R# q# n# |1 \end

0 h! g7 o$ X( |3 d- N7 h7 H9 ~5 G# o4 a
, s/ J' |# n; ?, `1 pbegin P_mC_down arriving
5 q* a% ?% T* {: ]. ^- x   while 1=1 do % O+ C7 R9 ^* k* W- t
   begin- D$ w& c0 v/ R
   wait for e 230 min  q4 U: m4 q9 P! e
   take down R_mC
( r# u; _& D* _/ l2 {% D5 z   wait for e 10 min5 O' l  K$ M; j
   bring up R_mC
. p6 A8 ?3 o: \   end2 D! G7 p1 N: ]0 _1 {0 n
end

, U; ~1 W% r8 ], s+ g 4 X% |4 J$ b2 L& Z6 [
begin P_mA_clean arriving
6 v" g- K" w8 ~. k' J  t* |   while 1=1 do
0 t/ ?' a! u" }1 ^: l0 R# X0 u8 ?   begin
9 }- Y# v0 t' I4 E; J$ q7 z9 u& T   wait for 90 min
& ~4 V0 z; A. t. h- j2 C   take down R_mA6 n0 }: M/ J- j' d! [! x
   wait for 5 min
1 l7 r7 D6 c: l* ~/ v) V   bring up R_mA
6 L. w& Y+ @+ s2 \2 f$ l   end
+ T" o# D! _* z* h' H( a/ t. n& ~' ^end

8 H, o& G  N. |$ G! ` ( Y* S# S/ B( p7 ^" Y' y( j/ Y
begin P_mB_clean arriving8 f. W3 D% O9 h3 u1 [
   while 1=1 do  c( q, I9 m6 w$ N5 ]% D; O1 s
   begin) I% F0 w* `& @' h: v. ]
   wait for 90 min1 z3 @4 D: ~$ e; j$ F
   take down R_mB
  `$ q+ E/ I4 i/ r- o' u8 [   wait for 5 min
& z- I/ ~- Z2 f5 m% P7 i1 e. H   bring up R_mB0 n" @2 E! r7 O& M' |
   end0 ~) S6 J" g0 Q; d
end

% x# R0 d: h  f/ x: u 9 G9 x0 O+ v8 n' J  L8 m- U
begin P_mC_clean arriving  t. D- p7 [; q+ k
   while 1=1 do! r! \! Q1 K# h. B" [' k4 j6 ?% p& v5 g
   begin
  r5 c# W' O) f; a+ P, [   wait for 90 min
# A) |& |3 U/ ^   take down R_mC) q2 Z7 C& I  E7 @) R3 W
   wait for 10 min: O& z# {/ H% P! w& _
   bring up R_mC  x0 F& h% M8 v! Y9 W9 i
   end+ H/ V$ V! t9 t7 @6 z/ y2 W
end
5 a2 N1 _- H* h2 u# U& Y
----------------------------------------
) S. O+ c2 W4 N1 r6 d! ~5 P1 S) C3 ?" z
' `3 i. U* S. Z( }( v0 wExercise 5.9
4 i* n, N- F) b4 U
* L( ]. B1 d1 n( U% E
6 K9 I1 s+ B* I& K2 @. O+ Y) L& iCreate a new model to simulate the following system:7 U: i0 T" U2 i' V( M/ ^
Loads are created with an interarrival time that is exponentially 1 c) V6 u8 \4 o3 d1 \. o
distributed with a mean of 20 minutes. Loads wait in an infinite-
9 G# U/ W; ~/ m6 I; ^capacity queue to be processed by one of three single-capacity, , N( M7 g/ Q% A
arrayed machines. Each machine has its own single-capacity queue : }# V$ `+ a' d6 G6 X/ s
where loads are processed. Waiting loads move into one of the three ' [( p& D4 j/ P
queues in round-robin order. Each machine has a normally ) i4 S6 Q2 R! Q
distributed processing time with a mean of 48 minutes and a standard
2 n2 K  O. G0 ?' O3 ^" Odeviation of 5 minutes.
: ~' H% V- o* D  m0 ~7 k; z! k& KThe three machines were purchased at different times and have
2 o# f6 i0 B$ f' Z' V% I) ~; edifferent failure rates. The failure and repair times are exponentially
+ G2 ?; y( t, P4 `$ [& a* Ldistributed with means as shown in the following table: 1 d" l! u$ x+ b2 @6 u
Note The solution for this assignment is required to complete $ r; M  A. m  f$ A3 o
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 2 c! r& J& H2 S; {  m2 q1 \
your model.
" e# d' I  G+ D1 G8 j( |8 p, g9 j- [) t2 ]
MachineMean time to failMean time to repair
7 B  T. J4 ?4 ]3 @# N# ?: IA110 minutes      5 minutes# ~7 A$ @# X7 ]5 ?( i+ S1 ?' I" p
B 170 minutes     10 minutes
" \$ t. c# L6 D! j/ Z5 L4 p, qC230 minutes      10 minutes% t* u4 L  z9 O! ^5 U; @* D/ W  o

! {5 G; N; W: CThe machines also must be cleaned according to the following ) O& Y6 K: S# U' J2 B3 Q
schedule. All times are constant:
9 s" C- J) M( l2 ~2 U0 h
& q1 S" c1 K. O' Z2 KMachineTime between cleanings Time to clean: b% O; y$ @" ]
A90 minutes        5 minutes
9 s% s, l' |& U  |B 90 minutes       5 minutes
( N- l' x# c8 q4 lC90 minutes        10 minutes: [" g6 D, g2 b; L& E4 _+ R

5 P; ^' V$ E, C1 EPlace the graphics for the queues and the resources.
, f: h& J; r' o. RRun the simulation for 100 days.
9 \$ \+ p" o) dDefine all failure and cleaning times using logic (rather than resource # G) ]0 W  t- k. h0 _- W
cycles). Answer the following questions:: X! C. R! @8 j- s: b+ F& U  R
a.What was the average number of loads in the waiting queue?
7 h9 S) K5 Y: i- a% fb.What were the current and average number of loads in Space? $ T7 W# T5 j0 f! K8 f* l# g) N) B
How do you explain these values? 0 H; F$ }2 k! S3 l8 g6 H0 p1 q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
5 O8 S0 l' Z+ S6 U# V9 T$ }+ l! m. a. bsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ S0 N' s6 ^4 I$ _这行好像也不太对,各位先进觉得如何呢?4 `6 [' r4 b( o" g# v# c

4 h! Q; N% S8 ?* u0 [) _begin P_something arriving
- k' t9 `$ h  n  z" k7 R5 X   move into Q_wait
! b7 N8 @( T0 h8 z7 u  @   move into nextof(Q_mA,Q_mB,Q_mC)
5 u0 C$ n1 f  }% k+ \; W( ]   use nextof(R_mA,R_mB,R_mC) for n 48,5 min6 E/ R! X: g$ r6 x
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) : k! z1 h0 N) T
end. z2 P( R5 D# A% _
1 i  Q3 f7 b- F, r7 w. r
begin P_mA_down arriving
' r; P- |( v( p$ c, q   wait for e 110 min
  h9 A, u$ J: t9 ~! B   take down R_mA
4 V& T4 M( e1 T, ]4 c8 o& m9 m- G   wait for e 5 min
& q1 O/ [6 ^5 y; `5 |; F; o   bring up R_mA
/ W, Z: Z6 c# n+ F8 C* Fend
3 f! ^9 C% Y0 J7 z' H0 T8 e: I$ I* A' A0 C- v) D8 e
begin P_mB_down arriving* m: r1 U8 {& ~) u0 O, B" n
   wait for e 170 min
& D3 u5 _5 t" a; a5 ~* F0 c7 B   take down R_mB7 h  u7 o* r3 ~9 e- ~
   wait for e 10 min
! n' o  |, o; m9 O   bring up R_mB
1 b3 X, `2 u. Z' A. Y( gend2 k0 d- [* B0 t9 u5 `
! `: Q/ y* ~/ r! L' y
begin P_mC_down arriving
" u6 d! t6 R# i4 V5 j1 ~   wait for e 230 min
) l) R' d3 ~1 t! K5 L/ F- L   take down R_mC
. [% N( h: y8 C5 D   wait for e 10 min
) \* y- \: B6 E- [  V- h2 O   bring up R_mC3 C# H1 B4 m$ p7 G8 p. E
end
& J9 x8 `$ s6 l* c+ h: o/ Z/ Z& A; E' i' l+ z
begin P_mA_clean arriving9 ]. U% ~. A; p3 C
   wait for 90 min+ N; u. ~% f* \; ^" G5 a3 U
   take down R_mA
2 r) _4 j) `7 b. D2 b. r   wait for 5 min! o: X( s$ v. j& U8 F' j# L
   bring up R_mA. ?1 M/ H: y( m& p" A. g" V
end
5 r9 P; f2 D* B5 R; `8 q" J. ^3 x# i9 b& S( S) J3 e! h% T& F  @* c
begin P_mB_clean arriving& y$ o" V$ G2 A  l6 e* B7 |
   wait for 90 min+ K+ B' h' U1 r- {+ C, _* [. u0 n
   take down R_mB
: E1 \+ l$ B! a1 w2 N   wait for 5 min( z: \' e! ~5 m# T+ g
   bring up R_mB
  M+ {9 g$ }  t7 w7 Q; ^end
+ C& w; N7 q# x5 H8 b
% O5 F- b, F4 w" S* o- B7 J* `begin P_mC_clean arriving
+ }  u3 _+ |& _   wait for 90 min
2 |" M/ B# P5 y1 F7 U   take down R_mC2 |. o; C3 C9 e# X' |
   wait for 10 min2 a' O9 z& y) ^- ~
   bring up R_mC& D9 H, W6 a6 T0 t
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
# m. ~9 U2 ]  Q3 Z3 z   move into Q_wait% \5 o: a4 Y, i' }5 F+ r6 w
   set A_q to nextof(Q_m1,Q_m2,Q_m3): W& A' H! ^( d. M0 i2 g
   move into A_w
! O% z# V5 k1 [8 j# `4 t   if A_w=Q_m1 then use R_m1 for u 48,5 min& D4 i/ S$ e& _. U% h  M
   else if .....then use ....for u 48,5 min
9 t+ I& q/ Q& F5 p3 M& G" O8 Q   else if .....then use ....for u 48,5 min  9 `1 h2 Q$ H: w
   send to die% q0 P- b* p3 ^( S5 R2 Q2 I
end
) w& l2 h5 R( D. I
& O* ?  a  x) A2 d- c供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-29 21:55 , Processed in 0.013218 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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