设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6615|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ) H; w6 W* C6 b6 D3 P0 p

* m" d0 q# [$ b5 \! f底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. K+ g; q6 |" j3 N* L2 V
4 D/ ~7 l. [( H' c& M+ A' {7 C& C, x
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
' [" M: M0 T. ~# {
5 F0 M7 e1 i* q
--------------------------------------------6 X9 `8 n5 I% u  O3 q
begin P_something arriving* T7 X2 a4 |% N& b( M* s  P) e
   move into Q_wait
( x* x8 Z/ q0 i1 n6 t7 h/ b* ]   move into nextof(Q_mA,Q_mB,Q_mC)
' {4 H- I, M) z* Q% u' A. Z0 R* q, b/ s   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
( T1 _- Q) V- C7 t0 M   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; e$ y/ Q, f% b/ a1 K3 I" W5 e' c( g   send to die; S9 o5 k$ z' |5 T! ~% j- y1 ?9 C
end
( m, R7 }2 Z  F, O# h0 {- Q

% Z/ u- S# I$ o% o( tbegin P_mA_down arriving
- P. Q& P  w# d) q" f9 U7 j   while 1=1 do % G6 \' U8 H, H2 u: y0 z. j
   begin
( i, f8 T* _: a3 e4 ~8 Y8 |   wait for e 110 min
9 g: B, j+ q- w) A$ a) I+ R   take down R_mA
  `! t  Y" p9 @# v2 w. }9 ?; E, T# `   wait for e 5 min- A8 q  w/ O3 P/ Z: v. |# K1 G8 g/ D
   bring up R_mA
4 q: e: ]$ K# y   end
: H2 i& E3 w4 p5 p5 r& Yend

/ B5 u8 v+ v( Z" p( y% n 2 @) _% ?- w9 X5 a7 g
begin P_mB_down arriving
) a( d- ?2 y6 a7 ^   while 1=1 do- g. M  n; O$ \; I/ f% ]  S
   begin  p/ \; j' n; Y3 n: f
   wait for e 170 min
3 e7 y& O5 A0 P: @3 n2 N2 b- W   take down R_mB
3 P9 W1 q: {+ ?2 p1 {$ x& w   wait for e 10 min7 ^! z( [* A7 {4 ?' I
   bring up R_mB
7 l. c  Z/ f% g" h8 I3 O" O9 U   end. l& l) N: _0 J9 r
end

" i7 K; g5 u# d( M/ H  M  V
! A  \7 ~& p, p) J! w  \begin P_mC_down arriving! P/ l1 x1 Q8 q) D  x, w
   while 1=1 do
: X: L! ~# u! h& f+ E4 u) o   begin
; W: E( e' ]2 p! a9 r" {   wait for e 230 min; P3 T: w( j4 x3 I1 _0 L  ~) L) Y
   take down R_mC1 v" q- e+ Z/ `
   wait for e 10 min, [. n  Z. I4 u8 I. ?  u; r
   bring up R_mC
# F; V3 Q8 ^! B* C; w3 F   end
0 V9 M( }. v  jend

7 |% Z5 H8 H. j# P
) d- R4 N& N3 @( d* M0 `begin P_mA_clean arriving) K% V6 l" }- k8 Q
   while 1=1 do) j1 t8 ~" j. H! i4 {  y9 ^
   begin2 [3 h+ b+ G1 z. i/ a
   wait for 90 min
1 L, U# v# j3 U& s) x   take down R_mA: c' z5 i, K) s: N9 |. o( ?
   wait for 5 min! ?. y$ r& I7 N; n
   bring up R_mA6 l* [8 X& W# F4 s, [8 m3 g
   end( `9 h5 F- u9 r6 o/ ?
end
2 k: n! o8 x! J& |
# G& W3 X' C% i
begin P_mB_clean arriving# e' h. G3 H, D9 n
   while 1=1 do& ~6 j8 Y! t/ E
   begin7 u9 @& N. A! L# j" @9 C
   wait for 90 min2 l7 t; k( u( M1 z
   take down R_mB
0 S# ^& e, W- ]* ^' ]  M   wait for 5 min
! s. Y4 U* l, \% Y" C( Y6 w" ^( B0 I   bring up R_mB: ]3 ~7 I# S% m8 K+ p0 V$ O
   end
3 q* P0 T5 L; n  H1 I. ^end

+ v: {/ R' g5 G  Q! _ + z' k- v6 a$ ^3 W
begin P_mC_clean arriving" p, {" u7 V7 _* N
   while 1=1 do
/ g$ E$ y4 L8 D6 g, r' \   begin
8 w5 P8 S; f  m! w5 \5 {% W& _   wait for 90 min
0 O7 O- Q% P' E& K" [0 X% Y/ V   take down R_mC
1 Q5 X* ]8 c. `0 l' A0 J& e   wait for 10 min9 ~0 j, W* O( K! u
   bring up R_mC
5 {& B4 m1 q* L7 l1 n7 h* f" U   end5 v5 \$ M1 B% F( A) x9 J& S8 D, ?
end
9 H" N% H0 `, Q  {/ I
----------------------------------------8 F4 M' |# m9 ?1 F
$ I3 b. Z! e4 ]" r
Exercise 5.9
: {3 O4 Y/ O* A& R- a1 g
' }" f/ o( S( v& i. L- [
0 ^; j4 ^) R/ r: T1 oCreate a new model to simulate the following system:
6 M' n2 {- H, e6 J! VLoads are created with an interarrival time that is exponentially
- _! _- o/ f" k) o+ a5 R- z* s- Jdistributed with a mean of 20 minutes. Loads wait in an infinite-1 ~4 y9 x# Z3 z1 C& M. W
capacity queue to be processed by one of three single-capacity,
: Q/ d) n& P0 _9 L3 Warrayed machines. Each machine has its own single-capacity queue 4 ^% S. U8 X$ R: u
where loads are processed. Waiting loads move into one of the three
3 G4 T! P2 l9 P1 m& R& z1 Vqueues in round-robin order. Each machine has a normally 2 |1 @& q7 `6 E. `4 q( Q
distributed processing time with a mean of 48 minutes and a standard ) I& N# h  h+ f/ x& g
deviation of 5 minutes." k; ?% y. d( S4 z7 e
The three machines were purchased at different times and have
5 `& ]+ X1 F0 G, a; f3 }different failure rates. The failure and repair times are exponentially 0 R1 |* H- S% R2 I/ J7 Y
distributed with means as shown in the following table:
( G+ @. u( m9 O5 f- ]Note The solution for this assignment is required to complete
% h. K0 e5 ?$ o, X% g4 rexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
( Y0 n/ e8 y) k" dyour model. * P& J+ w0 p6 f' V  Z& y$ N6 e
  z' U8 f+ _: D
MachineMean time to failMean time to repair
: b; U7 r- \4 _1 y3 Y( eA110 minutes      5 minutes- F6 A. t% a0 y' b+ L0 F. K- r
B 170 minutes     10 minutes- P4 \! s& e  D. V: _7 g
C230 minutes      10 minutes
4 E6 s  r* @$ E  r6 I& ^! z3 P& X& E% j: d
The machines also must be cleaned according to the following * S5 d) `3 ^. e$ i
schedule. All times are constant: " ~: ?/ `+ ]7 I) w9 i" H

& I* K# s; |, c9 |# sMachineTime between cleanings Time to clean
0 _" M' O8 Q5 Y3 z* e. \$ w- aA90 minutes        5 minutes# }# Y. V2 ~. y9 U7 c
B 90 minutes       5 minutes  S  G. A( f" K6 h; A
C90 minutes        10 minutes
8 W' g9 g" I+ O6 W5 M$ r' [  m5 g5 o5 ^9 A; _9 I+ S* P* F
Place the graphics for the queues and the resources. . L/ r+ v0 l. p9 h
Run the simulation for 100 days.: \$ _! G$ Z* L6 m& r: ?; w
Define all failure and cleaning times using logic (rather than resource / d1 X  b) P; P- `( {) k
cycles). Answer the following questions:
  ~# }0 S2 v' ?# Za.What was the average number of loads in the waiting queue?
+ @6 B2 t6 a6 O/ u6 @1 @b.What were the current and average number of loads in Space? - N. g, O3 b- m1 X6 D
How do you explain these values? 7 K- G& Y' T2 ^

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
8 W* z8 y# [' \! Csend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ E9 b/ l) H$ e2 z3 b" ~4 z
这行好像也不太对,各位先进觉得如何呢?! j2 u# o; x5 l% G/ p3 M

( {) H$ D3 B0 Qbegin P_something arriving( E1 M  J" Y6 F
   move into Q_wait
! C% Q4 P8 ~6 a  ^; D# {, A. w   move into nextof(Q_mA,Q_mB,Q_mC) ( S7 O& v1 }5 {8 y6 R) z
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min9 j) w4 s9 W7 d" ?* B4 S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ G2 k) d5 _3 _$ G$ R) d( lend+ c! e! {: P6 X# s7 ]

( w) Q/ V9 E9 r2 t7 A$ Obegin P_mA_down arriving+ \) L: d: E2 {; \
   wait for e 110 min3 T  ]: Y. J4 A9 Z* o5 l& e
   take down R_mA
, T0 N+ k: Q0 c% r5 A2 Y   wait for e 5 min
; ]/ p9 _0 R% b   bring up R_mA, I+ t6 L, i0 d2 ]$ I; z. J9 n
end
9 g  o) T: W: `' Y" W- |4 u" H* r2 G# p4 c: E1 Y5 p
begin P_mB_down arriving
7 Y+ V9 I$ n8 Z4 }   wait for e 170 min
+ u& z. u% R& E1 c; {+ l4 D8 R) O   take down R_mB
9 Y% G: b8 @# @+ s7 P   wait for e 10 min
3 `2 T& C. v6 B+ h2 |   bring up R_mB
% I! l  x7 o! c- Nend3 U4 m4 y% f" h( j: k- {* h- n

% a: n7 Q5 A, h9 x" {' F% ?begin P_mC_down arriving0 R) C) i( Z2 p0 B( h' y/ S
   wait for e 230 min' Z, [) x  `4 ^% q* T
   take down R_mC
2 }' g# ]# r9 f0 Q: f% o   wait for e 10 min: |+ ?" a, s8 X2 a* i1 {
   bring up R_mC3 T9 S0 Y# u, o0 ?
end
4 d& q$ e  u1 p* o: [
3 v: s: ?8 G, v, E0 M0 P$ G. G/ {begin P_mA_clean arriving
7 N3 x. f: B. k( t   wait for 90 min
4 G8 K# |4 Q1 S. e- t9 {   take down R_mA
, y+ r% d' G# D% ^2 |) o   wait for 5 min1 U5 z1 U6 T; j6 ]& W
   bring up R_mA" T6 g6 |) F* c+ B1 X0 h
end. t$ V# c  |& Z& r. ?, b5 Y2 C

0 @- A, P: }0 E' Hbegin P_mB_clean arriving
( s0 E. n& q/ Y. H   wait for 90 min0 ]& P7 y8 Q) E' Y0 y
   take down R_mB, a6 e% M/ v# R8 R; R9 _; P  y1 a9 X7 p
   wait for 5 min
" ]( f: H* E8 q4 r  O8 h& _   bring up R_mB
2 n! `6 K) n5 C, s7 I3 |* Zend9 W% u4 J2 N4 W6 [6 ~; ~1 ?

  w' u% o& I; `7 mbegin P_mC_clean arriving
: X' }3 q6 {, }0 V   wait for 90 min* g; _& t8 h. j" z& Y
   take down R_mC5 c* \- T1 t; ^
   wait for 10 min. J' C. @1 u5 E, m: |% r1 O
   bring up R_mC# {7 {# P1 I$ |9 w6 [( ]
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
  g6 ?" B) {. r   move into Q_wait
' k$ |: C( h; h  \, f6 l/ ?   set A_q to nextof(Q_m1,Q_m2,Q_m3)' M* z# N6 \; n
   move into A_w
4 O! G% Q7 F' Z$ p; a$ w9 t   if A_w=Q_m1 then use R_m1 for u 48,5 min
* ~6 w8 |( _. T$ Q/ y   else if .....then use ....for u 48,5 min7 N, v3 k% b  e" f3 `
   else if .....then use ....for u 48,5 min  9 [$ K% W' {- G5 Z! b
   send to die- |6 R6 H) z0 n; Z
end- w, w$ L/ I, D7 H

1 `) p0 _8 q/ [7 A8 B9 a1 r供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-3 13:59 , Processed in 0.017135 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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