设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7261|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! P8 u* O/ C) r
! T2 Q2 c. F* c底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. t! V4 G# _4 m. j8 W5 L. p  ]
8 d- G9 s1 f. A, q
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!' V( u' `2 t. @0 q' `0 b

* p5 B4 i- c& P- s. G
--------------------------------------------2 d  N& H8 P- B4 u" b& T
begin P_something arriving
  y7 S" e  \; g, d* L   move into Q_wait! K5 Z( d+ V! D7 t
   move into nextof(Q_mA,Q_mB,Q_mC)! Y9 H: _+ k1 T
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min. _8 u& f) u; G  B# \5 E1 F
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' C: B3 Y1 A- T$ z1 a
   send to die6 ]* c6 t/ D/ k# i
end
2 Y/ O6 U- j! F  ?4 c  [  p

' C: j+ j' R' b; `begin P_mA_down arriving
. g& G! x  i1 j5 k& b   while 1=1 do ) }$ Y" s6 D+ i$ r/ ]" H6 H
   begin
7 c" Q" y- ?; w. O   wait for e 110 min) h% W! M& v6 V+ F  K% Y( U& ]
   take down R_mA$ c1 P1 n2 T6 O6 Z/ w2 A
   wait for e 5 min
- P% b( Z- G* g! ~0 C   bring up R_mA9 R5 V2 Z1 {7 J' K- o5 A5 W* }" k
   end3 a; n' A+ x; t9 p( @
end
% ?; R$ d, m7 k/ _

* \. B% a+ V+ ]3 d# m% @  obegin P_mB_down arriving7 x) u. J7 P" S* \: A. [0 h& _
   while 1=1 do4 ?  v& F! }- c/ Z: I  A( v
   begin, f9 j$ C4 X+ J/ i4 B( O
   wait for e 170 min
  K9 m1 D/ w  H+ r) v   take down R_mB8 i; V0 K; p) ^& }, E
   wait for e 10 min
