设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7611|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
/ ]7 Q- z( W4 p. P3 x7 n- ?
$ M2 E0 K7 G7 U' n7 E底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( U! E. c" _; h+ V, @% h8 o# D5 l
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!% A# w: s/ c9 `! x, i  [8 o3 k
% H" T; U2 {1 Z& V9 _4 q% g, @
--------------------------------------------
4 B* K5 Q5 k0 ubegin P_something arriving# t8 O2 t; s$ k2 S, m* x: I
   move into Q_wait( \8 z" X, S4 G
   move into nextof(Q_mA,Q_mB,Q_mC)7 w& ]  o: c3 Y4 _( M0 [% w4 y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" p0 D5 X( A! V& U& r   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  \9 H" b/ p6 A# V: L9 o2 {9 W
   send to die
# y; b8 L; o6 k3 p7 zend
8 a) P- Y% b% r8 M# y/ }: v9 c
5 f* k7 T, F0 t' U- ?! x
begin P_mA_down arriving
7 ~5 X7 `* g. W3 e3 R$ y  g   while 1=1 do ' ]! L( b' P0 F2 L6 {- }0 U
   begin3 Z3 n$ b, p8 t6 m; W8 @- i% e
   wait for e 110 min3 w4 ?2 h! x- g' \
   take down R_mA" m, R  e; M4 [$ ?8 a1 Q5 v5 U6 W
   wait for e 5 min
/ i1 {3 k. N  u+ B6 c   bring up R_mA
% i1 J) p0 e3 C: p% p& a2 B& f   end
  L6 Q) M: D* I5 jend
* O8 o. F" H, k  g7 _1 s7 T
/ w( y2 J7 O" P4 |% o3 a( x
begin P_mB_down arriving
" f& V7 I7 g3 _& s- W' ~   while 1=1 do2 w  O3 S, f1 K" Y7 }& w6 p
   begin
* Y: u' f) _) j( D: {+ z7 Z   wait for e 170 min
; l' |( b) ]" B$ G   take down R_mB
7 Z2 ~- K1 ]" T" R% Q   wait for e 10 min, k8 f( o; ]$ Z3 @+ h
   bring up R_mB$ [# l! K9 Z; e! M( D- M% `/ a
   end3 x1 m+ T/ F5 K* J
end

( i5 l( }2 z( P' n! K6 c% H/ P0 u+ {
1 c  |6 Q1 ^# ubegin P_mC_down arriving& g6 F" D4 d/ P. ~- p3 j( p8 V' c: a+ y
   while 1=1 do 1 u4 c( I% v+ @% e
   begin4 @0 U; V2 I, G
   wait for e 230 min+ a$ m' k3 _9 ]8 \
   take down R_mC
" M+ _2 ^0 |# D. k1 O$ L3 G: `% _   wait for e 10 min7 l+ @3 q# C  h7 b% C
   bring up R_mC
9 S* W1 I0 R1 D  d# |1 [   end
1 r, ]2 A2 g% E+ B1 L: C, |4 Vend
: X7 |2 ]+ H) d0 z" R

" F# `4 u8 N% Y2 pbegin P_mA_clean arriving2 u( |! E9 v, b2 O# O+ X6 {" P
   while 1=1 do  q8 P5 L# Q* P9 O
   begin/ S7 i- @: R) [! Z8 t- Z7 Q
   wait for 90 min
2 l8 @  C8 [7 J7 J( N1 ]   take down R_mA
/ r% s3 W* e! }- ]6 b7 Y   wait for 5 min
1 Y' b, C4 ]  D' B) b5 q& }7 {0 O+ O   bring up R_mA' V7 v' J: \$ [+ T4 v$ x; {' d- ]
   end8 U8 X- P  d  Z) U5 ?
end
4 y$ G; b$ R* i" w
, b8 I- f& ]/ v! }& J
begin P_mB_clean arriving
! Y$ m" L( Q9 V* s! ?( F, N   while 1=1 do- z1 A/ y4 `  d# J
   begin
% |4 m' B4 ~. Q* W   wait for 90 min  B3 @( Q4 [$ ]% B2 G
   take down R_mB$ p& w, K8 X% x" e. R7 T
   wait for 5 min& v2 u& t7 m; ^1 A6 t, D- z) y+ O+ t
   bring up R_mB
