设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7309|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
5 j& B7 [( O% L$ ~+ ]- G. M" R5 H# L/ \, f
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
- H$ K: |5 r8 N: M- g
# w8 M) Q0 U; F不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
, B0 k% W" F, }. Y
$ F. I( n! _$ u4 S; `1 p
--------------------------------------------
! e+ y3 w  f7 m5 G% }" qbegin P_something arriving
0 Q0 T2 L4 x: c1 ?9 |9 e6 K6 l   move into Q_wait' k) {, t* ?# W; f+ u2 s# Y
   move into nextof(Q_mA,Q_mB,Q_mC)" c$ o# A3 g" u5 N$ h# D
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 ^' Q' N% e1 A7 W( y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); K* _+ c" b# s  v+ w
   send to die& N+ I( s! B. C0 ?+ [
end

0 n1 D9 f  h: E% B- w 7 n" C5 Z4 C* B$ i6 m3 {2 b2 d) O
begin P_mA_down arriving7 C: `7 k/ Z. z& D& ]& X. F+ t
   while 1=1 do
1 p- r! U- w' L: W) L* c4 v0 K   begin
# Y' H; }8 H) o0 b1 t# C   wait for e 110 min
/ @! M+ C6 M" U- o) C   take down R_mA
+ R& l2 K. A4 w7 M0 e   wait for e 5 min) W0 X8 f' N" ^1 ?1 \+ x6 l9 C$ l( V
   bring up R_mA
$ r! [& n* K& E   end
: ?2 {3 {0 C* W1 L  d. I! kend

: B7 V- K" n. I% t
; o; U) T* }, ?1 x6 P* Bbegin P_mB_down arriving
6 `$ d8 q: n, `/ v: S6 h   while 1=1 do
* X6 ^( N5 c) A8 @0 \2 r   begin1 z; D3 U. ~1 b; O6 y
   wait for e 170 min4 Z! ~( j! ?: N2 Y
   take down R_mB
0 {2 ~% @; o* N0 p6 s   wait for e 10 min% q3 a" k6 ~5 R) k& W
   bring up R_mB
% s& B. `7 N9 a& Q% c4 |$ H   end
7 t  k. e0 X3 a8 a0 O: Nend

; H. z+ X' `4 I : n5 ]+ h& x8 w4 u! A, C
begin P_mC_down arriving" `8 b: g* n2 r; v2 E4 i1 R) K* d
   while 1=1 do # E3 R! {/ a5 z" v- `
   begin
! ]/ e# F* @$ j0 z$ p9 ^   wait for e 230 min& s" C' m% P1 q$ m6 ~5 ?
   take down R_mC
2 P8 u9 c$ R( T5 w: y* H   wait for e 10 min5 {+ N8 S; z( h& F4 n/ L6 R; M- l9 H4 [
   bring up R_mC
) J7 b4 p3 l: i3 J2 e1 v   end
6 I! U) ~5 C' g8 y# Q4 qend

' a) i) a8 w( p# } * V: D3 _" \/ T( i8 @
begin P_mA_clean arriving! T( U; u, f) V5 y+ D  Z& Z
   while 1=1 do
5 o8 o) B. P) i) v( `) a+ ~   begin- i7 q# |" D6 o9 h" i, a/ v$ l
   wait for 90 min- M3 ]/ T# q+ o- N8 z# ^& I: v
   take down R_mA! _6 V4 O$ X3 l# m# D0 e5 o1 `1 w
   wait for 5 min
8 }- Z2 k/ d* o# a   bring up R_mA0 p, P1 }  S9 B! i8 B& a
   end