2 Y( P$ v6 ?8 h( _1 t& d4 s5 ~8 \   bring up R_mB
4 M1 }% f# \; W# x! V   end! n; N. S9 s: t: d
end

' h* @5 {: N6 M* }: B- D 5 P" \( q: |* h' `3 q$ E8 ^
begin P_mC_down arriving$ \4 L$ i0 @2 Q8 {: @/ F& G) i
   while 1=1 do
) ~! n+ C6 G( @8 {9 {" @/ k   begin6 W. a5 x& N3 @, u5 S5 d7 s- ~
   wait for e 230 min$ c+ T" v; h4 A* K
   take down R_mC4 _1 {5 G9 H8 f- ~2 V3 |( E2 c
   wait for e 10 min/ S( h1 M$ d# ?% V
   bring up R_mC
, c# V  ^( T$ Z   end
  h1 o$ b1 B" ^0 n. I* Zend

, E: c3 n- @' Y7 d4 B & M$ z. Y+ {1 O8 b' a3 p
begin P_mA_clean arriving
* i9 u! Y- f2 ?( v8 A# B& t/ B5 j4 Z   while 1=1 do
% w/ W, g! l4 G+ W% {: \" D   begin( B8 y6 C0 O9 r+ T) Y
   wait for 90 min3 |0 H- C( f- d# ~, \
   take down R_mA; U/ ~: x" b8 w! J% g' b1 U
   wait for 5 min
% b/ `2 \' K+ }0 M- N   bring up R_mA
1 l( v2 P0 ~, d& I4 G3 H   end+ D3 w, v& s; l! i0 z% [' i! H* T
end

) P$ x! ?7 A  Z( g2 s 0 U" M! T. v3 Z1 e
begin P_mB_clean arriving/ z# `, E* O- G
   while 1=1 do4 M5 Q3 e' |# ]- s- O. |! l  ~# E/ t
   begin+ a9 ^: M7 M6 |+ }/ t7 j
   wait for 90 min
- i: k7 u2 P3 z( @6 ~   take down R_mB, A4 V' N6 H: }
   wait for 5 min
3 `: }' y: i+ y# F5 ]( V$ g   bring up R_mB
  j  j" e& q& D+ o   end
% b1 f4 i- }* y' R6 x' ]end
8 D# `; d( r% z! j- c
9 ~% X  R. C% u4 d! w2 T, f( k
begin P_mC_clean arriving% T' l+ ^0 E( |* P- }4 v& L
   while 1=1 do* W  |" X# {, b$ T/ y- [+ Z
   begin# o3 d! _9 |% d  K3 H: R. x$ u
   wait for 90 min* e, P1 _3 E) j9 W5 }0 K
   take down R_mC
. Z$ B, K' E9 x, n   wait for 10 min
# n: P- y0 f: {! D6 V) C+ ]* m2 s   bring up R_mC
7 C. V" q; @4 v2 G, q! P: X# I0 ?   end# S: N4 G8 w" O* b3 g1 I: Z; S
end
2 ~- I. c9 b5 n3 @9 m* l! u. O7 ?+ g
----------------------------------------
- k. V" ^0 `# W3 [! d9 I
" G' [! P" x% Q( m( YExercise 5.98 o" k0 n) ?, z2 {8 R( d
4 n: U% c3 W! v

3 J# T( a0 g$ v: D5 DCreate a new model to simulate the following system:
0 f- F2 r  z4 y7 ^' w  MLoads are created with an interarrival time that is exponentially
! A5 l/ ~9 k& R+ M" P3 }distributed with a mean of 20 minutes. Loads wait in an infinite-# ]" |# [9 p6 f4 O0 G5 Y  Z
capacity queue to be processed by one of three single-capacity, 3 ]: Z! h5 K2 V# ^
arrayed machines. Each machine has its own single-capacity queue . d! g' d4 p  f( O3 r
where loads are processed. Waiting loads move into one of the three ' V+ Z2 v' t& E; w$ }# K* I
queues in round-robin order. Each machine has a normally
6 C7 ^6 T# {1 ]6 p/ E$ P: F0 Ndistributed processing time with a mean of 48 minutes and a standard , _) P! N, C/ {+ C
deviation of 5 minutes.2 \( y2 }9 S& W( l
The three machines were purchased at different times and have
: b+ v% q7 \5 ~2 H6 w2 cdifferent failure rates. The failure and repair times are exponentially 4 P: s. S* Z# B6 q' s- |
distributed with means as shown in the following table:
% L& }& ^8 d0 E+ ~! TNote The solution for this assignment is required to complete ; p1 y1 a+ ~# T+ i: Y
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of . j$ q/ s: o: {, _; A
your model. 7 D' G) ~# X7 K
' h' W/ P6 q( M/ W+ i
MachineMean time to failMean time to repair: s, F: P  a# m/ J, Q
A110 minutes      5 minutes
/ t: i$ v4 V% ]B 170 minutes     10 minutes, y- y; U( k1 P% f9 u' @5 g' Z& w
C230 minutes      10 minutes0 ]: g4 P8 X4 V6 A% t

# c! @- ?, @" I& o. FThe machines also must be cleaned according to the following
) ^1 W3 q% B" ~* {schedule. All times are constant:
, Z4 N( o; n3 S1 ?  S% j$ _/ X3 Z; G4 I! i
MachineTime between cleanings Time to clean
: T" E& n% l' W, l0 j3 WA90 minutes        5 minutes
( S% y) B  ^3 `3 \B 90 minutes       5 minutes
3 u! C9 F" ^2 g9 V: u- }C90 minutes        10 minutes
* C. q) D2 V& {$ q) o
9 d2 V2 B/ J8 d, pPlace the graphics for the queues and the resources.
# x5 s* G" X0 k& D! e, ~0 LRun the simulation for 100 days.
. {/ }6 O" _, i* ]$ TDefine all failure and cleaning times using logic (rather than resource
4 d# V7 |  Q" k6 h' y3 k+ Ucycles). Answer the following questions:( F4 q* b" F& z8 @
a.What was the average number of loads in the waiting queue?
* S% H# r" k/ z* Zb.What were the current and average number of loads in Space?   ~% q9 O0 |( a) ^* ^0 P
How do you explain these values? ! z) j9 A* T% h: j/ |5 j% W- z' h: l

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% C; V" o% n. v7 O" m9 [send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& X  ?0 w0 b7 M; b( B% T# D
这行好像也不太对,各位先进觉得如何呢?- T/ P  O( x. `* W8 k2 }3 o
* D3 I9 r8 g# X
begin P_something arriving% [- N" G8 n! C+ U- C
   move into Q_wait3 W- D; Z- ?) M4 h. F* ^
   move into nextof(Q_mA,Q_mB,Q_mC) 2 Z! l3 T7 Y! R' _3 W7 q
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
$ K( i) k! `, F( S9 ~   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( m4 C' R* f( [' B+ A; ?end
' s' H; X6 B3 ?
/ h3 G- A/ }* o/ jbegin P_mA_down arriving8 i( ?" @- j8 K4 E) u  R
   wait for e 110 min7 o$ h2 Z4 ?$ z) V0 q# Z# Q
   take down R_mA
8 n: a$ q% h2 J$ g( `   wait for e 5 min1 C* y: @# ?9 y' E
   bring up R_mA
( ^2 ~+ K) c1 W* Bend
2 Q9 n7 C+ c$ B9 I- {* |  T3 f- U$ n0 O) f3 S6 j, x
begin P_mB_down arriving' f/ \6 e: W0 P$ b( w' L1 u8 p" {
   wait for e 170 min$ |4 P* h& m/ n2 K8 q% l
   take down R_mB  Z! v3 m8 }5 U
   wait for e 10 min! ?0 q7 O& C3 _- |6 x7 o, V
   bring up R_mB2 s9 S& f0 v+ E3 L4 g) W3 [% X5 ]3 ^3 a
end
# Q* K$ T" J' W7 {. F7 B0 e4 {. w  n3 C! L
begin P_mC_down arriving
4 H. b6 `' ^/ o7 U   wait for e 230 min
. I; k$ h9 {) E5 c   take down R_mC+ X# I+ V# G) Y  z
   wait for e 10 min
2 ~  j! v6 A2 u2 p$ T# e   bring up R_mC. r8 e+ W% B  D7 _- D0 p( ^
end
4 ^4 L8 M1 e' ?* }* o
5 |$ G5 D( ]/ qbegin P_mA_clean arriving2 c/ y7 R2 o; _* A
   wait for 90 min" S( J  Q5 P! Z( h
   take down R_mA
. d0 z* N3 }1 T( W/ S   wait for 5 min
! m- G# Q/ y. p" d   bring up R_mA
* a/ X# H0 |! v& Send# f. v6 E- A1 c

( t) X6 j( i, P7 d3 fbegin P_mB_clean arriving
+ f  n/ x- }0 P) ~" H- o   wait for 90 min
7 ^0 F7 h. ^' g   take down R_mB; \, k+ r6 M& q* U
   wait for 5 min
+ K% i6 v+ |- _8 {) x7 @   bring up R_mB1 g) H% T; j3 A, g3 u' E
end
# p( N+ I7 S5 y1 V" u, r1 j# G5 ]) W0 J( G4 W* U8 v- ]5 [' a5 T
begin P_mC_clean arriving
( ]! f7 P& u' z( ], \# d$ v   wait for 90 min
. h6 ?) X+ i" `! J   take down R_mC1 y& L' i0 F5 r; G3 @
   wait for 10 min6 A8 V# C" a# h% f; l
   bring up R_mC9 E0 O( W1 W* g5 X( k9 ]4 q
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
# i, W/ L5 F  e& k, J   move into Q_wait
7 h, x+ M7 a% r( ~   set A_q to nextof(Q_m1,Q_m2,Q_m3)0 t4 Q+ V. y- g* k: u! H
   move into A_w
) I2 M9 v: J5 p, `7 c( [  h   if A_w=Q_m1 then use R_m1 for u 48,5 min" v6 c/ U8 |( M. S2 ]& O* L5 a
   else if .....then use ....for u 48,5 min2 M- T) b5 j2 a) U8 R
   else if .....then use ....for u 48,5 min  % E2 f& o5 I! i7 n+ P
   send to die( U# z& s4 P" {
end1 y, @  \) ?% S( ~: q, o6 T1 _# i
4 \; j3 y# ~3 ~9 O* T
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-21 15:28 , Processed in 0.020192 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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