设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7828|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
' H% h+ }! G% B3 s
+ [9 e& Z2 [  N" B( k9 `底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 {' K9 }3 y( A( t5 c5 J, Z& U0 f- }! M" q1 y
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
. v4 \% d  U$ ]& A8 r" y* q7 G& y
0 F  j0 k$ F5 f. }$ \
--------------------------------------------9 L/ g$ ^# P/ {" {
begin P_something arriving
$ Q9 ?* z- c, C/ ?$ U   move into Q_wait
' D; g3 U% Y1 X6 `, d  W/ Y, z% h   move into nextof(Q_mA,Q_mB,Q_mC)
: L3 Y3 j7 H: M   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min( x& N9 W! {& N# E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ S8 Q; k" i  R- ?5 C# O! R
   send to die) K( U& p$ Z5 Y% \
end
" {9 |3 y- d3 Q2 \; n, S0 {! O
. @1 X) q7 r7 _. I0 H1 G
begin P_mA_down arriving0 `- P, T* j) Y5 z& |/ H9 ]' @1 t9 f
   while 1=1 do
/ v8 p" r1 q$ W   begin& T( ~5 A$ {3 d+ b' [
   wait for e 110 min, {% G# g( N9 V8 q5 X6 |& P/ P1 @
   take down R_mA
' v: w8 D. a$ T$ z; p   wait for e 5 min
; Q" p& G1 F. d0 L" F9 u; B   bring up R_mA
% v; ~8 S2 ]% Q) g   end8 p9 _1 l) p) j; ^! j* i0 o
end
/ k, K1 a0 t: b4 C

# F9 W, H; e0 f; a8 Q$ i0 H9 Zbegin P_mB_down arriving' p% L7 _, K. t# b
   while 1=1 do3 ?& C& k9 b( ~3 R
   begin
: b* {- w! \! V( {1 d   wait for e 170 min
+ P' _" A* K  W% G2 E5 I) g+ w  m   take down R_mB' Q$ p3 y; e6 X7 Z: j
   wait for e 10 min  v$ u$ {5 M0 e. V8 A5 F- T
   bring up R_mB8 F" |% e0 C! O0 }& a4 U5 W3 l; Q
   end
/ `/ u1 ^  T' I$ Wend
" l4 J4 l- `$ E5 L

# ?, C/ d3 V# L, c/ Bbegin P_mC_down arriving9 ]7 J# p' q; T# t0 \2 u8 t
   while 1=1 do
$ n$ G: G% K. B- Q; U. @" r6 S   begin
3 x$ {* Q  [$ v- U4 ~6 s0 A3 ^, v   wait for e 230 min. i2 R" ]; B) \5 q* v5 h
   take down R_mC# h( V+ A7 ~) `' N& R( m
   wait for e 10 min0 n& E8 v/ m; P( I
   bring up R_mC0 y9 [( A/ h8 O: @- G5 B
   end
% S. z3 @, c' v* e" iend

' ~+ d' y5 }/ D" h  Q + G2 r6 h9 T- ]' d! V+ O
begin P_mA_clean arriving- p1 m  `- m+ W, d" ~9 Q0 _" J
   while 1=1 do
+ ]( z- V" r) r! j2 d3 X   begin
2 U  H, D0 m! g/ M. |   wait for 90 min/ ?0 A8 E9 h/ t$ @7 Q8 ]$ g1 c9 C
   take down R_mA
% p/ I+ k* E1 @) R4 Q   wait for 5 min) R& I; @. v; R7 p8 Y
   bring up R_mA" A/ H3 I: }0 d# x9 ?4 b# {
   end
& Z4 X6 N5 `  k4 B8 d- gend
& w( T1 O, D: K  v
/ x! q4 ]9 ?; k8 L6 A
begin P_mB_clean arriving
) C4 i3 k9 p7 W* D   while 1=1 do
9 W( j4 Y- I( c# p4 a2 _   begin$ [# w8 D+ ]; K1 O; o! b
   wait for 90 min
2 C/ p& O! O6 v# V( Z   take down R_mB! j* Y6 C/ I9 v3 Q7 T2 A: i- C& |
   wait for 5 min
* V5 @7 n" Y( f( e# N: I   bring up R_mB
: J0 m) w+ j6 c, V, C2 a   end& O' U2 \# `- u( d9 ?# i
end
6 ]' @. w; J7 w$ E: P( g8 g

! h( S5 w3 g9 Zbegin P_mC_clean arriving
% v6 F5 F7 l: W8 K2 k* c+ r   while 1=1 do
- z, V* s& V8 \) Q% d' P1 P   begin7 O! g. X  A+ e5 V
   wait for 90 min$ V% ]. s, [# f  O: |; X3 a
   take down R_mC/ `: ]9 b6 ?: J( |; G
   wait for 10 min
% ?" T! E1 X3 H# k8 ?. d. V   bring up R_mC0 }9 o7 Y  Z' g7 t. J
   end. m. [  |: B" Z: k: ]) H; V# e' f
end

2 k7 S% l: @3 Q: p4 J8 z" C, r----------------------------------------
* M; |  K+ _! m. S% T 5 {. p' m$ W, G2 E2 |
Exercise 5.95 y" }2 k8 ?) k! m( r+ O
" u; _' G  ?% G" Y. S3 P
" t. t( j! N6 s$ G9 f5 G( J
Create a new model to simulate the following system:3 t1 y0 Y! {/ [
Loads are created with an interarrival time that is exponentially
# C5 W/ k  T, ]; S: e8 F% |1 n; hdistributed with a mean of 20 minutes. Loads wait in an infinite-# {* A; I  ^" }# _
capacity queue to be processed by one of three single-capacity, 7 }2 F3 Y7 g( [
arrayed machines. Each machine has its own single-capacity queue $ x1 [. _+ z% g; x' Z5 j8 B
where loads are processed. Waiting loads move into one of the three
7 \4 r, r& B, A6 {* e4 Kqueues in round-robin order. Each machine has a normally ) J6 z: ]% U8 q
distributed processing time with a mean of 48 minutes and a standard
5 j' o0 }$ r" J$ K6 vdeviation of 5 minutes." t$ S+ F( Q4 z" i! n6 y
The three machines were purchased at different times and have - L! P/ Y) D  Z5 Z9 ]& T6 {
different failure rates. The failure and repair times are exponentially
- v4 \9 t0 M8 {4 xdistributed with means as shown in the following table:
  {4 ?3 F- x! ]# s( n) O4 t- H" KNote The solution for this assignment is required to complete
2 t5 q) W  P2 V# Yexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 w  l7 O$ b# T) x: D1 a& D' o6 ^
your model.
$ l2 z# d3 E+ x" ]5 B- m7 F
2 K5 Y. g/ u! M4 j+ G- RMachineMean time to failMean time to repair) _  E& G" T1 J  {( F: ~; j
A110 minutes      5 minutes
% {7 p: {, ~% \' \+ o  p, W5 uB 170 minutes     10 minutes
' J- @/ Y# ]; n! kC230 minutes      10 minutes
7 e, h: n5 @% v9 b4 _7 F
- F$ z/ h2 E) q- `8 u: f6 c# R: MThe machines also must be cleaned according to the following
) z2 h& ^. R3 u: Z, @0 _: |* Aschedule. All times are constant:
8 x. R3 X% [( I8 s% C! y2 B0 ?, s
MachineTime between cleanings Time to clean
$ i! [; x# w2 j% J) l, [& m5 D' HA90 minutes        5 minutes
. y0 R7 H' A3 B3 a0 d6 gB 90 minutes       5 minutes
1 `7 n' w  I, k" V6 b' lC90 minutes        10 minutes+ l" f3 u8 T8 s4 y
# j+ a3 @7 t4 _: f. M' b
Place the graphics for the queues and the resources.
$ ?; c3 e, x# T/ V  a0 |* jRun the simulation for 100 days.' t' k" p0 Z9 H* Q3 P
Define all failure and cleaning times using logic (rather than resource ; P- o! @! u3 S1 _# x. d
cycles). Answer the following questions:
9 s$ c2 a0 ~: {( ^a.What was the average number of loads in the waiting queue?) K4 t! }- Z" A/ t
b.What were the current and average number of loads in Space?
! C: W$ k- x* ]4 K1 `/ CHow do you explain these values?
3 s$ m: I' B1 j$ H$ R

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉. f) j% G0 _; @& ^3 @3 m
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- N0 h( v! f- I& V2 z( U这行好像也不太对,各位先进觉得如何呢?* k4 ?% {8 R( l' w+ S. [/ V( `
2 y3 v0 W! a; t, ?! o, P
begin P_something arriving
6 ]/ L% }* S* T, s   move into Q_wait( u. a5 ?" R) q/ J# l9 R8 I1 H' `
   move into nextof(Q_mA,Q_mB,Q_mC) 4 e3 U1 v! e/ R$ {) {# E
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
1 M4 L  o( \' j& P3 c   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; g4 G- ^  O& I$ ~end3 {5 f8 U; l" j
; K( w  a" x" N4 y5 U' n
begin P_mA_down arriving
. u+ S1 A+ v; E& L4 r7 g, V   wait for e 110 min! p6 i/ O) H5 B  O8 l
   take down R_mA; q/ X3 v) ~/ c+ h
   wait for e 5 min
1 M; |- v5 h, Y) W) w   bring up R_mA
4 u. Y/ A- M* e3 Dend
: o( `/ y. {( `; f- I
, x' l, l% w% W  `. M" Sbegin P_mB_down arriving
- f( C1 c4 t! R1 x4 z8 u- Z8 D   wait for e 170 min. q( i* g/ b9 P" S
   take down R_mB
  h* H3 M: j1 }" e5 g' o   wait for e 10 min6 `  J3 j) x1 a& |
   bring up R_mB
1 [9 ?3 e" q/ e9 G- }end
  b2 N  W* {  ~2 U1 X: e' u  M  j1 E2 O; q
begin P_mC_down arriving
6 _8 R& y: Y6 W" s9 z3 Z& R   wait for e 230 min( c. m' B5 R3 w- M
   take down R_mC' s% |) p4 ]1 \& e3 b
   wait for e 10 min2 Y! T) x7 \* B
   bring up R_mC
) W' z$ |" G$ U' Zend/ z! ]" T6 y0 C7 a2 c  P/ j' ]

0 @" f5 ^" ~! H" J3 y4 K; D$ Lbegin P_mA_clean arriving+ `1 I, e4 {8 O# \- Z9 q- ~! }- B( W
   wait for 90 min
: ]- t2 D$ Z4 E7 {2 v! x# `) `% b   take down R_mA2 F1 Q3 m; r% L0 j% M
   wait for 5 min
% v( l2 b0 v- }4 d9 t5 S( {  S   bring up R_mA
1 b9 M7 o5 j3 V, ]7 Hend
0 l+ ?( X' k  @. E  I
" G5 L6 t3 s$ m: X  Rbegin P_mB_clean arriving) w- X0 r9 z, k0 T+ W+ D
   wait for 90 min
8 X* J. }8 j7 _1 L0 x& `  ?6 D0 T   take down R_mB# T+ V0 X- {) h, E/ A
   wait for 5 min
' f; w; K. F- u7 |$ s   bring up R_mB
" E4 U* m6 ]3 D0 V/ [( }end( B" L. q/ |6 M: G

4 N& e6 n/ l6 e2 t9 c% d, y4 Ubegin P_mC_clean arriving9 k' {9 ?% r1 h  A# a, k* R+ t
   wait for 90 min
' L; m: z$ R4 [; X4 N   take down R_mC0 y. f$ F7 [; S: {1 r
   wait for 10 min# ~$ y9 [/ q9 @2 i
   bring up R_mC
* v  c2 K/ k7 O3 Y0 M6 ^end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
/ @  l/ Q( b1 Y# J# B% r* x   move into Q_wait
$ ?. c% |* Q  b, z( s7 m   set A_q to nextof(Q_m1,Q_m2,Q_m3)0 I$ I4 N( w# N/ Y8 i4 T
   move into A_w
, a) m* D! f0 H5 _   if A_w=Q_m1 then use R_m1 for u 48,5 min# N# {' q% f9 m! T/ K
   else if .....then use ....for u 48,5 min" c1 C$ Y: V* `3 L9 s# M6 R
   else if .....then use ....for u 48,5 min  $ E! S: k/ c0 r4 O8 R1 O- K
   send to die
2 b; K8 S( |. V5 V. r2 I7 }  _end; p/ @( C3 U- i, J( x( U  @% R

: m1 h* O, K8 B* U6 q, {# Y+ A供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-23 17:30 , Processed in 0.015813 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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