1 C7 v; R6 [7 ]. [0 `end

- e9 Z& Y5 E4 _* W/ D9 f9 }, r# M
& {( E  p' c$ F) \begin P_mB_clean arriving8 p. O' D  J, z' u3 S8 k( ^
   while 1=1 do' f. }+ W. a9 N+ Y4 r/ {6 `+ X  e+ V( L
   begin
0 k; Z( z" a; ^+ Z) F8 E8 F   wait for 90 min
! d) M& h5 C9 `* t, c9 |( f( q   take down R_mB
/ o9 p" B& D3 e- P3 G* P7 a   wait for 5 min
7 s" u$ s, d* K2 p   bring up R_mB
$ L0 w" B' D9 S1 A4 B- {- L   end
  Y7 W$ D" @2 Q6 u$ l9 p* q) L3 ?end
; L/ q  t3 m7 S- a% }
7 ^4 j: E. y6 D1 {
begin P_mC_clean arriving7 Z5 y( D4 I3 d9 q1 E9 d# z: }
   while 1=1 do
$ E; `0 M# ^) `4 |. W$ M3 \3 n4 t   begin0 P" |5 O  w- }. m8 j/ W- j) X
   wait for 90 min/ q. |2 a  y% U' P6 o& ~" o
   take down R_mC
9 `* ]& q1 @( m9 s" N2 W   wait for 10 min! J# @3 n" Y/ S: D% q
   bring up R_mC1 ^% P' _% v& S8 P) O3 P0 Z5 g! `; b
   end
( N8 x" g1 n! q: Jend
9 b& l: r' k) t: O  _- Y( H
----------------------------------------
2 c! h9 x% ^/ n$ x2 C
, {: @7 U' K3 P  }Exercise 5.9" }  h) N$ U* P# o4 n. e& S4 ~

0 t1 \* q0 I8 \' Q& D1 o6 }5 H( Z7 C" D" ?4 B# O
Create a new model to simulate the following system:/ t4 L. ^, Q$ G7 f3 h* y
Loads are created with an interarrival time that is exponentially
/ a" A5 E8 N6 T' ^distributed with a mean of 20 minutes. Loads wait in an infinite-
  W+ l* d4 u6 J6 ]2 Q7 c9 Hcapacity queue to be processed by one of three single-capacity, 7 `2 c# x) ^* p: z& `( w
arrayed machines. Each machine has its own single-capacity queue
& S2 {! o5 L& C1 U% }where loads are processed. Waiting loads move into one of the three # ^" Z" ^5 I( ^" m
queues in round-robin order. Each machine has a normally
6 \$ e0 A. v9 \$ C& ~9 ~% Sdistributed processing time with a mean of 48 minutes and a standard
) J7 L8 X6 o, s" V% rdeviation of 5 minutes.
7 r  _: f7 m5 [3 |& e+ I0 i% `The three machines were purchased at different times and have
. k( g. A/ f" u0 W; c5 x! ^different failure rates. The failure and repair times are exponentially 9 c1 l8 m) D! ^- T1 K* m" R
distributed with means as shown in the following table:
& U. O2 F! l$ a! I# PNote The solution for this assignment is required to complete & D; P1 `! c8 G& D( \2 @7 _0 m- J
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of & }) v9 r9 C& N
your model.
, @2 C0 m4 V6 K3 j2 ~: t; s( D/ H8 W8 M# n
MachineMean time to failMean time to repair( v5 f# \( F5 {  N! N; m
A110 minutes      5 minutes# l8 O8 j$ J8 u* d0 a' `
B 170 minutes     10 minutes4 U  T* F; j6 f, R0 s& j
C230 minutes      10 minutes( g5 Y% ]7 B3 v' L; }& l5 y  r

7 d6 J7 o6 n- eThe machines also must be cleaned according to the following 3 o: K) ?& X) R: f
schedule. All times are constant: ; [* F0 E7 v8 j0 w
3 X' k0 y0 I* I/ M( C
MachineTime between cleanings Time to clean6 |* Z& k; J% V- r
A90 minutes        5 minutes; p5 s# U# V# y0 p  C
B 90 minutes       5 minutes5 Y! \9 W+ j% u" ]9 h
C90 minutes        10 minutes7 P2 `5 c) W* B1 X+ v/ U0 @

1 ^' ]7 h% G' C5 _' yPlace the graphics for the queues and the resources. & Y$ W/ P/ h  w2 c- |& u4 t4 h
Run the simulation for 100 days.8 \4 Q/ f7 f  p2 P( c4 ^% c
Define all failure and cleaning times using logic (rather than resource 7 V1 D. a, I+ h% N  x0 F7 z
cycles). Answer the following questions:9 ?; B7 i+ z6 X; I, w) C' g
a.What was the average number of loads in the waiting queue?/ Z1 ^( w+ o6 L
b.What were the current and average number of loads in Space? % e* \( ~. t" k0 R, }) D$ V) J
How do you explain these values? " Y( N. a1 z' Y

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉, F8 u( Y; D- U
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 X) D! F) s9 L. \6 |  A  w这行好像也不太对,各位先进觉得如何呢?5 A4 y' A: L. D8 ]* B* H

# N6 I* w* r4 W, ybegin P_something arriving
9 m. M2 }/ N9 B: A   move into Q_wait
/ Q) n, E, b; C6 |6 ^/ l   move into nextof(Q_mA,Q_mB,Q_mC) 8 k+ w! ]* J' [; ~' F- q( P
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min7 p) e6 E' r* e& F( A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 r# I" y! Z5 L5 k1 P2 i; G0 i0 q+ Tend. S- }& B4 E; }. |: y

7 p6 t- y7 y! @* _. M2 gbegin P_mA_down arriving6 P8 t% Q* o* a+ b. L! j4 q
   wait for e 110 min
3 y8 x' f2 B: h% `' l   take down R_mA! ~! `8 S  z( J  N7 ~2 u
   wait for e 5 min, h. M" B3 f# j. }$ S% m9 B
   bring up R_mA
& d7 o. g7 `  X, ^! Y9 O1 Vend
' Q8 @! [4 C# x! W1 \: X, `0 S/ W% ~; O/ X0 L9 C
begin P_mB_down arriving
+ ~" D1 e$ h) z' s$ b& D   wait for e 170 min  p- q8 }6 {1 ?. `3 G1 w9 o/ b8 n
   take down R_mB
$ j6 u" X5 u7 ]4 Z   wait for e 10 min
8 P- h7 m8 F6 b8 ]4 D- W* C   bring up R_mB
; l6 q8 L. O4 k2 R7 m2 S. S4 Eend
. ~- G) P% @8 p
3 \7 g) _3 o$ _1 N& r" x* fbegin P_mC_down arriving
( V7 X; c/ t' P4 g, I% |   wait for e 230 min: z: S$ a; p! o7 d
   take down R_mC
' N1 d# P6 Y- l( R) q" W6 S   wait for e 10 min
1 H+ P* [4 i! J$ Q5 B9 C   bring up R_mC
' Z# f/ M7 X4 H; o) uend2 ?7 N4 W2 s0 Z, }: l
6 s& t/ f( X  t
begin P_mA_clean arriving" G, |( m0 [7 l7 K& ?. G  e; c
   wait for 90 min
- D% R2 k1 T- f! x   take down R_mA
3 A: O3 x9 r# u. G  X4 K7 p8 ^   wait for 5 min
0 u( f+ J1 ?: q7 ?2 s   bring up R_mA
( m- y9 g2 m, w  z3 \/ N1 f, d+ eend
/ l8 a+ ~4 U" c% h' _
2 j+ v/ Y/ n5 _+ rbegin P_mB_clean arriving8 {$ x$ H, _: E* C( \7 G1 ~
   wait for 90 min/ |3 e+ N* d& h+ v: t  K' F
   take down R_mB
$ K- j, m$ A5 ^4 y( l, E0 k( n   wait for 5 min
* a' B3 K' Q5 o1 O$ m! k   bring up R_mB3 F8 ]4 G4 ]; P
end
# t# E7 i0 e  v/ n; n4 o6 O+ B* J) [; |8 a. h" d( W) N
begin P_mC_clean arriving7 X6 S6 L, V2 N, o/ k
   wait for 90 min7 |0 k8 M' H6 j0 L7 x" f5 I' O
   take down R_mC$ }4 v' ~8 X- ?; O: n8 s8 Z; ^1 G% R
   wait for 10 min
' \5 m1 R# H. k. k! v   bring up R_mC0 A& ?2 \2 `+ `3 C7 f
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 w: c/ M/ K0 G8 L2 X9 n
   move into Q_wait+ o. P& C5 h7 E$ \
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
4 @1 G5 b# ?4 `% q6 S% s8 x2 g   move into A_w9 U/ k6 T; h' ~, n/ V$ n$ l
   if A_w=Q_m1 then use R_m1 for u 48,5 min
' n7 _+ Y0 ^% f- c+ z' }   else if .....then use ....for u 48,5 min
: w2 q! a3 |+ n! y5 ~! {9 z+ ~   else if .....then use ....for u 48,5 min  8 t- l$ [+ t9 C4 j( x4 v
   send to die
9 h8 ~2 }7 w; H4 s1 |  oend
2 [% w6 j' ]# L- S5 F+ H' \$ [/ k3 \: ^) v! `, F
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-30 07:15 , Processed in 0.025701 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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