设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7552|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 9 {7 [0 y/ }0 }1 r

4 v% x* m  Z7 B/ l# z底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
! m/ `% Z0 V7 ^' o7 c( ]6 o3 i
( _& Y% H$ W0 x; l0 d# u不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
4 L7 H2 @% @8 h4 y$ `2 h
% \& K" T& G$ t/ ]" [$ p+ L6 {! L
--------------------------------------------% T! L  i* K- o/ b
begin P_something arriving+ V+ c! ^$ V; m6 c. Q+ z6 w
   move into Q_wait, l6 Y3 x0 N$ z* N0 c$ Y6 f3 b0 z
   move into nextof(Q_mA,Q_mB,Q_mC)" V6 Y% }" D2 l7 W; N0 l
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
9 X; m3 p( d1 Q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; N6 J0 j# k2 C+ b+ T$ b& n   send to die7 i5 F& T1 _' X3 M1 _& N5 Y
end

- M6 G9 d9 I* {  G( n( p& q
( ?0 y8 \$ n5 z& |. h) e2 X  Ubegin P_mA_down arriving
, j- y% R! g! J: X1 _0 e' J   while 1=1 do / e6 X! d. i! n7 i  k% c
   begin
) F9 G6 s( a/ k$ U   wait for e 110 min
/ h* |5 x5 c+ R5 C4 Z; _! K   take down R_mA* S1 ]. n/ b/ f8 P, \
   wait for e 5 min2 U: t* \& Q# Y# F# _
   bring up R_mA
- s. p; ]  j+ y% U1 Y5 w   end+ z9 ~, f5 ]/ Z8 i
end

3 k8 _9 L0 K* b0 `& f# i' ^ 1 o; \9 y! v# T* \7 f( Q8 H( R4 `$ ~! D
begin P_mB_down arriving9 H" H0 I5 `' c4 {1 U+ C
   while 1=1 do
0 w7 M2 a/ L  q! L   begin8 {. o( t; s; |
   wait for e 170 min
! \4 ]& `2 F- L! T1 J$ A   take down R_mB
. R$ ?2 ]- ?, B" J6 D1 {   wait for e 10 min
7 g/ \3 R; |8 m- N8 |& ?  M$ N3 |   bring up R_mB: c* {% B9 E, A
   end
6 I6 }, ]+ s% m% Y+ Y% Iend
& [  Y7 z* H0 Y/ o3 P: ?9 x) V7 ~
) z- P( Q. N+ L" y$ \6 l  _* L
begin P_mC_down arriving
; f4 U$ [% L5 \1 R   while 1=1 do 9 ~5 ?8 p2 x' p, A: P/ b
   begin
4 W2 B! h( q3 C% Y   wait for e 230 min
9 X% z5 r0 W# N( a% J9 g) b3 b* e   take down R_mC
. x- a; d/ [$ @! \  X   wait for e 10 min3 E/ ]; s5 u! ~/ @+ k3 Q
   bring up R_mC
  d' m% |7 ?- T4 h; z% w   end2 D6 [- r4 I3 [5 N
end
3 {, ~2 ]5 n  T- m) U1 U
6 O& k: W) j' i
begin P_mA_clean arriving% _) c. M2 ^0 K8 \, ~9 b" x3 M
   while 1=1 do
8 M# w/ Q% m9 f8 a6 b; ^1 X   begin1 _1 @9 H- v( ^0 X( ^3 h& X
   wait for 90 min9 R4 N) K) i- C+ s" f* Z
   take down R_mA& x/ j$ C, [% W$ n3 Y# P9 ~
   wait for 5 min
8 Q& }. s5 g1 M9 V3 [7 Y' I   bring up R_mA
. `2 }( K# j. o9 W6 f" e, x   end- g% _7 \- l4 u8 N- W# n) F! w
end
4 v7 W  Q( h  x# o2 l# t9 y
$ Q5 }, [3 [' u" a$ @
begin P_mB_clean arriving
: }8 k8 s0 g% l   while 1=1 do  K4 W( u$ ]4 _& Q3 Y% {, P
   begin
5 y) n( [& Z$ R% I   wait for 90 min% c* E/ n. D4 C% h
   take down R_mB
* K' f3 w0 u3 \: v' K8 u2 ^   wait for 5 min+ J( f6 G$ g' u  K( z* I/ v
   bring up R_mB
- z1 a. k: l1 N   end
- y) n3 N- p! \! Oend

  X* J3 L, S/ g- F) V & a: m8 g  \. n
begin P_mC_clean arriving
" Y- V9 U8 C& ]  r3 a6 X   while 1=1 do/ u5 ~* [" |, ^4 @0 V, w1 s: a! e
   begin
3 S9 C) r/ C# `0 d$ D3 w& U" ]3 h   wait for 90 min6 i5 T* t- G' _$ S/ E! l, T
   take down R_mC) L# _; X! L9 c1 |2 p- u0 D6 I# s
   wait for 10 min
/ Y# b2 ]2 B$ {7 R+ v! i% t   bring up R_mC
  o; w6 N1 y4 \) r/ ]9 e   end
! o" U7 s% m* x) q7 cend

7 b$ T0 q, a  r  U----------------------------------------
; Z. H7 A* ]7 l
+ q( q/ o- K5 Z6 KExercise 5.9& [0 {$ @4 M+ X% f. R& t
0 I* D) r8 n2 s! w" C: l
9 S' P+ j4 s) C! M1 T
Create a new model to simulate the following system:
, ^. ]6 J0 F$ I7 w+ `1 _Loads are created with an interarrival time that is exponentially
& s! P. V' }4 `6 j! p' ^0 N+ Edistributed with a mean of 20 minutes. Loads wait in an infinite-# Y: u& \8 V4 k2 F. D# h
capacity queue to be processed by one of three single-capacity,
8 q3 U' }; V4 o6 |; w$ W6 K7 ]arrayed machines. Each machine has its own single-capacity queue
* B2 N; Q4 w  awhere loads are processed. Waiting loads move into one of the three
3 A. `7 o5 M- X. O6 l/ [queues in round-robin order. Each machine has a normally : X! V% H0 A# F# z3 Y% L1 ^; @
distributed processing time with a mean of 48 minutes and a standard ; d) b6 t2 I; P% z5 K( q  n$ N
deviation of 5 minutes.
) k& r- [! P9 k* }$ mThe three machines were purchased at different times and have " C! c2 {% x! h( i) b
different failure rates. The failure and repair times are exponentially - L7 [; R# C7 P+ |. Q( y* Q
distributed with means as shown in the following table:
/ c$ L3 e/ A: X! o* ]3 PNote The solution for this assignment is required to complete
2 r: Y# ~3 d  Y6 a- Zexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of - Y+ j" ~4 _- e$ n
your model. ! X1 b9 [: l+ _# T* u; V
' P' M- q6 `' t: K; ]. I
MachineMean time to failMean time to repair; H) p, g' `1 X6 i
A110 minutes      5 minutes2 }+ ^+ E) y2 r9 q6 o( ^# g& l
B 170 minutes     10 minutes" H6 k  k; A  z3 T
C230 minutes      10 minutes# ?4 r# @3 w% Z% v
0 y/ F" I6 {; r
The machines also must be cleaned according to the following , X0 i& k6 e$ c0 u/ v4 t7 c
schedule. All times are constant: ; E6 T- X* z, D9 Z; I
* S! \0 e- d' j2 ^( G
MachineTime between cleanings Time to clean
' L; T4 T# a9 QA90 minutes        5 minutes
( y& n0 r2 H8 G( [1 b1 f+ ~2 JB 90 minutes       5 minutes, u3 z: R1 x+ b' a- b% s
C90 minutes        10 minutes5 v4 L+ E  O1 K& E- W
: Y" x' ~1 T* b! Q: F
Place the graphics for the queues and the resources.
2 f0 j) {# O1 F- C( n% {Run the simulation for 100 days.
3 |% ~/ T# ]2 Q3 ?4 RDefine all failure and cleaning times using logic (rather than resource 3 v  [4 _& ^6 ~8 n. h
cycles). Answer the following questions:3 \# n) d& j3 V
a.What was the average number of loads in the waiting queue?4 B8 x7 T. {/ x( B  J% m
b.What were the current and average number of loads in Space? 9 X; r4 Y- u$ u8 y, C& ~' H
How do you explain these values? - I3 a3 `: C. T) K3 U! ]! C. p

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉/ }* n7 C2 N# b2 Y9 B7 x
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ b& {5 X9 Z0 z7 s2 m这行好像也不太对,各位先进觉得如何呢?
+ J  g8 \  ?9 ^$ [; q* n) x
9 i, j3 E, ]) B9 nbegin P_something arriving6 m5 s/ w3 O3 O1 P2 I) Z+ }$ P5 ^
   move into Q_wait
2 W1 @6 w' m1 D) {1 `5 r: P   move into nextof(Q_mA,Q_mB,Q_mC)
% r9 b( v5 E0 c  Q8 H5 |9 a   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
) ]. n. E& @* \7 a! c   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) # x! w( P0 i$ d
end2 G2 r# K$ C2 k1 k! @

7 r+ |# e! ^9 X$ m5 R: wbegin P_mA_down arriving6 ]0 g1 n: A- q( C0 g
   wait for e 110 min/ d6 c0 {& P) c# M9 g# Q! q9 b
   take down R_mA
6 S6 J# A' D& C   wait for e 5 min
& \' Q2 F2 y9 G; G; h! D, ]4 ^   bring up R_mA
* F( u& N, c' o$ ~7 \end# c' R6 G+ u+ b. c
5 m* _4 R# R7 q4 Z$ T+ D/ r& s
begin P_mB_down arriving
* I: s& e- o3 }. l' \8 X   wait for e 170 min& O* K2 m( h( M' \5 C* X
   take down R_mB
* @' L! W3 L3 D+ T; f   wait for e 10 min
! s8 b8 v& m+ ^7 x0 f   bring up R_mB
2 T- @8 J4 d0 i: e2 V' Aend
9 ^+ d/ |9 P" B8 q7 S
) f6 s3 @- P- A. ]& n9 l3 kbegin P_mC_down arriving, s2 v- m# Z1 g/ u2 g6 }0 I' c
   wait for e 230 min3 E: F4 p* o; N
   take down R_mC2 [! Z) @% k, n5 x1 t
   wait for e 10 min
% Z( Q/ Q" C* Y! w   bring up R_mC- e' B7 _9 d* e. c. w# t
end
  u& X/ G- \* T1 Z1 `
) q: }6 a, i! ]9 q% H: cbegin P_mA_clean arriving
# P5 d# T+ N9 f1 G* L   wait for 90 min
$ \' p# x2 x; ~" b, U* R: W* ^   take down R_mA+ N7 g6 j: @0 U/ \3 o
   wait for 5 min( Q: l3 |) y3 R& y8 ~
   bring up R_mA$ N3 P4 X$ B( W9 g4 A
end
  R0 E% r$ a9 Z# F8 [: M3 G5 D& K) [
begin P_mB_clean arriving8 v& m( H# \2 W8 a, A
   wait for 90 min+ @+ K) Z3 y* e( L
   take down R_mB
5 [: o* p! w! ]6 ^- T) A2 ?   wait for 5 min2 R' l9 Z6 g& R0 b3 L$ H
   bring up R_mB
$ V  }: b3 J% H8 send& G7 ?6 A; p9 D, ]

. k3 g$ s2 {5 g+ R+ P1 f) j2 {0 t& Pbegin P_mC_clean arriving, F9 G3 x- w3 s3 E/ i
   wait for 90 min
7 j# J! U. P$ _   take down R_mC, w# M8 V; p5 t2 i0 ^1 T
   wait for 10 min* [, }2 F7 ~  p) u
   bring up R_mC! f+ v7 u8 v7 S; h* F2 x$ G  s$ B
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving" h- R5 l+ `4 r+ l
   move into Q_wait
# B' W% m- @2 [" D* d   set A_q to nextof(Q_m1,Q_m2,Q_m3)) r. ]5 H$ q4 b
   move into A_w
* X$ p  f5 R: S   if A_w=Q_m1 then use R_m1 for u 48,5 min5 z) o( V7 {- r" p: e4 Q
   else if .....then use ....for u 48,5 min
% l4 {8 n& z5 O6 w( k   else if .....then use ....for u 48,5 min  ! [: v- a& E1 ~
   send to die& e1 y! M* m9 n3 Y9 Y" _/ J
end0 q- ]$ D2 \! U6 w2 y
6 E0 M. R: H3 R. `1 _( X7 }
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 01:31 , Processed in 0.013683 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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