设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7333|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ a( X! i5 P0 Q8 {  C1 O
4 l3 s: E" v4 w1 E  R底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
3 D, J* _0 A" n/ c5 l7 f$ O* b$ q3 f1 A1 ?0 Q2 x, W
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!7 R( w7 g* \+ M

' f7 q! [8 e+ b2 ?; |+ e  k$ Y
--------------------------------------------
3 S' H; a  I6 w$ o7 j8 Gbegin P_something arriving2 u" U4 p: F+ Z  v$ h, s
   move into Q_wait
% ]0 L+ t! o* q) G   move into nextof(Q_mA,Q_mB,Q_mC)" Z/ R6 I; B4 D) s
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
' Z- r" l8 a8 V6 Q' t) P   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ p4 x: Q* B$ D" ^* v   send to die( s  J. \, T9 t" Y% z5 g8 X% Z! r
end

0 o+ N6 x+ z5 `/ k7 [ ! v6 {7 {4 V1 B: I9 ~  Y3 v
begin P_mA_down arriving
) u6 x5 {! d# U- O, ~1 H. o   while 1=1 do - O& h, c+ h: V; c+ K; y7 k
   begin
" V" N. \7 S" `, X: _' f   wait for e 110 min& T; T  s9 H' ]: B) }' R
   take down R_mA
, y5 e* D5 E' D3 T   wait for e 5 min
* G9 G' h, J/ M" n# r: i* e   bring up R_mA
1 R0 R9 Q4 M9 o; @   end4 D9 ]: ^8 `4 X! H) N6 s
end

& z7 ?! c1 \$ s
4 e' g% I- m+ X. }begin P_mB_down arriving: g* ]6 h- s  k' G
   while 1=1 do
: D! j1 j/ p$ F9 P* b5 x9 b   begin* b. t! D6 z) b( ?- K, s
   wait for e 170 min
0 o4 C2 v7 p3 y9 x   take down R_mB
% h4 p8 N: J/ `" s6 Y   wait for e 10 min+ n9 ?# a5 ^1 Y/ s7 l
   bring up R_mB
2 H' z4 O7 g/ l: y) v0 Z# j0 q9 h$ C   end
1 X* P, F, \6 T' P" dend

* W" K8 p# N* \7 d+ @' t+ S$ e# r0 p0 \2 {
7 q2 {* m; A" X6 |" w/ u$ }begin P_mC_down arriving
' A3 P8 R4 x+ c8 k: c  l   while 1=1 do
' ~6 R" D8 D- _! v: T   begin
( G- i/ M/ e: ~' D' E2 F   wait for e 230 min
7 a5 U9 _, _1 v# l3 K0 W$ O; q- c   take down R_mC
9 B9 Q) S" _' l1 N- x   wait for e 10 min% w; w; T0 s( A# V7 x# Z0 z
   bring up R_mC1 e' Z& q' n  l* ^7 n: L
   end5 w' Z/ b% k% w: ?: h
end
$ J: w& x8 _: A9 E- K; C/ K
$ @: C! O, G5 Z
begin P_mA_clean arriving
9 n  |6 P/ z# L4 H   while 1=1 do
) ~( j" u' C8 y2 ?: i   begin
9 b: ^3 }. N2 s* P$ y! x   wait for 90 min
2 X7 v% T# R  ~! @   take down R_mA
4 K8 y1 k" h! ~# C   wait for 5 min
! E3 t' V# }$ v# S" {8 k6 v' U   bring up R_mA
4 D8 v1 p) ^+ _# ]7 L) p9 K$ y   end9 B8 G7 c! M' n5 [# V0 d1 R
end

