|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
9 L% a3 c$ G) j" P
! e \; F. G- F6 O我的问题是,在每个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中的数值,不知道会不会有什么不妥。: ?6 E) q: e4 H
% }8 x" m! D+ r _+ Q* h2 A0 B# rbegin P_read arriving1 ?' G. I0 y p0 A# Z% v3 ?! ]
while 1=1 do begin
$ z6 P J* I" g2 U0 ?4 } read A_tote from "data.txt" with delimiter "\n"
5 i7 n; R$ I+ k$ b( x' G, {6 | read A_time from "data.txt" with delimiter "\n"2 w9 m5 B# a% h E9 J! p( @1 z2 x( ?
read A_leave from "data.txt" with delimiter "\n"/ Q2 M$ d5 h* m# C7 X+ d
read A_picks from "data.txt" with delimiter "\n"
& j% \4 t: O5 a set load type to A_tote3 b R; ~: @1 n& j! Q, B% p4 v- G8 K
if A_tote="tote 1" then set A_induct to 15 j' J. w, {" n) i6 E
else if A_tote="tote 2" then set A_induct to 2
5 }3 `0 `& j, a5 x: q/ u else set A_induct to 3
$ n/ y0 H0 } c7 V set A_i to 0
: `! {0 P0 T5 }, d clone 1 load to P_induction- Y1 u8 {2 K7 e' G( W/ i( C
wait for A_time sec
c7 `6 ^0 z. [* I# m& X l7 q end: E" V* V) y1 v- F2 S
end/ D. M# p) v6 \% V- D
, w6 `) l& z, Z1 q! K7 C
begin P_induction arriving
/ e l+ f: J4 \2 O0 O4 B if A_induct=1 then clone 1 load to P_pick1
7 z9 T7 X- P) L' G) Q: Q' K else if A_induct=2 then clone 1 load to P_pick2# u" G. x; b Z+ k! a; q
else clone 1 load to P_pick38 y0 v2 A8 \6 u7 _" r, u
end
; _- P, h$ _; P& \, _; c# [5 [2 F6 \, A$ @* k- V- v, f" u' d7 k0 z
begin P_pick1 arriving7 [1 m" i! [; T% m) W, ]
set A_i to 1
9 ~" i9 ^+ o3 V1 K( F) U# e: u move into Q_induct1
7 B; f5 f3 q( X, ^% s# O move into pickaisle.induct1
; `5 |0 P! r1 W7 K/ t, e while A_i<=30 do begin
, }1 `+ q; S+ F1 e travel to pickaisle.con(A_i)
: B, D3 ~8 H8 N, l: J3 N, { if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec5 o: s; b2 S" _. @. ` f
else wait for 10 sec
" j2 L. i ?" K1 q4 |$ r! Z0 k if A_i=A_leave then send to die. s6 T% y6 A7 h D
else inc A_i by 1) k' {$ c0 G5 Q: x2 k! ?/ H; r' H
end
3 C4 s7 E2 A2 V+ G% cend$ m* n6 Q# y/ G, i
# `& _% H! s8 ?$ Rbegin P_pick2 arriving% F% \3 Y4 B' k1 [& }3 p
set A_i to 11
$ ?1 s1 ]# S1 E3 T6 o move into Q_induct21 z. T n2 l* K; [0 {
move into pickaisle.induct28 ]! h- N! N% f) P5 z0 X$ g9 z' E/ i
while A_i<=30 do begin' i% d4 p$ F. ^6 K& G- `
travel to pickaisle.con(A_i)
4 v0 G8 s: N2 s. S. J% W( b if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- v h/ E0 R( y2 S1 ` else wait for 10 sec
. {+ i4 B( k1 g- n. J' ]' W/ {5 A if A_i=A_leave then send to die; n' \: F, _/ `( r! N
else inc A_i by 14 |4 y0 |# H; ~
end8 X& u4 T( D; B9 u- P" a
end3 q' U, w6 w% e& l# v) {8 O/ p: P: Z
. X+ \5 `" N0 g8 }( A9 Y- Lbegin P_pick3 arriving
9 a0 S3 d2 p* P set A_i to 21
3 [% e& G/ C& w9 W move into Q_induct3! g2 Z! v1 Z& q' d5 s
move into pickaisle.induct3
: p5 h7 J8 m& Q3 _6 j* K6 l while A_i<=30 do begin
& q& `) i7 L6 p2 |4 a9 x travel to pickaisle.con(A_i)
1 L* e: O% V0 N& q1 K1 @* ~% e if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ K* t; w# j' }& R: A else wait for 10 sec* [ d; m: c: e3 Z9 h
if A_i=A_leave then send to die' E$ X, c2 @6 r A2 |8 S- O I
else inc A_i by 1
3 Q6 O" n% w/ E$ ]9 D, J1 c end5 c) W: j2 z9 W" H
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,其它按你的 ...
|