设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7702|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ' a, S3 G: t8 }+ g' v5 A+ G! H

$ _" D  b" R. R6 ?6 M2 ^5 ^底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去2 V! j4 U1 B& _  u
2 R4 c, D. o- ]
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!0 S7 u) S6 k" [1 W2 q! c" J: M
/ @9 E# ?- A  W& ~% ]
--------------------------------------------' {  x! ?- V4 e8 b1 Y- J0 b  W, ^6 z) _
begin P_something arriving- r: V- _. F- w
   move into Q_wait
& I' Q  L2 ?  z) d& P* {   move into nextof(Q_mA,Q_mB,Q_mC)* L6 i  p. j  S# F0 J' N' K  v, y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min5 z& x( R8 V$ s
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
4 |( M( t7 Z- J8 L* c3 T3 \, n   send to die& V2 i1 X& {$ e; C) p% @/ I
end
# e; _, q0 {* h- _1 H& ?  g7 a, h
( A0 e/ I# b" o! t0 U+ F- j
begin P_mA_down arriving
3 m" y$ g5 d) Z' G   while 1=1 do 5 P2 F+ t  V" u3 G9 z( s6 R! n, a2 |
   begin+ L( {4 `; }# C/ n& m+ I. g) x! I
   wait for e 110 min
4 T& s$ S4 }& ?, m% D   take down R_mA/ L6 ~* e; Q$ p# d- M- U5 v
   wait for e 5 min
1 X' S8 k3 w% i. z   bring up R_mA: x4 M" W; m: w/ l1 {, \0 ]" O% E8 g: M
   end
1 x, A- o- b, v, f; z/ qend
& ^& A2 S2 }0 x/ p3 O% v

9 `3 i2 ]4 @# n) X/ Hbegin P_mB_down arriving$ X& w! I5 E9 c
   while 1=1 do
  _, _* w* @+ D% X+ d   begin
- d; F/ B7 V6 ^5 q7 H, K6 p   wait for e 170 min
# `8 |6 v2 _0 Y   take down R_mB
! \  D) R' I8 G. w4 a   wait for e 10 min; c8 W$ u$ }2 M
   bring up R_mB5 u+ S7 x4 I6 S: a
   end8 E# z& f% i  h$ }1 e
end

  U  f6 k6 n  g6 S2 ^. k" e 1 m9 _. {) H, a. g# E6 N
begin P_mC_down arriving
4 ~8 M! w4 h. ?# L- W7 k$ v. G   while 1=1 do
7 O( O2 v. Q/ ^8 e5 F2 I   begin
+ D7 M$ u/ Z; u$ T; J   wait for e 230 min. v& C" Z' x8 W: X4 a
   take down R_mC( M; p- E2 F5 I2 F: X
   wait for e 10 min) A% b1 L+ X( A! C; T4 A
   bring up R_mC% x8 {, `+ j7 t* R8 D$ E
   end
$ A2 r; j& P6 s( l+ }/ ~- Y9 _end

2 [' {: M7 x2 S" t& {- p
! u3 \4 a% q4 _6 ?# p. Lbegin P_mA_clean arriving
0 J, I0 }4 |6 X( w' E6 @   while 1=1 do( U, ]; N* w1 H- R9 ?. A, F) F
   begin3 H  L# N9 ^6 v
   wait for 90 min
$ h; ^5 c" u" T" I7 J5 c# b0 Z   take down R_mA
, w+ ~# h8 ^5 Y1 k* ?0 x7 h; ?   wait for 5 min
+ y) S4 H% O! x& t7 t   bring up R_mA/ s3 n2 @4 U( Q: z, U9 N! w) n
   end% v/ ^# W9 W% {: T% Z) E2 d8 _# F" J- o
end
- [6 R( c* I8 A3 k
( ^6 }2 e+ a8 E; |
begin P_mB_clean arriving
3 d+ c, O2 ]+ D5 y   while 1=1 do+ t: o8 H; O6 @! I$ K: o
   begin
8 ^) W! r& V- ^' P   wait for 90 min/ {% P, N1 N. A' j4 i/ k
   take down R_mB0 t4 r/ O/ G" {* B( C
   wait for 5 min
; b7 R* w1 [+ x" n# N# w   bring up R_mB
: X  T7 q9 J3 b  ^0 i   end1 r7 m1 G' t3 Y% x: D: ^' ~
end

6 r; I% x! `3 ]) a # _) {. z4 B3 y
begin P_mC_clean arriving4 h1 \3 ^3 V0 k  y1 h$ N8 Y8 D) a
   while 1=1 do
; T: z! r: _: z   begin
$ h9 f" i+ Y/ A. ?# q   wait for 90 min+ f( I( V8 v* k7 R- I8 u5 ]8 `4 c
   take down R_mC
- L3 K2 E- G# D   wait for 10 min
) o8 T2 _' b4 W3 j/ O( \   bring up R_mC3 }- C) R' y' h/ j& W3 e7 y% z
   end
5 J, @# Y: V: L9 f2 ^% t) w" vend
' b" C: S  F8 Q
----------------------------------------
  m: a* d3 G$ K+ k. R/ g
$ w0 S6 V) D% _0 H# wExercise 5.96 t* |5 u* s/ Q& L

, h: M* O1 v; I
  V6 W" E/ ?! m' \( Q1 K2 }Create a new model to simulate the following system:" N5 D  d2 v1 _! A: V5 m
Loads are created with an interarrival time that is exponentially 8 Q! z" H) U* V8 q0 W. v% q# q. Z( g
distributed with a mean of 20 minutes. Loads wait in an infinite-2 a4 R; G1 z3 J" s9 u. ?$ o6 ]7 ]6 A
capacity queue to be processed by one of three single-capacity, , [- e0 Q+ F$ V+ {. Q, G! W5 o: W
arrayed machines. Each machine has its own single-capacity queue
& j4 P& N" u8 |- }where loads are processed. Waiting loads move into one of the three
8 F( _8 M& K3 b- P. W" nqueues in round-robin order. Each machine has a normally / n0 H! ~2 t! T. {' ~) s' M! i+ z, u
distributed processing time with a mean of 48 minutes and a standard ) }3 h2 _5 t) n  A  ?
deviation of 5 minutes.
' N* A: e* K; FThe three machines were purchased at different times and have
: |3 j! l$ M/ ~  {  pdifferent failure rates. The failure and repair times are exponentially ! A4 j6 C. ?" g  }$ V
distributed with means as shown in the following table: 1 y- n& {5 W! T& M) l3 u
Note The solution for this assignment is required to complete
& D0 W+ y* j, U" z+ Mexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
& z& d/ A$ W6 ]& Syour model. $ g' _. W8 X, K# ]7 P
/ v3 ?3 s1 u( ]- j- n$ p2 T1 Z
MachineMean time to failMean time to repair* ^" f/ C3 @; B  B  e4 b2 a: y
A110 minutes      5 minutes& A9 j, s9 k2 G% I% D
B 170 minutes     10 minutes
( Y8 t1 v% p; F7 P8 [% _C230 minutes      10 minutes
/ W& n2 ~: o+ l" Y0 R0 E& d# O' I) D* W" d/ T% n
The machines also must be cleaned according to the following
% g/ ~" ]; z% M4 sschedule. All times are constant:
6 I6 j; C- L3 Z+ |$ P% l3 U( [- e* d6 N/ M! d, X
MachineTime between cleanings Time to clean5 A8 f& K- \' h
A90 minutes        5 minutes
: p6 y& Z  ~" i& h' l+ aB 90 minutes       5 minutes
, Y& r  ~$ O9 x% GC90 minutes        10 minutes: B. ^8 R  }9 L

( X# S3 S* a7 N9 T5 kPlace the graphics for the queues and the resources. 0 H# `- K; e& {6 ~' f* c6 w
Run the simulation for 100 days.' v/ t1 r+ j# l1 }5 m7 ]5 z
Define all failure and cleaning times using logic (rather than resource 0 o- J4 j9 f! w, ?
cycles). Answer the following questions:5 X+ E7 U% A" `
a.What was the average number of loads in the waiting queue?
  |; p2 M4 g4 t+ h1 @4 h, Lb.What were the current and average number of loads in Space?
2 J% }* I  H6 {) o7 R, lHow do you explain these values? 3 N& {9 S" k. D+ W8 i2 h  q. y

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
9 S- c1 ^' T  v5 K1 G7 b; Qsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 s4 G& A6 N$ h  O1 `( o
这行好像也不太对,各位先进觉得如何呢?" l6 m' I6 U! p. P/ Q5 f$ A9 @4 Z
  J5 `! P: U, ]0 [! G) Q
begin P_something arriving$ s! _3 R# |6 a
   move into Q_wait
6 l! V! d! q* ]' R   move into nextof(Q_mA,Q_mB,Q_mC) # U: ?9 o. U" v$ |  l+ L! y
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min7 n# t; P  H6 T( l) G  m
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) - \, L' ?* J2 ~6 i( y
end
1 L+ Y/ a, Z9 O" I( c; X0 }7 R; L0 j5 W. X! l
begin P_mA_down arriving" \7 D) h' k5 Y& T
   wait for e 110 min
  m& j* a1 a4 o- Q- u" k1 F- O   take down R_mA6 D8 p' N0 c# z  {3 V3 g" z! e
   wait for e 5 min
4 B6 j' y' H6 D" [9 k6 t9 p   bring up R_mA
8 I2 ?3 Z- @$ k3 }; J# ?end
1 ]+ R6 {1 o3 Z) C" U6 ^- x, o7 t) ?, E1 H: G! U4 q
begin P_mB_down arriving
1 g2 t+ z" l/ b/ s   wait for e 170 min" T+ w" h/ X* r% \. w6 s% G
   take down R_mB
1 ?; w# z5 Q6 P( \' P+ a   wait for e 10 min7 r3 h: w4 T' B8 @) Q9 G: l2 ~
   bring up R_mB# z# z9 i3 L& ^& \* {
end6 o) r- I; ^# w

: p) \4 _2 X- k( _& o6 W8 U: ^( [begin P_mC_down arriving1 c3 G  ^) y3 H* u* C
   wait for e 230 min
, T" G( H! E+ m( n( @2 V- K   take down R_mC* @; A: [. W6 ]2 W+ j: u0 K
   wait for e 10 min9 A6 }  ^( Y: S2 S' i5 h3 a. c: [
   bring up R_mC- D" @2 z5 {  h7 U3 t. Y. d
end
5 K, q" E) j0 b% B1 @# X* P, {
, F* A; H. [2 e1 H' ?. S( f+ `begin P_mA_clean arriving
7 @. W5 w+ N! W0 O" q   wait for 90 min  T( G/ S# B& |4 X) r1 V6 h4 n2 ]; F
   take down R_mA+ @* ^2 J% [% t7 T' u& Z# w5 p9 p
   wait for 5 min
) a! Y- @- G0 ^0 u   bring up R_mA3 H& a. D' _" y
end  Z: q( {! M; C: |. B

* Z0 s* s6 Z$ t  D8 t) W( D9 q- ^begin P_mB_clean arriving4 e1 U& K! {/ j4 H& @7 n: n
   wait for 90 min
1 X  \1 X* l2 X' a' M8 `& ~   take down R_mB. A% j9 p! c0 ?7 Q: g. I
   wait for 5 min7 A" a: _/ b( Y
   bring up R_mB5 L& R2 s, d# Q, ~- a
end5 S3 m$ b5 V( |2 E* e) I) Z0 I

; ]; k0 n# v" dbegin P_mC_clean arriving
8 ^1 [7 O( ?; _- y$ `$ ?6 _8 o2 l4 a& w   wait for 90 min! O  M7 q  F7 j" y% H1 _2 I. p1 y
   take down R_mC
1 {* F2 d  X% y; ^5 T9 S2 }   wait for 10 min
* o; W% P$ L. b& ~   bring up R_mC
2 R7 }! i* b9 \' J& P( h  [: f% Vend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! y7 j+ v! _0 N6 p- ?   move into Q_wait% M* ?% K% V- V$ c1 z6 R
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
) q$ M: M- |1 B% }   move into A_w2 u, e1 k" T6 i- V2 \. M
   if A_w=Q_m1 then use R_m1 for u 48,5 min
; G$ S! K6 t/ E; ~8 r   else if .....then use ....for u 48,5 min
* O: b  A) o7 {& |2 T2 z   else if .....then use ....for u 48,5 min  4 ~$ E2 e0 Z9 l
   send to die- D* E! O( Z! P
end
: ^0 A: N6 S& Q' m; {+ ^5 P1 F6 P- K1 f: [
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-27 17:00 , Processed in 0.018115 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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