设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6728|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'
4 g1 O8 \' w# v/ h& P*/
+ x/ c) g( x$ qis
. r9 p2 ]) _8 e1 M- m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) \) r1 G9 e8 q6 V) T3 H8 \do! o# q3 }. U$ M1 U. |/ y: W6 _  Q6 E
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 x) b* H7 I6 K9 n/ ]. D$ c        if current = @.Destination -- else return
6 K8 u3 J2 Y  o4 h        then  o: v1 ~" J" x. [9 t) Z8 J
                @.Destination := void;  c, @, I7 Q3 e& I- f
                if @.occupied then, R' ~; T$ l1 R( p! W7 }
                        part := @.cont;- R4 s% J! _) F% f6 @4 X
                        @.transpOrder := void;. e  H" q/ @- _9 q$ z7 f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ b* q7 h" h( Q" P& w6 G+ A8 k. i- `2 e
                                @,root.eventcontroller.simTime);5 j) m  V8 a1 s% {
                        @.HasOrder := false;
' n2 p( s6 O- N3 o" P                        @.DrivingHome := true;+ ]( }! c7 q0 G4 b8 _
                        rgManager.tryToStartTransOrder;! C' c  W3 O) M0 |, O* C; p1 B" J
                        if @.Destination = void
  P9 w7 y, Z3 a* l. V                        then -- no transport order for vehicle @
% V5 T$ u' F# U                                @.Destination :=2 l4 g6 r3 \% }: X$ @6 d
                                rgManager.nearestFreeStation(@,track.~);
+ s; _7 S( Q5 |8 `; |# r+ K                                newDirection(@);   : t$ e4 y* }9 {
                                if @.Destination /= void then2 y, B% l' {" x. \) n& _
                                        @.Destination.NumReservation :=7 O5 C: q- `3 k: w' M: J4 c, e
                                        @.Destination.NumReservation + 1;# D  W& s9 r5 Y2 N
                                end;+ }. ^  s8 t& ?: |* S
                                @.CurrIcon := "drivingHome";" H, P; z; O. n8 ]1 ~# |4 v, O
                                @.DrivingHome := true;
0 U+ O4 h* d% J" b/ T% t                        end;
. |5 V2 K' n5 S0 d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) @8 d' i" S. ~# e9 @  ]                        part := @.transpOrder;
# ?. {8 M9 q9 S* l                        part.move(@);-- load part
: K  A- t/ k! r' Y                        @.CurrIcon := "load";
/ [( o$ j( j7 I$ y) F3 M                        GlobalDistObj := part.globDestination;6 O, b! E8 f- p; d% D/ Z8 r
                        assignLObj := rgmanager.rgAssignL;
2 Q6 u$ h; x/ v  I% X                        row := assignLObj.getRowNo(GlobalDistObj);, o# L  l9 |: ~6 k, j
                        if Row = -1 then -- since 701 y; b/ {/ w: Q2 p/ v5 \* Z
                                if lan=1 then. @* O: F# ^4 i- C, R/ y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, T( W. l6 K6 x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: b# R/ l6 c: E# A5 b! M( i* Z4 c                                else
1 p! c0 d' e/ p( z5 k9 `# x" q' d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% Z( Q5 B) P) h+ V  b" f                                                to_str("in docking station: \"",?.~.name,"\""));                               
# O& L* g2 R! J# g' w) a                                end;
" U$ V: ]- n- f% Y2 m                        else
- Q5 w: I: A# x. I2 Y9 U                                @.Destination := assignLObj[1,row];. b+ Q, n( v% \+ J9 a
                        end;                       
% Y0 v+ d! r* o9 N6 @                        newDirection(@);
- D7 e5 ]( x; ]5 k. A. j                        @.HasOrder := true;7 m: \. f/ E0 r! q6 p( e
                end;
, j6 l9 S, }$ ?* @3 z- p        end;, N0 o0 }5 f, @8 S$ U- }
end;        -- of the method; h  u' v  h3 X7 ]7 ^2 Z( Q* H' G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " }" m9 H0 ]5 X/ q' ?5 I& J
" D" h" }' K( ]: l1 t: b
这是AGV_putin中arrive的method。
$ @% O2 R4 ?( k! O: p
, \" J4 E" I0 `7 ~, R9 i9 N4 m当到达物料速度越高时,这个报警更多,
. m, G  p! e, |$ g  e2 Z/ w  T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 B3 S8 Y4 E2 x/ V; S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ N: q/ z4 r$ P4 K* }: T
4 Q  Q  P) C) G3 p0 [) L另外一个小建议,就是move,所有的move都可以这样: C+ d8 B0 J' ?; G7 O' ?
if not move() then debug end
3 j/ Y/ P% p2 o) w' X' L2 _+ G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# T: M, W$ W$ ?+ P5 p) Z, {
plant simulation中的free libraries有AGV模板,
6 \& L9 {6 E2 P. u: X里面也有案例。
7 A6 {" p/ M# q( _% s  m! a* ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( t8 N) Z; R  m& g
5 g. G* N5 @4 D4 c- B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % D% G# i: |6 P/ d  ?* a: J/ o
% M, s  j1 U1 n% E, o  u6 u/ ^! h5 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 ?6 M, x" S9 J0 N
这是AGV_putin中arrive的method。
$ u6 O7 H6 `& O; C# Z7 U3 L* O) Y0 ^
当到达物料速度越高时,这个报警更多,

/ e3 H' {% I; v: {" B& a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 02:29 , Processed in 0.018488 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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