设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7148|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
; _+ g3 Y0 V7 X& G- r4 R" z$ `  k6 A7 y8 ~5 _: T9 ~
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去, K& n' Y3 R0 f! P
- B" S5 s! x) [! L1 d4 J
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 }/ {0 }1 B% S  f" n2 J3 S: Y& }

8 b4 H( n. y* x4 J( p9 ^0 |  r
--------------------------------------------
: v7 n: T* i: T$ i8 Ebegin P_something arriving
% B0 M+ L, H; S- ~1 k3 [8 Y   move into Q_wait
- |; S  R) \+ b+ w6 C: ]; a- O   move into nextof(Q_mA,Q_mB,Q_mC)
6 G8 L8 S) T4 |. Y1 D: T9 x& K   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
; o) {! r- c, |/ P$ A0 X   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ h/ s- p: T, ?: D# q+ J   send to die% ]( v4 i7 {- a( Q+ p1 }$ C9 t. U/ a
end

' ^2 q6 K" V+ ~: l   C6 t: n' P6 D0 M* }' {
begin P_mA_down arriving
+ o! g8 X, f% e0 S# G# l2 ~# `   while 1=1 do
8 _7 c! a# W% `9 V/ e7 \* B: Q2 A   begin8 g  D* O; F0 s! C
   wait for e 110 min7 N- W+ Y7 }0 ]0 P. Q" y( H. T8 l- i
   take down R_mA, T4 }) [) A1 ?3 A, W; o* I: O
   wait for e 5 min$ h7 i+ X9 k2 ]" W" s3 y
   bring up R_mA
