|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢% `' V# ?$ q5 o' ?% C
, f) k2 w9 N+ v" K我的问题是,在每个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中的数值,不知道会不会有什么不妥。+ m; v( K7 \' N9 t* j v
! Z8 C# y, C* Y
begin P_read arriving: Y4 h' @' t3 f+ i6 T
while 1=1 do begin0 P$ |9 ^' P7 g' W! i
read A_tote from "data.txt" with delimiter "\n"6 r; X; Y. F* o3 w3 R- E7 Z# p. R
read A_time from "data.txt" with delimiter "\n"
t6 @* g8 i0 M* l) s4 w+ _) { read A_leave from "data.txt" with delimiter "\n"
) e' G* r# O. Q0 X: t' w) Q: a! [ read A_picks from "data.txt" with delimiter "\n", F, u# P3 S m9 {
set load type to A_tote8 S8 C5 {/ g" H( S# L" S
if A_tote="tote 1" then set A_induct to 1
" G& W9 M3 A" A+ B9 n4 A1 l" { else if A_tote="tote 2" then set A_induct to 2
, c" }; a7 v; @; a else set A_induct to 3 # D7 P4 D5 U) t1 ~# x c7 X8 E
set A_i to 0
7 v# r" j8 u9 h) ~# ` clone 1 load to P_induction
2 ^0 V' W3 |! W5 x wait for A_time sec
+ ^6 ?, T0 j9 h# m end
8 [" t2 ~+ Y Bend
' [' {' o/ x5 V5 {7 {( Q
9 O) ^- s' w! f2 `7 J: C% ebegin P_induction arriving
- @7 C6 F0 N1 N/ F: T1 @ if A_induct=1 then clone 1 load to P_pick14 r7 _5 h4 L: ~* I& k4 a$ G
else if A_induct=2 then clone 1 load to P_pick2# I( V8 A: D/ Q6 w8 @) m
else clone 1 load to P_pick30 E5 @. E& @+ s* _" H+ P- v
end j) K# i3 Z0 g4 e
: T7 Q" s* k0 g" @begin P_pick1 arriving3 f* E% b; i: n* x- P0 G1 a
set A_i to 1
1 g* J- a4 n' S0 B6 y1 S' y8 ~ l" e move into Q_induct1
1 C) w6 x8 M8 l* \& h# o move into pickaisle.induct1: o) O5 N7 V! c' I. n8 y( M
while A_i<=30 do begin. e n A& p: W$ ]! v( R
travel to pickaisle.con(A_i)8 B, c; ^: I: u7 U- v6 g3 U
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec& M. f4 \0 I' j
else wait for 10 sec2 Q$ s, y- _/ J8 t
if A_i=A_leave then send to die: b) P2 }. K9 O) f; r# |1 _& _
else inc A_i by 1
) g& Z+ A! E( J6 b {& f, }6 d end s8 ^3 x0 ]5 z2 ]: C2 O6 t
end
1 @( @' g* n" n
* z7 r5 F' E. J& z) x0 i6 N4 l7 V; cbegin P_pick2 arriving3 ~, m8 K. z; @" h
set A_i to 11
/ \, d/ F: q* k$ ~9 D5 J move into Q_induct2. R! f; Q5 C! d
move into pickaisle.induct2( a) v) L- ]% E
while A_i<=30 do begin1 h6 P u( p: S, |5 O' c9 |. @, v# ?
travel to pickaisle.con(A_i) ~" {& V. A- Y* I3 X6 t2 a
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 _- M N a3 v% P* q' O8 x; J else wait for 10 sec! h% _0 l( f' c
if A_i=A_leave then send to die3 G$ _9 n+ G+ s1 F; b: j
else inc A_i by 1
, L$ Q1 [1 \. t- G, ^0 g end( N! {% C/ k F$ n" c
end
/ r4 \& Q! i/ N, w" Q2 f9 f4 z- E F1 w: L( S$ K4 ~
begin P_pick3 arriving/ G0 }, n0 `( s. ~; v# H
set A_i to 21
7 f" n/ _+ D; `9 E) Z! Z6 k move into Q_induct3 t; r" M# O3 w/ ~! ?. _5 j* a
move into pickaisle.induct3
; p0 }0 Y/ z0 a while A_i<=30 do begin% _5 ~# N; \$ f5 p; D' `
travel to pickaisle.con(A_i)9 Q0 I# _+ }+ A0 c; ]2 T7 m
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
! Q+ `* J/ o# j1 u1 ^' c- g4 Y else wait for 10 sec& ~, y$ o" l2 P3 F+ ` n
if A_i=A_leave then send to die1 H% F; |- l6 o2 F" R9 x1 Q0 u+ }; D
else inc A_i by 1 d6 F1 p) G8 C+ P& E4 _
end
* U" j* j& z2 Tend |
最佳答案
查看完整内容
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,其它按你的 ...
|