设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7817|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ b$ y6 B" p1 Q/ t* g7 f: a6 w" F% P
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
  e) A8 P( j) E
6 S# w- h, Z! {' F- d4 @不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!' s! F6 ^/ \" v4 i3 S- x

( j- \0 e! w& _9 |8 e
--------------------------------------------# _( ~6 P# E1 V$ K
begin P_something arriving* n+ |7 S  \; z  S
   move into Q_wait
) [  A, F5 V' O0 V( l   move into nextof(Q_mA,Q_mB,Q_mC)/ W5 M+ ?( _# f' I1 g' g
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 W/ C2 d+ W$ y, w
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 X! d* u$ V3 n' M/ k, q$ N
   send to die6 g0 R+ |2 j2 e6 t" _9 l
end

  b5 z* E4 a1 N( U+ ]4 D
1 ?; {, m9 x8 bbegin P_mA_down arriving
! Z+ |# V" u4 Q! [   while 1=1 do
; Y* [" Q# p$ p/ J5 X/ c   begin
6 h9 V9 r7 x. g   wait for e 110 min9 [  n; r) y8 S: L
   take down R_mA) X5 H5 q% k& E2 |8 h
   wait for e 5 min
: ~$ F" }, o' r1 B% T2 w) n   bring up R_mA% T8 k2 Y; ?6 _3 R+ m+ K8 s1 r( w3 {/ C
   end0 M* e4 I, r) |5 h3 x6 R6 _- G# b
end

8 G, G. v& K  Y! W1 }  y
* d  J- F  E. \+ |begin P_mB_down arriving
2 E9 u" p+ H$ E; u* ?, b   while 1=1 do7 J8 r7 [! ]5 p
   begin3 H# [$ ~$ |/ j# A0 T
   wait for e 170 min
' M& |5 f( u$ e+ r6 f0 i   take down R_mB+ r! m* |6 R$ D, R- W& r# j
   wait for e 10 min5 q) |% i8 d& q6 S# D. U% l9 X) b
   bring up R_mB
  Z8 [) S; v4 X& M' ?0 K   end+ W: M& A( S% K
end

