设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8418|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
, ]) }' m7 ~9 R, B  k4 j5 t
: N3 ~6 Y% T) Q: b+ V底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( b- k6 Q9 P0 Q5 ^( m) }: \. A( ?9 k! O% N1 U
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!! v9 J* D( s* o
3 L' j. \7 t5 h' {* |
--------------------------------------------1 n8 Q/ ^- m% A3 {( {. i0 q5 E
begin P_something arriving
+ i& P# o$ R# C! g2 M   move into Q_wait# P5 A7 Z0 H! \0 J; I
   move into nextof(Q_mA,Q_mB,Q_mC)* X" D! r3 F  w7 E
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" T8 \6 P1 q- W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 t* f) K9 i* o" `' |   send to die
( Y3 m8 ]/ _% k5 Jend
2 w7 h3 W$ K4 J- X" H+ Z

+ }( Z: u  I$ Z* e1 {# ^' B: Mbegin P_mA_down arriving4 J, g) `7 T9 M
   while 1=1 do
$ J+ Y, f$ a) J/ f) O   begin
  q5 G) ^& R5 R1 W3 t, J) r0 j$ a   wait for e 110 min. [6 o3 w8 X- U. v4 [/ P
   take down R_mA" t4 W  s# j6 W$ H; _+ [2 b$ G$ t, n
   wait for e 5 min
0 M- g3 {& Y0 B) p5 L5 ?8 |   bring up R_mA$ n( ?: V) @) A2 H
   end
) T8 J' r4 b) @* [$ Y: ~end

; X6 h+ N+ |1 ]2 s- I& y7 W4 e
! A2 _% i9 Z3 O; W0 a0 g0 Gbegin P_mB_down arriving) K9 K- d! |3 u  @+ n
   while 1=1 do
; I0 M* L! T$ A% q   begin
5 M; I7 O. @/ B   wait for e 170 min
7 s+ D. _! i: J, w; m  N   take down R_mB
7 d+ N* q7 y% ~8 P, U4 i   wait for e 10 min
: o9 B! x% v4 ?   bring up R_mB; n' H4 E3 D9 A! S
   end
! f! B5 @7 P0 tend

6 T5 Q7 x5 o3 r. @7 P0 j5 x: j/ F
% b! Z$ R; |2 \. e" xbegin P_mC_down arriving2 v! m# D0 k% g$ y% l; w0 L/ F& t" Y
   while 1=1 do
6 z- r/ Z- E7 t8 ~   begin" n" }5 Q8 v5 a1 D* p: r! C
   wait for e 230 min
6 J: i5 q+ Y( v6 o" I% U& ]   take down R_mC
4 ~/ g. M# ?4 @3 X; {& g   wait for e 10 min
5 x0 {4 a/ [( h# ?/ |  ~   bring up R_mC
, E# Q* |3 h" ~: ^9 B/ a   end5 a$ d9 Y* _  t0 a$ q
end

& T5 A; K4 r& h7 n% h* ~
: Y7 V+ j' H$ g2 G+ l# p! Zbegin P_mA_clean arriving
4 o5 S* ?) g4 C0 a   while 1=1 do
7 |. ]) `& O/ k( k+ b; u   begin+ F' P% s& k0 s
   wait for 90 min
% [; ]" P: Z( t9 V7 X   take down R_mA
2 b" k$ d3 @" N& g! M: R( b  T* c   wait for 5 min/ l" S. j' Q, ~
   bring up R_mA  ]  A, [3 K. s
   end
! R8 s7 X) h( }6 pend
$ f+ ~7 o/ [2 D- z6 f

( ^6 s7 i0 [  ]begin P_mB_clean arriving5 u6 U: ^- i$ c. [- u3 ]# d* O
   while 1=1 do
  i9 q( H+ e) ]8 I/ F& w# u9 ?   begin* G( G! B' G8 k. ?4 E2 S$ ^0 {
   wait for 90 min7 t- n+ F6 B  f! N0 `
   take down R_mB
1 n) |( n0 H9 n+ f   wait for 5 min
& a) u  K* l. Q6 ^- ^   bring up R_mB" S( V2 T' `2 |
   end4 K* h; U7 W5 Y% n: u
