设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8313|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
& Y6 g- u# O6 j. ~
* c. R5 y/ x. ^) {: _9 C& K6 ^3 M底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去2 ^- }, P6 D7 M4 z- ]# `

" X6 p3 ]9 S$ M; X; |  N3 q不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
+ L. o- S" K/ l/ G3 _" T
- o9 ~: K5 g2 n0 C% Y8 x* Z" y- L
--------------------------------------------' T' m1 ^" J6 h* `* D' m( H
begin P_something arriving
8 P! J3 m# p! Z9 \- o' \   move into Q_wait* C9 @' E+ t# b; q
   move into nextof(Q_mA,Q_mB,Q_mC)/ O) J5 K& l  h: T3 x" V% g- |* I$ J
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
& ~* I7 a: @7 X7 F/ g0 @/ g5 |   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 e+ n/ ?" F7 M
   send to die8 V  ]- g+ o/ @/ b- w
end

. b- T1 i# r" [8 m( r% J& | $ \, F7 h! F: E5 J% V" H9 ], J; \
begin P_mA_down arriving
" ]$ o7 z7 F+ H   while 1=1 do
- K' i9 W' a+ L1 }( d! l   begin, U  D3 U6 R: f* ~
   wait for e 110 min
7 P, [. S2 k/ X   take down R_mA' @! J+ T; o+ l6 A7 P
   wait for e 5 min
6 n- L  x6 b6 }( V# U) P& ~# J   bring up R_mA# j% z( v! V: P% w, G; A
   end; S# a  s: \! j6 a' Z
end
# R" j( H' x" ]
8 T( Z' \4 X3 c( F2 S7 w; m
begin P_mB_down arriving+ A/ b6 ~; G9 T$ t) P$ L
   while 1=1 do
2 @- l; t: J% {7 W1 u! _4 c   begin$ H# |2 W0 b% P" n7 a1 [
   wait for e 170 min; P1 O5 a: @5 B" C) b6 z
   take down R_mB
! n$ U7 V* S6 A! x4 h$ z; M# M   wait for e 10 min7 g! f, S. Q0 j9 J$ N9 L! O
   bring up R_mB
- W% c6 W0 V& [) t1 V0 N# o   end/ ?2 s9 B( \, }  b( m, J: E
end

( l  [4 m" J0 n- B3 ^* c& I$ t; b
5 D5 w* @4 }" U0 i7 U+ W" b- D& p3 Ebegin P_mC_down arriving
8 \- C' e4 C, m  t& a. V- `   while 1=1 do 5 I! P, N0 E) F& J& ]
   begin+ K0 }. x) j8 X, v, ^5 ?: i8 M
   wait for e 230 min
6 a* n4 ~" |; s# O9 C5 V+ T   take down R_mC
5 G, D6 z! e' y& p+ O1 g   wait for e 10 min
0 C( a: u3 P6 Z" X( A; O   bring up R_mC
8 l8 @2 y' q7 Z) I3 H   end/ x9 z" U) S5 x6 J; R) }
end
' ~/ \7 t* j  f2 e# u

! o/ m$ H5 _0 R# W/ g5 Z! Bbegin P_mA_clean arriving
( d' Q* B8 `1 Z4 ]. S+ u* \! X4 g   while 1=1 do+ s5 i& B" [) s; y1 p7 m
   begin
. C2 H3 |" o2 T# A1 k; X& }8 j; ]. Z) X   wait for 90 min% D! U/ M0 l! P" L* V; _, C- q
   take down R_mA. M* v. ^0 f% ?+ @
   wait for 5 min$ Q' m( L( F: J: x
   bring up R_mA/ z' N$ f7 E& ?, L% i' D
   end* Q; `5 ]& i# q4 s
end

/ Q8 `9 t' i8 v: P& G; [7 p8 C, J & T# \  v! x# @
begin P_mB_clean arriving
' q1 N# G2 Z$ s# h$ j# Q2 H   while 1=1 do
) [& j5 y9 ~6 U7 |% \   begin
& W+ M! K$ r1 a6 C8 u! I   wait for 90 min
. x% }0 v7 k" t' r. n) b   take down R_mB
. z8 P$ L! K5 a. R! S6 @2 O   wait for 5 min' |( ]8 |# G( m2 \4 W
   bring up R_mB7 [  v: h( E; B
   end
' ]9 q, {! _, e3 Y- Uend
2 @( Q- S; a, B1 F+ [
2 J) B2 c* Z  ]$ C
begin P_mC_clean arriving" {+ v+ Z5 u7 {* k
   while 1=1 do
4 O# T. q7 g4 L  V  F; D. n! ^   begin0 l+ v6 c& p, C/ u1 w
   wait for 90 min
' j- O& ]2 m) @   take down R_mC( ~: J( h) B, H
   wait for 10 min$ f( e4 k; \: ?/ c2 r; i3 E  t
   bring up R_mC3 s7 G, `. p4 _; s9 b( U+ z
   end
$ S7 R- U; L0 o1 {end
. T% Q5 {4 s! [" ]% A+ o
----------------------------------------
- g* Z* H0 |! W. ?, F
2 x$ K% P8 N: m' M! h* YExercise 5.9
4 g9 n. L" O3 f0 F. Z. Y0 M. x
; d* R* ^& k1 s) U  e% E
" I" C$ a# f4 \3 U/ I. k. o, ?* l2 qCreate a new model to simulate the following system:
4 D3 F) E7 }: `8 N1 X* zLoads are created with an interarrival time that is exponentially . @0 I0 M; }* l$ [! X; _
distributed with a mean of 20 minutes. Loads wait in an infinite-8 N6 p% T3 e& @
capacity queue to be processed by one of three single-capacity, / X2 u* r! Z, k
arrayed machines. Each machine has its own single-capacity queue ! n& z# O( |/ t. U
where loads are processed. Waiting loads move into one of the three
2 A4 H4 _! H# f9 `# E+ }queues in round-robin order. Each machine has a normally 7 V; G3 b" x" K5 m( M8 V
distributed processing time with a mean of 48 minutes and a standard
8 y4 a' H( L* h- @% Ndeviation of 5 minutes.. g7 x' a2 [2 Q9 k) p- |
The three machines were purchased at different times and have ' n# d1 P: w! @2 \
different failure rates. The failure and repair times are exponentially 8 ^' `2 d5 P- A/ g& h
distributed with means as shown in the following table: : E* D: s% {1 ^9 P" G
Note The solution for this assignment is required to complete
2 g- A' k, \+ M) o! L) e8 `exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 9 C, ^0 J) @4 b2 X
your model.
$ o5 Q$ s+ C4 C  M$ T0 @
: [$ N# ]: K. w+ K6 x# u' QMachineMean time to failMean time to repair8 t4 T! Z8 ]) `, ?% y1 M
A110 minutes      5 minutes/ N6 q0 _; Z, O1 c
B 170 minutes     10 minutes% P6 u4 p! g; A* C& @* @
C230 minutes      10 minutes( U$ e2 v5 C$ v+ \9 p9 W
! U7 j7 t6 b3 K. \
The machines also must be cleaned according to the following . ~% R3 G7 V0 g7 j+ ?% o8 e
schedule. All times are constant: % A& r; u8 j3 U: h5 p% d
5 ?" E9 i) E; C/ b; a4 f% |
MachineTime between cleanings Time to clean
! ?% h  P5 m. A( c' W8 o5 tA90 minutes        5 minutes
1 [7 E# \) T! q9 oB 90 minutes       5 minutes
% p$ M$ n4 r; k) ^; h  AC90 minutes        10 minutes' d6 y* V. V1 Y, {! ?% f

. Q8 {* M# Y1 |) w1 rPlace the graphics for the queues and the resources.
3 ]) }4 O) V% u2 _" _Run the simulation for 100 days.
, }8 h5 i& q7 B  T& O8 X" q$ lDefine all failure and cleaning times using logic (rather than resource : S1 m5 R* r: Q& M1 C
cycles). Answer the following questions:4 J  G( L0 s, w" d0 Z- h; p
a.What was the average number of loads in the waiting queue?
5 k! p2 m5 g# \( B# Gb.What were the current and average number of loads in Space? 9 Y6 \" A8 M* k2 X( d2 \) h  S
How do you explain these values? " _0 ]3 t  |" R7 \- x& p

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉2 `& ]& [% e4 J! ~
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 q0 d0 D; i7 c2 H% e1 H这行好像也不太对,各位先进觉得如何呢?7 Z3 {% v9 e# C# z9 J+ `( m

2 B3 T% _* V, M0 g9 z* tbegin P_something arriving
0 ]$ d( H% G) b( V2 ?& P   move into Q_wait
- L5 `" n4 U. o; Z3 f) T   move into nextof(Q_mA,Q_mB,Q_mC) ! o: ?$ g0 S+ N4 Q8 X- N
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min$ Q9 n: f0 y) }+ c  }; _( z" Q; Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( I2 j2 \% f& }# Oend
/ y+ s/ s5 b9 i8 _1 c$ [& }% r' y" u/ s) }1 U9 h  E
begin P_mA_down arriving
3 ]" g+ t& G3 A& n/ P   wait for e 110 min
3 Y" r$ J  t* l   take down R_mA
6 o" i# T+ X" L  E0 r   wait for e 5 min
! ^8 z1 t" E3 }& A& \   bring up R_mA  R$ \) T6 Y: b6 x, B+ Z: M
end
( d& ]/ `& v9 N9 C( q7 _* `0 F3 J6 Z( Q7 [% J+ u
begin P_mB_down arriving  ^& p3 J4 Q1 H/ T; @/ G
   wait for e 170 min! o; i4 ~( a4 Q5 _. o$ g
   take down R_mB
7 D5 _; v, K' U5 ~   wait for e 10 min
+ ]8 Q+ \/ {! j0 o: ~/ n* h- x   bring up R_mB
: v+ \4 t% v- ?2 l8 y& iend
: Z' o+ L* \! N" l  W+ O; n
( c2 K( v  p5 rbegin P_mC_down arriving
- v% s- T* _6 ^0 H   wait for e 230 min
/ p. k" _* w. H2 q! p* A   take down R_mC, R  d6 Q4 H* z7 H! `
   wait for e 10 min
+ {: O. j; C2 [2 O9 u   bring up R_mC  J6 r5 J4 b/ J7 `9 b! x7 H7 X' X
end5 Y- ~, C( B: U0 R! P' C$ D

. d+ o8 V# M/ ~begin P_mA_clean arriving
% q3 W1 X, Z, H! I, @+ [   wait for 90 min
$ B  Z; m% i' r" u! p; A* M: O   take down R_mA
* B: c& N$ [6 d9 P1 K   wait for 5 min) e- f7 v3 w0 t' f; \
   bring up R_mA, ^  I# B, `; n2 O
end
" o1 ?, l, g( C1 T
! K6 o* q5 x' N$ M( [begin P_mB_clean arriving9 G- t4 E9 g  R# c* Q# |5 \
   wait for 90 min
: w$ Q. c& R: r% u, B  k9 q   take down R_mB
* v) N& e" K! J( [! [) z   wait for 5 min1 n5 R* Y; P6 _$ z
   bring up R_mB& a$ c1 `( x2 R
end3 \$ r6 V+ R% u5 U) W9 [3 B; ^
+ s4 g. }" p9 P+ H
begin P_mC_clean arriving6 Z/ z$ ]. I( y. y( u/ o8 v! d5 F
   wait for 90 min
4 x8 P% C: O9 T% D, N6 \5 [   take down R_mC3 l8 n; @  \' k% a" L8 h
   wait for 10 min
5 A# D9 O' T5 k. O, S   bring up R_mC
5 O) i, H6 `1 g! `* gend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- u4 n8 p, j/ {- H2 x4 A   move into Q_wait
9 O% O4 e! U) F% S2 E   set A_q to nextof(Q_m1,Q_m2,Q_m3)
0 s7 ?! {  Y2 p- J. i; Q   move into A_w
# h+ @1 Z$ ~3 p1 n, a& o8 q   if A_w=Q_m1 then use R_m1 for u 48,5 min
% w; O: u0 O3 F  g   else if .....then use ....for u 48,5 min
' A( v$ Y8 Q' c2 s   else if .....then use ....for u 48,5 min  
) G5 G( |  E8 B7 `/ D; C   send to die; T1 t2 W& i) W( C! v7 |
end
! z$ h, X: l5 y0 |% {/ Z5 ?: R0 h
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 09:20 , Processed in 0.014799 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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