设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9541|回复: 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'
+ a' P6 G  V5 Q# P' |7 w3 a*/
' i+ K7 R" b2 o* m2 b$ Y1 ris& W7 ]3 ?7 }" `4 O9 A: K* V+ J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  Q3 }# `: `' m# f
do3 H6 P+ d5 `" O; I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ n% `" M% `2 `* I4 _# w3 R        if current = @.Destination -- else return
& U6 |! e# t3 Q* a4 ]        then
+ I3 Q4 V# h1 p6 \/ B" N                @.Destination := void;8 r, e3 }; h: o
                if @.occupied then9 E, ~% o: ?) q8 A
                        part := @.cont;8 a! r) `% |! k/ b: I* s* Y
                        @.transpOrder := void;  v& U) L* O( [8 H( R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# T3 i* N1 t: o1 B! {# j5 z" T
                                @,root.eventcontroller.simTime);4 W8 }+ o6 g% Q* E% p5 p, n
                        @.HasOrder := false;. t5 f- U: w: Y; F! T0 E
                        @.DrivingHome := true;  `' s7 z! P1 n; G* y3 w* D8 y
                        rgManager.tryToStartTransOrder;, j; Q7 {5 ]$ {$ m
                        if @.Destination = void
% a- |: E. Z: j                        then -- no transport order for vehicle @  P/ }/ v+ a2 x6 }/ s& i
                                @.Destination :=
2 O, B# a* B0 f                                rgManager.nearestFreeStation(@,track.~);
% V( J6 z; Z  L6 F- t0 j                                newDirection(@);   
9 I5 r: ~! J5 o  l8 ^                                if @.Destination /= void then
# [6 O: }8 `- k6 l' i+ H                                        @.Destination.NumReservation :=% E: r/ _4 Z: K$ m, `
                                        @.Destination.NumReservation + 1;& E4 ^; [% I8 `, E
                                end;
  e) V, d' D# O                                @.CurrIcon := "drivingHome";) z  y& i6 d: k. I: r
                                @.DrivingHome := true;' N, i& [6 P- |$ @8 b1 N- l
                        end;
2 w( Z- t# l7 b8 s' {  @$ i& K8 S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 N5 t7 u6 e3 s; [2 R  d. H# r
                        part := @.transpOrder;5 f1 a' k: Q9 E- Y/ V, j* i9 g
                        part.move(@);-- load part
* }& j: N* s+ R                        @.CurrIcon := "load";
1 e- k9 o7 p/ F0 u$ P+ G. w                        GlobalDistObj := part.globDestination;7 {. V9 c6 k6 ]6 M4 a7 S* @1 J! w
                        assignLObj := rgmanager.rgAssignL;; k- _+ e1 ^9 E- @& L) S, Z( @
                        row := assignLObj.getRowNo(GlobalDistObj);
1 x- i1 w6 O! G                        if Row = -1 then -- since 70' |8 r* x; ?! [! b! M+ V
                                if lan=1 then
1 v! _' V, S" h' V( N) y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  q3 x8 {: i0 P2 ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ A( ]- K) I7 C
                                else3 r, k9 I* d- X2 t& n0 D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ o  H$ I7 ^5 h- h
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 O% f) ~) s& {' ]. s/ ~0 f
                                end;
) J" x4 k/ P: J  i$ S                        else
" s& @, K$ T) U0 w  K% v                                @.Destination := assignLObj[1,row];
" P! F6 l* Z6 T                        end;                       
- }( J0 ]/ y' H# m0 h, |                        newDirection(@);. o  s+ w1 w" D, \
                        @.HasOrder := true;
- @+ s, j7 ]$ v: E0 `- p* x                end;
% v3 t& o4 P+ q9 b5 ~        end;: \3 q' r$ R; Y! I$ ]8 C; b
end;        -- of the method% F" J0 F( [6 I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ t8 Y; o% R3 f. v4 w9 a2 z* g
, P3 [, O* ?& C* J: M! y这是AGV_putin中arrive的method。
' t! {5 a" ?) a5 N$ p9 ^- i, t7 r( a/ D8 T2 t  ^3 q
当到达物料速度越高时,这个报警更多,
1 L6 _6 z7 Y2 Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ R3 q6 T! B2 L$ b5 o4 D
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  i0 T* g5 y, W: J4 U# |9 K. Z- [
. v  i4 n# L( D- v8 r另外一个小建议,就是move,所有的move都可以这样
. @- s% a; z; k& `if not move() then debug end; E+ J6 Y% s/ b6 _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ o7 @- v, l$ G* [
plant simulation中的free libraries有AGV模板,
9 |7 D/ e# |$ k. j( m里面也有案例。. u: L; ^8 R  [% \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 [: x4 M! I1 |- z
$ E6 Q! u! T- i/ `2 [- z, J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& X) p4 h, [) N1 j7 l' z7 a
) Y! B0 f5 v: ?% g' B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 n' f$ E3 M& i' Q8 Z8 q6 T这是AGV_putin中arrive的method。4 t2 X4 v9 E9 j' v/ O2 `

# G2 Y/ c* b  q2 j1 y& X6 l7 k( m当到达物料速度越高时,这个报警更多,
' ~! l9 c1 R5 f; b7 @3 i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-7 00:10 , Processed in 0.020974 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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