设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7284|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 8 t& `/ z  B; Y6 ?9 s& d
! Z. S) i7 @- |7 i
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( Y  _$ A( `" m/ g+ a1 ~3 {7 _) M( o; N  H9 t
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!0 L. x" t6 `4 {2 s& a/ f: G
7 h2 B5 h" `& ^/ Z
--------------------------------------------5 s9 y( c) t9 f9 v# y0 |
begin P_something arriving& r1 [3 [: \' o+ D1 k, Y
   move into Q_wait( S) S! d. ~! @0 i) Y9 ^2 P+ _* o
   move into nextof(Q_mA,Q_mB,Q_mC)
9 f4 W) }, q0 c+ V" Z, a- _- O" `   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
1 D  I3 a9 E9 T# l7 r2 E9 z# O! T, x   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); q( D* [" p+ o3 J; j/ }
   send to die; d$ y  R. x" A: F, R3 Q- ]- O
end
8 k7 d7 ?7 y0 M0 j2 g( U
# A" }: r# C9 e! L: Y$ \0 |
begin P_mA_down arriving
4 \* Y3 W/ C3 h   while 1=1 do
- B+ A1 N1 i0 R6 \6 ]5 _9 \# c+ W3 T   begin) y, D0 a8 o$ J) p9 w- {* B: i
   wait for e 110 min
( Q2 @6 q7 j# u) k: w. S9 H   take down R_mA+ @' ]5 H* e, C/ n- z
   wait for e 5 min# K# _6 L8 h% {+ q3 S8 v4 j
   bring up R_mA
7 ^3 f; e. V( t! |5 ^( g8 Q   end$ b8 z2 z# P. M5 D- i" N
end

1 M" }, w) g9 b# p9 [! r( G# N' b - G1 l- ^" [# j5 t" w9 J
begin P_mB_down arriving3 s) ^5 M( v; @8 M( ]
   while 1=1 do  ~( l1 v7 f0 N; u
   begin( @1 x, q5 T6 \! n7 a! q8 \$ S
   wait for e 170 min
! z. _5 Y7 E' j( E( {   take down R_mB
2 {. @7 u( ^( j4 \% I7 ?   wait for e 10 min' t8 k* X8 u0 p/ F* m4 V, {/ i
   bring up R_mB" K6 c, |2 ]+ e  E
   end& Y& e7 D; P3 N
end

; O) Q' s. m. G% R
% H, s+ h0 p  }begin P_mC_down arriving8 D! c8 v7 o2 n8 G7 \( v
   while 1=1 do
, d: r8 j* M. |& H; F, t   begin
7 g  |9 t7 `1 m   wait for e 230 min
  E! ^- K( r$ z. c+ @6 v' f   take down R_mC7 @' ~6 |$ y% p; n& |" B" P
   wait for e 10 min( J/ W! J3 }& |; |7 D' p) N6 \
   bring up R_mC. ?, I3 O4 [3 {. w  s
   end
/ y% T" u- q, S+ G9 T0 K6 P9 k9 N6 v" kend

# A6 A7 P2 C/ ~ $ n2 f/ A7 I8 m- X
begin P_mA_clean arriving1 O. N1 e. G( j# V, X3 x) M
   while 1=1 do
+ o8 t; K3 {8 ^   begin
2 Q, [+ M/ C6 E2 X, J; L! H   wait for 90 min
: g% p# ]* Y0 m   take down R_mA
+ v2 ^% ]' v3 Z8 T/ r   wait for 5 min2 v) c9 J1 g7 l) L8 i3 j
   bring up R_mA
! Y$ e$ E- v9 H2 u& b0 i& H' S( V. n   end9 X, [7 h+ \8 R5 e/ u
end
/ Q* B" i- Y/ S. m- N, g; \

2 [: a- ~0 q$ A8 Y! G( u1 }2 c$ z" L5 cbegin P_mB_clean arriving
6 L' P: }4 C0 d3 W9 Z% v& w' r   while 1=1 do0 \4 \2 c4 L1 I( n; K* x, n
   begin
9 \! Y6 l2 A# R0 e   wait for 90 min# G8 D* c+ |8 ^: b$ M. o' f
   take down R_mB1 i4 I) o5 I9 ?! X: j+ ~1 v
   wait for 5 min1 C. R8 T5 h7 c/ _+ z
   bring up R_mB
& B' Z7 v( v1 @6 S  h3 U+ N: L   end, m. v+ c  L# E' h' O
end

& [3 U: g; L* _+ E* M( a, n8 Y( h5 h 1 r' J4 j, K; N8 f) Z, N
begin P_mC_clean arriving
! Z4 e! }9 m1 l& w& H   while 1=1 do& V; D( @7 v& Y) j7 [
   begin
/ v9 j, V5 G6 h$ f# \) H  `/ P   wait for 90 min5 j! e; F  R5 g: r' P3 G
   take down R_mC$ ^, z5 e+ w, c! [# w* z
   wait for 10 min
  K0 L! Y* ~- ]0 E" C- {* ]   bring up R_mC
0 G8 Q7 H  r# y" ?3 G/ E4 x, ?* P   end2 p( a  T) b* {0 ~
end

; l1 ?) u" h- J- G# d3 D----------------------------------------! [! [; p9 w2 ]# P5 H- b5 F

7 v7 c4 G( D; r3 \) r0 W; \/ LExercise 5.9
0 m. ?" S5 C: M0 B4 _+ Z- K' y
; l% w# [  g) h; `/ n/ \! Y
1 e1 N) ^5 w1 J" j. TCreate a new model to simulate the following system:) S* O4 j- o8 c
Loads are created with an interarrival time that is exponentially
, h7 p, c+ k1 s" Z/ \distributed with a mean of 20 minutes. Loads wait in an infinite-
" L0 }" c, Y2 r2 C9 `4 Q4 F% Fcapacity queue to be processed by one of three single-capacity, ( p2 `) ]! S9 A6 H- R; T; S
arrayed machines. Each machine has its own single-capacity queue
% E9 F3 M* o/ O' \where loads are processed. Waiting loads move into one of the three
. Q' ?, f. V8 J, s1 U  lqueues in round-robin order. Each machine has a normally
/ g" C* N7 h7 s( f- }$ F' Ldistributed processing time with a mean of 48 minutes and a standard
! i5 ?8 W: @: [# p0 M/ O( Q% Ndeviation of 5 minutes.  u6 T7 h) R2 n: d) Y! H4 G
The three machines were purchased at different times and have
# n. p& R1 y7 c. P; udifferent failure rates. The failure and repair times are exponentially - `% N% I" X' A( c
distributed with means as shown in the following table:
0 t$ `1 A* n5 @Note The solution for this assignment is required to complete 3 _0 ?5 _5 o( g. \7 Y- T
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ! t$ c' T6 O  D5 ^, ]( h
your model. 2 O1 D! v/ Y, o: R# @2 c. ?
% @, j9 z) n  ]0 b- W
MachineMean time to failMean time to repair
0 `( z. v. X* S2 z% r. kA110 minutes      5 minutes
9 w! C# y% n  zB 170 minutes     10 minutes
8 Y2 a3 b" Q/ tC230 minutes      10 minutes! j2 b7 O% A$ P$ W9 q2 q& |( v

+ m3 I7 T+ X7 `4 UThe machines also must be cleaned according to the following 2 \9 I% v+ Q' D6 i6 k' _1 j4 N) o
schedule. All times are constant: , X2 g3 g) U, k  R8 A( W
- C) N' H0 Z( ~' `" L
MachineTime between cleanings Time to clean' l4 L7 h. \7 S* A: a& J# `
A90 minutes        5 minutes
  N. C. B3 e6 N# {9 wB 90 minutes       5 minutes
8 W% P3 z/ Q3 V" pC90 minutes        10 minutes
; |& A/ b2 `8 i" X0 s. \+ c2 {" M, e) ^
Place the graphics for the queues and the resources.
8 e* X5 Q+ w: ~( h- v# ^Run the simulation for 100 days.2 P! P: \6 e7 m/ O9 ~" u. u
Define all failure and cleaning times using logic (rather than resource 5 R  c2 `& f8 L
cycles). Answer the following questions:, U! O4 @" ^0 y% x1 b. I, o* M
a.What was the average number of loads in the waiting queue?
6 @. \8 K; x9 ^- }# A( ?7 P) Ub.What were the current and average number of loads in Space?
0 V9 J0 d7 _4 a6 Y3 u/ @4 eHow do you explain these values? $ D2 l% ^* ]. v& E: f

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
  n2 y( S" Y* P* t0 Isend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ S* g: U  o0 r
这行好像也不太对,各位先进觉得如何呢?
9 x% j2 i) I4 `, \4 }/ m+ p3 \
: _* Q! M; i3 ^7 D. D- Z2 [begin P_something arriving& @" e7 e2 j: T
   move into Q_wait1 m3 a' g6 z8 m5 s5 i( l# n
   move into nextof(Q_mA,Q_mB,Q_mC) 3 [" M/ D5 r7 g- N) H( @! I
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min8 L/ I) y3 N# U( `
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 1 T" a- i& I3 i% E! l
end1 H: E* k# b+ Z/ X% U! [2 f
- S8 ]; V8 n. C* y5 _; Z( Y1 O
begin P_mA_down arriving, ]* z( S. L& {2 u3 h; E
   wait for e 110 min
% Q- B: l- v4 [5 A  v* R+ y( @4 s   take down R_mA
. @$ z6 Y; |# D& S" [4 x   wait for e 5 min
7 H& S  L$ u* W6 O: U9 e8 m   bring up R_mA( X- V4 p" z2 [$ D/ d8 f
end, E# g3 n/ T: D) v; a
2 q4 x3 V& Z- ?+ s5 K. Y. S
begin P_mB_down arriving
1 B0 ]4 e- ^* w4 u3 O   wait for e 170 min. j. v; }! @+ I3 m$ B: e6 X
   take down R_mB
% ?" E2 t* O' G. r   wait for e 10 min
" |5 p  ^5 j7 ?/ m" W0 j   bring up R_mB4 c, @3 M8 R: k; n. W' v3 Q( @
end7 I* q# t  ?* ?# m3 ^# {. Y" b3 o
2 C, E; @. X" G3 j
begin P_mC_down arriving
6 L3 p+ u: N) {( T6 f: S8 C" X   wait for e 230 min- @$ f9 I& c9 v9 z% {8 G. y! C
   take down R_mC
8 S& N: R! ~; x4 U8 j: L   wait for e 10 min! i) {, f" ?1 Z4 K
   bring up R_mC
6 B. V- W( N+ [end
2 a0 k8 C# }/ L& m" m
# d. r$ }! L; {3 O6 kbegin P_mA_clean arriving
& Q) |+ Q2 u+ Q   wait for 90 min$ F# k2 G2 e% r' R* ~. U, p
   take down R_mA
- @6 K- V  I- b% M/ [   wait for 5 min
. C/ S. q' z* C9 ^   bring up R_mA8 x9 M  @6 T5 u$ }  I- f
end
- @6 u( z- w4 i
9 k  r0 Y7 [( A1 w) Gbegin P_mB_clean arriving$ O# a  q& K0 U
   wait for 90 min
. R, }$ i- U9 g! P* v   take down R_mB
* Q1 M- O, M1 B/ h; B  m   wait for 5 min& g! T$ k2 C* i5 Y& }" V
   bring up R_mB
9 v# e! s) w5 f! W5 gend" v9 Z3 a* X0 Y6 [0 l" g
5 ^% Y* I# [1 `* u2 n- p9 V( v9 t4 N
begin P_mC_clean arriving5 ~3 r' }6 i5 M8 v
   wait for 90 min6 y' {$ }- K* L: O, y
   take down R_mC
2 l, V4 P) W7 A+ F   wait for 10 min) h3 h' ~; L" V: k/ K' E4 T
   bring up R_mC
" J: M% j$ B7 J1 qend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
" W" e) E) d( O8 v   move into Q_wait, P3 a  h- ]$ n/ @; x- d/ n0 w
   set A_q to nextof(Q_m1,Q_m2,Q_m3)6 m7 {! E# q) \2 A! g
   move into A_w2 X) C8 B( I% e" v) o
   if A_w=Q_m1 then use R_m1 for u 48,5 min
5 ~6 g9 |8 m$ ~9 g, N  P1 I8 k   else if .....then use ....for u 48,5 min
8 e6 J0 O) d3 w; j+ t   else if .....then use ....for u 48,5 min  , U- {7 `4 @1 q; O& f+ f  G! o
   send to die2 c; r, g" L: @0 Q9 [
end6 x0 L7 n5 q1 P+ I) h( d

6 l& L8 l3 s' h) o' i供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 11:27 , Processed in 0.020054 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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