设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7821|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 # B6 |7 a/ q( `: c: R# O
9 x( a+ j7 K1 y% b
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
7 C* n, z0 F- |6 R' I; D; d1 G5 ?+ f7 s: P" ~: i6 t! R2 v2 v
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!) {6 a1 J' s3 Y7 y( D

& B  U5 D0 Q+ u1 f  ]& t  p
--------------------------------------------0 c; O! X/ I; K" B5 M3 k8 Q/ W
begin P_something arriving
! r+ m# V6 m4 ^6 W% Q( J   move into Q_wait0 {* f, L; u% |7 k# I, v) Y7 L7 _- Y
   move into nextof(Q_mA,Q_mB,Q_mC)' `/ b$ L  H' v; o4 s
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
& X4 A  O4 a  I/ z! W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); b7 T2 ?) q' M% Q' Z' m' n
   send to die
- P- G0 D* A1 x! P" Bend
' k8 }) Q! U: F4 B
! X! k: Z! g0 s9 o/ ^
begin P_mA_down arriving/ v, V, r& K- ?' K5 x* `
   while 1=1 do 3 d) @6 [/ _. K) }4 C6 j3 }' @
   begin, Q8 D1 k, w& d) V7 K
   wait for e 110 min
/ x6 V  R9 m3 F) O" w   take down R_mA
& m8 Z# S! t0 M6 N  |5 B" h, U   wait for e 5 min7 F- b( |; H1 k4 K
   bring up R_mA, n" l" H  P9 R* o9 X+ i% e
   end& P: L  r% T/ q
end

& V) f4 G" w* L1 _3 W7 i
2 {* i* a  k$ }7 w$ u! }1 vbegin P_mB_down arriving
" C6 }. p& }- O; E* [% |) i   while 1=1 do( I( I$ m6 T7 C( W3 H5 u
   begin2 p3 {" m9 q. j) ~) B
   wait for e 170 min8 d5 l% G$ h& y) N( z
   take down R_mB7 r' k, @8 m, l! X, V9 v+ x9 s
   wait for e 10 min, Y7 l3 e- T" l+ K% G, _, N
   bring up R_mB
9 i; f) J% d$ J% s   end
2 R4 S# B  {4 s7 @2 @7 b* zend

  X9 G/ m; F! R0 e; q0 g 0 P, z+ |6 O2 I+ @
begin P_mC_down arriving, l& W& S/ E! z. X9 I/ U) J
   while 1=1 do
  ?; ], |+ z, k* Y% M( o; M   begin. r6 N# m) r" B$ A
   wait for e 230 min- G6 r, A- g' e
   take down R_mC' o2 a. }/ e+ O* m% h5 m
   wait for e 10 min, N. ?, T& q- p6 u1 j1 p" R
   bring up R_mC9 I" J9 F: R# L- c( ?/ E+ b2 n
   end
- R; Y" G2 F% z# k4 kend
, c0 [% l: F, D$ l" D0 B
1 L, `. S$ f" x, L) c/ T
begin P_mA_clean arriving
. b4 f  W6 U; M# e! d   while 1=1 do
" n0 L& ^2 {* T; ]1 G   begin
8 f$ ]0 t: @7 r1 Q4 V, R6 P% Y1 T   wait for 90 min. H. e% Z# d  l; C$ }, n* Y; s+ f& E
   take down R_mA
+ H4 N  h0 T: Z7 M+ H, q   wait for 5 min
* d$ U. S$ {% g   bring up R_mA/ m# ]. f* k* t. Z: P0 L
   end- v5 }3 `2 j( H
end

1 c' @. y0 }7 k( y 2 a! `( D$ ^6 q$ \: W8 ~
begin P_mB_clean arriving% }  Q6 I1 ]7 g) |) s/ }- Y
   while 1=1 do5 }3 S# F2 Z9 x" J) K2 }
   begin
