设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7280|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
( u" S. _( D* ?" J. S( p4 L+ G- U
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去4 A$ ?& F$ [; J7 e* I( B! J* _

( ^- |7 v( q: r$ W3 l' _6 R不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!2 @) j9 F# |* V5 p

6 c" U' ?1 X  c# ^5 E" S
--------------------------------------------: e5 a6 U  x& R
begin P_something arriving* R5 M4 R# S9 C1 d; w5 J9 M  e. O
   move into Q_wait
+ m1 \9 ]! j8 g% J4 Q( }! [1 A5 n* R   move into nextof(Q_mA,Q_mB,Q_mC)# J3 Q! f' r7 ?& Y8 G6 l
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 E+ v) Y% B. o9 R  V. c: A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)2 a  e$ G8 l+ ?  b! o. Z: P, R
   send to die8 N/ S* c- g. i+ K- J3 U5 G" T
end
# q7 V( ]1 X7 @: g

1 Z+ S# Z# m) N- t6 gbegin P_mA_down arriving
+ j0 s' L7 Y; L" ]/ f# n; W   while 1=1 do
1 s% g* B$ p9 v1 S" b1 U# k. ?- n   begin5 S' e" E8 t& @* ?# l
   wait for e 110 min( Q3 D+ D" O( E% `( v
   take down R_mA
2 \8 ~3 |3 C2 h3 G5 P% R, d* c   wait for e 5 min( `! O9 A0 W3 l& B# r+ T! L
   bring up R_mA+ M4 L7 t" v/ F2 N* u
   end! Z. ]7 F! L( C) x
end

4 r. S2 g! B4 \ $ ?8 q% c1 V# C1 H% A
begin P_mB_down arriving
5 E% @+ f4 W$ |# k& ]) P: H9 `2 F/ F   while 1=1 do
" I# y' @/ ?% E' r% S% c; H   begin
( s; U  {' a# N  }   wait for e 170 min6 o; ]6 d  u9 P4 E! x8 c4 T
   take down R_mB
# E5 h/ V- R' U( \1 L; y8 o   wait for e 10 min  k- w" [& n  f
   bring up R_mB! L, G6 y$ \- k9 a! [
   end" M2 _& m1 n' N4 t* j
end

' Y% J3 R6 c  q& j3 y
9 m* O+ M2 D& x3 e! S" f% `/ `4 }begin P_mC_down arriving
6 \, `# a3 \& j   while 1=1 do
; M0 ]6 ~4 L' K; P   begin& w: P1 H% \: M3 D/ ^2 @" p6 v; ^
   wait for e 230 min' `2 I. @2 _/ p( c/ m& R2 Y
   take down R_mC! {9 x, R  o6 _# l/ ?/ t
   wait for e 10 min
$ A# m2 w  b# G6 k5 W( I; L   bring up R_mC
1 F. I* ^2 }2 @' |   end4 q1 p& e) @. q  {9 M( m
end
/ w# o& |+ O3 F, r7 n+ U' M
- _9 t! O1 Z% f" p+ \0 y+ w
begin P_mA_clean arriving/ }& x8 F& l4 b9 c# I  l' x
   while 1=1 do
3 k& c& u: C3 h6 V( a& b9 m$ H! B   begin! D( m) A; P# m* y+ f
   wait for 90 min
4 [0 b2 h$ o: I( j3 x5 D9 y   take down R_mA& T2 s, ]7 [+ Q/ d9 F/ R9 i. e
   wait for 5 min# E. @" ?/ s% n  R" ^/ j
   bring up R_mA& N  T& X: c' S. J3 X( V, ?5 G
   end
. |, ~3 L0 m5 G3 w' B* _! o& Kend
' K! J, {' G# |7 N/ _% ~5 j
4 ~" G- ^' q3 f9 [& m
begin P_mB_clean arriving
0 Q6 }* B1 d7 _% F$ i6 f   while 1=1 do
9 t( _/ z/ a1 _# g2 d   begin7 W/ \! W3 n; I3 u( }) _7 g
   wait for 90 min
( t, V3 d! K* o# H4 b4 p5 |2 g   take down R_mB. l: u3 P! V% u! x) m3 M0 \
   wait for 5 min
! R( J( B& ]1 g, z. A   bring up R_mB
4 n7 V$ X! Q$ l  i$ \   end7 j9 _7 f% r+ [! {/ q6 q: `
end
/ c) a$ I6 Z( s" q7 C" p7 Q# A
( I: _5 d1 A$ e, t
begin P_mC_clean arriving8 x1 F) A/ s* b! r7 L& w3 r
   while 1=1 do
& i7 e2 i6 M6 G! F4 K) A4 t# P   begin
' Q7 S0 Y) B# Y3 Q   wait for 90 min
: b8 z* u& R2 T( l# C; s   take down R_mC8 b1 V) V/ n$ ?
   wait for 10 min
9 A) p7 P- d( j6 N   bring up R_mC
) _! V* F4 I! }5 C/ \: n3 v  N* k   end
2 d9 a5 `0 ~: p" o2 i- d! yend

  D* T' {- B  A----------------------------------------
& k- m# W) o  k7 o
7 p5 b) J. s8 N. W3 e8 A  F" I4 uExercise 5.9
* `& R9 V, l" p% Y. `1 x! T  h& `# P7 s. \) N3 c' [  n8 u( d2 G( [

/ |1 ^+ c, F2 M' l  fCreate a new model to simulate the following system:
: v8 U: i+ Z2 k4 n2 y' D% `Loads are created with an interarrival time that is exponentially
4 e# i' I7 X* I! L1 F  Sdistributed with a mean of 20 minutes. Loads wait in an infinite-. T/ ^5 \+ x" N  ~; x9 \7 _1 {
capacity queue to be processed by one of three single-capacity, * T% E0 x$ M+ J* x* y
arrayed machines. Each machine has its own single-capacity queue , \! c5 D" f- b8 P
where loads are processed. Waiting loads move into one of the three 9 g6 Q9 Q( L- ]
queues in round-robin order. Each machine has a normally
6 ~+ |( T7 z* c7 E9 V: B  Mdistributed processing time with a mean of 48 minutes and a standard ; d7 _" Z+ W; o6 `" c2 j
deviation of 5 minutes./ _5 h3 T- N/ @* g2 O
The three machines were purchased at different times and have : F# Z7 a! X8 O! I3 a0 @0 m+ T9 `. m
different failure rates. The failure and repair times are exponentially ) M: B3 D. D& r# P
distributed with means as shown in the following table:
: F) p  ^1 i0 [7 XNote The solution for this assignment is required to complete % M8 H3 l8 r& E5 K  v; @1 N
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 3 r9 C/ z$ Q8 {' g1 E  e
your model. 7 w* c" ]5 M& x

5 k, |# K6 }, l8 TMachineMean time to failMean time to repair; G/ ^+ c: d5 O7 P* _8 a
A110 minutes      5 minutes1 s: t+ j7 ]4 z2 S
B 170 minutes     10 minutes) Z3 t, r0 F  F  B2 V6 k
C230 minutes      10 minutes
( e, c. q2 G  i% h: p! K$ `8 Z8 q1 O& I  P  i" K/ Z$ r
The machines also must be cleaned according to the following 8 `8 e+ D8 s1 H" ^! }
schedule. All times are constant:
1 h4 H1 `8 Q6 y/ q) a. P4 B: d) K3 h9 u/ @7 Y1 K
MachineTime between cleanings Time to clean
! l8 H" ?6 ]- ?. S) ?5 z. x% E# uA90 minutes        5 minutes' ?/ o; h5 T/ g. U( a0 ]; W
B 90 minutes       5 minutes
( E8 A* ~2 e+ M7 ]5 M" w3 J$ {% xC90 minutes        10 minutes
) a; P# q) g+ [% b* |' ?) e" G. M$ A! t( h2 Q: d2 G1 \: Q
Place the graphics for the queues and the resources.
0 P2 o4 ?2 T0 k( _2 LRun the simulation for 100 days.
( ]& u) Y# L2 N1 [  XDefine all failure and cleaning times using logic (rather than resource
4 Y( X7 ]: x. _) @* e1 Scycles). Answer the following questions:
* C5 l+ M: H% t+ ka.What was the average number of loads in the waiting queue?( ]  j' S0 |* n9 N* E) L' j
b.What were the current and average number of loads in Space? 0 f6 d. M0 h& K1 ]3 `, x' {
How do you explain these values?   Y% U# ?( e4 ?) H2 u1 ~; u& J

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉; P: F  s' a8 _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 S' y- Y1 {0 j这行好像也不太对,各位先进觉得如何呢?" M. Z, F: G! A" y9 S  M* l
# W5 p" a. i# _. T( U  n. Y% C2 {
begin P_something arriving
8 h, ~% i2 Y6 _  K2 j$ Z   move into Q_wait
6 M6 e% m# x! D1 s   move into nextof(Q_mA,Q_mB,Q_mC)
6 h8 A* K8 v* R, V$ D' s& Q   use nextof(R_mA,R_mB,R_mC) for n 48,5 min9 J  ]# i, V& [$ D7 h0 w; ^
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, E* m/ g  R! j1 y# T6 k$ l) y/ _. cend
" m- U5 i6 S1 V' J3 L  e  i
0 x" n) ~8 ]+ N- y3 _& A- Tbegin P_mA_down arriving
6 m* Y# R6 f& i1 s   wait for e 110 min9 D3 i. x  m$ ^2 A
   take down R_mA
' e& q) {1 n' T' C   wait for e 5 min+ ~' E1 |" }0 d# W
   bring up R_mA: S. P1 g2 p5 ~! B( K8 p
end, [5 F# O6 ?0 H$ w! O
# @5 G% `" p. M! k6 r6 R
begin P_mB_down arriving
& n9 @: E" y$ q* G+ y! j) \# U4 ?   wait for e 170 min2 q4 ]" }3 c* L4 o9 N3 X  _0 v
   take down R_mB: O) S) C4 l+ B+ A5 F/ h" q
   wait for e 10 min
' j% v  L0 b7 F& f! q   bring up R_mB- L% @4 ?6 n- K$ U# E- E$ @
end
2 G. m, U1 X/ q$ G; }; `
+ I7 A( q  ]! Q' ubegin P_mC_down arriving
5 [! s& f- Z. f$ d) j   wait for e 230 min
* @2 ~! P7 ^# y6 T4 ^   take down R_mC% d" g6 A! e. _1 E4 c
   wait for e 10 min: }* l( c8 P9 m$ b" U
   bring up R_mC3 D! i/ S6 G6 t8 E& R
end
" o# C" y* b2 G: e! N0 G; P7 I$ F8 I; Y: O1 d  M& k3 i
begin P_mA_clean arriving
. F3 L0 Z9 J0 E- I; e+ ]" Q: O   wait for 90 min
; M" \+ N) D" k9 F   take down R_mA
2 L; A8 D7 B* A5 E: `2 u2 g. o   wait for 5 min
% @" @- e8 _4 G; M1 \   bring up R_mA+ F, y! f, B0 N$ j% W# G! N
end6 r/ E7 C1 b) {& _* d  q4 f
; J* y4 Q7 _; h; |- A$ q/ u1 p
begin P_mB_clean arriving. L: A9 p1 j7 w8 |5 Z9 }
   wait for 90 min
& G7 k" v2 c" l   take down R_mB3 \  G4 e( h' ]3 T9 t
   wait for 5 min" j& F2 g- i: C) c* G% q! Z
   bring up R_mB
: D! _7 U/ Y5 u' `end# J  j; D6 r0 l
% b( I; l1 G+ X5 ~4 z
begin P_mC_clean arriving9 U% J' P2 ?# w6 y6 J) Q
   wait for 90 min
  M  Q$ e3 R. B/ _5 z   take down R_mC$ Q9 d2 R* h' n
   wait for 10 min# s: }$ R$ W9 V  v+ ^% S
   bring up R_mC
3 u8 A1 e( W/ \. S% \0 {! cend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving+ Y9 m. t1 f. k' P
   move into Q_wait4 ~3 c! T- E9 o+ C9 `9 R' b
   set A_q to nextof(Q_m1,Q_m2,Q_m3)6 G0 N, a6 E; T! P1 m/ K4 g
   move into A_w
  J- H) Z, O. A, }   if A_w=Q_m1 then use R_m1 for u 48,5 min
, J1 @& X. A$ o   else if .....then use ....for u 48,5 min
' T8 f$ E. s2 ~$ k   else if .....then use ....for u 48,5 min  
1 Q0 l; g+ {- s- o. O   send to die+ ]1 X& `8 U7 t$ l2 A7 a% |0 k
end9 j4 _7 T# |; _9 o# b$ C

  W' \  e# s) J, x# T$ B1 `' o供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 22:18 , Processed in 0.015266 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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