( i5 w, f! n5 v' @9 V9 D) E   end6 ]! G# Z* F5 v5 Y; z
end

) U- O$ v# z- ~$ `  k$ a! p 9 z/ {) b  _3 }' o! y9 d
begin P_mB_down arriving
4 S" j, k( t. C) {/ B' v% B6 Z   while 1=1 do
8 g) M( G# l& @& k/ ^$ i   begin( S' Z1 L% Y2 m$ `' p. X
   wait for e 170 min
9 K- \7 A* m9 {   take down R_mB. X# \) e, e/ K$ b, _& s7 f
   wait for e 10 min0 }( J1 E8 B% \; e+ A) N4 E
   bring up R_mB
1 h# M/ O  r/ P   end$ N2 H2 v9 M6 t0 Q( o" `- ^% ]
end
$ T8 R, f: S1 Y7 v

" d2 Z8 B- E& a0 n4 vbegin P_mC_down arriving$ f, Q# H/ A6 O2 [( \( {
   while 1=1 do 4 s+ T) @. b( t9 [3 c4 {
   begin
2 e% q8 @( s2 H" ?: Y- q4 H   wait for e 230 min& j2 o8 K  N/ [
   take down R_mC
; p% C6 Q) [5 J   wait for e 10 min. V+ q* T& E! r: `
   bring up R_mC
! y) E, ^1 N# Y% ]   end
5 ?$ ~- P: x" x8 |0 Q) Dend

( Q0 @  m: o! _ ' w# @& v8 s( j" b
begin P_mA_clean arriving
! l  M) A" `: E" A" A5 \$ k   while 1=1 do
' x% f( b. r1 h/ D4 Z+ k   begin2 ]) Q( y5 S( [! {0 L' v* H
   wait for 90 min
& t; A& K. T' b% ^: p   take down R_mA5 O7 p+ A9 X, d% A" c
   wait for 5 min
6 v% b8 L& v' ^. e8 z   bring up R_mA8 s, |- w* `, o/ a! U
   end
6 i! u: N/ L* @6 i: t+ kend
8 i- }( s: |4 W$ D

# b6 X8 r+ J% |% j8 ybegin P_mB_clean arriving/ M0 k; \7 F& P, M" {! }7 {  R
   while 1=1 do
( B) e& j+ t2 Q! I$ T' {! H" B* Z   begin
& o8 C# K$ |- n4 X   wait for 90 min3 ]# V4 E( ^' S/ k+ {0 {- A
   take down R_mB
5 j& D6 E1 P5 Y/ s) E  R4 B& v% p   wait for 5 min
  o4 ?% q- S  h9 g   bring up R_mB6 }, z  I3 n8 N4 ^
   end
  l# o; V- d* V4 cend
" z; p' H9 a5 t$ b. f% z

. e8 I3 w# _) X" Mbegin P_mC_clean arriving9 X: I% l+ h$ g, W, Q
   while 1=1 do
3 `$ \& N. t$ v$ R7 X$ w& g/ \# m   begin
+ o! v( \% `9 _% ?$ S3 B' E$ e1 ~   wait for 90 min
" N8 Z' j4 T* I) I) Z9 P! \   take down R_mC
6 e+ z0 |; c" g% P" [2 c. a   wait for 10 min+ I! ~& e0 ~) D8 `$ q
   bring up R_mC2 Q" Q/ i9 w6 o# s7 k9 t
   end/ g$ f) L* O* h
end

0 R9 \5 ~$ S0 Q2 l7 w$ L$ c----------------------------------------
. _$ L4 I% ]8 p5 g0 Z/ ^ 8 v+ r) E9 \, Y6 l8 t
Exercise 5.9
& I! R- g- m( {0 g" z4 n: i# l( K  B9 [0 a
3 P9 _$ J3 s# K
Create a new model to simulate the following system:7 I* |3 @. Q  F7 J: L! c2 Y9 z
Loads are created with an interarrival time that is exponentially
& V5 b) \3 q# O3 ?% ddistributed with a mean of 20 minutes. Loads wait in an infinite-
- N1 G% n2 M; `7 f- s2 y/ Qcapacity queue to be processed by one of three single-capacity,
4 N$ g0 C5 o( D8 c/ A. u: {arrayed machines. Each machine has its own single-capacity queue 5 J, o8 l) C# J& O4 y
where loads are processed. Waiting loads move into one of the three
" ~  d. J. j, b0 L- g  D& Aqueues in round-robin order. Each machine has a normally
0 K9 E# D, H- L5 Q1 I( q( |distributed processing time with a mean of 48 minutes and a standard 8 Q: y: d: t' \9 W5 w- r" v
deviation of 5 minutes.
/ h7 k0 e% G3 ~% ^# Z9 P9 EThe three machines were purchased at different times and have
; O9 E* f7 _) b4 W. }' v6 z; Odifferent failure rates. The failure and repair times are exponentially + E; X1 @8 H* ~- p& J1 O, b
distributed with means as shown in the following table: 0 a- [( v- g; ~1 t8 @
Note The solution for this assignment is required to complete
' G4 P: X% O" a+ J& z& v' A6 pexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ; m( t% @) L  ^2 {
your model. ! O; @2 ?/ @5 o1 t8 \
6 `/ N* C% V6 q6 W/ f4 a
MachineMean time to failMean time to repair# _$ b7 D4 T4 o  [
A110 minutes      5 minutes' Y5 A# r. L, U# X6 ~0 @8 }
B 170 minutes     10 minutes
: Q" G/ i/ I, V( P# lC230 minutes      10 minutes
' l4 p4 q! Y4 ?  a
; G9 W+ o* \- H* D$ e1 F# G. ZThe machines also must be cleaned according to the following
) N8 c2 M4 i7 u; O+ sschedule. All times are constant:
/ _! f4 q. x; ~+ D( a9 t- A. g2 Q1 }- |0 [4 C. V# U
MachineTime between cleanings Time to clean
3 p) h6 g% P. x/ S# B4 |A90 minutes        5 minutes
" p9 k1 `% Q# o! j3 M8 u3 KB 90 minutes       5 minutes1 g- Z; o/ Y1 a/ @% J8 p, ~* |3 J
C90 minutes        10 minutes
1 `8 c5 `7 P- ^6 v% H" {- z2 `% }) g7 P5 H: S5 r! f
Place the graphics for the queues and the resources. 1 k( N$ w. X4 \8 r( {
Run the simulation for 100 days.2 `- Y8 I2 c9 c1 g! P3 J; c. o; @: d
Define all failure and cleaning times using logic (rather than resource . J' q; X" _' E! h8 }; `: N
cycles). Answer the following questions:* S/ n; N9 h0 G2 J6 T( U: Z8 ^0 r
a.What was the average number of loads in the waiting queue?
2 `% F6 R# x: U5 y9 Kb.What were the current and average number of loads in Space?
- N; E2 P. r/ g( ]- y, GHow do you explain these values?
* Z9 C: g1 {, n* L+ K

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉8 S3 c, y: H6 h! ~0 i
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)8 P6 v% ~# H: Y
这行好像也不太对,各位先进觉得如何呢?
" ]' e# `0 H$ Z( h6 \# }( N/ Q4 r- T( v$ F& B1 n
begin P_something arriving
. R5 i4 T) R: y! J  u+ o% |   move into Q_wait) |; X7 `3 L, R7 r
   move into nextof(Q_mA,Q_mB,Q_mC) 4 K# L" J7 O" @) G& g4 j7 i
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
/ J3 K, D! b5 F/ l" _# B   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 5 y) _7 k  h) i( ~& F. S
end
+ j, i! m$ p) @! j9 r; G& f* ~5 ~, W) p, ~* {+ Q" u5 X
begin P_mA_down arriving
9 S5 I, W; X1 @; w7 d   wait for e 110 min0 R' g8 A2 {# T5 b9 ~7 p
   take down R_mA' u9 \5 \6 L! I
   wait for e 5 min, ]$ M3 z6 ]# I) d$ ]3 v+ ]
   bring up R_mA6 e5 h1 ]8 a) D4 A) A
end/ U. }3 _% H9 e6 Q
% L, k2 _# V9 `! m6 m  L
begin P_mB_down arriving
# b% J5 `5 |6 ^4 a* S   wait for e 170 min
. r0 G( n! g  Z/ p   take down R_mB
, e, ~# G! [% N8 t1 `% |! G   wait for e 10 min
, q) B7 m+ Z- b+ |/ Z  Q9 B4 o   bring up R_mB
: h/ f: j' y: B8 ~. U8 b& l3 Cend0 A2 t" R& Y& \2 f/ I

2 J3 Z+ u" `) f9 m1 A# w; `begin P_mC_down arriving
; T9 t/ y" ?& e4 r/ I2 O0 ?6 c   wait for e 230 min
' U. p" F0 L' G  K) n- K   take down R_mC& a- ~+ P$ V3 O$ Y, |) i3 `
   wait for e 10 min
" }# Z( M$ y4 b% Z7 ^0 j   bring up R_mC
9 ?0 k% `. i. c/ p% z+ E) w  u- Hend
- n% m! E( }- r! ]
3 }% J. U" G7 o+ j0 t7 \begin P_mA_clean arriving) g5 u0 h# x/ `5 \* j& r
   wait for 90 min  [( F( w: P9 ]9 ~+ g
   take down R_mA, U. h! \0 q0 m/ n9 w0 C
   wait for 5 min
9 I' f7 z% F' Q: i9 L8 `. X   bring up R_mA' T+ B9 C( h5 a  P0 ?. L# N/ G; V
end
8 M) ]1 @) z) B% W( H
; f( d. _7 p, c: d/ s1 H0 w4 vbegin P_mB_clean arriving
. C6 ^7 U9 X7 S# N% y& M   wait for 90 min
5 k* D! K) j' p: N) ], J! l   take down R_mB
- Z# A# `7 `3 Q8 C, C0 F  k   wait for 5 min
# w/ W7 \) c& f, o' S7 P& s( K   bring up R_mB
8 u9 x4 B0 d6 aend
7 O5 O. l& K' k8 w& A( F
, \+ x- ?1 d# Mbegin P_mC_clean arriving- g9 o% P4 E" U) M0 X
   wait for 90 min
0 u+ b2 |% s7 v" U) F   take down R_mC
8 V& q* D( x* E' }   wait for 10 min
# Q% p& y1 s0 o1 F! Z   bring up R_mC# ?* B& S5 T, Y* `3 {  J
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% z% ^7 N* R7 m: n1 `& z
   move into Q_wait- [- {. w; ?0 k0 C9 ]
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
& V( y, s8 d% S( e   move into A_w
1 T9 _3 `0 i+ @   if A_w=Q_m1 then use R_m1 for u 48,5 min
: H3 S$ T8 S4 I! N. s; {9 s: z! N   else if .....then use ....for u 48,5 min6 }% w+ P. d9 x/ B* Q
   else if .....then use ....for u 48,5 min  . I2 a; i& ~! r  ~& ^6 `- E" \% s1 K
   send to die  p- M7 x* H: U4 F
end
( _0 S; V6 D- B% V" _+ F* H) J3 o
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-8 14:15 , Processed in 0.021000 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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