设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8019|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
% r9 A5 m% w/ r4 I3 O' z: g% z5 k, {, S. \8 J- N+ N1 c) f
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
& G$ N  n' b' g+ H/ R
7 q# L; C- o% w  b2 u; |不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!. m1 h$ R. ]7 X8 a& [
" ?# h; E& G" j. j3 j9 r  ]0 E
--------------------------------------------
7 t- j' U& |( C, e7 D3 J" z: Q8 v2 fbegin P_something arriving; n0 Y, f1 H" x% t4 `7 u% d# y
   move into Q_wait
. s% v$ H# m1 S$ u   move into nextof(Q_mA,Q_mB,Q_mC)
! Z* `6 @8 r! }   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min( e4 `0 A) h' P6 r, I( }8 U3 j  i' @
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) A* K9 K8 j" {$ B9 W& q   send to die# R# e6 T+ ]- m4 x2 ~6 A+ n  {( M
end
, z1 }! v6 s' v8 Z5 E  C

& Y- x# Z1 ]5 ?begin P_mA_down arriving% s$ n2 Q: B" p" W! M6 o4 h
   while 1=1 do 6 L+ ?' G& _# o: E* n
   begin
$ p6 l8 F) h2 l2 E4 C4 j0 Q   wait for e 110 min0 ?6 A8 q# v  d% q3 z" J
   take down R_mA
