设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7614|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
( t! `  f; z% S2 J+ F( {
7 t# T$ }" x! E底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 W7 h7 j, a3 J  U0 R5 ]  n4 G' k( |1 h! r, H) [
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
6 s! z  \9 I) \9 x( |
! |! a6 n8 [& x, }2 d0 c7 h
--------------------------------------------& a% a- [1 Y$ P
begin P_something arriving" J; v( I6 P$ c4 K) ]4 ]
   move into Q_wait! T! P5 r  c, I
   move into nextof(Q_mA,Q_mB,Q_mC)2 n, @' M: T* }6 m7 x: \% h5 \
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
2 z/ |# x9 h0 g& C; L# R. |   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). N  ^+ Z2 [  p1 I9 U7 m' p
   send to die
8 h% r6 ^2 r/ a7 s4 @  |end

0 V* I/ n& p" @7 c & `0 f& Q9 j5 q  G
begin P_mA_down arriving
) Z& ~- \) Z7 g1 }; q) R   while 1=1 do
3 D, ]9 x9 ^2 i; `  C% o' _   begin
. n; @+ w, }- u9 I- r1 D   wait for e 110 min
! n9 v2 o* y8 p( ^) t5 }   take down R_mA
8 o2 W( @7 {& U" @5 i8 ~! p   wait for e 5 min# k4 J% A6 Y( O4 S4 t
   bring up R_mA
- Q7 F( J( Q- A7 g. h8 r& z  h" Z   end
+ x9 v, p- I5 c2 E* r8 rend
+ a9 N* b; q- j

- ~* a2 ?4 v1 R. I# f$ Fbegin P_mB_down arriving
, f. U1 t) l: ?% r9 c2 B, ?   while 1=1 do3 K1 j/ C& U9 [; ^% R2 ^7 U
   begin3 l. S( ^  e: Z: ?/ K$ V, w( F! c; }
   wait for e 170 min& l2 G6 f% \& g" i
   take down R_mB
7 o* ~, [) _! [$ O' c/ u5 Z, v! o   wait for e 10 min4 q: Z- U! j8 D
   bring up R_mB3 ?' w! `/ m7 V, K
   end
5 o6 c$ a. v: e5 ^+ |) Dend
4 G2 m+ j4 S' B- Q' L. |
* z1 O5 F# G% g+ W6 t6 g
begin P_mC_down arriving
4 o% s8 o& g0 u/ r/ V& M- m   while 1=1 do % Q, n/ q2 j, o  B& P/ l
   begin