8 N6 v. d$ i& H! y" _   wait for 90 min
2 o, o4 g% v! f7 y( Z7 E% @, L   take down R_mB
0 a& T! L+ q- W   wait for 5 min3 f! f! |6 L5 K& Q0 i5 ~
   bring up R_mB
6 D" N3 I! ^3 Y   end/ ]# w! S$ i0 E9 g0 H
end
! T0 Q9 o# `  m  T% \9 S, Q

/ [6 E& f; a) e1 l: j6 kbegin P_mC_clean arriving2 K1 [  `( L, S) B( ^
   while 1=1 do
; |' Z' f' e3 x/ I2 \   begin
' d$ Y) C' s$ I) l5 j2 I   wait for 90 min8 j; {6 M" X0 I9 U
   take down R_mC
/ N, v2 _6 G& ?   wait for 10 min& @* t, s, G7 K+ g4 T
   bring up R_mC
; n$ b9 y" `6 f! S7 a  y' ^' [* S   end9 ~: R8 [' f$ }  q9 H
end

1 _* W" y# f% `* u----------------------------------------+ A9 k3 e+ L# c5 b4 ]7 U9 h/ Q9 J" x

3 n9 S2 J6 q/ `7 S" @Exercise 5.9
3 n& |7 c5 Q! u! Y7 e
5 M" d/ ~1 j3 z
' W2 H. c$ _# [# g1 r) ZCreate a new model to simulate the following system:8 L9 o2 n$ ?, h# L
Loads are created with an interarrival time that is exponentially ' I5 V6 p4 h/ P
distributed with a mean of 20 minutes. Loads wait in an infinite-
6 c" Z- F6 h" L" h4 h# ]! `, Qcapacity queue to be processed by one of three single-capacity,
3 W) t  t/ }9 u" s' h5 _/ Varrayed machines. Each machine has its own single-capacity queue
2 E4 p% N' d! T' {+ G0 i# }( Zwhere loads are processed. Waiting loads move into one of the three
; _# E1 S3 w5 h. pqueues in round-robin order. Each machine has a normally
) Q1 x' K# h/ |distributed processing time with a mean of 48 minutes and a standard   ^4 i6 F* C, A) P
deviation of 5 minutes.
: o/ j% w! E* @0 R" m, MThe three machines were purchased at different times and have 7 G* v3 Q7 {. p5 C! |
different failure rates. The failure and repair times are exponentially + J" z9 J8 X: e3 a( r# M# n
distributed with means as shown in the following table:
( _& \" _% C' N9 m: j8 L# o4 J1 L& zNote The solution for this assignment is required to complete
0 p8 \4 b& e! K' Cexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 o: o% z* b' A( B9 W! K9 }5 i' `your model.
, u2 S8 ]* H* ]! `0 g' M
: _1 O' R; z  Q, YMachineMean time to failMean time to repair
7 f- Q3 d; F. I) \! y$ X$ @A110 minutes      5 minutes
" C' ~0 r7 Z( lB 170 minutes     10 minutes4 v' {1 q& E9 |/ S" a
C230 minutes      10 minutes$ S+ G% B# d  K7 R9 `+ M5 Z
, }" l4 z+ @0 R" I2 }7 C
The machines also must be cleaned according to the following
4 U6 }5 r7 h6 |5 `0 sschedule. All times are constant:
5 }) ?! A4 f) h9 C6 N: ~+ y+ C! d- v; R
MachineTime between cleanings Time to clean
+ e: v. I) ^# L. h$ AA90 minutes        5 minutes
' _# I+ M* \0 d8 M( Q+ }8 ~B 90 minutes       5 minutes! \4 S* P* O2 V1 b% q& m$ Z' T8 l
C90 minutes        10 minutes, `3 |2 ?. @, I3 I
0 @' w! v2 \* I: T! e5 Z
Place the graphics for the queues and the resources. : T; w3 e) r( h8 X/ V! n
Run the simulation for 100 days.
1 x+ ~1 @% `. v8 T2 S  s& EDefine all failure and cleaning times using logic (rather than resource
/ L8 Q2 k. {" a$ A/ Icycles). Answer the following questions:% l4 u1 Q  E' |+ d6 K
a.What was the average number of loads in the waiting queue?
( k7 l$ f: K  V- Z% C- bb.What were the current and average number of loads in Space?
7 b9 e7 m4 o  q1 U+ XHow do you explain these values?
$ v5 e3 ^6 A9 S+ W9 q9 M3 A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉1 H; V" _& O0 f1 B! C+ R4 v& ^7 E$ s, v
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 n) \$ M, k; _1 B$ P3 i* ?这行好像也不太对,各位先进觉得如何呢?# {( I) D' ]5 H$ k( X" R4 N. r

) ^7 @% `. M, @  I! x, m% T0 b3 Zbegin P_something arriving% [2 i3 l8 b- v
   move into Q_wait2 a+ |0 f" t3 V" \' E& J
   move into nextof(Q_mA,Q_mB,Q_mC) * A  f2 y6 {1 P  e
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min: X8 j* v, D* [3 P0 I3 @/ j
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 k5 i7 a4 }7 h1 m6 J1 iend8 X4 z0 Z' W! l: C) F

. O, o, Z+ n, X! h" ]: O& M9 ~begin P_mA_down arriving' E1 t8 `. q: X
   wait for e 110 min
+ R, G* T0 K  I/ J( d3 N9 e   take down R_mA
0 b3 q' I! @1 R7 w* ]3 Y( E   wait for e 5 min& d* P  c/ Z; F) l, V
   bring up R_mA. G( g+ c+ a- X5 e3 v2 V
end; Y( S5 }: l* D/ _! o6 M

' p$ C/ c7 n% [" tbegin P_mB_down arriving( G; {7 W3 q9 ^( G/ U- L
   wait for e 170 min
$ g' k1 Z) P( L7 t   take down R_mB4 l. c: k2 K$ w$ N  ^6 G
   wait for e 10 min& _* {9 j5 L# z2 ~
   bring up R_mB
; h, d9 Z$ l" V/ e" kend
$ Q3 U" y7 x" L2 p1 V9 R  E/ o) |) q; G* I, q% n+ m
begin P_mC_down arriving  x6 i& D( a# `7 U3 O2 ^# f6 I8 l5 f
   wait for e 230 min
) {4 v4 T" ?* f4 |, A' {1 T# _; p   take down R_mC
: T0 I8 t5 C" Z. p2 h* t" L   wait for e 10 min
  J8 T/ _1 H( S4 b! S, b" R$ m   bring up R_mC
9 w' z( r2 w( j5 eend- O& q$ G6 l' E8 i4 @4 [5 y% y7 }
6 n, n; g: m% _/ Y
begin P_mA_clean arriving) i. n' B3 L- I9 g8 k  R
   wait for 90 min4 P" g. ?* t/ m) _5 [' U* E
   take down R_mA  ?9 [& y" A& t4 }% L
   wait for 5 min
* \% D9 t+ y; ^: q   bring up R_mA$ E6 A0 v. R! A. C# I  ?
end
) k# `6 P9 N* y: b' o6 Q1 m% p8 |5 X$ w$ q
begin P_mB_clean arriving' w" [( \( ~5 j$ T8 V
   wait for 90 min' u7 S1 J* v- X
   take down R_mB2 Z) l% P4 ^! }+ }# ~* a6 v
   wait for 5 min
9 ^; R7 C8 ]5 F. ^  R* }   bring up R_mB5 ]4 `, q/ l4 P6 T, G, c$ c1 M4 u
end/ o8 k  V# b9 M" ?2 S' I

% @7 C0 y2 C  q( t; ?begin P_mC_clean arriving
+ \1 O2 K* ]" p& ]   wait for 90 min
% O/ ]! B  y- @, R. p. ~7 Q: W& z   take down R_mC
/ G7 w( h0 w  R( D0 ~1 c   wait for 10 min! h; P" I0 I" {: s1 L+ k  N! Y! c
   bring up R_mC5 k; w9 a: g+ y. [. S. u
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
/ p; @3 t" n+ L+ M, H. |   move into Q_wait: S" p; [" g# B5 g
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
) h- U' d8 U# S5 m   move into A_w; K) y; V5 f9 _/ ~
   if A_w=Q_m1 then use R_m1 for u 48,5 min
+ w! Z7 S9 A4 _% {$ N   else if .....then use ....for u 48,5 min6 j1 X5 D- {, R4 Q8 M
   else if .....then use ....for u 48,5 min  
& q8 H; r2 a" O- W+ K& ?7 t) l- p   send to die
! d3 x1 N- i% @3 b' t5 l6 o- a1 Tend
0 E* G2 A; j+ P* J1 b* g
- x+ R5 ]1 I1 l+ D: o供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-22 03:44 , Processed in 0.015802 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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