设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6523|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ' c2 ]1 j  F' N$ O+ O) s0 I; `
3 `6 H" y$ d* T# `1 V# Z
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
: E2 V2 a. |8 j, k0 R" u  j; ]8 G- S9 q
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 _. C7 T7 m* ?) B
0 y4 R3 d/ ~( A1 f: ~- U
--------------------------------------------
$ Z; Q3 E' ?. \$ Mbegin P_something arriving$ g$ x& L) Z, X! }, I- Q
   move into Q_wait
2 A& \/ S7 [0 q; c   move into nextof(Q_mA,Q_mB,Q_mC)9 r8 z5 N/ V% p, v0 _  l7 n* P
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
; k1 u$ j; \; H" l  V: i8 O2 Q# M( W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
* B+ |3 g. t1 n) x   send to die
0 ]9 Q7 d9 T; k. F' t  S( C8 }* ?. _end

! o' c7 y5 D; q4 j; `, ~; X; q
, C  r* E; Z9 m6 g6 y+ U4 V' q5 gbegin P_mA_down arriving( |& z9 u9 d1 X- A% J
   while 1=1 do
( Q" z7 ^* A, ^0 r' _   begin
3 X: N9 U. a6 [   wait for e 110 min5 b: l; r! G; A; z( Q" {% S
   take down R_mA+ J  D) }8 f$ T: \
   wait for e 5 min7 J6 J7 N: b  [
   bring up R_mA2 f( `6 y9 p1 P' ^* U8 j
   end1 a# [+ m- {0 V2 s, E
end

0 o4 ?0 F+ y& q) e 6 L6 Q+ n/ X- b% ?: [$ s
begin P_mB_down arriving: s  g+ k+ Q8 |. F! {# ]
   while 1=1 do
9 u; V2 g: O# _4 X6 {   begin0 q0 p' Z! y9 H6 v
   wait for e 170 min
3 |' o- w( H: E( M  T$ x   take down R_mB
- e8 M' ~5 E4 x. \! @- W( ~   wait for e 10 min
# v0 Q5 v) P. \' ?$ Y, U   bring up R_mB. P' p+ g, A2 ^& q5 ?$ a# x8 @4 S
   end
* R  {/ s: X9 q6 T" r  Send
2 [+ \7 n/ J/ P* D

* [9 a& G# E% i/ }& T0 R: {; e- Ybegin P_mC_down arriving& \, Q- K; v* N' S
   while 1=1 do 6 P! x* |! q* J5 E$ J- z
   begin
  h& u/ G( X# F3 n( a# ^* S' |   wait for e 230 min
+ ?# W3 T& o6 K4 R8 U( z6 ?   take down R_mC, h) {1 J5 r# L7 g
   wait for e 10 min
# e5 Q( J$ `  y6 q5 U   bring up R_mC1 R; r( p' T6 F& d( J4 x. F
   end, {' a9 ~% S4 v' [5 [+ v8 U8 k
end
2 ^1 r( G! L; Q4 N8 i; g- ~
  N2 [; x5 d  E: r! @  p. A
begin P_mA_clean arriving/ t1 d3 Y4 E! X2 ~9 U7 S9 @! ^
   while 1=1 do, n4 A6 {- Z$ N& X8 [
   begin: I4 `- E- i* Q
   wait for 90 min0 t6 d" k* A; W( e6 w
   take down R_mA' r# G2 X+ W6 V
   wait for 5 min
  B2 i7 g: T" h+ J" J. m   bring up R_mA2 Q2 p8 ^! `  a7 t" e6 `/ g
   end
' f3 a( I( X3 Q; Q+ H" I; _end
% }1 a  m9 {+ K$ T+ O5 D
0 M- _0 Y1 z% x. x7 f* t& [( K
begin P_mB_clean arriving' Y2 j6 ^& L& [
   while 1=1 do# F! x9 v+ y3 H
   begin
0 l9 M. \& i( k   wait for 90 min
2 A) A0 Q% Y. p* q& W8 l- W# ~   take down R_mB; ?, a( {. r* c* N
   wait for 5 min
8 M2 }0 n0 K4 ~* P. H- A4 p   bring up R_mB
8 v( |& s" @  x  K9 ^! L  q6 G/ {/ I   end) b8 X- F" T! t& V' T7 g
end
, @; @) w7 }* o! J3 l; u
! \9 b3 S* v0 k
begin P_mC_clean arriving
* [6 K$ G' l1 Y* r; s   while 1=1 do
4 z* I, Y- L" _) n   begin/ x: h' V  g* Y. Y, K# R
   wait for 90 min
9 ]$ y) b" t& E  W- X, T! n* W' |   take down R_mC
& q; Z; A- o6 ~1 y   wait for 10 min# C  X- t& F" s' d
   bring up R_mC5 u6 g% @- V! P* ^9 F
   end
* ?$ E9 O4 _+ u" `, s8 ^; y; s& Eend

% @( w( p, t% I2 @# X----------------------------------------
% m/ J# e3 Z! k6 i  a
( k3 ~  v8 U0 Q! ^' VExercise 5.9
/ q: `" \7 M+ d; T* z5 Y  W8 h0 @( y# K1 l1 P4 H( ?

2 a. s  Q5 p! Q. n$ w4 z$ hCreate a new model to simulate the following system:! {. I5 i0 O  z8 m- @: S
Loads are created with an interarrival time that is exponentially : U) U& B( L( |0 ^: c6 \
distributed with a mean of 20 minutes. Loads wait in an infinite-6 r* d+ y& i5 L0 S& O) I% R
capacity queue to be processed by one of three single-capacity,
* Z0 g( n1 f+ L. G+ ?' f. h8 Harrayed machines. Each machine has its own single-capacity queue
, o4 C* ]$ ?) }% Q9 N1 W: owhere loads are processed. Waiting loads move into one of the three 2 o# k2 }% n- P
queues in round-robin order. Each machine has a normally 9 e: K' @) @% O! n
distributed processing time with a mean of 48 minutes and a standard $ {& h5 R' e1 o( F: G. S
deviation of 5 minutes.8 a8 F% }, [0 w% K
The three machines were purchased at different times and have
8 _: u) _) W! G/ `7 tdifferent failure rates. The failure and repair times are exponentially
, k# C$ v$ ^; Z( p6 A$ Ndistributed with means as shown in the following table:
$ l! B" `7 H& s/ [; T5 W& gNote The solution for this assignment is required to complete ; o0 M- ^2 w: r6 o" F. X/ B
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ! C" }* p: r& C& H
your model.
! L: }" U- Z: w8 e6 ~
9 E" k6 Z0 Q4 N0 I1 u  bMachineMean time to failMean time to repair
1 G* q  u/ ~# D  V# E4 z5 TA110 minutes      5 minutes
2 d& `0 V8 w8 {6 j& ], D' k7 n; p- tB 170 minutes     10 minutes
+ q; z' r5 c; p* n, yC230 minutes      10 minutes
' o9 n7 E1 ^6 x' h+ D. {, }
8 w" T1 O% E* I* c' y+ NThe machines also must be cleaned according to the following
5 R) O. |- ~$ _" F4 t2 R% [8 hschedule. All times are constant:
; Q1 t8 W. f# E8 [/ Z7 r1 [
' h' |" ]% d# |: pMachineTime between cleanings Time to clean. F. n9 w1 P) p3 Z* v8 v
A90 minutes        5 minutes
+ Z4 R# e$ K. _- ?- V9 BB 90 minutes       5 minutes
4 z% H& a# E" D1 _5 X% B6 N' a* UC90 minutes        10 minutes
" W0 y  K+ F" B0 F5 t
' W7 i& _- D: ]. _  U0 UPlace the graphics for the queues and the resources.
+ [8 Z, O4 ?8 B# w7 lRun the simulation for 100 days.  y2 b  J" C0 P, i) S; U9 Q/ c; y
Define all failure and cleaning times using logic (rather than resource
2 O( \$ |; q% e) S7 X) U9 [6 Ycycles). Answer the following questions:
1 ]0 z! L% F7 B0 M) X! va.What was the average number of loads in the waiting queue?
5 i, X0 z/ v% P( \+ A; Ib.What were the current and average number of loads in Space?
1 m8 r4 f# U& b  ]2 T4 j8 b8 hHow do you explain these values? 0 \2 a5 R$ V4 c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉% \3 d6 A$ R1 H
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 q- D) N; a& @7 R* L. Q这行好像也不太对,各位先进觉得如何呢?) M: S  B) A9 j% _
( E# D" J4 S5 U' Q$ f; B2 x
begin P_something arriving3 Q: V3 _. V/ _6 e9 T
   move into Q_wait
: K- i& ?6 j7 h$ g! O! O0 w   move into nextof(Q_mA,Q_mB,Q_mC) 5 O; }6 Y, t$ y2 G
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min$ `9 w0 H5 o& @% p5 z% |& J$ d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 2 b2 E/ V* G* i; @
end- _' x8 d8 \! g: X& u) F" l
! l! t& f$ i3 e/ T+ o" ?% p: ]& \6 [
begin P_mA_down arriving
7 p" p( a8 Z7 [   wait for e 110 min
2 N) a7 m9 E5 a" o   take down R_mA$ K0 h) M$ \) t3 Z, Y
   wait for e 5 min. V+ {4 i# f. f$ b  o/ S6 Y: Q' o! f
   bring up R_mA6 W' V7 V1 @. X  `) d' q
end! c- s& x! ~7 t1 \

9 }/ }( m; W, K1 Ebegin P_mB_down arriving) |7 k, E9 Z8 P
   wait for e 170 min; P# C0 m  V7 l2 _
   take down R_mB
& ^% M( G% d1 t% c$ ?/ a/ Z   wait for e 10 min5 T# n7 ]$ E. ?8 n9 j
   bring up R_mB9 E' R5 r6 K) y% _: k( h$ C
end
! U0 Q. U  C) B9 j' l# r: @: e! ?: _- ^
begin P_mC_down arriving( E0 f  P9 c* x8 M7 d' V' v
   wait for e 230 min
7 }3 o0 x2 S2 |! d8 J  z   take down R_mC
% x1 z! K' ]0 l) a  W/ A0 p% a   wait for e 10 min
2 b2 q) r9 B- V- _2 B' i   bring up R_mC
2 `1 V5 H# Y( x6 @end
$ A! e- z4 U% \% f1 {/ p; z% i3 p4 J+ f9 ]& C
begin P_mA_clean arriving
& Z/ o$ v: m( D$ x   wait for 90 min5 Z; I' R+ s1 ^: D2 q
   take down R_mA
3 }3 o7 U5 o1 u   wait for 5 min
6 K4 _8 u  f7 N# I: B7 ?   bring up R_mA% q- o- a: j4 x
end/ f( A8 \: e/ M4 T( z

5 |* k2 ?3 Z9 zbegin P_mB_clean arriving! b1 Q* [; C0 L4 v: E
   wait for 90 min
; o% @  ?4 Y5 i/ Q   take down R_mB
& O1 J5 [& X2 |2 q1 _   wait for 5 min
) B) T( z, P! N2 m3 C  s* [. l9 O# T   bring up R_mB
% R! n- R# P7 G* o/ H6 N/ W( send
( k. H$ n4 i- r# U2 O; P& V- \) t7 w/ _  G" L
begin P_mC_clean arriving
3 G" M; Z: H6 x# y9 f( t; n   wait for 90 min; `( H8 O. |" X$ O
   take down R_mC
) |; [* z0 b/ i3 |   wait for 10 min" v; h. P4 T* W; y; R2 E
   bring up R_mC& T+ r5 }& y. }4 x( r& N
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
, L% Z1 [% W6 \8 d  S. q/ E. t   move into Q_wait
' d! E" f& Y2 r   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 O' X) S& c6 }- A, J  h7 Q# p$ W8 o   move into A_w6 J1 l, W- C# S6 n  u9 E- x3 z
   if A_w=Q_m1 then use R_m1 for u 48,5 min7 {( M+ P' m" a3 `, {$ L
   else if .....then use ....for u 48,5 min
4 F+ K: b7 ^- d9 `   else if .....then use ....for u 48,5 min  # U$ w. x" c2 K: c% s
   send to die
( u# R2 [9 m8 y, [( a5 H7 A7 Fend
1 D1 u; `4 T& ^/ W2 Q  A) v
) \) N4 D0 i6 z. W8 {  n9 h! ?供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-4 04:57 , Processed in 0.015270 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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