, Z$ U) _4 s2 W   wait for e 230 min
, G$ l1 H3 j" z1 w$ U8 W   take down R_mC
% H9 i, a* N" N( H% r$ o' t. s   wait for e 10 min
$ m2 x2 p& k$ v1 `   bring up R_mC
. w9 c' Q+ w7 \6 i' l   end9 B2 H) ^. h) R; A6 x2 k
end
( T4 u' b: w( A3 ?
# F  F2 \4 f" O6 a: c# |! z+ m! c, f
begin P_mA_clean arriving$ `8 M( ]$ p# @2 R1 p" m
   while 1=1 do( K# w* i5 G. O( d
   begin
  g+ B& q1 K( @0 N" G' l   wait for 90 min
  i! j! |; I& `  D   take down R_mA- d! A# N0 m+ @0 S7 X! i7 Y% L
   wait for 5 min
  M. h. U" H. n1 X7 Q# T' e   bring up R_mA
- D+ w: S: ~  l3 {; R$ A3 g) v' s   end: w* l1 Y) ]5 T, u
end

% z5 p/ c, S2 u' n, C
; w" L' \; J; X9 G# X  O/ G* Q; cbegin P_mB_clean arriving
3 m: Q2 b) r% r+ x   while 1=1 do
3 z- t, ?! @4 _0 F1 t   begin+ p3 B. L( `+ |4 }
   wait for 90 min
% C1 A, p0 A4 U' x   take down R_mB* N0 p" u1 H% S8 _8 [3 t! i9 r: L
   wait for 5 min
% T; \; {5 |% N" T/ z+ N4 H   bring up R_mB
+ X  o( N( r/ j9 f8 W; W   end
; ?1 B3 x1 I- s, p4 {! ?3 Oend

% b; D9 N, F8 E% z; Z # N7 O$ q. }# M. a. v. S) ^
begin P_mC_clean arriving
1 i5 _5 Y" c5 f6 C% u   while 1=1 do
0 t9 v' ]3 ?1 n   begin
* `6 w8 D' i$ N  k) ^0 q( F- H   wait for 90 min- x' I% X4 a4 c. _. @5 H* G
   take down R_mC8 ^, [7 i& k& O
   wait for 10 min4 u' q% y. C8 k+ m0 y( n1 S
   bring up R_mC$ H- D; @9 ]# z2 X
   end; z7 d* u3 d& h: s% Z  F2 @  @6 A
end
& P5 F1 L4 b/ B0 S: V) K6 j4 v
----------------------------------------0 t/ C2 v$ n$ ]  I5 N
/ y6 J: B/ D0 N5 @
Exercise 5.9/ a7 O0 X5 N) c0 ?$ R

2 T/ m, i. M% W0 p0 K2 c
# A9 U8 ?& H5 }% A' m! f* O! GCreate a new model to simulate the following system:; B( ?$ [' P; _
Loads are created with an interarrival time that is exponentially
2 f2 h- ^% ]  A" x5 T/ O% zdistributed with a mean of 20 minutes. Loads wait in an infinite-6 Y& K; }+ @" D6 g1 K
capacity queue to be processed by one of three single-capacity,
/ o' C6 @2 r& _( ~- l. farrayed machines. Each machine has its own single-capacity queue * G0 v, ~, n$ i. c! B
where loads are processed. Waiting loads move into one of the three
" G3 }: O( ^  D9 e) zqueues in round-robin order. Each machine has a normally
% ?( z! E; }) ]% x( P* Vdistributed processing time with a mean of 48 minutes and a standard
. ?( q! R8 D" s3 E% Vdeviation of 5 minutes., Z8 e3 B+ i: \! |* U5 C4 y, S
The three machines were purchased at different times and have / Y5 P- s( b! q* i6 Z
different failure rates. The failure and repair times are exponentially
& `* B: }8 ~3 Q: Adistributed with means as shown in the following table:   }* y2 g1 h8 `
Note The solution for this assignment is required to complete ! D) Q6 K9 D! _6 o4 t6 @' b+ p. s4 A& Q; s
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
& u$ e3 {6 j' syour model. : ?0 v# O( x% m
' [) k& B6 [4 q# g* \& {
MachineMean time to failMean time to repair' ?6 e) W, C' i' v2 f% e
A110 minutes      5 minutes" G0 Z; j) r$ k) r1 i
B 170 minutes     10 minutes
: N3 x* B. ?. ^! P  b6 s6 ~% PC230 minutes      10 minutes
6 y3 T( b/ R( {; J$ F
  O- P4 X( }1 \2 P1 e" QThe machines also must be cleaned according to the following
3 a/ f. j( a# D$ Q; _schedule. All times are constant: 9 }+ K+ g  c. ^
' y! S* `; f8 a; Q
MachineTime between cleanings Time to clean% F. |$ H/ I1 x4 j1 z8 _
A90 minutes        5 minutes- S3 {, |9 K# `% d7 G
B 90 minutes       5 minutes
. V# z! a+ d6 W9 n1 _& sC90 minutes        10 minutes. E  e# T$ Y/ `
7 o( K! x0 K1 S3 M  }! B3 \1 [
Place the graphics for the queues and the resources. $ b  o, k) a$ x- K7 ?8 C2 V
Run the simulation for 100 days.( f: Y$ @( A+ x  S+ D  c! `) v
Define all failure and cleaning times using logic (rather than resource
* T, l, l) h! xcycles). Answer the following questions:4 {3 y% y" C+ x) [
a.What was the average number of loads in the waiting queue?0 @2 p3 w9 v+ j) Y8 p  G
b.What were the current and average number of loads in Space?
% k  Z/ n9 ]$ ]5 n: |  ]How do you explain these values? " F' B6 p  }5 ]  |% J- \0 ~2 q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉% W. K8 \; [- L  r, U7 s
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). R) F5 r6 m- d1 Z
这行好像也不太对,各位先进觉得如何呢?- C' H4 V0 }7 a0 `
5 C2 E: o% T! w4 H5 P6 C) S: C% w! \
begin P_something arriving4 X) |6 I2 Z0 k4 g$ B! R
   move into Q_wait+ W1 d* Z" V5 o6 ]( D# g
   move into nextof(Q_mA,Q_mB,Q_mC) , V5 W- H$ @- ^6 R* k
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 c7 l& V" K, r$ j6 m$ Y( g" D   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 X& P$ P2 d+ V1 D" h# g/ ?end/ b8 }6 g" F1 W0 s7 b5 s
; e. r. C1 `) @9 d
begin P_mA_down arriving
$ z, x  v: l4 v. |6 D' z0 \6 n' x! C   wait for e 110 min
' ~9 |- Y% w" x3 t   take down R_mA
' D6 k$ u! F5 X. }! r   wait for e 5 min
8 r& e5 t* ^& y# t   bring up R_mA
# t4 m. q" u  O0 yend+ l) ^  V/ a# m" N, |
, W( `* p8 n% ^4 v
begin P_mB_down arriving
9 t- {6 o9 f) t$ t+ w7 V' @0 `   wait for e 170 min7 v6 N) {& W1 @: H# K! y5 \
   take down R_mB
0 d5 Z+ |8 y* l, u+ t5 c   wait for e 10 min
- O. V: j9 Z0 a1 ~, O3 r! p   bring up R_mB
, t0 u7 v. _0 }# a3 aend/ e. O2 i$ z8 G5 f
; h9 ?6 A  |6 S3 d" |+ A9 c
begin P_mC_down arriving" g' R4 B) B# a' U
   wait for e 230 min% \# G) j3 J2 I. H6 J* w/ ?
   take down R_mC
: w) [0 \( D0 C; |( I8 @   wait for e 10 min8 A* R4 W( ~" c  v, `
   bring up R_mC
/ u  b& M8 G8 g; @' gend  ]1 N& F* K1 |. r3 i( K

( y. t$ b6 A1 P9 h7 r' Kbegin P_mA_clean arriving
3 o6 _9 ~4 R% l   wait for 90 min
# W+ u# S+ A9 s9 }& s   take down R_mA8 y# c9 }9 }$ B
   wait for 5 min0 I, G. ]# }: m! O- n1 ^# R
   bring up R_mA& D! G  }- a5 s' k: L
end
' e0 O9 w! D- T/ e& `& s# T6 T/ ]# |" p: C, D
begin P_mB_clean arriving
3 e& `- b" U! `% Q8 Q" L   wait for 90 min; l9 R/ |$ |- U. Z. p
   take down R_mB
; U  C' E- b) f8 O   wait for 5 min
3 `5 c6 @% p% K; a% W( t7 C: {   bring up R_mB
4 K) s* W( A: h  }8 [, Mend5 E2 i9 g" ~: f: E+ f& d
- t3 v2 _" a1 P0 W6 g
begin P_mC_clean arriving
. {: g  q+ ]: B) I2 t& }# d   wait for 90 min
% \' {* }# W4 F# ~   take down R_mC/ i/ s: g& D* e% L1 S+ R
   wait for 10 min
1 P5 m/ ]6 X& Y, D6 r   bring up R_mC
9 I* Z& L5 U/ z" C$ f) y! O% ~end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving- ~' F; c0 t" p" H1 S  P2 E
   move into Q_wait5 |& }6 X# i4 K7 T
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; k5 A+ S$ W' G5 g; w   move into A_w( _. d# w' T) `# S) M
   if A_w=Q_m1 then use R_m1 for u 48,5 min  X) i4 i. D. c! l
   else if .....then use ....for u 48,5 min) |- `( M- a6 i7 M7 _% q" _0 u: r# J
   else if .....then use ....for u 48,5 min  6 Y1 y1 F% M8 l+ y  H1 s
   send to die: C/ x8 h5 E2 W6 W4 T+ Y
end
$ h) y  i6 c( ?7 |) Q0 V; I+ \8 N& L7 G* i& o, P0 y, M
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 14:05 , Processed in 0.016791 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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