设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7314|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 . H" E8 X) R* @* A& _2 j) \: B8 Y7 [
: t0 L1 o- a# w0 X
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
: O! l- s+ H4 {$ B2 _8 {
# W2 p7 t* U- e7 A  ?5 ~) o不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!) K% b: ^( R( g1 e# D+ m% K# I* h
) N  Q' F% P& T6 P( \4 ^7 A
--------------------------------------------
: b* z, a! B( V3 _: qbegin P_something arriving, T( A5 L' P# Y( E9 ]" J* e9 i
   move into Q_wait
# N. Y2 M' k$ b$ d) t( {" L   move into nextof(Q_mA,Q_mB,Q_mC)
8 K) _8 S/ U& X+ B* k, m3 Y3 l   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min' i2 g2 p$ ?% d" Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 {  F; ?( {. q$ ]% M
   send to die' ]- k" a( _" j& Z: G2 I" ~. o1 S
end
; c6 d1 D' l0 N: f+ u
, f- _, I2 m/ l9 ~
begin P_mA_down arriving; i3 K  x( Y9 Z+ M7 h* {
   while 1=1 do : |( S2 m: T) m% S! s& s: j
   begin
. X- j( ?9 d$ h! f5 f3 @   wait for e 110 min
, d! I3 m% A5 g; k0 f8 E   take down R_mA: U* c' r. u( E- |4 b
   wait for e 5 min, a" {. e) ]& E: Z8 U
   bring up R_mA
5 l" W5 n; A2 s4 O& d4 U   end
+ L/ M" ~2 y: z0 D% v5 Q6 x" T9 E) ?end
  ^3 C  y: b- u# w8 Q5 ~( Z

9 h7 j2 `' d) G0 Z# ]begin P_mB_down arriving
. n1 e2 h5 A, k8 ]0 u$ K9 d7 A   while 1=1 do
: a1 p  S+ t' q1 p2 N7 r   begin
, D$ T( _' p. H  O* ^" f6 L   wait for e 170 min9 c/ h5 }# C" \# l
   take down R_mB
* F, O8 n0 b# [) [8 m   wait for e 10 min! {$ C5 @7 K9 _7 Q) Q4 Y
   bring up R_mB" [1 k4 F' ~% h% l, j6 p6 |
   end
6 {% X* L  Q0 X0 `: l+ Uend
! ]- |0 Z9 q4 Q: U: b- R

8 p# A( h' g$ Ubegin P_mC_down arriving
4 f. C# }4 O) G5 K8 F4 T+ S   while 1=1 do
, G7 P7 m$ |# w$ }, A   begin
" M2 {3 g# A& s6 ]. `3 G% l; f   wait for e 230 min& N8 c' f2 D" A
   take down R_mC
; P& v- g  m. n, b4 s( j. s   wait for e 10 min( B- `, u1 F) p4 S$ e! C9 H, h2 |& |
   bring up R_mC6 r" Y6 I/ u6 n3 J; S4 j  O  s
   end
. D7 U. k- ]1 y2 g  e  `" c3 Oend

9 ~$ P7 ~- X( Q( A( M% g3 t- A- a 9 k7 U( c2 W8 v* `% W& l
begin P_mA_clean arriving
4 w8 ?( u* B+ z   while 1=1 do: i$ _, V2 h5 [2 L( z
   begin8 T- Z4 j" k# k% }% S
   wait for 90 min2 d5 l, m' D. ~9 [
   take down R_mA
- e5 [% d0 G/ a8 [5 R* j   wait for 5 min! N( u: d7 b( O) W5 q" S
   bring up R_mA, i+ X& n  z. `
   end
& ?$ o: A. n/ G# Send

& o* N( B6 X! B6 s) q
, n3 r/ q) K4 b& n: W/ e1 sbegin P_mB_clean arriving' N9 @. @+ ]) r7 _
   while 1=1 do
  y6 u' n  w! U& ?) g( O   begin0 m: d6 b+ @8 {6 v4 X/ R
   wait for 90 min
( a1 J3 O2 }' y$ j& ^! F5 j8 L   take down R_mB& t8 g! M; R1 ?- C4 v0 s2 i
   wait for 5 min
" G* X% _: g1 A) T9 Q4 m+ G3 }   bring up R_mB
; n9 |) m& ^- t& V& O' F   end
8 p8 r# H6 y2 i# l: R1 Jend
, h: r8 j# H/ i1 o6 |( v
6 K& M9 F5 Y0 s7 {
begin P_mC_clean arriving( ?" x. A7 r( M9 _% o  A5 B
   while 1=1 do2 e9 }0 D2 e. k
   begin
7 p: \: p5 k7 i   wait for 90 min4 O/ j: q" P! X  ~1 u- X8 J
   take down R_mC
2 n0 s1 J& M. a2 M5 l; ]) s! K   wait for 10 min
. _$ T( _: z2 f# T   bring up R_mC' U3 }0 R0 T& O7 v9 h$ G
   end
5 H1 }( I+ i7 I$ eend
6 z8 E( l! o8 x/ V+ X$ [9 u5 H
----------------------------------------8 C7 n. h. K6 A1 W' ]
. K9 I0 y% {+ h4 P9 k
Exercise 5.93 b9 Q) r4 Q  m$ a) w2 Y. q

# g3 x( {! M) q* z: Z& G- `! c. Z* p$ ]8 i& L7 `5 {
Create a new model to simulate the following system:2 \: |" ~' p% Q6 W+ B' }
Loads are created with an interarrival time that is exponentially ! _2 I& C" s3 \0 Q1 k/ b
distributed with a mean of 20 minutes. Loads wait in an infinite-  D2 a! s. D* H! \% v. q+ l
capacity queue to be processed by one of three single-capacity, / T0 v* J. p+ F) {: L# i0 u
arrayed machines. Each machine has its own single-capacity queue $ P! n# c! J" ?( C0 d3 ~& y) z
where loads are processed. Waiting loads move into one of the three
# _* e. @$ J& b  }$ s* Oqueues in round-robin order. Each machine has a normally 7 w# S. A. I* Z
distributed processing time with a mean of 48 minutes and a standard 7 Z2 e5 c( v8 K. E2 A9 x
deviation of 5 minutes.
& v/ B+ R* k% w3 L6 t$ MThe three machines were purchased at different times and have : a3 ]; j" Z7 s- ~8 v; z
different failure rates. The failure and repair times are exponentially 6 @" w! h; a: P
distributed with means as shown in the following table: / Z! h3 w) i+ G: k: \3 h  R
Note The solution for this assignment is required to complete * y" e& N- U& ?6 }% n9 J
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ( {1 @$ ~/ Q# R  X) U5 y( h/ K
your model. 5 ^/ ^* e# `- J3 V9 c- x

" f: x$ `: U% A, fMachineMean time to failMean time to repair3 m; j% j+ x3 F  |1 U+ G
A110 minutes      5 minutes: {0 g; l$ M# q* H& o
B 170 minutes     10 minutes
, O5 u4 n# V2 @4 z( GC230 minutes      10 minutes1 p! ?7 ~6 `8 Q2 N/ X; G! t# y
. O! _3 B# s/ w# c* p
The machines also must be cleaned according to the following $ D' b# z. C4 e* g
schedule. All times are constant: 2 y, B7 o. w, {5 w

7 S% j4 j6 I- H. gMachineTime between cleanings Time to clean; m* E1 ]5 |. b" t, x4 {0 V# t6 Q
A90 minutes        5 minutes% `$ q( @/ z$ g2 C
B 90 minutes       5 minutes
2 C3 [- C( U( j: h/ D7 MC90 minutes        10 minutes
7 B5 k3 F/ D" Q4 {8 W$ `' N# X" _- c7 d7 e
Place the graphics for the queues and the resources. # Y; _2 B: x, h) K
Run the simulation for 100 days., ~  t: j1 V" v& N4 \# o
Define all failure and cleaning times using logic (rather than resource
3 i! g, t5 t  ]# I' Ncycles). Answer the following questions:; p3 A  t! M- w8 s
a.What was the average number of loads in the waiting queue?0 N: {: L1 K; o$ P2 u7 |2 J
b.What were the current and average number of loads in Space?
0 k& C( z1 i/ lHow do you explain these values? . d9 S$ e( m+ j. g( i  B% E) p' i, f

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉' Y7 z. P! h) v, z2 j* o7 Q6 _/ `& ?
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), U/ x  ?/ i( F0 H/ V5 m( J* w
这行好像也不太对,各位先进觉得如何呢?, k; f4 g. R$ b# W9 V, }7 ?& e
/ \! O6 x9 ]% J4 d: ^
begin P_something arriving+ ^5 |# F( Q8 g1 J* o1 A' v
   move into Q_wait
) N3 S+ p# E( Q7 i7 X   move into nextof(Q_mA,Q_mB,Q_mC) 7 d; J5 Y( R. ~+ ?/ @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 }# Z6 W! a: w9 m- V1 Q5 q* \   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ F' R+ T- Y; Z1 A+ ^end
$ @3 F1 U4 v- R6 U4 i1 Y" y
- J1 T* q# c$ n# C) V# p3 T, {begin P_mA_down arriving, l7 l& C3 p+ s1 R4 L4 q
   wait for e 110 min
9 Z; w8 |9 v* Y9 L( t' @) H   take down R_mA
( p8 d5 d; Z2 g, b( @   wait for e 5 min
( r4 A/ x, r/ E   bring up R_mA5 H% A9 a; q  b" j; ?! n
end
; h0 R, y4 ~. S0 f+ E( j5 r$ _5 I
# ]( I7 Z) V% U8 _' \begin P_mB_down arriving& y! X0 y8 ]. ]3 x) r% W
   wait for e 170 min0 ~) L! _4 o0 [$ \
   take down R_mB/ c( Z. N( ?. l* f. i
   wait for e 10 min
$ ?5 [1 L$ ], n: Z1 _   bring up R_mB
: y* u4 g+ F0 @! o. Y  ^end4 V% _2 [0 ]( t! Q1 o) K6 d

, l# v! u* V: R/ W' X' rbegin P_mC_down arriving
7 E. e. F3 j- v5 @" b. c1 j' d8 e* U) M   wait for e 230 min- {1 w" z6 g$ r: M$ V$ |/ D" S
   take down R_mC9 @- c- B8 }" c0 E0 b0 U1 X- l
   wait for e 10 min- a3 k" u& D+ b+ p, T* [
   bring up R_mC% r9 [& \  Z$ V3 L) V: ]* {
end
5 U* f9 ?3 V5 p3 w, ], f0 p
$ o  N; S" P1 \- Jbegin P_mA_clean arriving$ g+ m# c- |8 x* F! o, _
   wait for 90 min& M" ]& `9 L* s  T+ m1 B& n7 A
   take down R_mA; O* V0 _( ~* V/ U% G# l
   wait for 5 min( w+ B# f0 b4 Z" r! U  U
   bring up R_mA9 a$ `5 e9 |1 A- y: S# P
end$ }6 K1 T/ F" S1 {: s
4 P, r/ Z. x1 n
begin P_mB_clean arriving0 F! b. n* }& c! W
   wait for 90 min7 L- ?2 x( Y; K
   take down R_mB
) M7 Q0 e" z/ ^" R* {4 `& F   wait for 5 min
3 d9 o% U8 v- L% u) x5 ]' B: A0 E   bring up R_mB
& {0 @7 J0 ?: l9 J& nend1 L8 y. U+ ?9 G% G3 A
% _  _+ y* i( r+ g( K3 e" {
begin P_mC_clean arriving6 ^: Y; C/ z8 L: `4 Z; \4 \! T$ }
   wait for 90 min
- [9 G% e6 _' N, \   take down R_mC4 A% h/ d9 Z" s; V
   wait for 10 min0 a4 c  _1 y* l4 M
   bring up R_mC
& e* b+ ?9 E2 k  S) b+ @, Tend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving- }9 b& b9 ~& D; J' p: v
   move into Q_wait& O/ F4 j6 T7 k
   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ [. \, t2 s/ Q
   move into A_w" i/ A3 z2 S/ g' p" C! x; p2 y
   if A_w=Q_m1 then use R_m1 for u 48,5 min
' _; D# o! i9 S5 X7 D/ w   else if .....then use ....for u 48,5 min' O% N6 N7 F/ }% l$ ?1 D( j& ~
   else if .....then use ....for u 48,5 min  1 a+ X( h) E; k' `& s3 u
   send to die& \: B% x9 K0 S6 V. v
end2 f2 O+ V1 i6 J* ?. L) G. `
' r$ K- N) A. u5 y( k# t: [3 f$ x
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-1 09:54 , Processed in 0.018460 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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