设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8416|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ; @& i0 D+ ?7 w9 F; d
) [  L& Q. A9 l2 ]4 O  T
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
7 H3 P* r; X. T! t+ m+ X7 Y6 {8 ?2 l7 q. [
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
7 k1 {8 a: h2 s% v: I* K$ G" n1 k, y5 m2 e, G  i( k6 e" {
--------------------------------------------: D2 d5 W4 w4 U% `7 a- R, }# _
begin P_something arriving
- ~4 }6 E, \4 T$ f8 I( {   move into Q_wait( K5 D8 J  Q1 v
   move into nextof(Q_mA,Q_mB,Q_mC)
1 K2 ?0 \. t5 c   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
: T4 C$ Q; ?; K9 m" X" H. d   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean): q" j0 j( h5 D8 I
   send to die5 t1 h" A3 D9 |. c
end
6 M4 d$ g$ F7 H! P# r
/ e  G- Y2 P: w) X
begin P_mA_down arriving0 r! K0 @+ U7 f/ |
   while 1=1 do
% E4 Q. d/ \- k5 K6 I! \   begin
+ s/ L; ]1 N7 I) Z   wait for e 110 min9 v2 a, n! F/ A( t
   take down R_mA. K. \& E+ l, R6 \
   wait for e 5 min  B% T( X' ^' _+ c- Y
   bring up R_mA
0 U1 _7 v. Z9 ?( d% O- W) G   end; ?+ g6 x, |% M& P) N7 |8 B5 b" p
end
- H: M, {7 d' C1 e

% u8 @- h) U% _# s$ ?begin P_mB_down arriving9 [8 k% K7 ~2 U% c- V8 ~( H# e
   while 1=1 do; F. o7 F/ Y. v8 [/ v
   begin
# ^/ W( V8 A: t+ T) i* i   wait for e 170 min
  Q% Q! M% D6 p/ Q' Y   take down R_mB
3 N, V2 C9 l( J: R$ Z0 ?; b3 G   wait for e 10 min9 |" h+ t" `5 D& Z/ t
   bring up R_mB
6 t+ J# N+ }6 v' V& Q# h! E# o: p& I1 y   end  a9 o% [. _. E! E- o0 N. ~6 U
end
  K' a5 B8 k- M. S5 V

  X/ d! S& t. |- o/ q5 n# qbegin P_mC_down arriving1 S4 E  K- r& U$ C2 O6 X* h
   while 1=1 do ' W: ^( E- X  R) i
   begin- I8 E1 @7 v- {% {/ \
   wait for e 230 min3 e) w% P( I  _2 q: ~
   take down R_mC
! f! C5 H- ^" ~   wait for e 10 min9 z0 r3 d* b& S: Y" X3 g
   bring up R_mC
" f, ]) H6 o% Z: Z   end
1 y7 j* i; k/ }, m0 U/ ?) f' Lend

* ?9 y/ l& O- A. t- c: T) c6 d / R! r( D. M% w1 a8 v! D
begin P_mA_clean arriving. H1 J7 k  G& A; v# L
   while 1=1 do
6 S7 ^8 d0 ^% p( u: U# S' s) z   begin; U) m! a1 N7 }( R
   wait for 90 min, L! P) D/ J' y" C0 U; l
   take down R_mA! Q" S) i+ i: ^6 Z/ E4 D
   wait for 5 min' `2 D9 T% x  q: w* Z
   bring up R_mA
# `7 e% m; b  ~   end
& p0 S( M: t& K2 oend

4 b: p- F, x4 ^1 O7 x
  d# b5 ?) U& l7 j( U9 U2 O0 Hbegin P_mB_clean arriving
6 ^. l4 j" Y3 P* G/ R   while 1=1 do
4 s+ d, w( z* w7 {* N   begin* {$ [( F3 ^$ f3 f0 i& K. u& ?5 g
   wait for 90 min
0 N/ t% @5 s( P5 _. [( G   take down R_mB
8 i! S8 t$ T+ L3 f- G' }   wait for 5 min
% ]' c1 L" B# i4 F0 K% {   bring up R_mB
# E# S/ U# w8 e/ W8 d! ~2 V   end
9 ?5 }" ]6 U$ i' k- I! Y. tend
3 L7 T/ j# @2 H7 _* \
3 R: P" N7 k/ E! Z
begin P_mC_clean arriving
: x- w: Y! _7 r$ C# K$ N   while 1=1 do
% q# c. \+ s( l- y: g5 V- j2 z  @$ r   begin$ L& e+ ?; P# p
   wait for 90 min$ m; `* S  K7 X
   take down R_mC+ e: j' g( y# m9 t: y0 ?+ q4 C
   wait for 10 min
' I' R# q# z' s6 Q- \   bring up R_mC* t$ D9 W* P: e) y* h8 g$ J2 c
   end
# z- Y% \( }( w0 N4 h; f0 k2 @end
1 N' b* |! r" _* f
----------------------------------------5 J5 v$ F. r+ K+ ?7 A

  X' p/ ?0 l1 ^4 l+ ^/ f2 c% H' fExercise 5.9
7 S/ ]' u6 X1 l  Q4 P: f; Y: |5 c5 A
+ h* Z$ D1 @: Z; P  s
3 s( p+ i3 _5 X# f) rCreate a new model to simulate the following system:
' P( Q# v' R  M1 \Loads are created with an interarrival time that is exponentially 5 m/ x6 F1 A& z: k  L  s
distributed with a mean of 20 minutes. Loads wait in an infinite-
/ x- p7 s& S. a% Ucapacity queue to be processed by one of three single-capacity, ! g. W# H/ T- k" W- |  ], o# B
arrayed machines. Each machine has its own single-capacity queue - g7 o* k. H/ y6 H: e  j: K
where loads are processed. Waiting loads move into one of the three
: w% r) a8 u/ ^' R+ E# H4 ^queues in round-robin order. Each machine has a normally
) J  O4 e+ I3 v  tdistributed processing time with a mean of 48 minutes and a standard - o& B4 G9 v  H5 E/ F
deviation of 5 minutes.
% J/ l' c' v. }5 d5 E4 EThe three machines were purchased at different times and have
3 N, C) a! o6 ?% C+ `0 ldifferent failure rates. The failure and repair times are exponentially
2 U( M  T# y& F5 Zdistributed with means as shown in the following table:
* i# y9 ~0 j8 GNote The solution for this assignment is required to complete + C- q4 e, _* v; L3 D: |/ P
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 |" o" W+ T$ @% [0 w3 }% V; f/ hyour model.
* a2 L6 w7 `. d8 }* x+ {0 j. L- L3 C7 }2 S
MachineMean time to failMean time to repair* H/ ?" F  \( A& {; D) H
A110 minutes      5 minutes
# O: p& b6 t* A" `B 170 minutes     10 minutes5 B3 B- S0 a) A; S0 r" h2 h1 n& v
C230 minutes      10 minutes* z- [% s' V: u9 Q. y1 }$ p
! @. ]5 Q  j6 ]
The machines also must be cleaned according to the following 7 {- X' ?8 M% u
schedule. All times are constant:
9 C; I% Z* O# c* m# o' E- C6 r$ O
, Y9 X. i' s7 w3 uMachineTime between cleanings Time to clean6 M7 v* v$ R, B- [3 }
A90 minutes        5 minutes
5 L7 x/ j9 ^( j4 ]' n& |& k: FB 90 minutes       5 minutes
/ N. h# O" c6 M/ b1 O: SC90 minutes        10 minutes6 c( C* ?0 C3 p9 @; ^' z, E
4 D% ?3 k+ I7 \) Q( j# [
Place the graphics for the queues and the resources. , ^5 e$ U" w' ]! C
Run the simulation for 100 days.
0 b5 N; W8 i4 y$ JDefine all failure and cleaning times using logic (rather than resource 6 z' }( T; j! p. R! f
cycles). Answer the following questions:
; P6 k- f; d% C) K( D9 na.What was the average number of loads in the waiting queue?  E( R' _# m' \/ I/ F; W
b.What were the current and average number of loads in Space?
( U/ }* E$ u8 S1 i8 VHow do you explain these values? 5 B6 h5 @5 w2 p( f+ Z  y: Q, L

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ n7 {* }/ f, l! j. B9 W9 o: P
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" V- t& Z7 Y% b1 R0 |
这行好像也不太对,各位先进觉得如何呢?
! h! F% r/ A1 L2 X
. T$ j* h2 M& q# T6 d' i) j: |2 Bbegin P_something arriving
% T  m$ G7 [' ^9 K# X   move into Q_wait% p" ^& Y3 z  W& B  F1 ^; d( B
   move into nextof(Q_mA,Q_mB,Q_mC) 3 O' W) g2 ]' G& `; H
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min8 E# S) t$ @, q: E& p, Z# [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ) H9 l6 z* H$ q7 O% v: N
end
4 P8 x" I. c0 G. {5 Q( h
" o4 n! [& V" k' O& X0 q7 Cbegin P_mA_down arriving
/ B! Z# y5 k/ D0 s8 F  O: R/ a   wait for e 110 min
+ t9 q8 N% @6 {2 `9 s5 A, g   take down R_mA) z$ k8 Z" B! m- g0 p- i2 E
   wait for e 5 min2 s7 j7 m  e* i. e  i& a& a1 K3 U
   bring up R_mA
) F( Z) z0 b) p/ P0 _3 S- N3 d. fend
' p8 X6 B; D, n  z3 s" I+ Q  U. G9 O8 F8 {  H  I6 V8 o
begin P_mB_down arriving
& c% _7 c( |9 L# {& N* I# S1 U   wait for e 170 min; R: _7 b  @0 D4 T* B
   take down R_mB0 P3 g( V. s- v  f/ n1 u* A
   wait for e 10 min
% U. x4 x! B; k( E   bring up R_mB
; d1 H! i& {- C: P+ ]; O% lend# n2 `: N! W" j3 Z

7 d3 z2 R5 z. p4 R0 Kbegin P_mC_down arriving
4 z1 f4 o( |8 w: f  n   wait for e 230 min9 p% ?7 K3 e2 n+ U# `
   take down R_mC4 ]' f5 d8 ~9 W, m# x5 G4 F9 i
   wait for e 10 min0 b' O, v' e# C1 c
   bring up R_mC! p6 Z, N6 e  i: Z% e1 Q; o" t% @
end( i; C; h* y1 ^5 q. l! D4 S
2 C" R9 u. i5 \& V
begin P_mA_clean arriving
8 g# V$ v" T% H: [. b5 i   wait for 90 min
2 X& k* k% l- ]  i) {5 q+ X4 n   take down R_mA
+ t9 j/ x) c/ |7 n# C/ L   wait for 5 min& f* v' y! u) s; H
   bring up R_mA
* w! o5 [8 ?2 [1 M5 Z) q6 k8 \end
) q6 Q/ G* _' t( H' S* u% Q3 a
7 z) B* v" K! e& sbegin P_mB_clean arriving$ V7 Q2 [8 k/ u+ [* I" O; t
   wait for 90 min
3 r+ @" u2 Z: g! i   take down R_mB! n/ y! N5 c3 R! S6 N
   wait for 5 min' A$ \9 U# X& F( |
   bring up R_mB
$ U" t$ m! ?/ [4 F4 M5 s, F+ d* vend4 Z9 l. B+ y$ F: w4 h8 |  ^

; v* G' c0 n  N( o6 j0 a0 f& z3 T; Rbegin P_mC_clean arriving
. R6 V* }4 g( m- R, ?   wait for 90 min' H! X1 I$ @" R& x# y
   take down R_mC/ D% C2 U4 ?7 x. ^( }) r# ~
   wait for 10 min' U8 ^4 o/ k8 s
   bring up R_mC4 L0 u7 x. z7 k, X' f
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
' M7 w6 ~; e! j; ?   move into Q_wait3 j. Z# R( [* [& ]6 b4 I
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( g$ @9 `3 g0 d2 ?7 [  Q   move into A_w
$ ~% x8 @/ s% I- `8 z! x# b! P   if A_w=Q_m1 then use R_m1 for u 48,5 min
  V: I, U4 X7 c) O& F   else if .....then use ....for u 48,5 min
5 k' V' d1 l  P9 O+ Z2 T   else if .....then use ....for u 48,5 min  
- t; v2 E7 ]8 e6 F& ^   send to die
5 k/ E" T0 T2 i5 N# ^% }end8 T( P5 @! n/ q% V0 g. r7 `
; i; d" l  m9 [6 T
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-10 12:55 , Processed in 0.014588 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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