设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7272|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 $ _+ V" S3 c! Z1 l1 {

* x( Q3 t8 C  v$ U底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去& g& X0 J% e  `! i* S1 i' K  \

! p; ~5 T. D* \# ~( @3 O% {* s不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 o( N8 c* h- W3 N* S) e7 \, W

# B$ N4 Q* ?0 L, t6 n/ Z
--------------------------------------------% s  k4 F9 k. F
begin P_something arriving
% Q& p' ~3 [3 V, D: L- ^   move into Q_wait3 t$ \$ t7 W1 r9 U7 v
   move into nextof(Q_mA,Q_mB,Q_mC), s2 b% m- s9 F1 p
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
6 [; v; S4 G5 F, ?   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' k: ], \. l7 Z7 |# B' Z( `   send to die$ H- U$ X- A5 b/ b% v9 }
end

2 C& y$ k9 u% |0 Y( A! u
" O' {' i' x5 u& h- H: T8 S9 _/ S% ~begin P_mA_down arriving- T% I8 Z; q4 N; q: D0 g
   while 1=1 do 5 y6 C$ U, S; a! D* H4 ]! r# E
   begin  e& n; L# q* U. h( c5 Z- g: f2 P% y5 t
   wait for e 110 min) |$ b" f7 Y% |( ~, I: e9 d
   take down R_mA
4 Y6 x9 n3 a) s   wait for e 5 min7 ^* ]( R- G( K$ j( M
   bring up R_mA
5 P7 h. ?: B# O2 r   end9 X4 _# Z1 i5 U9 v
end
' J1 a3 h  f% ?
; z- ]% o- G7 p  ^
begin P_mB_down arriving
6 v& ^4 w& r6 G( ^   while 1=1 do
3 p, i; n$ h( W- i% d0 u   begin* A: Q7 V) @7 f. b
   wait for e 170 min' D/ w/ ^0 x! b  \/ Y/ V) p3 N
   take down R_mB
5 y) L( g. c9 g& {7 g   wait for e 10 min
5 m7 G5 v+ }" b: K  a0 B" }% n   bring up R_mB
$ n0 R9 o3 |3 [3 T/ Q& A   end% N; R* D7 J6 S3 l# v
end
; x  {7 x; u% C  l- N( U
# G, i( V4 ~: P& T
begin P_mC_down arriving
8 ?; n# u* [9 m, O% g   while 1=1 do
0 M2 i& D( a2 D0 f0 o9 w   begin0 \$ h* O# W) g2 W
   wait for e 230 min( ^" P* R# N6 X& R) [
   take down R_mC* J  u( v4 P6 x- r5 Z" T
   wait for e 10 min
+ u" P0 o9 M- q   bring up R_mC
1 X+ X. @3 D0 A3 |/ A  z   end
! h* |% M3 F. I2 Z; z5 h7 Oend
# ?, M: u5 D" P6 i4 w, t

8 J9 I; h* N. I* H4 L  _begin P_mA_clean arriving
# D$ |) \. |) s( w1 r' D   while 1=1 do; w+ Z, q# |" S" N5 @4 A
   begin8 `( c+ @" h4 U0 N# R. r
   wait for 90 min! g- ~7 U9 G# _- b3 \7 t7 N
   take down R_mA1 O" ~7 i" q  E4 W: f9 w
   wait for 5 min
$ Y! @& g) C- {* f   bring up R_mA
" i' a. h+ a# Y4 W9 _+ v   end
( |6 S3 [) k4 y! jend
' |! P4 E8 ~1 {; {1 x

' _/ Z9 I; n( N0 Cbegin P_mB_clean arriving/ o' z: q$ x' c
   while 1=1 do
  o" a0 [) f& l) Z: R   begin
! s8 n; |6 w# [0 R   wait for 90 min8 [' d0 G8 V8 c, X) e4 \' E
   take down R_mB
& O" l1 W( V( a/ Q6 }- u  E* j1 w   wait for 5 min, e5 z* @3 U6 J8 _' U
   bring up R_mB
" R8 c) M5 z, e" C- r   end! ?- c8 E# S2 T
end

( P1 `7 F& g) j. M
/ V$ @& ?: u+ E* |: S4 jbegin P_mC_clean arriving+ k3 E' \- L, |
   while 1=1 do
7 v3 w  K) N: }/ J6 }: r3 p& R   begin
' l+ {# K/ J9 S* w" g, D   wait for 90 min
  f" G' _! D: \   take down R_mC
) p1 N" E8 X" p! U# _   wait for 10 min& E: T6 k0 G& M. x
   bring up R_mC
! _% X! v/ P/ e/ O# d* f   end
& w  P+ ]4 }; D* ^1 @# p6 i1 eend

; m) Z9 W+ ?" k: {+ j/ Q, K- d2 D----------------------------------------; X3 @7 e: n2 U6 z
& y* z( }6 B  i
Exercise 5.9. Q7 C9 E5 C5 s- y2 h$ o