+ b; P3 J2 V7 L6 x5 d
* X4 E0 X% T$ R2 a) T3 v& bbegin P_mC_down arriving
# L9 R8 Y/ g( v6 P# L* _" w   while 1=1 do , u  p& R( w) _+ Q# @
   begin: ]& w( o2 B# P4 J" U/ ]
   wait for e 230 min% z+ j# D* L4 v' a9 Z8 x  P) w
   take down R_mC9 P% `2 N1 I. Y# f! B- d  j
   wait for e 10 min
% `$ `4 b- z$ g/ d. v: f, j   bring up R_mC9 I5 M: F: c4 M% T, P" g
   end# p8 R9 Z( H9 O* v
end

' N! y+ K" y* W9 k  d
& u: t* P: E- z  j, ~) O& Z' r% fbegin P_mA_clean arriving; s; H$ Q' Z" d+ |( ~
   while 1=1 do% c0 U, a$ C' w# x, Q
   begin  v& v8 @/ Q* |3 k9 \9 @/ |/ c% S
   wait for 90 min/ |4 [; G- X: p% |2 ?
   take down R_mA7 W7 H4 m$ v. ^
   wait for 5 min" c$ L$ p/ }: j# f, C/ ~
   bring up R_mA
; }! L; b7 \  C3 u; P$ Z   end5 x6 `1 [+ q- C: Z
end
( G- Q% {6 T, ]* O* F

8 v. J. j: |! ?0 Ybegin P_mB_clean arriving
2 A9 y  _# t6 W4 [/ Z' K* [6 }   while 1=1 do
8 f5 w) \2 ?/ i9 ?   begin
1 S2 Q! v% |+ L# ]/ `# y; S6 F   wait for 90 min  B6 K2 O; ^+ c1 D  `4 K* X
   take down R_mB
" z/ ^" ]7 S7 u. V! T0 Y! I   wait for 5 min
, U3 G: |' ?# c) b5 B   bring up R_mB
6 @4 E9 n. h3 I/ |( V1 E" s   end
( r6 I* ]9 z! P$ s1 xend
5 c7 C! T0 ?) J% p& B% L6 X% `  z

  o8 U/ C' K4 A7 L& Nbegin P_mC_clean arriving
' Y9 ], h% ^: r: y5 M   while 1=1 do2 @1 s' y/ o* B+ ~
   begin
+ z" |  i+ ^5 v9 O" y: f  Q   wait for 90 min6 E$ Z5 u; }4 D+ J, l0 e4 R8 P3 [* B% i
   take down R_mC2 Y' p# B) H6 t( _3 q( i
   wait for 10 min9 _, T9 R$ e# c1 u! E+ K. ]0 ]
   bring up R_mC
- u, i5 C6 N+ _$ e   end0 r3 W* W3 g8 p
end

# Q2 e) ~; u" j( o' }6 y----------------------------------------7 s& N; g) I& n6 |8 }3 m3 x

0 N2 i# k( Z& x1 @& Y" qExercise 5.9
+ g4 J6 r' u9 V) S+ I9 g7 N- t# @2 c0 L) l
7 D, Z! N& ~) d% o5 f4 F3 P
Create a new model to simulate the following system:
" t' z5 z2 [8 w  }- d, t+ \Loads are created with an interarrival time that is exponentially
. L0 a( H7 N; {distributed with a mean of 20 minutes. Loads wait in an infinite-( z# _& K0 J3 g3 a+ i6 }
capacity queue to be processed by one of three single-capacity, ' l- O" f2 z; z* h5 O0 O
arrayed machines. Each machine has its own single-capacity queue
) [: p7 q& `* j, T) ^7 {; s" Hwhere loads are processed. Waiting loads move into one of the three
" e% `  g! q5 S5 \8 g2 aqueues in round-robin order. Each machine has a normally
2 s! z. x" c- ^0 Zdistributed processing time with a mean of 48 minutes and a standard - d, C$ M: h* p1 o+ G7 W! |
deviation of 5 minutes./ r/ E6 C  |4 E* _: e8 O8 y
The three machines were purchased at different times and have
" l+ e  o: A* R& z4 Sdifferent failure rates. The failure and repair times are exponentially
2 t1 i. n5 S$ T  ^8 D5 ddistributed with means as shown in the following table: : U( Y! D) E4 Z7 X/ r5 u! Q
Note The solution for this assignment is required to complete 7 M' L0 t9 Z$ a7 L4 J/ a0 {* C
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
/ R  f7 w( I% O4 T1 A% A5 b" e+ C$ |your model. 1 T8 n/ s2 g/ w! O+ \; c

6 C' B- m) s8 lMachineMean time to failMean time to repair
1 ?1 z  e6 B3 G- |! ]; fA110 minutes      5 minutes
# o$ G7 h4 z7 ~7 O# |B 170 minutes     10 minutes
! g; J' h  _! T7 C3 N  ^! PC230 minutes      10 minutes
+ ~( W: A3 `& E3 {
/ U$ I9 h: F# O( E( U* dThe machines also must be cleaned according to the following & `6 s; G* A1 `2 t) K
schedule. All times are constant: ( \" H5 c# }, l9 ]9 ^$ m
  t1 E+ A# ~5 S: M1 t# i
MachineTime between cleanings Time to clean
: n% L" S$ [: R( ~; FA90 minutes        5 minutes
9 r) P0 A! x3 m7 G& w+ s: n! n3 j& M$ lB 90 minutes       5 minutes
4 ]4 {# X4 M9 \% U# JC90 minutes        10 minutes
8 ]8 r; I3 l  x. ]. g1 \, Y9 h9 f& K1 f& M
Place the graphics for the queues and the resources.
4 K% n* O) Z: S7 e1 O. x* K. r7 iRun the simulation for 100 days." q' ^1 h( c1 ^+ [- ?
Define all failure and cleaning times using logic (rather than resource / N- m) n& o8 b7 A5 P4 f
cycles). Answer the following questions:
# J0 n" e: I6 l* K3 Q1 H! Va.What was the average number of loads in the waiting queue?
) M+ O) s' o4 D! y' P& ib.What were the current and average number of loads in Space?
* O2 O2 E# I- mHow do you explain these values?
8 d& h: c# J. p; l9 V- E

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% t( s$ v3 @+ C' psend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 X- P$ m4 }! }( e/ x这行好像也不太对,各位先进觉得如何呢?
/ P2 K- }$ v2 C! T2 V% ^
& i/ c" R: r# c2 Dbegin P_something arriving; h. `! q. w# l0 |; h3 W  _3 f
   move into Q_wait
* s$ i1 a2 p" T" h   move into nextof(Q_mA,Q_mB,Q_mC) 9 W7 k& s8 G8 g
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
, Z. U  O! k7 S/ ]( m1 x# k   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) - j* @0 Z9 s5 i( K
end
% @0 {, U* \* O/ C& h$ ?8 ~
6 {+ p5 ^2 T, H7 s& u  V% ~begin P_mA_down arriving
( }, Z4 D  }" q$ v; P, _. w   wait for e 110 min& z" F/ L+ f+ _5 j" W8 X- K* p
   take down R_mA
, x8 ?2 V8 X" \. Q0 r' o   wait for e 5 min3 A% M! F$ P& P( g# {# Q2 @+ z/ Y! H
   bring up R_mA
  ~: Q: Y! G2 x5 ^3 T: j# dend
  q8 ~) c8 e( j9 O( I
8 o) f! B  ?" g1 p5 t8 Obegin P_mB_down arriving' H. }/ K- i; l: S& l1 y5 E
   wait for e 170 min- K* A( D! ?9 [
   take down R_mB
, T9 ~7 x( X3 L. I, E7 K0 t   wait for e 10 min
8 m7 H4 z; @- V3 l; S' n# r   bring up R_mB# d, x/ o5 i) Q" ~" T1 |
end1 t6 L6 f4 P4 J7 k

0 M8 O$ c% I  S! D: ^6 S& Cbegin P_mC_down arriving# r: E+ |' r0 u6 @& n3 H
   wait for e 230 min
& I* g; o0 L  Y  S7 \, X; h! Z   take down R_mC
# c0 W# k: i6 I# t+ P   wait for e 10 min7 r. f, b6 y- ^/ ~# n* |
   bring up R_mC
) I0 _. w9 P) E2 R$ Tend1 t* F& K) V6 o2 p' D6 d
/ c$ r: N1 T2 f3 e& U/ x
begin P_mA_clean arriving1 y/ p, O# ^3 u- n1 @+ I9 l
   wait for 90 min6 ~7 Q& ?( c& M1 j, l
   take down R_mA
$ J7 k# W0 Q6 k/ ]6 u6 p1 ?2 p3 G, H   wait for 5 min$ {( E* M# o7 m
   bring up R_mA0 L/ Z( I/ x, Y+ T0 U
end0 v" p5 ?+ Y7 v" R4 S2 q6 s

# s% a5 ]6 d1 w; nbegin P_mB_clean arriving
+ V( W# C0 c0 i0 R9 Z8 r/ M   wait for 90 min- w; w+ S$ X. P% M# D7 I
   take down R_mB' X5 U( O+ {" _0 N. D% o! E! z
   wait for 5 min
2 q" l! o( k8 v$ P# d: r6 W$ b   bring up R_mB
- m" ~2 l6 k: x3 Q0 pend
) A! l: ]4 |5 ?5 I- m% o/ O! [4 R' {3 j( u/ {, ]5 A
begin P_mC_clean arriving
1 t' [/ l& a8 d0 z, \7 I   wait for 90 min( U) G4 W. H/ A. ~) ~- [* J( v
   take down R_mC: T# t9 M7 K0 ?; `4 w1 X8 J) a+ V- |% g
   wait for 10 min: z  r& Q' p9 G1 ~% _1 ~
   bring up R_mC6 Z- a8 \& N. \' f
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
5 s6 z; f( {! F# ~  J+ `, i" Q, E   move into Q_wait* Z" I# j0 I: @  M" L  B3 ]2 M
   set A_q to nextof(Q_m1,Q_m2,Q_m3)3 |! E; S7 Z7 F4 z
   move into A_w9 ?7 o( O1 p" z: U. T) R6 T% J
   if A_w=Q_m1 then use R_m1 for u 48,5 min# s6 e1 p  N# \" }( h- ^4 o3 U6 d
   else if .....then use ....for u 48,5 min' ?; h! I8 i) Q1 u
   else if .....then use ....for u 48,5 min  
) R2 J0 s7 i- ]1 U5 r* x   send to die
3 p3 N. p0 q. S  M8 c8 {0 lend( {; B1 A$ Z8 j7 q% d

4 u* l6 }' n  d% D1 V- }; w供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-22 00:16 , Processed in 0.013913 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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