设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7294|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 $ n! Z# k, n4 u9 Q% h( q
" W' k9 b: z0 Z  O
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去' a' j3 f% f3 b) t' G2 f4 t/ E1 E; a3 Z
1 A  ^  o; G0 n9 h' m/ E& c& Q
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!8 [) L3 |( o/ O; F! y, E& v( L

- x8 X# Y- a6 Q2 {. Q4 c7 o
--------------------------------------------
3 Q1 G2 R5 D* a: {4 |3 t% A, [begin P_something arriving
8 j8 `; [5 w: P) \% R/ [   move into Q_wait/ P0 [7 k% `+ |; ~$ [7 l
   move into nextof(Q_mA,Q_mB,Q_mC)
+ B" J, n* I9 Y2 `7 S" W   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
7 U0 @0 U# J9 U7 a   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). k& R3 v/ C) n/ \, H' b$ @% i3 R2 w
   send to die
3 P& _0 A% D2 `; ]! M3 c8 A2 wend

0 @, _; F' z4 J. \( u2 x5 [
( C3 z/ ~8 G/ {begin P_mA_down arriving
( B9 Q$ ^2 q( s3 T7 T   while 1=1 do + r7 z1 ?% `8 Q8 {; @1 ~/ B
   begin$ c& ~& w( A$ {" l
   wait for e 110 min$ r: V) |% ~4 R% t, K
   take down R_mA
) T6 v- M3 |9 h# I( h) o   wait for e 5 min9 c" T  h. m1 O+ y' z4 \, O
   bring up R_mA
1 d2 X0 o; V* F1 P9 d; U: q9 H   end
, B! v3 E+ z! Y  l5 @( W# Uend

5 S4 A8 e1 K$ f% B# ? & u( y% A( Y- n( R& Q! i# c
begin P_mB_down arriving
, h. ?; L/ Z3 J   while 1=1 do/ V% e1 D7 |! y& M$ c% Q
   begin$ ~4 J) H* N2 B# p8 G( o
   wait for e 170 min& q& I& G7 i  y, v
   take down R_mB' e# P$ n3 m+ m4 |; I: S
   wait for e 10 min& Z0 e) i# _+ Z% k
   bring up R_mB) y, F6 v. f2 N: T2 n
   end
$ F% J- c8 J! {" [6 q: b- W4 tend
8 O7 F# p( t! P' @7 p

  K4 {  a/ f. H0 s! Z: d6 Dbegin P_mC_down arriving
& @* R" |' u# x; M" y" E1 z   while 1=1 do
9 B$ d" q/ b5 t   begin
" h) M: y8 k& F  ?* L0 S   wait for e 230 min9 y4 C6 T3 V1 o. e: y7 k- U
   take down R_mC
" r- o6 i+ n/ e3 C, o' ~6 b5 v' w' X   wait for e 10 min
/ u6 X; V  Z  I3 A   bring up R_mC
& |6 z5 |4 P2 n: x" b" a! t, Y   end6 \4 K% v. l2 r+ _
end
. H' r! v  K! s+ j+ K+ N; n6 m) `
" r1 n' y' |  U
begin P_mA_clean arriving! J6 D  H: J/ L+ U
   while 1=1 do
5 C8 [" L# ?, F   begin
: \1 X$ Z/ c# i% H9 I% {   wait for 90 min
5 s6 A, N0 {+ W5 W& V6 M   take down R_mA% l: B3 G; |" W: ?- j& x9 d
   wait for 5 min
( U! H8 V; f7 J! i! V+ Q   bring up R_mA$ z$ o$ e+ Z9 |5 r9 b& d
   end! {! V$ k+ v: L6 o/ O
end
& x4 R! @1 B8 Q" {; g, g) Z; w5 G& P
* o/ _! _2 w8 H* E1 i
begin P_mB_clean arriving
" Z0 d% l1 P4 o1 e   while 1=1 do, \% [! `6 ~) I$ `; v
   begin
3 n* Z0 B$ ^& m: S$ L# ?9 Y( [   wait for 90 min
/ O( K2 R0 ~" |. t4 r9 T   take down R_mB* ?. S& N: S. z* h1 {
   wait for 5 min
( ^4 |) ]5 a+ N" o% }   bring up R_mB
; n+ D# r3 t' C! @/ R2 O   end
; t, `7 [9 g. W7 h3 |7 rend
' }, x/ H+ H% P; g" M  s0 Q6 V& ^

/ I/ y* Y4 s) ^' pbegin P_mC_clean arriving( n& y4 K. q4 M4 K
   while 1=1 do
) f( X# X0 d$ y2 j6 {6 d4 p. z) V+ a   begin
% e1 A, {/ L/ T   wait for 90 min0 o1 a. t+ g$ [; a+ q: b
   take down R_mC
' M; {9 Q7 J0 Z: c; B) c2 T   wait for 10 min
) a7 U! T% U# Q6 A" O   bring up R_mC
7 s; @/ ^' u! {& Y3 V9 T  R6 v. b- S+ D   end. S* l( \  f5 }8 Z7 H' x
end
& `" Q* \$ a8 z3 H- G
----------------------------------------
) H( o+ l  k+ c4 R  g 1 Z4 B1 d3 |0 {8 i. K; d5 S
Exercise 5.9
) `& w2 M1 n; G+ g3 U1 I; E& G7 c6 G3 j6 R1 }* T4 u8 Y" T
4 b7 a! j* H' _5 v
Create a new model to simulate the following system:3 z  ?+ M( ^3 ]0 D2 x& ?, }
Loads are created with an interarrival time that is exponentially
( w7 ^  q* U6 i, G1 Ldistributed with a mean of 20 minutes. Loads wait in an infinite-1 y$ f2 h/ Q5 K! U$ J8 \% ]
capacity queue to be processed by one of three single-capacity,
' p/ p! q& U/ |2 jarrayed machines. Each machine has its own single-capacity queue
- Z" D4 ^) ^5 y0 b! W( }- S! H5 }$ M- uwhere loads are processed. Waiting loads move into one of the three
, s0 Q9 }" f* U0 ?, Cqueues in round-robin order. Each machine has a normally % f, h" w- _5 H2 i
distributed processing time with a mean of 48 minutes and a standard
  y" F/ r6 D3 q0 n2 gdeviation of 5 minutes.
. `+ C7 U& Z$ H1 V) \# v: vThe three machines were purchased at different times and have
, W+ ~* R, M# [% N/ l% wdifferent failure rates. The failure and repair times are exponentially + P  ]6 J% ]/ M3 E$ Y  |
distributed with means as shown in the following table:
- P" y: d, h8 @Note The solution for this assignment is required to complete
' P5 U8 B3 {# [. w, ^1 Cexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
1 N9 i0 f: f" R& M# ]your model. 9 _! p& x) B. ^0 M

6 e" {9 ^4 I8 `- o2 x2 S# iMachineMean time to failMean time to repair2 q4 g; x/ o3 f- }" `- q
A110 minutes      5 minutes
; S! A' y1 Q: A- y' pB 170 minutes     10 minutes: ~4 s! I0 g5 B- ~
C230 minutes      10 minutes: J8 E. @. D  g2 e4 j8 r2 v3 B
, f0 z& B) K% B* y9 b5 J
The machines also must be cleaned according to the following
5 E! x3 f7 `% I0 f: X; c; {% Jschedule. All times are constant: - a( H( J  K$ @# a8 O4 S7 q
3 r+ Z1 s- [  i3 ?/ l" i5 ^9 ^. ^
MachineTime between cleanings Time to clean
, \" r) W, {/ zA90 minutes        5 minutes9 b& R, j5 [' f  n  [
B 90 minutes       5 minutes
& C; A- `6 O9 O* ^9 [6 ~) @6 X! QC90 minutes        10 minutes
. ^8 l' ], X  H2 I
9 i+ g4 p5 Q& T5 ^( r2 iPlace the graphics for the queues and the resources.
$ Q% J2 n9 H  fRun the simulation for 100 days., b6 n3 q" K; o) `4 \3 z' E7 C
Define all failure and cleaning times using logic (rather than resource % s; {$ _8 D/ U5 V. ~! y
cycles). Answer the following questions:
9 k; L! c* u. X; ^7 qa.What was the average number of loads in the waiting queue?
* ~0 P5 W- w$ x* L1 z7 h  @/ Z1 Pb.What were the current and average number of loads in Space?
2 M, G4 o- q, _1 DHow do you explain these values?
) G0 [( J$ I( F$ @8 d5 l2 o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉# [  z6 j5 Y' U" I
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). D# I5 L- u- B- X- E$ ]
这行好像也不太对,各位先进觉得如何呢?
# D: V& i8 q1 c( [/ `+ O2 U3 h- i& f9 C% x7 Y
begin P_something arriving
& Y$ g* Y) A$ j& ^- _# y5 E   move into Q_wait
" w$ w) A! p* x0 i2 x1 n+ `   move into nextof(Q_mA,Q_mB,Q_mC)
: N# s2 N; o6 z" S) [3 }% w/ B   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; x  A' v; }  {, _
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) : S# s6 L, e3 }* `
end
! ^1 `. I' ?5 v) O3 \% m( S4 P% a0 d3 Y' j! i; Y2 V7 x
begin P_mA_down arriving% s+ G8 ]6 S& K( o" I% l
   wait for e 110 min9 F6 {2 N3 M$ [$ j' d7 {4 s
   take down R_mA
; R$ A! `8 x( s2 F% {, y   wait for e 5 min
; [' I( x! a) b   bring up R_mA4 y! y( ^& A1 }5 E3 H' d
end* M6 ^  ^( n+ t( ~- k8 Z: `0 S: d  r9 M5 w
/ R' o/ {- k5 P2 ~, R- l: O
begin P_mB_down arriving! z- G" W+ q4 w3 J0 M- F7 X% ]
   wait for e 170 min( h  ]+ y* q) D9 p+ r. Y( Y* f# y
   take down R_mB
/ E" l0 \0 l9 `9 O   wait for e 10 min
1 X' Y4 y: M' f2 F; z' Z9 g8 _   bring up R_mB1 u' I: i. q0 l1 Z" T1 y  t
end  D$ ?+ [+ T; \0 e; i7 @7 a

( G9 b, |! c5 G. Nbegin P_mC_down arriving
. X# a; K; ?" K7 U8 H) h   wait for e 230 min
& ?) j5 v- g0 c0 c   take down R_mC3 x; \! a& U  w) }. Y
   wait for e 10 min# p/ Z2 K$ p# z  B  j" S- T
   bring up R_mC7 g) @8 E- j! X2 u1 }
end; A) L) H& I8 _7 g! ?* W4 y
& t1 S7 N+ S; k/ ]' }! K
begin P_mA_clean arriving5 l' [5 V$ ]4 k! j4 r* J4 i
   wait for 90 min$ I& _% Z% T( l0 u, R
   take down R_mA1 p7 D5 T) W6 q
   wait for 5 min
& I3 }- l3 l' i: l2 x3 X   bring up R_mA' O% L' s% u% U% ^0 W
end- u4 Y' |  u8 Q
# j+ h' \* R. M  O# T
begin P_mB_clean arriving
# X+ U# U4 o) c! _   wait for 90 min$ N4 o' n# d9 R4 v, U
   take down R_mB$ }$ k: u7 i+ p3 \
   wait for 5 min
$ D# h5 m/ R6 q# l% ?   bring up R_mB
' G' _$ s3 y8 M; ]' X, D7 m/ yend
% R! |1 o- ~4 Q- y
. h8 @8 h0 r- H( w4 d  F6 _. Wbegin P_mC_clean arriving
8 c0 @5 p. z2 h8 w1 W" F! \  `   wait for 90 min) ?! t3 g- S* t- o+ l/ e) H
   take down R_mC6 E) N) h4 ~: |
   wait for 10 min
9 A* `9 u! c9 K; B: D   bring up R_mC
4 D4 ?6 r. V' F' n8 s% `$ aend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving( I5 Y, `$ s/ x# |
   move into Q_wait
" H, K& @! C* W3 k$ y2 U' ^   set A_q to nextof(Q_m1,Q_m2,Q_m3)' f, P+ ?( t. r) U* }
   move into A_w% H$ _5 S. C5 w$ x1 m3 k2 ~. G
   if A_w=Q_m1 then use R_m1 for u 48,5 min2 ?. ^: P7 T: |3 A7 ^) `
   else if .....then use ....for u 48,5 min8 n& m' P8 }6 t7 R5 C
   else if .....then use ....for u 48,5 min  3 O7 B+ \! y: S! {# h/ S9 ]5 t
   send to die+ @5 a* E2 t) G5 s! Y; N
end
" G9 P4 I# O8 B% s( ^) Z6 Q
8 @2 _$ j7 k! I供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 15:59 , Processed in 0.015491 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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