5 \% R# |( z- K5 z$ `8 j
) k: x# |/ ]( j2 B1 b5 @Create a new model to simulate the following system:
. C; D" y! A& [8 ]6 \! }. mLoads are created with an interarrival time that is exponentially 5 ~1 Q1 x& G2 [
distributed with a mean of 20 minutes. Loads wait in an infinite-% Z. j* R4 D8 ?, \. Z
capacity queue to be processed by one of three single-capacity, 5 V$ i1 {6 i% R1 L! M' E
arrayed machines. Each machine has its own single-capacity queue ( O( x0 P. d1 A( W7 ]7 I! P+ T
where loads are processed. Waiting loads move into one of the three $ o# h$ L) p2 |/ k4 a+ v
queues in round-robin order. Each machine has a normally
3 r! V- P3 l( z2 d5 Cdistributed processing time with a mean of 48 minutes and a standard & \% b, T! I. a8 X5 E9 Z
deviation of 5 minutes.
8 I" O0 }" {, mThe three machines were purchased at different times and have
) P1 s$ M$ u6 |! L: D* N  ^7 Gdifferent failure rates. The failure and repair times are exponentially / r5 l- n7 a- [$ L, R
distributed with means as shown in the following table: . A% Z/ D3 I7 c6 i
Note The solution for this assignment is required to complete 3 j# A7 X* V; g, |% e5 g3 S' Y6 J
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 2 h1 V/ Z( L8 G, |& Q3 w
your model.
" F5 V5 `% T5 E) o7 `  h
: L5 O( S  m7 I& n' kMachineMean time to failMean time to repair( n5 @- H; u9 u* J
A110 minutes      5 minutes
* d% ~- c7 B/ U$ y/ @B 170 minutes     10 minutes8 o  O$ X' ^* @5 w/ R( n" y
C230 minutes      10 minutes
) o. x1 i# G1 r2 C8 J* \$ x
% F$ H) r) f$ r! |( K1 j1 fThe machines also must be cleaned according to the following
3 L! i+ y8 V, q- ]3 Xschedule. All times are constant:
- P" v+ Y0 E" {! P8 o& k! P$ s& N, w- ~
MachineTime between cleanings Time to clean/ t; N. o, K1 [, V$ l
A90 minutes        5 minutes" y) M! |7 u* _3 u
B 90 minutes       5 minutes
/ g$ y! j+ S0 _- l: T- ~7 q  x6 pC90 minutes        10 minutes  N. s* |, ]8 T, y( m6 l, M1 c, b
7 ]/ N0 }* [+ s* h) }8 z- i
Place the graphics for the queues and the resources. . w- [# y$ {* h1 a
Run the simulation for 100 days.* q( a& D$ \' f% M8 y, I# y
Define all failure and cleaning times using logic (rather than resource
" d- x5 o* h; q$ L7 Q( ^cycles). Answer the following questions:, D# [7 E* P9 e5 D, e
a.What was the average number of loads in the waiting queue?7 d8 ^7 C" X) V+ w- J( G
b.What were the current and average number of loads in Space?
3 G+ j/ Z4 s  y* w6 M5 |$ Q. [How do you explain these values?
; |9 v, x% K6 L& Y: {

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
& ~6 L; q6 w+ @, `, h' C  Gsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' ^0 l; y( r. x) K6 |/ Y
这行好像也不太对,各位先进觉得如何呢?4 G1 @# t; Y4 t. M& b
& S& s+ b! T/ W. ?
begin P_something arriving
9 y( w1 u% G* m# @9 F2 h7 y   move into Q_wait, i$ g" U% ^$ w& U0 |) H2 p7 J8 x2 t
   move into nextof(Q_mA,Q_mB,Q_mC) 6 g. _0 O3 x. U$ c' }
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& f0 H4 e7 o+ H. ~" Q3 u   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 w* y: m$ c% {  tend7 v! F) r4 p% W( Y& m

+ J* Y9 l1 u$ ]( U$ ^begin P_mA_down arriving
2 D0 b; P+ x3 i/ W7 p; m; P   wait for e 110 min9 D7 b1 c# I: G/ H7 ^
   take down R_mA8 y) v" A+ E. x8 h8 A/ F( P! d+ F6 j
   wait for e 5 min$ [3 k8 i( H; }$ L
   bring up R_mA
) x4 b; k: C/ A( n/ qend, S. Q$ ^- r8 I7 P8 c

3 b) n- A8 R7 T& `: f% Zbegin P_mB_down arriving$ z) R0 F+ G" ]
   wait for e 170 min# M. }! P" {9 D: O% w8 \9 y
   take down R_mB  L6 B  W2 f0 c4 Y+ R& d( B
   wait for e 10 min' ~# K: S& Z! P6 C
   bring up R_mB
  |2 ^8 c, [6 r7 O: Q4 J$ |7 kend
+ `# L: |' r8 S; n  D9 y8 k
) J  f3 R9 ?2 _6 P# E, [0 @begin P_mC_down arriving' `3 U. u1 _* j9 t
   wait for e 230 min
" H; Y- U; B6 v3 y: ~: J1 r   take down R_mC
; J8 I9 X5 [; j   wait for e 10 min
8 h2 ?9 R% d' U3 Z. h   bring up R_mC
: [1 z$ Q8 _8 \# V6 Wend
$ q# H3 Y& n" h& u% P2 W
' G! ]  {* O5 I. @* Nbegin P_mA_clean arriving5 e) x0 l" |# S: k" Y# Y+ a
   wait for 90 min3 z% c/ _2 n6 b4 N" ?$ O4 J
   take down R_mA, ]  n! g! q5 R* B2 z) J# T
   wait for 5 min
+ G$ G7 n8 H9 p& p" R   bring up R_mA1 F& F9 D3 q- o2 M5 n
end$ p" g- F2 e; x5 N

( P/ K0 z4 r! e9 ~5 m2 Tbegin P_mB_clean arriving* H) N- i/ K8 t# k. z4 P
   wait for 90 min
3 y! s. L! T3 c4 c+ W   take down R_mB
3 n* J) b0 M$ d! J0 e" Z4 ]   wait for 5 min. S0 K3 F$ ?- i9 D8 v: b
   bring up R_mB
% b" Y$ T/ m" h- A! H; ?5 Pend
. I( k- C$ G0 N; x/ m
+ {4 X1 i1 I2 i$ Wbegin P_mC_clean arriving
5 |" J( U. c, L9 _   wait for 90 min
& k+ d; }  j0 X3 p# `& D   take down R_mC) k" I6 h: B2 [) p
   wait for 10 min4 B5 ^8 M8 E8 U
   bring up R_mC
( \; E9 s8 g2 z7 g! k5 v1 vend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving5 J& G3 _) V, U/ [& F: c5 D
   move into Q_wait
3 `1 }$ `7 d% r+ M6 _( v2 T+ H   set A_q to nextof(Q_m1,Q_m2,Q_m3)* t$ F+ x$ w  W" P& W0 U
   move into A_w
6 o* E# I$ w( Z, t& ^   if A_w=Q_m1 then use R_m1 for u 48,5 min
, t4 J7 C$ d4 I( {* [/ L   else if .....then use ....for u 48,5 min, U( o: _* z9 \) u1 R; j, ~
   else if .....then use ....for u 48,5 min  : c  R$ `/ \* H$ b) K5 a* y
   send to die
& b' o! d' F- s7 ^) ]- tend1 K) F8 }, O+ h' p) S3 S( {5 H5 B1 ]& s

0 N7 m; z6 f/ X2 k, p# w供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-22 23:50 , Processed in 0.018464 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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