|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢/ r1 n' M/ @# ]* \3 Z+ B. \, k
$ L, l5 z( s+ R' v, o3 z我的问题是,在每个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中的数值,不知道会不会有什么不妥。
; @* ?1 P1 a( _% Y
5 t0 r' c1 |) U( E! G: _begin P_read arriving$ V7 E+ n* F1 ]7 ?0 y
while 1=1 do begin! ]9 ]% j& r$ g. @
read A_tote from "data.txt" with delimiter "\n"
* _/ q0 T9 i4 R4 O. J# v read A_time from "data.txt" with delimiter "\n"
9 |* Q1 X8 E7 y {! S( E read A_leave from "data.txt" with delimiter "\n"9 }, _- R- h' ?% L) W
read A_picks from "data.txt" with delimiter "\n"( f+ @2 x& y4 e1 V# C8 t
set load type to A_tote
; p* m* m8 s& u: D" G: b; ` if A_tote="tote 1" then set A_induct to 1
; \$ v/ ~* |7 ~" z6 e) s: N else if A_tote="tote 2" then set A_induct to 2
3 j) Q7 S1 E$ [ else set A_induct to 3 4 f2 R+ `/ `" W% L
set A_i to 0
) ?, a# `- L7 f. p0 Y) h clone 1 load to P_induction
o, Z% A# j: t) |( Y4 L wait for A_time sec
1 x1 d6 ^0 F! s4 r! s) o end3 Z/ L0 \" c' Q: g- C
end
4 X* ]) Q/ ]/ X5 Q+ E; k0 q y; J5 B; |4 x0 J% b' D
begin P_induction arriving7 K. c1 ^, m; S9 Y6 f G
if A_induct=1 then clone 1 load to P_pick10 u! U, B. g& _4 S; e* j
else if A_induct=2 then clone 1 load to P_pick2
2 r5 {3 }! A3 V! e9 O9 c( B else clone 1 load to P_pick33 S- b* Z+ {& `/ d/ G
end
# {. Z" |6 L/ D; d- e* q P8 b7 V# R: e+ \
begin P_pick1 arriving2 J8 x4 l* j4 N: n; t
set A_i to 1. B% f8 e, t+ s! p. S
move into Q_induct1
: ?. f# r3 |9 V! h5 n7 G( v move into pickaisle.induct1
, W6 |3 y2 d- ?0 \0 n while A_i<=30 do begin7 X3 Z; T3 ` ^+ p7 q. W
travel to pickaisle.con(A_i)
3 s/ d( w8 y1 y3 ^ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec4 @: O2 _0 x2 ~3 [
else wait for 10 sec* G% o ]. [9 v7 Y
if A_i=A_leave then send to die
* z* R9 s- p& j4 g* l else inc A_i by 1
! n) k1 |# q G* }& c end
- m% c) T* q( Z9 H' ?' v# uend0 r; R( k! F5 Q, p7 I
4 \' X) _- d: x$ t: J- a
begin P_pick2 arriving
0 m+ f0 }0 }+ s* V! r: \$ P set A_i to 117 \ q9 `5 N: K* _: Q" O6 u H& @- G
move into Q_induct2! C9 X) r- h2 o" E% M$ f
move into pickaisle.induct2' s0 a* {: R' u
while A_i<=30 do begin: w1 O) H1 {1 x' [; P
travel to pickaisle.con(A_i)1 @+ `7 P5 h3 h0 d+ O
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec# Y) F9 {. ]. [ A" m
else wait for 10 sec
$ M& E( e9 f* `: A8 G8 d4 L" U! f% I if A_i=A_leave then send to die
9 ?! s# T0 J# l/ u3 A! Y7 T else inc A_i by 1
. G6 {7 _1 V: d, z$ ^ end1 H# {$ w0 F8 {! a, S' j, K3 @! z8 `
end4 ~, q, D t q( e
: j4 `7 }! c+ u& x, y# l+ Tbegin P_pick3 arriving
+ h5 m0 n' h; ~+ q set A_i to 21
2 o% H( x' k& y) A* `; W move into Q_induct3- H4 H2 w9 |/ I# Z& O/ U' F2 X
move into pickaisle.induct3/ w& l4 e" S0 M8 z& m$ p
while A_i<=30 do begin4 C0 |9 q+ S; f
travel to pickaisle.con(A_i)
+ \; }0 f- O, R if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% x- S! s" b& d3 S4 W
else wait for 10 sec. ^+ f: L, d7 g5 O! O5 N. ]1 }1 ^; G( U
if A_i=A_leave then send to die* r3 p" Y6 Z" n' C6 ~
else inc A_i by 1' `/ l' e0 J+ h+ @0 H9 [
end' s) T$ M/ J8 ^0 }8 @
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,其它按你的 ...
|