3 |5 H! k, F1 C- _   wait for e 5 min0 M) d9 J9 u0 G
   bring up R_mA
  c/ ~1 G! M( i9 i  p* u   end
1 v, l9 W( w8 E! ?end
$ |  t  `; W. F

8 w4 Q. q2 s$ Pbegin P_mB_down arriving
  S8 @, h$ w) \, f   while 1=1 do
4 ?! m/ L- o, \& ]   begin
6 }$ K+ g/ C# ^8 Q   wait for e 170 min# Y, |6 {/ B6 m/ z" W
   take down R_mB
) d6 o. e- F8 z/ M# i" R  A   wait for e 10 min2 {, D2 v: g; z
   bring up R_mB+ R9 W5 Q# K$ D- G4 Y# v* s
   end
* k) B  X7 F  |, w! n: O- a+ _end
  r9 E" z2 T& l9 X
1 h& N) {) F& E) S# y6 H, K
begin P_mC_down arriving* Q# i! M4 P. A: o; ?! E
   while 1=1 do # J5 h! S* T. ?" ^' e: D
   begin
# l5 T8 M  p& y' b7 t4 @6 n   wait for e 230 min
3 G+ y; |+ w9 k, `% {   take down R_mC
4 c" f3 `8 k$ W4 U6 l/ O4 n$ M- D   wait for e 10 min, j& e, W& W# b
   bring up R_mC) j7 l7 i3 m' e0 C7 o
   end. P/ ^' b) c9 ^) X$ V8 ?
end

4 h# r, }! @, L2 v+ |. ~( [ 0 s  L2 J8 D. H# a6 f  u0 ?- A
begin P_mA_clean arriving/ E3 [5 p% O1 E$ K' J2 {* Y
   while 1=1 do
+ s6 j# @+ B/ ?' |. A/ ~& i   begin
: t4 }3 O$ Q6 @1 ~+ {   wait for 90 min
  \2 j) @0 n, X/ c   take down R_mA
8 t6 G6 O0 u7 g  Y' Z   wait for 5 min1 g' X+ v' ]$ ]
   bring up R_mA
& f/ w3 f4 [6 e3 Q* M/ _& g$ v  X4 e   end1 ^4 G, A3 O9 |% C
end

) f% m2 H2 B, v( v/ U
. x/ D' S3 j" a: S3 H4 \. ibegin P_mB_clean arriving9 w! c. a6 |& w9 I
   while 1=1 do
- |2 o/ j2 k, e, T   begin8 a  z) l; n: ~: O
   wait for 90 min1 [( G* }, w' ]/ Z$ e* [3 [  h7 Z
   take down R_mB
, Y/ m' B3 t* z3 u% ]0 W* j/ }   wait for 5 min5 ~" E! r) N% y- S4 D" Q$ \
   bring up R_mB1 e/ x. |# m& d) _1 {3 Q
   end5 o' M2 m& _' s( d% I( ]
end

3 n# H- f4 Z2 O3 t, f8 i# ` 3 q, u" C. \! W6 g2 q# V
begin P_mC_clean arriving
1 Y+ a6 s& Q9 o; b" o   while 1=1 do
2 Q- H" ~) G6 |! |' o" p   begin
( g. h/ A6 _  N' {" E) ^, P   wait for 90 min
' I9 [/ ]; c0 ]) M% s/ p   take down R_mC
( b: t( Q9 M2 o( L+ k6 }   wait for 10 min
3 e6 ?0 ]. c0 e1 e. j! W/ F   bring up R_mC
! d$ e5 Y4 {- Q3 ]* V" Y   end
1 R* _( M$ T6 K* |end

4 x* d* j  }, Y! ]5 h4 O4 w6 q4 ^----------------------------------------4 ?$ o4 L+ T- t( b2 P8 l& g

# B8 q* l  W* h: ~# mExercise 5.9* }: w- a( @$ `

3 ?  l! f# r& G7 M# C# [% C$ B7 D/ u$ [$ ^& j7 ~
Create a new model to simulate the following system:1 L8 i- B( h, U" H& v
Loads are created with an interarrival time that is exponentially # d) p; h  z2 O; q
distributed with a mean of 20 minutes. Loads wait in an infinite-4 Z' o" [2 H+ ^
capacity queue to be processed by one of three single-capacity,
: k! f! H& m+ c, {/ J7 b. Farrayed machines. Each machine has its own single-capacity queue : X7 C' u: ^1 a/ I
where loads are processed. Waiting loads move into one of the three
6 F, M8 Y+ g% O% n; _# _1 d4 D/ dqueues in round-robin order. Each machine has a normally , p  {7 U+ e8 z. _
distributed processing time with a mean of 48 minutes and a standard + q3 I$ W! \4 m6 R/ ]# W; j$ t/ F
deviation of 5 minutes.
, {6 Q' ^3 m, J( ?The three machines were purchased at different times and have 0 o; W0 i- W" X3 \. F9 u
different failure rates. The failure and repair times are exponentially
+ N" v' }0 o( x9 ?, c& tdistributed with means as shown in the following table:
& A: `: z8 Y0 ?& z+ M+ ANote The solution for this assignment is required to complete & x+ O  C0 E  n4 L7 c4 R
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of * H0 c! k5 d! B8 G' q
your model. 0 M/ W3 |& M3 x% q
4 x  T; G: N7 K/ t* ?( A
MachineMean time to failMean time to repair4 U3 s4 A8 u4 ?
A110 minutes      5 minutes
, i9 ?4 @) S, C8 FB 170 minutes     10 minutes" p2 Q; _, g- `3 c
C230 minutes      10 minutes2 z% Z0 f# ~3 \0 w! G

5 b  g, Q1 |0 vThe machines also must be cleaned according to the following " C; B8 `, Q. r/ E. n
schedule. All times are constant:
7 M) e1 w5 \: W* Y9 R2 O$ L9 J) u5 K: d0 b9 {
MachineTime between cleanings Time to clean( _& k! h) G6 k5 o( x
A90 minutes        5 minutes
5 R5 _  p4 E# Z/ P' D' V# fB 90 minutes       5 minutes! o7 L1 W1 n  }5 I9 h
C90 minutes        10 minutes$ s% o  g* k, f  \! U1 q

* \& N) W2 K/ C1 [# W4 \! TPlace the graphics for the queues and the resources. % [5 W. a+ x0 [# t
Run the simulation for 100 days.( f' l2 N2 Y$ ]! ]" ~9 y. ?3 k
Define all failure and cleaning times using logic (rather than resource ! Z9 K/ ]. ~$ I3 L8 W/ `% A" P
cycles). Answer the following questions:
' G4 S% O7 T* t- e4 ?3 fa.What was the average number of loads in the waiting queue?$ b) i& e  U7 g9 c% E" S0 X
b.What were the current and average number of loads in Space?
. }; }6 R4 Y, R& S, ^4 yHow do you explain these values? ) q3 z" [5 s+ H

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉3 H) G" v* M  ?' ~5 d
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)( m8 U# v4 y- K2 K5 _" M
这行好像也不太对,各位先进觉得如何呢?8 `" F6 g' R3 X: A8 M

" u$ \/ _: k" a$ k" R* Dbegin P_something arriving
, h3 n  B" Y( {9 u$ \3 P   move into Q_wait
1 Q7 n& y: Z! T; i0 c) H7 D   move into nextof(Q_mA,Q_mB,Q_mC)
! E# g) P, \  |   use nextof(R_mA,R_mB,R_mC) for n 48,5 min4 U& y3 t( D7 {; z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, J2 ~9 M( O1 S9 y6 E: D! Yend; Q8 s( H- ?$ a6 K3 O, ]7 ^

+ M& S2 R  I6 c4 c( ?4 j) Vbegin P_mA_down arriving
7 Q1 F0 p$ i6 V0 g; a   wait for e 110 min
0 A0 d' M+ N3 V/ \8 [' y   take down R_mA, x- k# X( a+ N8 }0 n2 ?7 \# g2 ^
   wait for e 5 min0 y/ v) I5 \8 I" n
   bring up R_mA
  W5 ?" n* B0 ^/ h# c% lend
- g& R" L, I8 r  E, o  \, M
4 `" _( W* b, b" gbegin P_mB_down arriving7 k7 \# N, H% R4 {) y
   wait for e 170 min6 b! r+ x8 y  i' {( J
   take down R_mB
( n& |+ x5 a& T0 }, [+ u   wait for e 10 min6 K& F, Y6 T3 v/ ~
   bring up R_mB  N$ @- [: l# U
end, N5 O+ ?' A! b- V) d/ c8 m
/ _# ^2 O( j1 K7 t, K
begin P_mC_down arriving5 {( u/ m& w2 W2 b
   wait for e 230 min' z2 r0 l( q: S6 m
   take down R_mC: n0 N4 c4 I" ^7 \' x
   wait for e 10 min
. |* h9 v3 O) Z0 B   bring up R_mC
% }. @9 `$ S, f. |end8 E! [$ g% m. x8 H9 f

) }. p  n5 u: |: D5 _begin P_mA_clean arriving
0 P2 w* v0 s4 ]' n% S   wait for 90 min# F/ p. R& g3 K4 [; N( ~2 J  w
   take down R_mA0 Y1 M# C$ j$ z. m. Q- v
   wait for 5 min
, c2 W8 H0 a+ E8 {: n( C   bring up R_mA; i% P0 h% J) V. Y7 M
end
0 J5 {; H$ ~0 \' d8 \
& ]2 F, k0 |( J; c6 `- w8 jbegin P_mB_clean arriving8 c' b* K. e! W8 o4 _3 z
   wait for 90 min, e9 r0 g% ^0 t3 B0 ?; I
   take down R_mB0 s, n8 b. }# H2 n  V7 T
   wait for 5 min# W) L& e+ q0 L5 W; @) ?
   bring up R_mB
7 V% j' [; P/ M+ S) k1 K% Uend/ f5 n1 I2 W$ l- J
1 j8 K* Z. a$ O' s: m
begin P_mC_clean arriving- i# g% \7 z3 }! ^
   wait for 90 min4 @0 Z  ?* Z$ f7 m: {
   take down R_mC2 s* p  }1 f+ w9 a1 a* z
   wait for 10 min$ e# C9 |& k/ @+ j3 W! G
   bring up R_mC
8 A0 T* \# Z, e( L+ g0 L' Lend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 @  _3 ?6 I. d) j! O
   move into Q_wait5 V& l) U7 t' A& E) s+ |
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
" h+ K9 k  v' L: s* w. Y   move into A_w7 P* o2 [( H" ?6 I' U7 C2 c
   if A_w=Q_m1 then use R_m1 for u 48,5 min* p: ^5 M: Z7 Q: O( r
   else if .....then use ....for u 48,5 min, B+ X" Y# C$ N: ~
   else if .....then use ....for u 48,5 min  4 ?0 M4 a$ f5 _& B
   send to die
/ q: D- P" e( X# {$ hend, ]/ y1 H" ?3 l' h: r7 L( @
' m  K1 F, D0 s" \* p& h
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-13 21:48 , Processed in 0.015624 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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