设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7028|回复: 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'
. {6 u( O6 |& Q  ?) O*/
8 a/ R3 c8 H, ?0 b9 l$ t, Xis$ E5 }+ s7 u* K
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. @6 b7 p9 L/ E# ~* j% X$ Edo9 u) ^( I  q  d$ y1 v! V! r
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 `6 _- j/ ?# O. `* ?; `7 {/ O
        if current = @.Destination -- else return" |# w6 L, n% V0 Q! \5 `) d
        then3 i# n) k* W" c+ r: ]) n. e1 ]
                @.Destination := void;- B! i5 n8 f0 x( k& ?
                if @.occupied then
8 [3 Y7 W% W) ~( {, J+ ]9 `                        part := @.cont;' M4 R0 I- `) Q* p/ K9 m0 ?
                        @.transpOrder := void;
$ b$ E: A+ p3 n/ U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! R9 i# ]/ L# V! h8 A3 g                                @,root.eventcontroller.simTime);
" I( o% {7 N% w& v' |4 i; }                        @.HasOrder := false;
9 E  w& l+ X0 I                        @.DrivingHome := true;
/ S, n/ \9 S; j4 H# H                        rgManager.tryToStartTransOrder;
; {+ ^+ l  q! c8 m+ f# N                        if @.Destination = void
, ^8 B$ B- a1 Q+ H) a0 Q                        then -- no transport order for vehicle @
* f% {7 a' j9 n8 S$ a+ D                                @.Destination :=
6 }- v' V7 t0 B/ ]/ m4 E; Z                                rgManager.nearestFreeStation(@,track.~);4 D& T. e/ }7 J" X
                                newDirection(@);   0 W6 m# W+ _- F& Y# w
                                if @.Destination /= void then. R1 p7 ]% \1 q* t; F$ X% f4 e
                                        @.Destination.NumReservation :=* R) z  Q. L% p$ b" k6 a
                                        @.Destination.NumReservation + 1;
* {9 G% d5 H( s+ v- |                                end;
- |0 W8 L, X# h& b                                @.CurrIcon := "drivingHome";
' ~- @" I6 j9 ~5 `4 g- y                                @.DrivingHome := true;, U7 \' z% {/ @! U( T
                        end;
9 ]  B. w- Q' P8 I8 f6 t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% _/ N% Y& s' z  W3 p  o( N
                        part := @.transpOrder;) ~) P( [, B. K( }* k+ d
                        part.move(@);-- load part$ ~7 d# r) D1 G; w
                        @.CurrIcon := "load";
5 g. Q" G' q+ I" K                        GlobalDistObj := part.globDestination;
; ^5 I) A+ C( m/ w( Q+ A8 e                        assignLObj := rgmanager.rgAssignL;4 }- I9 G2 E  a6 t
                        row := assignLObj.getRowNo(GlobalDistObj);
0 Y4 b" Z/ x; M* i3 Q+ X                        if Row = -1 then -- since 70
* A; E# T7 n' u                                if lan=1 then
3 X3 u2 T; b8 D) h. K! [. X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: U9 A; j/ x9 ?% w% g2 y) k4 Y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 {/ H" V; ~4 F7 Q                                else
# O# N; H: D1 B7 x8 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# p5 z" x: v4 }! S1 [4 i1 i( y                                                to_str("in docking station: \"",?.~.name,"\""));                               
' @5 K. g* q( Z+ J* G  t  Y# n% e                                end;
& Z9 g9 j$ T6 h7 L% ?0 N  p; @' [                        else
- k2 s) O$ l4 f* g. R                                @.Destination := assignLObj[1,row];
$ c- x6 w/ }5 `! `) _1 W; W7 c1 S5 }$ O                        end;                       
# e8 g) |0 Z) D2 j) U- W                        newDirection(@);  r% v% ^+ d0 X: E) @$ j/ w
                        @.HasOrder := true;
  l- w; t5 L4 d- J6 c& r! C                end;2 d7 O7 X, j+ C$ a* W
        end;9 |( p& m4 X% Z' u% l/ n: I) J
end;        -- of the method7 i" ?8 G; x# H( |5 L$ \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - s: ]% \4 R1 X- G

9 _/ k4 L6 m6 X0 }  x" t这是AGV_putin中arrive的method。4 N' S- a  X! ]8 V- E
, C: e& ]8 o, K3 W
当到达物料速度越高时,这个报警更多,: y/ [: L& t9 b4 t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 n+ t' U: V  n# Q. O8 n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 m/ i) \+ X5 j$ T# C
6 d$ b; |5 X1 b另外一个小建议,就是move,所有的move都可以这样0 m; ~$ I' W3 E9 K0 m
if not move() then debug end
" m% l) b9 [0 i; X2 X5 L! H% [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: C4 |% o9 H7 j) u) I2 |8 Dplant simulation中的free libraries有AGV模板,
' d$ t4 P1 \9 z% g8 n里面也有案例。7 J* H! O6 g' |+ n/ F/ E
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& d6 ]6 s( p/ y% l6 |8 p: f# I, `% l9 Y0 O. @4 i  [7 r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " R- E0 x9 {- J$ o# U( K9 G
6 k; C8 L7 J4 D6 T
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 u" m2 E" C" T6 n0 d% K+ C, }这是AGV_putin中arrive的method。
+ w* ?* Z- G6 a
# @$ w) p+ j2 D4 M( F0 b6 D3 h) W2 a当到达物料速度越高时,这个报警更多,
$ h1 G( f8 ?6 t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-12 01:43 , Processed in 0.020867 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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