( k: I, ^$ \+ _# K' _& z  H
! H* N7 t4 m+ Z% E0 mbegin P_mB_clean arriving6 |7 `2 E# P# [& v
   while 1=1 do
5 @$ c- X, d5 c4 S$ U7 D: Y, A( s   begin. n# x! `% {  S" \
   wait for 90 min' {5 z* s! A* I) N) Y+ ]6 V
   take down R_mB$ G: m" K2 s8 E& t/ E
   wait for 5 min
9 A( O2 H6 |( n5 d# f5 b1 O& m5 H6 x   bring up R_mB" J+ b% U; H; O1 N3 w7 f( Q
   end
0 _/ w3 J3 k# a- C8 L7 k) Fend
& S& t: |' u: J) ~3 M8 z
2 S5 f9 o& `+ U  r' f
begin P_mC_clean arriving
" I; r3 E7 ]( s5 @   while 1=1 do
5 Y( L/ m8 s1 S9 S1 C   begin
2 Y% @% `' I8 ]   wait for 90 min
' @4 D$ g6 M6 A   take down R_mC& o7 F. L7 R" O8 j
   wait for 10 min
! B+ c( q5 s# W/ p" [" c- X& p: d   bring up R_mC
# L% ?) [9 U+ V0 c3 [. S4 G   end. k4 @; Z, n. @
end
* ]1 Q4 h! m) w% u- \
----------------------------------------
2 Q5 I2 o7 g: r 4 d( M+ w2 L1 l% _
Exercise 5.9
* x- J% p9 x) S9 q  k# D1 s$ m4 ]) c; e# W. o' X! E

, i6 F9 W. p2 ]. MCreate a new model to simulate the following system:) c3 V1 o3 f) H  f2 w, Z6 T
Loads are created with an interarrival time that is exponentially
! P* ~" y" e& V3 f9 i2 N; k  C& G0 o6 Pdistributed with a mean of 20 minutes. Loads wait in an infinite-# {9 O* Z) ^/ S/ t. \. J
capacity queue to be processed by one of three single-capacity,
1 n; z& P, K$ T9 \$ Tarrayed machines. Each machine has its own single-capacity queue
8 P& p# r! Q& j  Z2 ?5 U4 g: ^; G8 pwhere loads are processed. Waiting loads move into one of the three 3 j) l' N1 n5 ]7 M* o; y) b
queues in round-robin order. Each machine has a normally 6 R6 _; t; U9 i, e5 i! a
distributed processing time with a mean of 48 minutes and a standard ! p. b0 m+ S3 ?; y4 m
deviation of 5 minutes.9 d9 y$ \) d7 m: p4 F7 Y( m
The three machines were purchased at different times and have
; e, i9 A7 b, t/ T5 e: }/ Ddifferent failure rates. The failure and repair times are exponentially
2 L+ T8 E9 ]6 ddistributed with means as shown in the following table:
  q2 r) |7 p8 \Note The solution for this assignment is required to complete
9 k8 g* p# C" I$ |exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
4 a: @1 H0 g  P& b- C. X( z# l0 o) wyour model.
" n8 J8 o1 B; K: z8 d0 b1 \# k8 V# F7 v" {9 Y7 P
MachineMean time to failMean time to repair
/ @$ Z0 }3 ?$ ?4 NA110 minutes      5 minutes
! Y4 n4 S6 t9 XB 170 minutes     10 minutes
# S& S8 y5 |1 G- J, D, Z! L  ~' yC230 minutes      10 minutes
4 M5 ]* [" O" d
5 F( t1 a) O) d$ K! c; J8 |The machines also must be cleaned according to the following
* I, _$ }$ c+ v; L' Ischedule. All times are constant: , G( q' c# W8 X) v3 ]( c1 z

7 f* _. m( `3 j) q, d8 u, eMachineTime between cleanings Time to clean; D+ D+ [# m4 {( T" G
A90 minutes        5 minutes; ^2 g- _2 v( D% Y3 g( ^
B 90 minutes       5 minutes
0 V+ A: X. m# O2 y5 f1 ~0 E, G; }C90 minutes        10 minutes/ w- P2 b: X' ^0 v
+ C" u# ?8 }  e" w1 ~
Place the graphics for the queues and the resources.
& C  q2 Q0 h9 ^1 Z% ?Run the simulation for 100 days.9 q% }& f% R9 s' _. Q
Define all failure and cleaning times using logic (rather than resource
" H2 V! c: _4 ~/ p# Q) gcycles). Answer the following questions:
8 A5 U5 Q% Y; ~1 Y5 |# i6 Ta.What was the average number of loads in the waiting queue?
7 {$ X/ {4 m4 t2 g& C# Gb.What were the current and average number of loads in Space? & V* d4 f2 k2 s, N' ]
How do you explain these values?
" d9 a0 I# C/ c- }" _

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉6 L! E$ g$ M) w. ]' J
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 d2 p- U7 `% h3 R# T, `这行好像也不太对,各位先进觉得如何呢?) B+ |" t. W* O' h0 E& v+ h

) S  ]1 d! C: F  b# _' {begin P_something arriving3 M3 {9 p7 K$ m+ w. o3 P/ Q
   move into Q_wait
