设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8419|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 5 F# L) I" w. x- q; }- V

( Y3 e( m0 Q9 |  ]+ o7 J/ q8 g4 C' f  [( r底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去) ~  j/ e) d" r. q0 _* \
+ B! ?" }9 n7 X+ l; z" \6 q9 X5 z( v2 L
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 v, e, Z2 J5 K" ?& T
# h4 C4 u' i& {' M
--------------------------------------------4 R# @6 ]: r' o/ Q. m6 J
begin P_something arriving/ k7 P- z6 l! I% S) [
   move into Q_wait
6 G) ^0 L/ U4 t' S- B8 ^1 T   move into nextof(Q_mA,Q_mB,Q_mC)
4 z$ Q; K0 ]4 p/ x   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
4 S: Q  F, o! A  }; @/ I8 I+ v   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 O( b) Q) ?/ c# ?5 f  F% i
   send to die+ h$ r/ ~/ W+ R  R7 I1 k8 E+ D5 T
end
+ S' D/ M4 ^1 V( d
8 B' a' }. [4 J8 w( V
begin P_mA_down arriving$ h6 }- x- u- Z8 c" |+ s6 E
   while 1=1 do
# k- y- @$ e6 R3 L   begin
; @( [. G" M5 D! p$ s   wait for e 110 min/ v8 Q! C! [0 v2 r& r
   take down R_mA
. j0 \7 e: q" E   wait for e 5 min4 c/ X* R2 P0 t2 G9 Z2 l7 G/ J
   bring up R_mA) p; @' d$ p& P8 [/ {
   end& |0 V, ]) \+ L, m) i# Z1 M) ]
