设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8071|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! N9 |# _7 I' j: e* I& W* y
5 d3 z# S- r* p7 o" T1 J* o$ n8 X1 m底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
7 V6 z% J- f  n1 ^' V7 A1 a
2 ~& C# y5 }+ u% F1 T2 t( H8 H& D不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!8 m& F" A3 q2 r
/ U) m* x  _. [
--------------------------------------------2 K) f4 @$ T# I( ?$ |6 O) d
begin P_something arriving
9 C* r# p2 A9 m  p   move into Q_wait
9 }+ p1 C# C" w5 I3 q   move into nextof(Q_mA,Q_mB,Q_mC)1 i. i, X& p0 n1 K; r7 ?8 i0 P# t
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; Z, B" g- g# N4 o$ P  k5 F
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 U( h  K. F7 ]. O, H: M9 B
   send to die4 ?6 x( k4 M. s% @( s. R* e" \
end
6 H1 V! E/ L( r
) p( z% p* g+ T- }2 S5 q% m: J
begin P_mA_down arriving
5 D, y# |# ^! Y, {   while 1=1 do $ I+ {. l5 {2 P  ?8 y9 i0 |
   begin9 _1 r% t* ?. h. f$ s
   wait for e 110 min+ ^* ^  s' X% x5 g. [) P2 I# w% T
   take down R_mA5 t5 C" [6 n$ b* f% d
   wait for e 5 min* K( [. H0 R9 D/ E# c  o
   bring up R_mA
; ?# j0 o. _# c. M8 s/ n. o$ F   end
  J. `* h. Y! V) L& z  nend

  t  f% |% I/ X# j6 q( i5 H
/ l6 J" J9 t  E( f9 p% w+ o* v5 \. Hbegin P_mB_down arriving9 Y  v- j7 ~/ \5 ?" e0 H
   while 1=1 do8 \8 |8 e) v4 T. ^
   begin* J3 k5 l' b/ v; d, b
   wait for e 170 min0 `' R. N+ j  a" _0 ^1 U
   take down R_mB. ^( T, x( M* Q/ h! M: f  z; D
   wait for e 10 min$ l0 O; f" W" ]/ q; N
   bring up R_mB
) [+ Y2 _. m) o( R4 j9 W, X. x   end& x- E# A5 _1 H: z6 D* t
end

  B( U9 \3 a9 A$ G, b8 y% G & c. h5 V/ o% W  Z& w
begin P_mC_down arriving! T+ n  S! v/ [! o7 N  S
   while 1=1 do , q; T7 N( X& \0 |: P
   begin# f% H6 n* V& s
   wait for e 230 min
: f) `4 \; h3 f7 C! G9 F8 I   take down R_mC
5 P3 T# ]) Q3 g- A; _$ G   wait for e 10 min; W# Q5 x9 z, o; ^0 }, c
   bring up R_mC
9 ?5 B- F9 d) |' m9 ?   end
  S! W% P7 R6 Yend

% v2 b/ o6 ?' O 6 f: P0 \( v6 C8 f8 F
begin P_mA_clean arriving  J4 w2 o. i( l& N0 z" j
   while 1=1 do# G! x$ v# R; a7 ^/ f
   begin
9 ?7 v6 F3 B0 v0 l1 W; B5 Z   wait for 90 min/ M; X' \7 A- U" I
   take down R_mA
1 v3 Z" a9 p1 v   wait for 5 min' h7 ^1 u7 E) q$ [4 s+ y" h) h3 h
   bring up R_mA, D5 \6 _/ L) C
   end
; u# a6 v6 U6 `/ C4 ]* Uend
% ^* ^5 u9 ^6 }. x9 N
# D) P0 D; E$ T- C9 g. Z
begin P_mB_clean arriving
5 b& Q; C5 ^8 I" P0 k* b3 y   while 1=1 do
; o- }7 R7 y" H9 }   begin$ b8 H" G3 q2 R
   wait for 90 min8 D) f) K0 }& y$ ?
   take down R_mB) g' n) r" i9 q1 n
   wait for 5 min4 w" ~2 X6 f4 \+ j6 Q
   bring up R_mB( v) D) b, S4 V2 _6 j1 W7 I) a
   end