* O$ i) U/ v8 r  w! M8 r   move into nextof(Q_mA,Q_mB,Q_mC)
% b( j. Q* N4 n- j' P   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 a7 U# T2 i4 [6 u# W. G# M
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ |  ^. u" A: Q' D  B8 Q% Q6 J: x7 aend
) R) ?& d" \: Y3 D3 k$ \. C$ F% S* \  ^# W
begin P_mA_down arriving2 J. k  t2 ]6 @# P
   wait for e 110 min% K. r# J6 k* }0 z
   take down R_mA
1 G7 S8 Z* B9 j; E# Y( w   wait for e 5 min% W2 t; h$ D& z2 E  R
   bring up R_mA% x% b, n+ l9 W
end
6 @9 e; L5 n! _7 W2 r! ]* T/ w# x2 S8 U3 I# q' R
begin P_mB_down arriving5 j! Z2 M+ ~5 v$ J# x+ X$ i+ j8 T( S
   wait for e 170 min
) ]0 H, J- ~$ a   take down R_mB, X' e4 o6 p+ R$ V/ w
   wait for e 10 min
5 Q. N# r. N2 U! e: o   bring up R_mB
3 D/ p% M* y+ B" t! \7 {( b# aend1 g) j5 C4 K$ `3 |

* ~( }0 c; f$ j/ ]. G, Q8 S$ \; obegin P_mC_down arriving
" ^" Y) v& m2 |9 e   wait for e 230 min$ l! X& j8 W" z0 \9 e
   take down R_mC
/ {6 V. r5 r! B# \   wait for e 10 min& h' k8 k) O' x+ A3 p0 ]- S; O1 G
   bring up R_mC
: t! M3 S% g: J- a& ]3 N- J& xend
; ^' C# s4 h( [6 b4 ^* n
' ~. _. N6 c# g0 v; X4 zbegin P_mA_clean arriving
( `( A- v* U- p. g$ F   wait for 90 min
4 T6 D  f' @2 f" \   take down R_mA% i8 b* ^, @! l
   wait for 5 min
  c% ]3 {, |( }) i   bring up R_mA
/ F$ D6 m* t8 ?/ v( {end  I  N. P' @9 s& g+ B1 x
* d, R# e' J) N
begin P_mB_clean arriving0 `4 P1 C5 \9 C, X9 B9 D
   wait for 90 min
0 W9 D0 {  E% K% q% A3 l   take down R_mB
9 u" z6 _* D1 n4 U# J   wait for 5 min4 s  x. R8 l  L" @
   bring up R_mB
  a8 c9 E$ c0 w2 Z' o0 k- ]end
% y1 G; A. P+ ~3 p5 [& K. j5 F& v1 p$ R1 x- F
begin P_mC_clean arriving
9 i& }/ i2 }) ]- v   wait for 90 min
+ R% v, b) l8 {7 j# P( d0 G0 y   take down R_mC% t0 K, ]! c. x0 \5 O0 H) u
   wait for 10 min
) M5 o- [, h- F. S$ C; H9 i   bring up R_mC
8 ?# A! ~) B- o( D! d6 nend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
& j9 y. d0 \' |# f, O   move into Q_wait
. g1 s! K& D; b0 e1 _   set A_q to nextof(Q_m1,Q_m2,Q_m3); `% Z& j& J# Z1 K/ r  m
   move into A_w' t4 D, z5 _2 K- e% G# b3 H) z
   if A_w=Q_m1 then use R_m1 for u 48,5 min
, D% Z5 M7 h1 P2 U/ W: G" n   else if .....then use ....for u 48,5 min
% y; x6 A9 `6 m   else if .....then use ....for u 48,5 min  
+ u1 {4 C$ \4 C: O/ F  z! ~   send to die
- [9 q0 d, e" @1 g# [0 g+ b$ J- Eend3 J7 n0 T, c! D0 ]6 K, t) N

: `: |" l  q4 ~/ u' O  m% ]# Q  A供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 20:51 , Processed in 0.018718 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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