end
6 A5 Q6 e* @5 F; {0 w
3 m$ V1 X$ R) a! g! M: b" \
begin P_mC_clean arriving
) z0 d1 V+ p" s$ f   while 1=1 do
% o4 p; ^: C5 X3 b" R   begin/ G5 e- O6 a+ j
   wait for 90 min; h+ r, V  H9 J1 A6 W/ I# x+ W
   take down R_mC
$ {  ^# g5 O" |" U, {& H   wait for 10 min! [! o2 p: z0 R
   bring up R_mC
4 `, t: B1 e0 [1 o# r: u# M( U& x   end
+ o( D" K: r* m' R) }4 c9 L  oend
. ?' s/ P: _0 r$ J; V  H
----------------------------------------
4 G. s: y/ P# H" J: [" W3 t# H5 m/ q
$ Z8 ^4 N; ]- L0 yExercise 5.9
& B% R: ?+ C  j' L/ |, Y" ]3 }5 A: P1 Q3 R0 q
7 l+ m2 e+ ~3 |  {5 ^2 O
Create a new model to simulate the following system:
8 j" F, m5 F* O( m' TLoads are created with an interarrival time that is exponentially - ~) P& {. c2 t! R9 j5 S' }# ]
distributed with a mean of 20 minutes. Loads wait in an infinite-! Q3 K, l: |3 |4 q
capacity queue to be processed by one of three single-capacity, 5 I8 G3 t, ]+ |* _
arrayed machines. Each machine has its own single-capacity queue
9 M& N9 n% @1 f5 B# Iwhere loads are processed. Waiting loads move into one of the three
; H8 M' ~9 v# R/ T- x  Yqueues in round-robin order. Each machine has a normally   j6 P1 Q$ r; R
distributed processing time with a mean of 48 minutes and a standard
8 p$ ~6 r, n( ~, ldeviation of 5 minutes.7 M0 S8 l; {; U- n
The three machines were purchased at different times and have " @) `0 T3 Y( D
different failure rates. The failure and repair times are exponentially % r4 V! k* w/ ^/ t
distributed with means as shown in the following table:
% y1 C. t$ u" E& z$ _' mNote The solution for this assignment is required to complete
% `5 h. j/ p/ x3 }exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of : r; s6 ^4 |$ e7 T% I6 G  n
your model. ; R1 n* b8 ^, a

2 w8 {' p+ A4 B* k4 LMachineMean time to failMean time to repair
: d3 p1 S) x+ g, d, J" z0 jA110 minutes      5 minutes$ I# j9 h2 D7 t9 ]3 r4 p& J
B 170 minutes     10 minutes! ]. ~8 c9 c- m
C230 minutes      10 minutes
9 y+ @) G1 d. [+ H+ @$ B" R* {
" I9 k/ M1 |. z9 b4 [The machines also must be cleaned according to the following
( Q- T- k/ L% S0 Q  V3 sschedule. All times are constant:
) k$ e& r: a9 Q5 O$ G9 D) k9 `" o% F$ T! W
MachineTime between cleanings Time to clean3 q0 q0 Z; V, N" V2 B- f+ [! M
A90 minutes        5 minutes! F2 K( \: q8 m! P
B 90 minutes       5 minutes. r4 s2 ?5 K$ Q
C90 minutes        10 minutes
! ~# n6 j/ B. }" r8 {) e# a
& ?/ J) C, K# H5 X: yPlace the graphics for the queues and the resources.
7 @8 P: K3 y/ w3 A; i% ]Run the simulation for 100 days.- m' h. F1 C& O4 [2 S1 i( e! q
Define all failure and cleaning times using logic (rather than resource ( F7 ]2 v0 ?8 G, \
cycles). Answer the following questions:* \, |% M1 [4 l) \- x
a.What was the average number of loads in the waiting queue?
& t2 V& h% a& W& j- ]+ o/ Gb.What were the current and average number of loads in Space?
, f6 ]+ N3 }2 k' c; E. `How do you explain these values? % x, S2 a0 j. N/ ^) T* K0 S0 ?5 |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
' m% C5 d+ D# _0 {send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: t7 M. j( N" E/ O- W) O, {' l% A这行好像也不太对,各位先进觉得如何呢?2 b& k4 g0 T2 q5 S8 h, [5 R4 ]; T
! ^& G( c6 U+ O& R+ q
begin P_something arriving( d8 z, ?7 x: M3 P
   move into Q_wait
! R0 X0 O. F3 ~7 I: k" N   move into nextof(Q_mA,Q_mB,Q_mC) 5 j( p& ^. F1 T! ], }/ ?; |+ J  {' f& V
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
! a$ V; F0 \& o: Z+ z& }( S   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# ?$ H" l2 c/ _$ |6 S4 o# g$ dend( ?: a. ~: b! E5 z( o9 r5 a

% w! F) x3 l+ d" Wbegin P_mA_down arriving$ O; g; f$ {5 d. b+ c
   wait for e 110 min
7 r+ t  G  c2 u+ A9 t' T   take down R_mA" W6 g4 K9 g: v0 k! L
   wait for e 5 min8 H- g0 c' P, Q
   bring up R_mA3 k* d6 j1 i( \7 o6 x
end
& Q  Z$ j& H, Y( W, k4 R1 t8 ?
0 L% `3 y& m3 |1 {begin P_mB_down arriving
) V# Z; V2 j, {- l: S; k   wait for e 170 min
  c( D1 v8 N, _! F. [' V   take down R_mB
2 t$ t" r( v2 G# @7 c   wait for e 10 min' `0 t3 c' s; U6 H) O
   bring up R_mB
, J3 E3 }% x3 t; t9 bend
4 L) N# r3 b* n* ~$ {! j) q% }& W8 W. [# q
begin P_mC_down arriving
* _) ~/ v0 t. _8 w  o   wait for e 230 min2 Z# ^) G% W4 E4 R3 C6 B) ]
   take down R_mC$ A/ B: P6 _9 a( K( ]: U+ p' C
   wait for e 10 min
3 Z  \1 @% \5 G2 @" f' y/ `   bring up R_mC
  _9 r# J5 X8 Q8 \, @; n' `end
$ n2 e5 b" f2 R. x- e- r
2 T& @* i2 B1 Y3 Hbegin P_mA_clean arriving
3 R  K3 Y% O% M& l9 n   wait for 90 min
0 [2 r( S9 @0 D   take down R_mA
  o' T8 _, T8 q! w$ S. A8 _3 h! F6 |   wait for 5 min+ R$ f9 M% [  n* F9 K" W
   bring up R_mA
' c1 T6 S& z) h9 q( }- Rend
6 Z  }" ~3 v' l0 B  @+ ]0 H
3 e0 a" g+ l! Z; c# gbegin P_mB_clean arriving5 D) Z7 P1 V, S
   wait for 90 min
5 ^4 q# J. Q3 X, o2 f   take down R_mB$ |! [, s5 G8 V8 k1 y$ f* w1 U
   wait for 5 min
3 B1 f# Q% X! d7 z   bring up R_mB
, I+ \2 M! x" \# N4 nend  z  A# I; P, W9 p5 q1 O) S

7 O9 l# ~. U2 D6 N! \  e* ]' ^begin P_mC_clean arriving
7 B0 c; j8 |0 S7 G) ~; j   wait for 90 min  p, Q" c' U, K8 P( q
   take down R_mC6 m! q3 K. m/ d6 r
   wait for 10 min
1 \9 c* d4 y/ i5 A! d& g# q   bring up R_mC
  H$ F0 J/ j. w/ T; Y) S! ^9 Eend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 G( n5 L5 W2 q6 }$ P
   move into Q_wait! U) w" Z9 C, w0 _& v5 G2 _
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
  M" E' E- |4 |+ s7 L( j& ~8 z   move into A_w, T. g) _% I/ e- U7 V9 T+ m
   if A_w=Q_m1 then use R_m1 for u 48,5 min
- M0 W9 L. H% e   else if .....then use ....for u 48,5 min7 `' ]( }3 I' N# Z
   else if .....then use ....for u 48,5 min  $ Q$ w4 x+ f- _" e; A. h
   send to die
1 L7 j' N3 z$ }2 M% f8 Aend/ R% ]! J# V' O
" r. f3 D$ r+ @3 s5 q0 s) ~
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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