设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6867|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 / P3 o9 d/ J! s. X+ i1 m
, d+ |, z* Y6 o2 X3 @; X9 ]1 g
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去$ W+ q# g7 e$ T! H( o- X3 y
, m+ T" x  i$ K% z3 ^
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
! o3 I/ o% p" D% D- W" y5 @, S- }9 y3 H
--------------------------------------------5 p4 |9 P; M! y7 S1 Q1 r4 i
begin P_something arriving+ r) ^6 t$ ?2 y% Q. ?/ Y
   move into Q_wait- E( X3 g9 t9 K* D4 n" y  L# {
   move into nextof(Q_mA,Q_mB,Q_mC)! C) q1 Y$ t. Q2 q; S- v: h3 k
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
; g/ g* {$ D: c! y   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)8 K, ]+ c/ P8 k& w. u
   send to die! k+ Y1 r! d; D7 U
end

: i7 R8 D# v$ l" R2 S3 g9 b& T
+ @: p% ?1 z$ B( S2 l" Ebegin P_mA_down arriving
" B  P9 `& E- C, u7 _   while 1=1 do
0 n+ S+ P/ ?8 G( s& D   begin$ q+ X( w- x0 }
   wait for e 110 min
# J9 ]7 i( \7 o% \* q   take down R_mA
1 x0 O9 j; [6 }   wait for e 5 min
3 x- ]) v8 o# q# E   bring up R_mA
+ O* @5 a8 m0 F" z, N0 }8 B   end
& W. f" ]; u; Tend

4 s; K+ ~& @1 w' r1 O% x# L! X
0 X. |* \# ^2 l5 j+ B( h% k- Bbegin P_mB_down arriving3 o3 q; M1 d2 m: X1 }0 h
   while 1=1 do
3 f- s& C. g" r' N   begin& A& C9 ~+ _9 n  P" v( }# Q
   wait for e 170 min
' t$ c9 g5 C) H! A   take down R_mB
: l5 O$ S5 t; F, z/ z# l   wait for e 10 min
+ K- f" ~& q9 A, A2 a   bring up R_mB6 W$ k* R- H5 D& ~3 e
   end
6 a  K8 d8 B( n2 vend

2 M6 @2 _9 n* e4 P8 z" O  @, `/ Y! C& B
3 a2 [5 j, c/ U- h, p1 e4 G/ V- {begin P_mC_down arriving
3 [" y9 q5 \& H  e. J   while 1=1 do 3 y. L' z2 I6 }
   begin, f2 m8 R3 e8 W# B& H) i( @
   wait for e 230 min' u1 q7 J0 L1 Q7 e; @+ @6 o6 b0 H
   take down R_mC
1 L1 l/ ]. @" H6 w+ x' A7 M( G, g; n9 B   wait for e 10 min
2 v8 j: k) c+ R+ Q2 N5 Y% s1 \   bring up R_mC
$ y; X7 d: {$ b3 e( E7 J   end3 U! J, d+ q( H5 G3 m3 S1 O5 t
end
. }3 m# e3 J% k1 x; D& N2 x; k

. O$ ?1 i( c5 K! Fbegin P_mA_clean arriving
( }- H7 O) ?8 g9 W. l   while 1=1 do5 y  B8 T' V- t5 r, @: }
   begin
3 A. N6 i& s/ V+ Y# w9 S# N$ X+ t% i   wait for 90 min
; }8 ?! u$ d+ J4 }2 m6 N   take down R_mA
' h2 W2 O# `0 W% C3 q   wait for 5 min' Y! {0 q* ]& @! X2 q0 O7 K
   bring up R_mA
& y$ H# @- q3 p5 h6 S% e   end; m6 K  Y6 M1 P/ X7 R- L
end

  P' m0 D5 e6 b
6 G# b. M3 }* w/ xbegin P_mB_clean arriving8 B- H* z; u( L* i- v  p3 e
   while 1=1 do
. N5 R9 v) y, b1 f1 Y   begin
# D, a; y5 e) |% G9 L   wait for 90 min, t( |- R! L5 ^$ S) p
   take down R_mB4 y7 w( I) e: `- l
   wait for 5 min
% W5 d# I0 _) _   bring up R_mB8 ^+ f( W1 ]  M
   end
  j+ q, i9 N5 [; `8 k( @) B# `end
! c7 p4 }' \5 d) l# y; C/ a5 p

