|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢, Z8 V8 g# e4 [; u! c! w) b' V
& d1 b% B, e; D7 I
我的问题是,在每个P_pick的process中的while循环内,总显示错误Expecting QueuePtr or Location, but found PathPtr. 在我定义所有的attribute的时候,从来没有定义过任何QueuePtr or location or PathPtr,为什么会出现这种错误呢。 我这里面A_picks是一个30x1的array的load attribute,我想用A_i这个load attribute来读取这个array中的数值,不知道会不会有什么不妥。
- ~! ]9 W5 f9 l( {& v$ B/ p @- ~, E6 v. E; m
begin P_read arriving& F- c ]' M1 D- n, e# _/ w8 o
while 1=1 do begin
5 Z7 F3 j+ e u R read A_tote from "data.txt" with delimiter "\n"
O3 I' Y1 v# Z) y read A_time from "data.txt" with delimiter "\n"
! l, w: `, o; z read A_leave from "data.txt" with delimiter "\n"7 X K5 Z S/ I1 L7 q
read A_picks from "data.txt" with delimiter "\n"
) J) n% t. T1 c set load type to A_tote
1 G7 V, S+ E. @! E9 @ if A_tote="tote 1" then set A_induct to 1
9 m- j0 _& X6 A; b0 W- \* n else if A_tote="tote 2" then set A_induct to 29 ^1 i* u* W0 s* ]
else set A_induct to 3
5 k& X/ g( k3 \& C7 M set A_i to 01 U) B4 T; o9 c8 t6 g* w p
clone 1 load to P_induction
( Z. z$ U( [0 u/ l wait for A_time sec3 X# Z: h( @! X3 p& C' c0 `& Z
end
2 A* Y: I t' w- @9 j' f2 B! \end
4 X! i P2 u) g- k
9 d/ d6 g0 d! r) v6 ^8 v: |begin P_induction arriving
/ M1 ~% @& Q# K, }# w if A_induct=1 then clone 1 load to P_pick1
! X/ R: P, L. i& S, w& b& r1 @ else if A_induct=2 then clone 1 load to P_pick2 t! @# `1 k- p$ V f* ~
else clone 1 load to P_pick39 j$ l# W# [ q9 P& Y/ B1 c: ]0 K% q, }
end+ X, K" l9 u" p; f1 S8 C( u* i- X
+ n% ?. k9 N9 N. nbegin P_pick1 arriving2 [6 t8 d# @. V1 P' g! B2 T7 |
set A_i to 1
; C* y' M6 W' A move into Q_induct1
4 n* `5 u t1 f2 D8 Y* T* ^ move into pickaisle.induct1
3 Z) I6 h/ F' E4 E5 N) A6 d while A_i<=30 do begin
m4 X) a. j' O: }/ `, Q# J% ? travel to pickaisle.con(A_i)
! f3 X1 F. `! h. o& E, G if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" R4 B: ?6 X, W" F* G" k
else wait for 10 sec* a* Y# M9 D3 ^4 j& e4 p4 U
if A_i=A_leave then send to die( v( c! n6 L# ?; Z% b0 U0 E6 ^, X
else inc A_i by 1
5 j3 C$ \" ]; `9 |$ D m end. H9 I3 I+ m6 F5 k+ B9 \
end
2 ^! g9 ?7 u- H+ D( C4 A+ y' N, q3 r l: r, r) M1 l% O/ v4 ~
begin P_pick2 arriving
# H' H& R' \0 m! k- M set A_i to 11 E0 q) C5 s5 ^5 y, A; d6 P
move into Q_induct2
, z: W: U/ i z- n/ P move into pickaisle.induct22 \, c9 o1 g" P0 L. }/ ~8 a$ W' E9 _
while A_i<=30 do begin: ~2 {7 h8 s2 A
travel to pickaisle.con(A_i)3 S) \* _9 L7 N: R
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
+ S/ R; v; S- @2 |& {( x else wait for 10 sec" @5 K( Z1 m! r% L
if A_i=A_leave then send to die7 S H7 J7 B* V
else inc A_i by 1
6 i: s& D% n7 o5 | end1 k* j+ s! k- {
end
/ M/ c$ W. G; Y3 k& L
c! J4 ^6 }7 g' ~+ ]1 l3 bbegin P_pick3 arriving) t* n* X l" a+ m$ q3 |' l
set A_i to 21! s/ [9 U1 \ b# U$ F
move into Q_induct30 v% L) R( S9 @2 |) j
move into pickaisle.induct36 g( N. ]9 d1 y) F* Q
while A_i<=30 do begin9 U7 ]+ h1 m) O" l: _3 D% n
travel to pickaisle.con(A_i)+ a; `& M9 T A, i
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec9 v7 [( ?. k9 g6 D0 [
else wait for 10 sec
+ u- G7 }5 {' ?" [ if A_i=A_leave then send to die
' B6 U- K9 ]0 r+ U, N$ t9 @2 s else inc A_i by 1" M5 w! ]- M9 i% L2 @6 }: t- K
end# D: ~( f' k; c, o
end |
最佳答案
查看完整内容
pickaisle.induct1/2/3是个什么东东?
move into后面,应该是一个station或control point,或者Queue/Container/Vehicle/Segment之类的东西。看你的报错信息,这个induct是个path么?
AutoMod Editor的语法报错信息,有时候会指在下一行,必要的时候要把上下几行都看一下。
另外,你的几个P_pick是完全重复的,建议以如下方式修改,可以减少代码编写量:
1. 创建一个Process:名称为P_pick,number of Processes为3,其它按你的 ...
|