end
0 s1 j: g+ [; I: A/ r- M# y
" D) I/ q- m* P" g* _; l# x
begin P_mB_down arriving- z: D, \. W: a3 z8 O
   while 1=1 do% x* ~1 k: |! i9 e9 y& S
   begin* x9 _" q  r8 o" |- w( P; E
   wait for e 170 min  e* M8 c, S: U2 c& ^. @
   take down R_mB
9 n4 V, K4 t8 u   wait for e 10 min# n1 U1 }4 S; _$ U0 E
   bring up R_mB: f* o  V; v8 d4 z4 g3 Z
   end
- E! j' G! ]( N( U8 T, Aend
8 R3 x& n/ k' Z. C% F( D
" ]7 \% ^, K4 C5 {2 A
begin P_mC_down arriving
+ x9 w7 S0 g" r; N   while 1=1 do
8 W6 N; f% a( c4 c5 W" r* l4 _: K  Q   begin4 j# D% B4 N8 h4 x2 C- j' _
   wait for e 230 min
  K0 O6 `' m, h. u* w2 s# f" M% Y   take down R_mC, a9 |) e& R" m
   wait for e 10 min
" \- o9 {! w( [+ @& {   bring up R_mC
# P; i" T0 w3 F- p$ |# o3 Q   end
2 x# f8 v1 S* R, x/ q8 Y! |" {end

' j+ B6 X+ [2 e/ V, H
* l% U# ~6 t. l  I( hbegin P_mA_clean arriving
/ w: _; A9 Q4 D5 k& L8 @   while 1=1 do+ y# A* v: @% ^
   begin
3 n; N% V- W  ^/ R5 T- o5 X   wait for 90 min
7 G' B* v* }) u   take down R_mA
+ }& d3 l7 J0 N. v0 p' m. c2 c) Y! y   wait for 5 min
$ G: r1 h" |- O. r5 v6 C8 T   bring up R_mA5 Q8 K# U- X7 D/ ?
   end" o9 L/ O7 }0 d, k9 Z
end

$ |3 `  [/ n% A* X  N! c2 g, V 0 O5 l$ k/ n" e
begin P_mB_clean arriving
/ k. J( a6 t9 ?# w   while 1=1 do. p% o' g4 ?5 |, t
   begin
1 p! D$ ~* P/ l! L& R   wait for 90 min
8 K: K' O6 k9 A( ^   take down R_mB
' o7 G: a# R) g' h9 ]% r   wait for 5 min
. X' i3 \& E1 i' i# ~( i: \2 Z   bring up R_mB' ]  k6 j0 v. l: v* @, |5 l
   end
$ c8 f* n" @% }9 \& a+ l0 Y. ?1 \# bend

: i  {; [) `0 |5 q : }# a% B  X/ ?2 _: F( L  ]$ c
begin P_mC_clean arriving
  @# @! f9 Q% |& t2 m   while 1=1 do
" x/ ?5 d& x/ r, J9 |   begin8 K" \! @" E3 M/ E
   wait for 90 min' t3 \7 r6 X: {1 ?
   take down R_mC! X5 J, R. i9 c
   wait for 10 min2 p3 I+ \6 S) P& V& m  ^9 f1 |
   bring up R_mC
4 L: \& q9 O/ O, P, T   end
- C( H. m5 Y0 Z: \) Rend

* {1 e5 H% t- r& A* h) [----------------------------------------  V* s0 ~$ \( D3 |9 Z* T7 g4 `
( U- H* w( S5 A8 t8 L: b
Exercise 5.92 j& s# Q# V4 B+ e

% V/ i9 ?: Z: k2 o$ r2 n# E; P; W! @
Create a new model to simulate the following system:% h/ g0 t  V# x
Loads are created with an interarrival time that is exponentially
1 R' r( f7 F# f, ^- Odistributed with a mean of 20 minutes. Loads wait in an infinite-; A/ g$ Z' J7 A* a/ x! S
capacity queue to be processed by one of three single-capacity,
: b: x- q( y  q( ?+ tarrayed machines. Each machine has its own single-capacity queue 1 D7 I7 e7 s7 \& g
where loads are processed. Waiting loads move into one of the three
8 H: z$ S# |1 J. equeues in round-robin order. Each machine has a normally
3 V) i/ ~3 W4 x+ h; K3 qdistributed processing time with a mean of 48 minutes and a standard
0 s5 ~6 V3 d5 n/ u! J5 |4 ddeviation of 5 minutes.7 j+ E% h" D7 I1 r5 Y. K' u
The three machines were purchased at different times and have 0 T6 _5 z1 q9 m  G7 {9 E! `4 t6 D
different failure rates. The failure and repair times are exponentially $ j+ a! J& A8 f0 {# J
distributed with means as shown in the following table: / q6 a' r1 ^5 V% v
Note The solution for this assignment is required to complete
! |0 t1 d! w# ]7 [8 Hexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 C, N5 K% P/ A# Yyour model.
( |1 ^- P+ s+ D
2 d1 J. r3 ^2 o& H1 i! FMachineMean time to failMean time to repair4 G8 h6 Z) w$ a$ k7 d: z; j
A110 minutes      5 minutes
; Y9 q2 G" B5 E# Y& VB 170 minutes     10 minutes; Y1 x* F- }, E% n
C230 minutes      10 minutes# v3 y/ D! v5 C! O: p* `

: u7 X/ Y' h, i# I: RThe machines also must be cleaned according to the following 7 }2 e1 g/ f# v1 o8 r7 @
schedule. All times are constant:
" {! G* W' t7 \' O$ F4 e4 D
, }' }: t; b9 O7 a" A7 T  zMachineTime between cleanings Time to clean: }( Y5 `/ ^/ g  {
A90 minutes        5 minutes
! {. M( z+ M2 l% \/ k2 }  t  H( k6 DB 90 minutes       5 minutes- J1 u& S* Y0 b
C90 minutes        10 minutes
% S5 L) g9 V4 W# G! j  g9 u  S! b4 m
Place the graphics for the queues and the resources. 3 o& X4 f5 J7 X) a
Run the simulation for 100 days.
" |3 o& q9 S5 s7 `Define all failure and cleaning times using logic (rather than resource ( v4 y/ s( K) T+ V4 u
cycles). Answer the following questions:3 S7 \0 J3 L$ Y* |
a.What was the average number of loads in the waiting queue?8 @3 D, z" ^  v# h; q
b.What were the current and average number of loads in Space?
& y# H  K% ^# M6 |7 v- BHow do you explain these values?
+ P/ B% M* m5 ]" E% A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
3 r! \) r9 @) g- C" J' g) i: ysend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# p- n2 B  A3 `: ], k; i9 |. y这行好像也不太对,各位先进觉得如何呢?
- j# z6 ]7 P: _# V( x% v: L, K: ~. v$ p1 B- _! T
begin P_something arriving
" M1 M& X2 D& \   move into Q_wait
* J& E7 t; Z. m5 e   move into nextof(Q_mA,Q_mB,Q_mC) 7 z" B5 @4 C! D  l1 m  }
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
* ^+ [0 X7 R6 x/ J& K   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; {' D) [2 m/ S( r6 u0 dend) Y! F( T3 \/ j
" y% v, f. G1 L. x& K. n+ t
begin P_mA_down arriving
, V5 ~& ~9 I5 c) P   wait for e 110 min2 Z, [! q$ j5 t) u
   take down R_mA
5 Z" I- I& L0 a( n- H# ?$ o9 y. C   wait for e 5 min
& M1 _$ _9 `, o4 v8 P   bring up R_mA
3 f9 F1 p: h( Y' a# s; ]# y0 s" ?end
1 z! W- ~1 n/ ]& B: l! G6 b4 Q! s" y& {
begin P_mB_down arriving
, c/ [& Z, d0 n' X8 b# y   wait for e 170 min& a2 J# k" N+ c) U% ?
   take down R_mB- q3 ]( Y1 v8 ~5 l7 t4 B& V
   wait for e 10 min. T: }' A. r" S) A' ]) ~. S) T
   bring up R_mB
6 u9 G% Q: f, q1 _4 F2 H0 i2 V# P% Iend" J! I5 `' L( d
7 I4 l& h6 U! X% q, T) i
begin P_mC_down arriving- o3 m1 O" \6 x" V. t# a  {
   wait for e 230 min3 n! f7 F8 }$ r  X
   take down R_mC
/ _7 B% j: P9 d, L' e/ ~   wait for e 10 min" Q0 o  t) A; e2 d/ T% e& r; B
   bring up R_mC
. G7 s+ B2 t' P& y5 }! O# Jend% u; K* H: X# k! c! J# s  c

# J! ]+ J( v4 L0 {. w) G3 u" wbegin P_mA_clean arriving4 a1 ^3 y3 c: p& a# Y( m! c
   wait for 90 min: |+ F6 q! g) m7 T+ ^3 W
   take down R_mA
. y( Y0 [0 b7 l9 a% T) d   wait for 5 min6 B  P1 d6 n, `; S9 q
   bring up R_mA
# z: l+ u) J( M) z/ o9 S/ _end+ S' \% y6 l4 R2 l9 ~1 r" F) L9 _
: i$ o9 C: [) B: Y: j* R  K
begin P_mB_clean arriving4 E8 G- ^. J8 S* [) s7 w
   wait for 90 min
, o6 v* \/ f" y1 M' G   take down R_mB
3 \: [, `2 D2 I  q   wait for 5 min5 z: t! X9 ]. K8 D. l2 G  O$ @
   bring up R_mB
/ m0 z9 u# _2 z# W5 e. M( ~; Vend9 O6 A3 ?6 t3 o
7 ]3 |2 d5 w' C8 b- z
begin P_mC_clean arriving9 v- |" R& A) o* z% G7 V' y
   wait for 90 min
/ E- ?& o6 [$ p' e4 m! `   take down R_mC  T7 x* v0 c2 U% p' P- o. H) v
   wait for 10 min
+ H5 ~6 p2 `' C. K/ X; t   bring up R_mC
1 _2 M/ [+ d$ b6 t% zend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving- H" p- s' w7 C& g0 G6 P8 q
   move into Q_wait$ g4 o5 ~5 d' r3 `
   set A_q to nextof(Q_m1,Q_m2,Q_m3)* j5 M2 ^/ A, ^8 t& Q6 ]
   move into A_w$ C  x, u) Z3 x' i5 l. @
   if A_w=Q_m1 then use R_m1 for u 48,5 min
" m9 s0 p! I+ L6 J! o$ W   else if .....then use ....for u 48,5 min: `- Z' i) a/ {
   else if .....then use ....for u 48,5 min  % O+ U) \( Y4 B
   send to die
: K! ?# B6 C9 X( {. d6 Rend
3 t3 O* Q7 z) f1 m" n6 l1 [6 Q' X, m: f4 l( K4 s$ ~5 \
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-10 13:41 , Processed in 0.015713 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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