0 B: r) N) E! lend

) w2 T1 g) j5 k' Z8 t + V& d) c+ b& z0 ?% G! i6 U
begin P_mC_clean arriving  |) |/ m. D, L, U* l! c( B
   while 1=1 do+ W0 z$ e4 \. A5 r# `9 g% q
   begin
/ B+ ?$ G+ w6 j% {4 C. W8 R   wait for 90 min8 a' I* Q" N' B0 q3 C; T
   take down R_mC2 A3 k, q, P% d  K! W! ~) J
   wait for 10 min! u! B9 e0 H+ ~- Z6 |& g, l
   bring up R_mC% v1 q+ D  S% K$ m# q: z6 G) q
   end
/ }; D5 G" Y5 _0 bend

4 z7 V4 J: ^5 P1 I% h4 u) K0 N; B) i----------------------------------------. D2 |: a: Y9 [! Y
) w4 m' Q) X+ T
Exercise 5.9; G* H5 Y$ r' c5 z# z

* d8 u8 Y3 q  W  x# N. A5 w. M0 j
; r  x. n" T( O' d. v1 NCreate a new model to simulate the following system:
! z3 A3 a% I! m7 y2 g( _2 v2 ZLoads are created with an interarrival time that is exponentially . H1 s3 q& d  D9 y
distributed with a mean of 20 minutes. Loads wait in an infinite-1 y% n' E& H1 _' L, }$ X' u
capacity queue to be processed by one of three single-capacity, ( t3 u" j; R3 O  ]% |& Z3 q
arrayed machines. Each machine has its own single-capacity queue + A0 o( O5 |, y  h" A
where loads are processed. Waiting loads move into one of the three * g3 {( U$ s2 `; {( U3 C1 t
queues in round-robin order. Each machine has a normally : p6 ^" g, N# a: H# z5 t$ H; L" \
distributed processing time with a mean of 48 minutes and a standard & F9 o9 M6 n/ q
deviation of 5 minutes.
+ V" E) V  x/ o8 A. }The three machines were purchased at different times and have
& o  ~4 B8 W" Y9 c0 s9 A& @2 e0 B% |different failure rates. The failure and repair times are exponentially
/ l" A& }4 w2 v% J( L# Hdistributed with means as shown in the following table:
9 a4 I9 G( I  \  k  vNote The solution for this assignment is required to complete
( O0 D0 B8 j5 X6 p! Z$ gexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
, A5 ?) g) l& G2 I! f2 D+ y% M& pyour model.
# p3 u/ `! a0 p) K6 }4 K
8 {2 d1 w: _, ~( W6 ~8 vMachineMean time to failMean time to repair( e8 I8 ~4 |- \* _
A110 minutes      5 minutes& u$ P  h+ J4 @: _
B 170 minutes     10 minutes. T1 w: _$ K& F; K
C230 minutes      10 minutes6 {* `+ U! i) K) u9 |

0 f1 b% c/ l) E6 p0 l3 h1 r( M3 mThe machines also must be cleaned according to the following
5 k2 H2 n: O4 d5 A4 M: l' Hschedule. All times are constant:
8 J+ g- x( E2 {: L/ B4 k. K" r$ m1 [- r; I( _) J# I/ q& {& H
MachineTime between cleanings Time to clean, U5 S: e+ g; |; c
A90 minutes        5 minutes* {# @: G+ Z- `0 B0 k
B 90 minutes       5 minutes
" J9 B0 K% L/ TC90 minutes        10 minutes* F0 d1 S  E- d! s. r

, u' \/ R3 U) A4 @Place the graphics for the queues and the resources.
, i, P; x, R2 ^8 ^1 W* f9 T3 ?6 ZRun the simulation for 100 days.: c7 L4 i$ d) ~) j7 K
Define all failure and cleaning times using logic (rather than resource
2 U0 t& H1 `$ ]% Qcycles). Answer the following questions:
+ G0 W. U6 B( Y9 @! ua.What was the average number of loads in the waiting queue?
5 \3 B# w5 c2 `9 k, z6 hb.What were the current and average number of loads in Space? $ o' d; J! {. Z1 o4 \0 H
How do you explain these values? & p2 G+ m% b5 f# b" Z0 C

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
' z( E% S% }% R, y: csend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 P$ e" P( }8 j  @0 l这行好像也不太对,各位先进觉得如何呢?
' o$ p+ F$ H9 a
, i* [# ]6 l6 @" h' S" z( E2 U2 u  H. ]& h8 `begin P_something arriving. _( _6 c" H( G. J& q
   move into Q_wait, }# D( g0 f# n" X7 e5 m7 A- z
   move into nextof(Q_mA,Q_mB,Q_mC)
" S* |! P( N. L) X7 g   use nextof(R_mA,R_mB,R_mC) for n 48,5 min* H/ {# n  p1 k5 V
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 9 K% B& A. Y$ n+ T3 A
end- N5 [/ L/ e% m# B5 n
& v9 D9 u. ]2 Z* d  S
begin P_mA_down arriving
. R, ^' F3 N6 G" j   wait for e 110 min
; k* H5 J& K2 p* l1 L) b   take down R_mA0 J: b2 H1 }7 J; \' ~
   wait for e 5 min
/ ]) D) T& N( u, `+ j   bring up R_mA
# K8 ^( ~( U: e8 v! W$ J, Aend) ?/ C2 ^, I- S! I- @

6 x# G& s) a6 B! zbegin P_mB_down arriving
7 Y8 C7 z2 P) B   wait for e 170 min. E& [' b5 A! |6 ]" X
   take down R_mB3 ?5 |9 f2 x" G& d! b
   wait for e 10 min, o* h/ d* {- H. }8 o
   bring up R_mB, D, U; @& z; @/ J& x
end* E8 U. c2 }* {0 J$ V& ~

* j5 K) F& Q9 ~/ m, h5 w& R1 \* K6 Sbegin P_mC_down arriving4 [6 ]. k2 w3 _
   wait for e 230 min
1 j: j$ `- d; p! _" P& V0 @- s9 X% u   take down R_mC
& m$ t# l% i  Y! a3 f( F   wait for e 10 min: O$ r$ N6 }1 T  n; J
   bring up R_mC
  P4 W9 @( |# t! S4 gend
, e: `( V8 a$ a4 Q) O: K. c5 R: ?6 B7 v1 J9 R2 n+ R: E( _+ c% S: ~
begin P_mA_clean arriving
2 p7 {1 ^% d% l/ Q   wait for 90 min
$ o$ c' ^- H  S4 r7 D4 k3 @   take down R_mA  `8 u9 e; F. f; }2 J5 f$ i1 C" y( r
   wait for 5 min/ w- C* J7 G" L
   bring up R_mA
# x5 M' f: q0 e: ^end' I; K; U2 _* r% i  z3 y' l

! r- X, E+ ^/ p. r: Y. [# Q" Hbegin P_mB_clean arriving9 I$ L% O# R% O. z
   wait for 90 min2 F3 J. a- _* C; _, Y$ n4 _
   take down R_mB
0 L& V6 |# i1 g6 a6 e" i* ~5 y   wait for 5 min6 g3 C" Q0 B7 P! l1 ]1 ^+ K* m9 P
   bring up R_mB' f# p* H- v4 U3 C: @0 j4 j
end. w" e# W# \4 H6 J& l; w
, _+ l2 z2 w" t) f% V0 p: l
begin P_mC_clean arriving/ e$ P& U7 H0 B3 u7 P/ C, P/ E( e
   wait for 90 min
: W7 _  _" L8 e/ R5 I5 h   take down R_mC9 B5 m6 z5 i* I" D
   wait for 10 min4 s% i0 f$ }, P/ p* g% }. h
   bring up R_mC
9 q; z9 W8 U/ z  ]end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! R$ I- f, v% `- ]2 P* o   move into Q_wait
+ O7 |: o2 R' o0 F   set A_q to nextof(Q_m1,Q_m2,Q_m3)
& L% B9 s( i0 z9 M8 a7 @  B; C: J9 a   move into A_w  ^) R  |; U& i- n* H9 W% U  y0 ~
   if A_w=Q_m1 then use R_m1 for u 48,5 min9 H) z; L9 Y! [; `+ H: j, C
   else if .....then use ....for u 48,5 min7 U" c7 ?: v# J' h9 b3 x3 d
   else if .....then use ....for u 48,5 min  - O, z& T7 C6 M3 Q
   send to die
; \1 K" _7 ]. uend
5 m* x' f9 l, q+ v+ d) Z! a! J* }1 I: F; N5 _7 Q
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 07:51 , Processed in 0.011487 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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