3 i/ Q+ k: w/ ^   end
( Z6 @4 |- Y7 o# {( J* `( u" c" W0 send
7 X1 R: ~( }  r" g! S

/ W9 V: U* I2 @5 J4 ~" Fbegin P_mC_clean arriving
7 S+ H' {6 Q" ~! J1 u) A. W   while 1=1 do
( s5 y* l1 d+ D/ D  r3 S! b   begin1 `7 x4 O& v7 |/ |" T; z; E
   wait for 90 min* C% q7 |' [; E# t* M( e
   take down R_mC
/ Q( @+ E# M1 \$ _   wait for 10 min5 d; Q9 Y1 ~6 w5 ]8 i6 [
   bring up R_mC
. s9 e) D; |, I   end
7 {" i: k3 t( Qend
# {' j8 c. a: B# {' @
----------------------------------------
; Y* i3 S1 n4 F* n9 U 7 G5 b4 ]+ |/ W" L2 h+ o8 d# ?
Exercise 5.91 U) b2 v$ S& t5 e

8 p2 \" X' q- n; c$ E5 _
, R, F( o1 z$ |1 p4 MCreate a new model to simulate the following system:5 O: Y- Z) r: N; E8 m  h
Loads are created with an interarrival time that is exponentially
9 Z4 y- P7 u& Z( a2 r$ Z) F7 Ldistributed with a mean of 20 minutes. Loads wait in an infinite-
3 |/ |! O& l4 m5 Jcapacity queue to be processed by one of three single-capacity,
; _! W, z4 D' c7 W! J9 S# H$ a% W* Garrayed machines. Each machine has its own single-capacity queue " T4 w% p! ~1 W2 o: r: O; h
where loads are processed. Waiting loads move into one of the three
4 K! Z0 h7 T7 Z, ]# K* a1 h3 c4 Fqueues in round-robin order. Each machine has a normally 6 e  E- h) s6 N0 {- B( i
distributed processing time with a mean of 48 minutes and a standard
! R9 K& A; v+ p- ?deviation of 5 minutes.
" |. g+ Z: t* N5 JThe three machines were purchased at different times and have & x& Q4 ^. V9 Y9 n7 V/ H
different failure rates. The failure and repair times are exponentially
8 H/ j0 n+ o: bdistributed with means as shown in the following table: . T" D) A2 y) |
Note The solution for this assignment is required to complete . q  G4 E' L+ I* [. K
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
0 m- c( Y2 I* q8 s+ w8 syour model.
7 H. Z; U  o0 p
4 {" r) A* t8 G* E. u3 u& }% oMachineMean time to failMean time to repair$ G  f3 U" ~2 k1 I6 k0 A8 `6 a
A110 minutes      5 minutes" z1 y1 i6 A' d  U2 i/ ^! I
B 170 minutes     10 minutes5 H- \* Y2 U; G# H
C230 minutes      10 minutes! o. Q1 N' e% C# T/ `" I  @

3 @/ s  H. m$ {& P( Z& sThe machines also must be cleaned according to the following
! v( ?, E- Q8 \0 _) Zschedule. All times are constant:
1 ]% c! [3 H  L8 z! ~. P' Q+ R5 v* e5 M, P$ V5 L8 q" |6 o( n
MachineTime between cleanings Time to clean3 E0 v2 g' a% x3 j2 t, [
A90 minutes        5 minutes
; w# g9 y% S$ A: m" X  fB 90 minutes       5 minutes
  |7 d' `( B& H5 Y- UC90 minutes        10 minutes2 X# b5 l7 L; O  a* G. p, {
3 o# }0 b! |( j0 a5 t1 i  O. ~
Place the graphics for the queues and the resources. : _8 A% Q# M6 }' W- K
Run the simulation for 100 days.( a: b6 R$ ]. O) e1 }4 ?) d* R
Define all failure and cleaning times using logic (rather than resource 7 H9 ?! @/ r% |9 c4 r) t6 Z
cycles). Answer the following questions:9 o' k: ]( J' ]( Z, g
a.What was the average number of loads in the waiting queue?# Z# Z+ Y* L" k+ G$ z* p) T* c
b.What were the current and average number of loads in Space?
  g' x+ @' ~8 Z0 ^7 l! z  g" \How do you explain these values?
; l1 M: y* M0 ~! f1 t- o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉0 n1 X  J$ `4 A& I; E
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ t; \) i% \8 {
这行好像也不太对,各位先进觉得如何呢?
* P$ y: o5 ^5 h! F. M3 T
! b. u/ m6 F: Y" D- z  Obegin P_something arriving& p" I2 Q8 E0 C, d6 b
   move into Q_wait
* v4 a) x, U! A/ ^   move into nextof(Q_mA,Q_mB,Q_mC) / k" v/ P6 j- O
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min3 q$ d0 w% \. X7 s  {7 {% D( s
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: x! ^1 s$ N1 Z, u( s& i+ ~end
1 {* W- `+ r; x) V7 F  |
1 A6 q; |& t% ]  H) H/ ~! N: Vbegin P_mA_down arriving
6 i( W- l9 [1 A1 g   wait for e 110 min. J, A3 m: \7 J- y
   take down R_mA8 Q0 L& z2 g9 T# {! q& b7 f
   wait for e 5 min
/ e( ]! o* M- F8 R7 C# Q   bring up R_mA$ Z5 ]6 d* }7 ?" a( N/ I
end5 D  v/ }+ i2 A. r4 \  q/ W) E
- i' \8 F/ R( D0 x+ h2 Q9 k
begin P_mB_down arriving
3 T1 m1 Y* h% M) D! C, q% a, A   wait for e 170 min
: U! L& v  N, [- k" z. T/ a   take down R_mB5 v9 p. @+ a0 y: j
   wait for e 10 min7 \0 m3 Z' C* M4 V6 K8 \) u
   bring up R_mB3 r! y' B) c- j6 k
end
9 w) ]- P; x( u, I6 W0 N" `: ]7 m( N
6 ~; R0 X3 U/ g7 gbegin P_mC_down arriving
2 q0 J6 c' m8 ]6 ^1 ^   wait for e 230 min
' a9 w* e, h& }1 S   take down R_mC, m% P9 x: [' m0 d( W
   wait for e 10 min4 i$ S* s/ I# g. J
   bring up R_mC& M- n: ?4 H, j
end6 H- c1 {* L# o4 _- Y1 G
: @6 k2 N+ L' r6 B3 i) D
begin P_mA_clean arriving
: V! A1 @. E, \   wait for 90 min
' k- [4 W: U) V( }   take down R_mA
  Q  E% `( u) v   wait for 5 min
3 _0 j. C" u4 \" Y  a) t- V   bring up R_mA
. ]5 Y' O; I9 ~5 H. {end1 [% n8 A. y; J
" P7 b% b* X+ ^3 M0 ~# B6 v
begin P_mB_clean arriving+ ?& m! B) a2 Q
   wait for 90 min: M+ [9 B+ y4 n* ^, ~( h' w
   take down R_mB0 _5 l! X! ^" ?% W6 I
   wait for 5 min( P6 U" N+ {; s1 j  g- ]
   bring up R_mB
3 ?9 z5 W5 b/ t; f" m' s8 Send
, P2 D( b5 Y; t  Q! A- Z9 r: `
% O* T9 R" b0 l; P6 u( i! @begin P_mC_clean arriving$ Q0 J2 z, @4 x- m$ G; {
   wait for 90 min
' Z" [. M! B# v- P+ l   take down R_mC
0 z3 ^3 Y* }- q/ x   wait for 10 min, B2 g- X1 R  J) w& y7 \/ P$ {
   bring up R_mC/ [! M% t4 l( z8 p5 r7 m% z, G
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
5 l& _/ ]/ j2 f% A6 g; X% y! ?9 T1 y   move into Q_wait7 ?. C+ W! P/ p) a: }: f" h
   set A_q to nextof(Q_m1,Q_m2,Q_m3): l) V8 A+ h- _' B( r! `/ c# c$ R
   move into A_w$ W& k% Q% H0 {& T0 F
   if A_w=Q_m1 then use R_m1 for u 48,5 min
0 E- r. v8 E* [/ j   else if .....then use ....for u 48,5 min- h3 _# b6 Z# X+ t; h5 r
   else if .....then use ....for u 48,5 min  
' @; v' R: z% z   send to die
7 E+ i! c- s; s7 `end
( s# z* a8 z# e, O1 o/ B/ U  I+ M" I  O2 Y
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 12:39 , Processed in 0.015567 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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