设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7249|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
% Z0 D& _8 B. M# i9 Z2 {. T4 s6 A) |  ?" r9 _
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去; i' D9 X" k. p' C
3 w3 L, c# V2 |. q4 [
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
9 v  P7 g" x5 a1 ^" L; a/ Z5 x8 g. ]9 }' c3 q) h" Y$ n
--------------------------------------------% t2 _3 i! q# W4 v% \7 q
begin P_something arriving9 r; L1 u! d# h  M' s( Y$ p
   move into Q_wait
$ ^6 e$ W! {! z! a) J4 S   move into nextof(Q_mA,Q_mB,Q_mC)
2 O2 L1 i% Q3 U6 }, T) B   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
. x0 P" |, Y( t. H. H0 C  O   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- }# e4 Q7 `, x# e+ _
   send to die
( j9 p! Q+ w* N( D; ?3 U( q, S- f* A0 ^  kend
0 y3 ?+ o. |/ y  i% I( f' H6 L) Y

& `# l4 i7 F8 D6 Lbegin P_mA_down arriving4 n4 \3 e: Y5 L4 P( B4 X  b
   while 1=1 do
* N+ i" T4 H8 S& f/ ~9 \   begin: T3 B% ^6 t5 y
   wait for e 110 min& o* m! D& j6 R$ a( V
   take down R_mA
+ m4 c1 R- W9 {& U) g; d   wait for e 5 min
: R6 i" S1 e. k& k' S7 P4 c   bring up R_mA
8 E5 R; u. A8 h% \   end
- g6 Z8 O: z: i9 N1 iend

7 N5 u9 J: M" V2 I. `& ?) @
* Q) {& s: {0 i" _begin P_mB_down arriving9 G* j5 y4 ?8 {0 F$ T
   while 1=1 do
3 D) F3 P5 C$ I. _% P8 `   begin5 x& g: s! C) m) k7 {0 K: Y0 x
   wait for e 170 min
# \5 l, m. p$ l; ~   take down R_mB2 E- I8 q4 M! Y' X
   wait for e 10 min& {1 w. N8 o2 {1 a
   bring up R_mB
  h: m( x8 R* _# F% L   end' ?( [- q2 C$ a! o  X  Z# z; Q
end
; M$ u% \* X) I0 T: H

' @8 j" j9 s2 ~8 Wbegin P_mC_down arriving1 y3 ~7 i5 i/ p( v
   while 1=1 do $ g% l/ H8 ?" P6 \- p* I( J
   begin
4 V3 `8 H/ z9 Y% g3 D7 O   wait for e 230 min, d# Q5 [6 u1 B6 }
   take down R_mC
$ s4 Z9 U  _. ~% a+ y   wait for e 10 min, |1 Q. N  [2 j( w# \
   bring up R_mC
& ]. I1 ^4 J, B   end
' ?, s, B- ?% K3 @end

2 D* T! p! |4 ^7 O# R
: f: |% {% g# V( [! M6 f" J: [4 l) Mbegin P_mA_clean arriving
( x8 N: B# ~/ m* C; v   while 1=1 do
) D; p' g/ c4 {% G7 G( V   begin
; Q8 m( T7 |5 L2 [) P& {   wait for 90 min
2 n/ ?( J5 q- s. y/ {& y; G   take down R_mA
! S7 F0 H* L6 ~" V% f7 x   wait for 5 min
. _3 u$ l7 a# ]6 X   bring up R_mA
( ?2 Z7 b. O0 N# F- A   end6 P: Z+ T0 l0 p
end

4 Z  F  I- w# X$ Z: |2 Q2 l: j6 w
, g. C9 h5 i2 I7 H6 c0 Mbegin P_mB_clean arriving
/ U* }& [/ Z& A) o1 m   while 1=1 do. D+ e; b4 R; q
   begin
9 y2 g5 E# P* A  N0 g" w' }   wait for 90 min
' i4 v4 A, T4 X' w% u   take down R_mB
0 h' ]7 }4 }! n* [& r7 O- d   wait for 5 min- S7 |6 }) i  T# E5 h9 B
   bring up R_mB
& K! v- e( j/ F) _   end( _* V3 f( c% I* u- f# m
end

4 V2 E- ~9 H. }# l$ u; @/ |
& k, O' Q/ z" C! o' z* vbegin P_mC_clean arriving
$ @* w/ h) f4 X8 B) Z$ D   while 1=1 do
- c6 c  r/ [0 q: t4 C5 Z1 m1 i   begin( b7 Q% g! r. m- i
   wait for 90 min
7 O( N4 u, x, a; [1 ~0 d: `   take down R_mC/ \6 m0 h  S- |, o2 \
   wait for 10 min: Q9 x+ @: ^& [6 Z1 I
   bring up R_mC% ~) i$ n0 m& p# C% U4 Z
   end
* X; @/ G9 v; }+ b( C( d9 B) Z1 C/ _9 eend
6 M3 G9 F9 V7 n8 _* t  G
----------------------------------------
/ u, \/ t1 k0 V% M8 V7 _ . n. y7 @5 e$ d4 M+ N
Exercise 5.9
" E$ n0 W8 p7 v0 C! W' D/ R) ]4 a8 t1 m' }( J5 E
7 `/ I! h) r+ f2 U1 `& p
Create a new model to simulate the following system:
7 B% W! w, D5 j8 L7 }5 [Loads are created with an interarrival time that is exponentially 9 P. v# Q4 U- D
distributed with a mean of 20 minutes. Loads wait in an infinite-- b  y4 |: s7 }: n+ A1 k3 i" |
capacity queue to be processed by one of three single-capacity,
: O- V; r. I) x" Jarrayed machines. Each machine has its own single-capacity queue * j' d( t0 v# P! G
where loads are processed. Waiting loads move into one of the three
  Z! l& o6 j* |5 H% j8 ~! Yqueues in round-robin order. Each machine has a normally 7 e( B8 S" T4 g4 H! p( o9 T; H
distributed processing time with a mean of 48 minutes and a standard
) B# U  R: K! T# x: j/ L8 kdeviation of 5 minutes." J! d( d- K' J. ]) C0 v: w& b
The three machines were purchased at different times and have
: V5 S1 h1 [1 Z' u" }0 |* gdifferent failure rates. The failure and repair times are exponentially
. K# Z6 I' \  [6 ddistributed with means as shown in the following table: / Q4 t9 d! R4 V0 }
Note The solution for this assignment is required to complete
6 o# M0 F2 u& G0 H% Y  Rexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ) S9 t4 I6 a$ p' @, T
your model. 8 Q# X2 A- F  l0 W
3 k% B+ X( g) l/ J. b% w
MachineMean time to failMean time to repair
! A1 h3 h& s! \. o7 h0 mA110 minutes      5 minutes3 @* a. x5 R. q
B 170 minutes     10 minutes
8 f: N& ?7 \9 M2 e6 w% s! d7 vC230 minutes      10 minutes9 |2 L  u5 U  C+ r# ?7 p% d5 Z

/ ^% L: ?. {7 S7 HThe machines also must be cleaned according to the following
# p, @$ C" z! G  bschedule. All times are constant:
5 c0 R$ b7 M1 R5 L) y, k
) x: H" E2 [# p# hMachineTime between cleanings Time to clean
  {- H4 L5 Z8 _A90 minutes        5 minutes+ v$ E, M2 M" L6 D- ?/ L+ a5 A) G+ ^9 M
B 90 minutes       5 minutes3 V3 |0 G4 e/ Q( C+ y
C90 minutes        10 minutes
) N% r: D% R$ y8 `  |# t9 v" T6 z! o2 h: P% g4 c5 m
Place the graphics for the queues and the resources.
4 _( W( X) j3 `" O# kRun the simulation for 100 days.8 b) U7 F4 H- v: E) f
Define all failure and cleaning times using logic (rather than resource : d( i2 ]: h& E' N2 C0 a5 B: w
cycles). Answer the following questions:
; d! v. ?0 A! A) v) ^9 k2 d# `a.What was the average number of loads in the waiting queue?  _! M6 n. h: O7 N1 C6 [
b.What were the current and average number of loads in Space?
! H$ G1 ]% {3 t8 ~7 Z5 o& XHow do you explain these values? + O8 P! T) F/ H& g3 v

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
8 _. r' Z+ n* D) T, e0 i, Ssend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" {% |  a' ~  ~这行好像也不太对,各位先进觉得如何呢?
; o# L& W4 D6 L$ o- @3 B+ I
- g/ E+ L+ J2 C: Y8 }2 Mbegin P_something arriving
# ?; f/ i1 W( S' |2 {8 h2 Q   move into Q_wait( c3 j, f0 A+ p) n; S
   move into nextof(Q_mA,Q_mB,Q_mC) " b+ v/ v4 }- L( w
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
! j# p1 |) T. [+ m" a$ v   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' F7 T7 c; ]5 }6 R) Q  rend
6 }: i4 w5 u) P2 \' k# b: B" `$ X, a, ^; ~
begin P_mA_down arriving9 z- H! ^5 f* t1 B% z9 K
   wait for e 110 min
0 B; K, y  n, ^' f6 e   take down R_mA) i$ j, a7 r: K; u5 C
   wait for e 5 min
, b* q; d7 K' f   bring up R_mA
3 a& [$ w+ \% n# ^! Fend
# H& F4 {, x4 |8 Q3 [
& D  }3 f; O1 sbegin P_mB_down arriving3 |/ X) v& Y3 ]8 x1 D
   wait for e 170 min' E' x! a: d; ]8 I, H2 D& S
   take down R_mB
7 S0 J/ W2 X& E9 \   wait for e 10 min
0 m! t8 \. N6 f+ t   bring up R_mB
+ b8 W2 Z- k/ h" }2 n1 n" r9 Mend& S+ T* {, l; f5 y( {$ ~

: [8 @& [% u6 Y! {5 A$ qbegin P_mC_down arriving+ P3 y. I9 L) N7 ~% k/ a, G
   wait for e 230 min" R1 ~! \+ ]2 E& T% e
   take down R_mC1 c# g" ^: r4 |# k& N% I
   wait for e 10 min6 y( ]% Q! C6 t* D
   bring up R_mC
* [6 Q; ^" X2 j- B+ E/ U% ?end0 G7 f6 N+ t; c( P* Z- F- T

" X  r" O( A. A, x: ^begin P_mA_clean arriving6 n  {6 T/ c7 f2 N
   wait for 90 min5 ^6 B" @# C) @: q
   take down R_mA. c6 E  @  O3 X& U6 L- [- M
   wait for 5 min
, W" i3 \  M- Z/ F   bring up R_mA
2 q4 M2 P# E. o6 R+ l; ]end. E; ~$ ?+ Y5 h
/ {- S8 K0 e6 ]  o6 P5 r# D& {9 K
begin P_mB_clean arriving- t8 _& r: S% U
   wait for 90 min
) H) i% D2 v, n4 a0 N$ f) T   take down R_mB7 t# n( d- p; @
   wait for 5 min! W: S* W+ v/ F; L' _
   bring up R_mB
# B' Y: a+ I- a; E3 Yend
& G0 p0 T6 V" l7 U7 L
4 ]% g( {' {/ ~2 P% d+ J1 E$ Pbegin P_mC_clean arriving$ A4 T/ w9 q+ C$ L4 v# m
   wait for 90 min4 _) s8 K) F/ w2 G7 J
   take down R_mC/ u) l' c: l, Z+ \' w
   wait for 10 min
6 W8 F* J0 O& R4 ^, E   bring up R_mC3 W: _0 G. b. U( f* w! w
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
+ y2 S6 _- x' ~: e$ N: J& @2 }9 J   move into Q_wait3 p: J8 ]. N' X
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
7 |) D; K" ]7 M: o   move into A_w
* G' W4 A& d$ v! m2 z) ^2 z; u   if A_w=Q_m1 then use R_m1 for u 48,5 min
& s1 k$ @- K6 b) _  R   else if .....then use ....for u 48,5 min
/ G, [1 u# r2 A7 B  a7 i$ F   else if .....then use ....for u 48,5 min  $ [3 T1 }3 n2 T2 |$ x# N& T2 W0 `
   send to die: X/ K6 o* Q- I, N- x5 d. t5 `/ I8 \
end
/ z! F, q; Q" {9 E3 T- J9 a8 C0 i
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-19 07:10 , Processed in 0.027829 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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