% y/ E3 M/ J  D, \begin P_mC_clean arriving
' E! V; S- P2 w   while 1=1 do
* O8 s' @' Q4 \! Q- J+ v& [   begin9 @( t7 r" R3 X: A
   wait for 90 min
7 b, [* h" V2 ^5 t2 U   take down R_mC% m" A1 T- ]$ j/ c- `8 U
   wait for 10 min
" x% k% K2 ^4 o) ^& W* F. ]' m   bring up R_mC
* O2 _8 h" O/ N( g9 r5 l   end
" v2 j4 A- @) ~. J* o7 I( Q: p* h- x" yend
. Z) R0 p2 a1 o" C# i2 U8 @" c
----------------------------------------3 G6 _/ F+ w5 _& @! y$ k

4 b+ Y! J2 n' p8 J# hExercise 5.9
; e& x- p; h8 Z  V$ X" X. ^# V" n$ I7 _4 |0 |9 D  e

6 p( s& Z. F0 A3 ]4 jCreate a new model to simulate the following system:  I2 _8 q. U5 A/ K2 |' o3 s
Loads are created with an interarrival time that is exponentially 8 v7 T3 j$ X7 W* h6 ]
distributed with a mean of 20 minutes. Loads wait in an infinite-; g0 @8 I" @$ p0 r( w0 L
capacity queue to be processed by one of three single-capacity,
6 m8 F( q; }* M7 \arrayed machines. Each machine has its own single-capacity queue
, G* S$ A2 q1 E( _" [; Swhere loads are processed. Waiting loads move into one of the three
4 F" z% z& J4 j& ?5 f1 U. Jqueues in round-robin order. Each machine has a normally 9 ^% U' u4 K3 R9 r  u7 r) Z; G
distributed processing time with a mean of 48 minutes and a standard
7 [% ]- {3 x7 m. `deviation of 5 minutes.2 x! j# j; V) M6 Z
The three machines were purchased at different times and have # j5 Z. W8 ]; J
different failure rates. The failure and repair times are exponentially 1 w  K4 F# @( h" k, K- z; x/ D
distributed with means as shown in the following table:
1 }) w& o. t1 Z: ANote The solution for this assignment is required to complete . Q" W0 ]: Y/ Y( F
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 9 A: D. j- ]" W% b
your model. 5 N; A5 S1 C" i6 ]- @& k8 U
1 k" l2 f5 R) R" f
MachineMean time to failMean time to repair0 Z8 k& E  H) J! R/ m
A110 minutes      5 minutes
% c) I' |( ?. C/ d! R! e* r7 t# RB 170 minutes     10 minutes
% g& O" v: x6 N3 h# AC230 minutes      10 minutes
- @" F2 J5 m4 A. \5 r( Q. g# N0 G$ m% {% U
The machines also must be cleaned according to the following
) _  e* K" y- B3 q$ m: Xschedule. All times are constant:
; y  X; o% f+ w) n# a/ V! W, h0 h+ @5 j7 y- A, r  X
MachineTime between cleanings Time to clean
" N7 W& b+ F6 _; i2 nA90 minutes        5 minutes2 \, E0 _' q3 x& x
B 90 minutes       5 minutes$ ?+ x! V' F3 q) m6 w3 s. O
C90 minutes        10 minutes
7 n* h5 S0 Z3 B6 |1 C  P' _! }1 d1 [) h: c; {2 g
Place the graphics for the queues and the resources.
+ e' W  h& Y6 h/ L0 j5 h2 dRun the simulation for 100 days.
& d) P7 _$ |) n% Q- S4 yDefine all failure and cleaning times using logic (rather than resource
# W# B8 Z2 V4 r0 f( G8 fcycles). Answer the following questions:( T2 S' I0 e: X! e( Z  i+ O
a.What was the average number of loads in the waiting queue?
7 |  U6 |/ b1 o4 hb.What were the current and average number of loads in Space?
8 A% J3 W( d7 f0 p8 M+ iHow do you explain these values?
8 w$ G7 a3 J/ G8 d8 }1 S5 `4 `

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
! |* Y6 ^' J! O5 s/ d  U6 [1 Z9 Asend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 z& P5 P7 i( ~' n4 x" z  \) h这行好像也不太对,各位先进觉得如何呢?& E3 j2 _: i  t% E4 ~7 O: c

: A5 }& E: T. ?+ Q- Ibegin P_something arriving5 y: \7 d$ U1 J: f) v" I. i
   move into Q_wait7 w- m$ P" c( Y
   move into nextof(Q_mA,Q_mB,Q_mC) & b9 ?7 A8 H; M, i/ ~) R  F, d* n# S. U- F
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min0 Z) }1 P- C9 a
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
* {) J, D! h- B6 B' t8 {end0 c% s/ g+ P4 r, c. j+ L7 T
% T4 N2 x/ h* }: @% b* U
begin P_mA_down arriving6 ^, H9 A8 K) S+ Q( `
   wait for e 110 min
( v' v) w& D- h* A# |( y) Z, E4 O   take down R_mA4 d4 h$ {7 W& E7 |" E
   wait for e 5 min" ?( o3 o+ ~% n, D
   bring up R_mA
( O$ s, Y7 W& I1 t+ y3 c- Cend0 U0 _* g% V$ f' G+ N5 u, p; ~  g
( Y7 K% w9 a' G9 c9 M; o1 j
begin P_mB_down arriving
/ V" w  W" u" o+ w8 t- F* L5 [   wait for e 170 min% f- V; i: v. h' v" H/ p
   take down R_mB
- E9 H" ]! @0 b2 l2 a   wait for e 10 min. t5 R% O* F$ B4 h$ ^7 A# c
   bring up R_mB; B) j' i6 R: M0 H  C- e! q
end
& o& E- O1 r( }5 s+ C$ ?: K* a( q
: z  h; K* R- }, W5 Ebegin P_mC_down arriving; y0 y0 }  t2 g7 G6 d
   wait for e 230 min
* Q/ i+ _6 y: L5 v0 {   take down R_mC9 ]) I# ^3 d' @0 x7 U! K8 \8 u
   wait for e 10 min
+ a# d' n& L9 `! x   bring up R_mC
- L9 e2 F5 d1 w7 Zend
2 ]$ h# |# R% q) i+ ^# x5 U" t. G
begin P_mA_clean arriving. T1 `5 A9 d: h
   wait for 90 min) \/ I. E3 R4 L$ Y9 |3 s
   take down R_mA$ m. C* N& i; D* `) ^
   wait for 5 min
