设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9250|回复: 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'7 R8 b- w/ I1 C& g4 C* b4 I( L
*/5 Q! h* c+ V! d2 Z% x" L3 L
is4 P" z8 f2 _  v! i9 M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! Y1 z* j# F1 q. I9 E
do# f" g- C; p" N
        Lan := rootfolder.Internal.Tools.AOLlanguage;- @8 a& N0 g: |/ j. t
        if current = @.Destination -- else return/ f4 u* Q# X& ~. N4 u$ H  ^3 v
        then3 G8 M& T5 @* y3 W. k' N. d, `
                @.Destination := void;7 _/ j. ^7 R% z
                if @.occupied then
8 N* w8 e! g7 o9 I6 x2 D/ y2 \                        part := @.cont;
0 F4 _7 @+ q0 e2 ^( {/ u                        @.transpOrder := void;3 ~/ ^9 y( P6 [% X  Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  A: [' g: r& q5 Z8 `8 ^( e3 K9 f' k
                                @,root.eventcontroller.simTime);
' V% W3 s, F% ?9 |9 @                        @.HasOrder := false;5 a* p3 F% ~0 d2 H1 }) Q
                        @.DrivingHome := true;
/ W7 ^6 j: X  U7 }1 P                        rgManager.tryToStartTransOrder;
/ c, B- Q) S% n% T6 q% y/ ^, W                        if @.Destination = void
9 q$ g/ N; s( Q! S                        then -- no transport order for vehicle @
9 d8 J6 S8 z) ?+ p/ j5 e' @- R                                @.Destination :=" {- ~8 I4 f; d% c6 P* p/ i
                                rgManager.nearestFreeStation(@,track.~);
0 ?9 }1 q! z8 z: v                                newDirection(@);   
  r* g; d. {5 i, r" W# V4 m  B                                if @.Destination /= void then
$ L' B% `0 r& ^. R) o- O) i7 E, Z8 V& R                                        @.Destination.NumReservation :=& A/ ~# x. O  {
                                        @.Destination.NumReservation + 1;
9 w# c/ t9 s9 T* n+ q3 {: j: y1 G                                end;
9 K* X; Z" ?2 j- g3 z                                @.CurrIcon := "drivingHome";
6 g) H- h; k5 K- `, a# U9 Q6 ~                                @.DrivingHome := true;
, e; \, L. K1 }: `                        end;% L8 N$ H% V- |0 G# i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 I/ ~* T) K9 c! m
                        part := @.transpOrder;9 O/ I* K9 n% Q: d( ~1 c2 A; p
                        part.move(@);-- load part
! Y# h& ?- f( r                        @.CurrIcon := "load";
8 i5 K2 X; J3 u7 g                        GlobalDistObj := part.globDestination;9 d$ J9 \% i, |4 [3 n+ l1 V
                        assignLObj := rgmanager.rgAssignL;
) u% N5 ^' t' @9 x                        row := assignLObj.getRowNo(GlobalDistObj);
2 S  |3 O& Y5 D# S                        if Row = -1 then -- since 70
1 r1 A( e3 ?+ |( y# T/ S                                if lan=1 then
4 C7 a+ \7 f$ P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 w# E  t* ~' i                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 i9 e, Y' G3 B6 p                                else# b( K5 h/ i9 R1 o! Q. f( J$ J) v# m( ~
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& `1 q: l" Z' X% b& [% h                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 E: u/ W2 k) ?  ~                                end;8 l6 P0 C  H* S2 p
                        else
: z$ x! t& q& E% T, h* U                                @.Destination := assignLObj[1,row];
5 I$ B3 Q. F& f4 f6 w/ \                        end;                        / M0 J& O; ?! u: x
                        newDirection(@);6 m* ]: H4 [; n6 Q! w
                        @.HasOrder := true;
. `% z  P% ]+ M                end;
# i, g* e) l3 z        end;! d- p4 T. x" y1 a0 s7 [9 k6 t
end;        -- of the method
/ i' |: M7 M' u" g: F' a0 u) i( u; N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % k( K! V; ]$ |  G
- u( t5 L  u: ]+ f
这是AGV_putin中arrive的method。7 ?8 P. }  U$ I7 e% p
* c4 ?. x1 f; t
当到达物料速度越高时,这个报警更多,/ r( R! s9 l( W+ \  x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 n* C' y$ k7 |; \5 L/ ^程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 c! [# X# |3 I/ {4 H: G
/ v" y! W" \+ V. z1 j2 L2 Z另外一个小建议,就是move,所有的move都可以这样5 j4 H, H% o8 v; E- |
if not move() then debug end6 J, A' J! Z8 p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; J) K+ @3 `4 B, z' M
plant simulation中的free libraries有AGV模板,! b/ l, H/ f' l1 f6 v9 E+ R6 h
里面也有案例。& b: G0 T. V2 d1 W3 _: j  X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' B/ I' O4 Z8 X+ P* V0 |* s# |2 s- p2 x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + X: y. n& w5 o( Z! g( |& l0 C7 ]
- i: E8 j/ M' r, O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . A) F% W# e2 T! n% k
这是AGV_putin中arrive的method。" [6 b9 n6 h7 f) g1 g0 ]% I9 l
8 y( g, e! U2 _
当到达物料速度越高时,这个报警更多,
! P& A9 m; i9 T# r. R7 M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-21 05:14 , Processed in 0.014676 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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