设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7286|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ M' b! g. x! i1 B$ i5 N$ S" p, @+ j+ _" x5 p6 S; R+ l
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
+ u4 c/ N! G' w. e9 C5 v: ?+ _1 n4 \
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
$ d( D# G: V' [/ g' N  ~1 F4 Q2 N* X- v2 \6 J( B) I
--------------------------------------------6 b) t% P: S, V
begin P_something arriving
! @8 \+ M5 c# E4 x% u+ c: ?1 `   move into Q_wait: B& \9 \! |& t
   move into nextof(Q_mA,Q_mB,Q_mC)
. _! }+ b* D/ P7 S( |% o1 f. [3 _   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min* e) Y" l! A9 b$ ^  C( E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
9 L4 u& G, W/ @3 @& G3 r9 G   send to die7 B* B1 K& `; p( \$ C
end
, B- E" ?" T+ a- G
4 T3 q7 q, T, |- B) H  e
begin P_mA_down arriving
. p# F5 `: T& P% Y& {3 d, u$ l   while 1=1 do
& k4 ^0 c8 v& i   begin0 m  A$ R0 z, L" r' X/ ?2 d& t5 G8 C
   wait for e 110 min$ Z4 q8 R" r$ m, s3 r: A& f
   take down R_mA9 {0 B; s/ i8 T1 T
   wait for e 5 min, j3 U; q: t/ _3 G" u0 s
   bring up R_mA
0 G6 \8 f7 ~$ z  k7 b9 b' V3 V   end% Y. T% y. k+ s# R% K* U
end
* M  M+ W; g* C" h% n$ n% E9 t  Y

) d' f. [3 l6 L( o8 W/ h. Zbegin P_mB_down arriving
! l9 l8 j+ x: B( X( |6 n% T   while 1=1 do2 h4 q& a; [5 z$ V' J& X* B9 O! ]
   begin/ a) r2 P) p. k* h( e
   wait for e 170 min
9 h, Z9 B, w/ c" X   take down R_mB
  F) s' l: m% R   wait for e 10 min
/ }; b$ J( A% O/ U" ], `6 ~( j   bring up R_mB
: s4 t. ~. b* y0 O- H4 `/ P   end- W$ ^; u4 N2 l5 Y8 r* F
end

- |( q( j) L! o  u+ ?8 T
, t3 D1 k7 O, ubegin P_mC_down arriving
. N' ]7 l% [& S6 k2 O* E   while 1=1 do
( _0 T% A; T4 {$ @+ v7 ~- B* S* C   begin  g. N) `& q5 B4 `
   wait for e 230 min
* {- u2 V: F, B- C   take down R_mC# G; ?  ?  p4 d+ \
   wait for e 10 min
6 ~( J. U. |* s2 _; W   bring up R_mC& K! V/ Q! I( x  U) H4 x9 B0 q* ^
   end) ]! [4 a1 {. ~+ q
end
2 M3 H9 h1 _% d8 E9 o
+ Y7 D* a2 A0 o" c* ^( X
begin P_mA_clean arriving
+ R4 b- l2 u  n- r( b3 @   while 1=1 do7 R$ j1 u. B" y8 g0 Z, h3 a
   begin" a/ L1 o; {% @# d
   wait for 90 min
2 l8 W# b6 U, K$ Q4 \, o- B" Y   take down R_mA
! m7 }# e* _) A   wait for 5 min0 Z& \" p* c( L' @1 M' z$ b& b, v
   bring up R_mA
6 i+ h; ?, c  f+ [5 g   end* F0 Y4 G& Q0 j
end

! b8 @5 X; t, j' x' h * H' u7 c! v0 {: |7 W
begin P_mB_clean arriving) M" ?" M  N/ Y- k, s
   while 1=1 do1 l0 `3 R% c- G4 f2 E$ y! r
   begin
, D. ~' a5 o! d  E9 p$ t9 h! a   wait for 90 min
3 n) B# p8 q3 |   take down R_mB
( X- U% ?# M5 V, w# V) p" Z0 E: Y   wait for 5 min
* \8 V1 h/ x: r0 \  [) `. H2 y2 j   bring up R_mB& n8 W) H( X0 P$ _4 e
   end6 _) J( J* [% g
end
/ y6 Q7 F3 j, F0 B( {) r
5 ~2 U4 C' z/ @) J9 X
begin P_mC_clean arriving
% ?. P4 I  V; `: W1 ]. y   while 1=1 do
; d3 F% K2 _5 `% z   begin1 A" z, f! `; l2 |
   wait for 90 min3 J: y* O+ w5 P9 y
   take down R_mC
: I; f, R0 j" g$ g   wait for 10 min
- d3 Q( X& y7 ~9 s   bring up R_mC* Q- k9 r3 V% b' Q% o( G" S/ B- L
   end: o( D2 t/ Q! G  u6 Z8 N
end
$ U) M* Y3 B1 d% d" }! L, m9 D2 k
----------------------------------------5 j1 d- l, F  _

$ ?, {6 m* j$ K* y2 L8 z' l* {Exercise 5.9
3 `+ m+ Q6 v4 l) o% g- L& h5 @- r0 F4 y1 H$ o

+ s: }  F; H# i$ K& q- G0 `  WCreate a new model to simulate the following system:3 `+ D+ y' W# _9 K
Loads are created with an interarrival time that is exponentially
9 e& U+ h" Q; _distributed with a mean of 20 minutes. Loads wait in an infinite-
) k% ]  o: `4 Z+ l& Z: dcapacity queue to be processed by one of three single-capacity, " ^1 @8 a/ l/ X9 c! c- S
arrayed machines. Each machine has its own single-capacity queue   G% k) L6 L. Z
where loads are processed. Waiting loads move into one of the three
  b' p) Y8 e. z' U5 o5 B5 Equeues in round-robin order. Each machine has a normally
  e6 G$ h( J0 Vdistributed processing time with a mean of 48 minutes and a standard
; i" o2 W% G$ |4 B3 Q; b  Mdeviation of 5 minutes.& D5 y6 I* Q* E0 }3 }$ p% s  E
The three machines were purchased at different times and have 4 O5 N9 K& c3 v2 W2 d
different failure rates. The failure and repair times are exponentially
$ B8 Y8 C0 l* c- L$ x7 s/ Adistributed with means as shown in the following table:
5 b/ y6 B* `- FNote The solution for this assignment is required to complete
$ v& y! x, a8 e, E) fexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ' o) S  q: S' E8 o: a3 @0 M
your model.
  d. T9 v/ Q1 }8 c8 [1 K/ R& v; Z" z6 S/ D! c8 Q" I
MachineMean time to failMean time to repair
4 M# X$ ~# \, q+ @0 n) fA110 minutes      5 minutes
% R* W4 X- \/ C- |B 170 minutes     10 minutes& X9 `8 t# P0 a2 ?
C230 minutes      10 minutes
+ `8 @& K9 w8 K$ {/ h& M2 `0 P6 k/ q. X/ \1 w' C* U
The machines also must be cleaned according to the following 1 u8 W7 T+ A: f
schedule. All times are constant:
3 {$ X( W# P; h  b+ f% J$ R* i; |# u- Q
MachineTime between cleanings Time to clean
5 i7 p2 n# f& l( a( Y8 tA90 minutes        5 minutes
$ A5 x2 D2 W- H% ?  `& N. Y' iB 90 minutes       5 minutes6 `/ i+ r$ c* w5 I0 _
C90 minutes        10 minutes
4 F, M3 @: {! o( S9 y! F% U$ }+ N" O! j7 p5 e
Place the graphics for the queues and the resources.
5 q: u/ D0 a2 `3 _+ rRun the simulation for 100 days.
/ K/ i: ?; R6 N2 O2 L) uDefine all failure and cleaning times using logic (rather than resource - V/ k  M" H0 z1 w& q# Z5 D
cycles). Answer the following questions:
* z; z( ~+ e: [5 oa.What was the average number of loads in the waiting queue?
" B1 `! f3 A( V: C/ N0 _, S0 eb.What were the current and average number of loads in Space?
: p  l6 y  F1 h  P  v9 EHow do you explain these values?
8 g8 B/ O, i- |' Y% i" q1 A# p

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉, T& B4 K/ }3 g  f' G5 i. H, C
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 o$ z, S: s* h  _) M& s! g1 M. J* G
这行好像也不太对,各位先进觉得如何呢?
4 D/ ~7 k" t$ w8 n
6 F6 }! P( V; E& N- Bbegin P_something arriving
) t3 F8 j4 K3 a   move into Q_wait
' \7 `! k! H; D+ k# U   move into nextof(Q_mA,Q_mB,Q_mC)
! ^  H: q( q% @4 ~9 U   use nextof(R_mA,R_mB,R_mC) for n 48,5 min3 r+ ~$ [: V: B7 C+ f" A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ! _. z. V7 t7 }. @) e
end
4 }9 p: q1 s1 B9 @: Y1 E+ o# F5 v, X
8 i9 H$ K. ^1 A) \6 ?; ibegin P_mA_down arriving
1 D) u6 w8 m; E" L5 V1 n  `' W   wait for e 110 min
' _4 T* D" ~4 f: M8 R" x7 \& b& S   take down R_mA4 m5 H% O+ J$ `+ j# S
   wait for e 5 min' F& I; s6 D* s
   bring up R_mA$ j8 h. J1 M) L8 ]. C
end
/ I5 n% `) i9 b0 K/ T+ T3 v: {) q+ j) u: R
begin P_mB_down arriving3 p* V1 M! k2 t5 W- k) n1 d
   wait for e 170 min* B+ d0 y, b; I
   take down R_mB
- N' _8 B7 z) _. u6 |2 U% x   wait for e 10 min% {; m# W$ H( R; ]
   bring up R_mB( n3 @6 ^9 x1 b' ]) K1 b2 ~- ~
end
: H+ `' A% ?: b" i, D" Y  D0 b% j) r5 M
begin P_mC_down arriving  }  B7 T4 E" }: U
   wait for e 230 min
) I3 f) K2 J3 r, R. a   take down R_mC. J5 Y3 c1 C! y7 z& Y. `- k9 J
   wait for e 10 min
' ]4 N& a. _4 Q  X- U   bring up R_mC
/ P  y) A1 S; v4 m. w: K# |5 Q" oend
3 w7 P0 V! c, [" \6 e' z3 m2 |
+ f3 q$ Q% L9 n- y0 L" ?begin P_mA_clean arriving
, V# ]. m  D3 [   wait for 90 min# F8 M: g# O+ y3 L$ o* h7 U2 \
   take down R_mA; p3 ]4 W8 X' g9 }$ ~( P8 Z" F3 |
   wait for 5 min6 ^5 O0 \6 `( A' C  n
   bring up R_mA1 Z* y% G4 Q% C4 @
end3 L* `3 s/ R3 ?9 A
( W1 c1 C4 A. e9 g( @, u, e
begin P_mB_clean arriving
& Z$ n% ?1 [% y- y2 z2 s   wait for 90 min
: B; I0 ^5 H9 V3 f# c. g   take down R_mB% Z' q% t6 L% @
   wait for 5 min6 r% F  H+ v) n: R$ M7 S6 V) w- }
   bring up R_mB
& n4 `- m) P+ Y7 W/ v! {, Q- |end
( U. A6 {4 M& Z; T9 S2 I# z
0 Y9 A9 E* ]1 Ubegin P_mC_clean arriving
" Z4 w. X7 {* d! ?- s  U   wait for 90 min
5 i! J2 n% q& f- _& l8 w   take down R_mC
. D! H1 Q8 _  D$ J( s! \* q   wait for 10 min
: J/ \. \2 D5 J/ F; o   bring up R_mC: C/ U% g) k5 g  y+ S- G/ B% E
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
" O0 I% I: t  I- `4 y   move into Q_wait; f! \) P2 A. R3 @( V! e. p
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
! L: A$ N/ K7 g4 J2 y   move into A_w
3 T$ l" h. y; h/ g* o+ @! D% D1 h   if A_w=Q_m1 then use R_m1 for u 48,5 min
- A, T3 J+ Y5 V- |/ I3 }! A: b   else if .....then use ....for u 48,5 min+ s. [# B: X) X7 \
   else if .....then use ....for u 48,5 min  
- z4 A/ Q" E6 j$ I9 |   send to die
# ?) X3 o- G- j$ Uend
0 n9 X# l/ o3 E0 l8 ?
! ^9 j1 Z% |3 T1 O供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 16:22 , Processed in 0.014032 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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