3 Y6 `+ r" y3 S& _% X   bring up R_mA
' V  O; ^; G3 d/ Uend' R- y8 f9 P: g: T8 T

0 y: {1 Z! S4 R0 ebegin P_mB_clean arriving
% u6 H! |  R! O! q1 o   wait for 90 min
! j- w% `6 p, O+ ~( x3 W, [7 V   take down R_mB
5 e6 O1 P/ F0 h! N" x& p; u. E! o   wait for 5 min" m! y$ t- ?, x  Q9 R
   bring up R_mB
+ z& O$ {' y- L6 Z* E8 yend
6 z" R% E' s) e
) ?9 m5 }. N" f: W3 Abegin P_mC_clean arriving9 w- R8 p# l0 Z0 d- c9 l
   wait for 90 min
( w5 o" O0 w' ~6 D4 E   take down R_mC3 p! U% P7 i- n; q9 H
   wait for 10 min
9 Z- V; e: e0 A) u9 F- E1 e! U   bring up R_mC6 v* s! |; }' ?7 r- j4 T
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
+ E& f$ a# W$ C: d% a   move into Q_wait2 s; T6 g$ o6 M+ d) A5 ~) v
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
" |7 t) y7 E* I3 o   move into A_w. r9 E+ O5 d2 m& j  c, X
   if A_w=Q_m1 then use R_m1 for u 48,5 min" j; [2 a/ X2 P. Q8 ?6 _
   else if .....then use ....for u 48,5 min0 Y6 d& _% H! y5 x6 y
   else if .....then use ....for u 48,5 min  : S; g3 S; ]! }* j
   send to die. z8 F9 @( x1 k( q
end# h7 f: _9 p: c+ Y+ o% a7 c
8 V3 }' n/ J7 h5 h; Z9 _2 X
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-14 17:04 , Processed in 0.014706 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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