设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8445|回复: 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'" Z! D: }( u% M# R2 u" G
*/
& {* m" M( w6 His
4 M7 U9 a/ x; R+ i4 f* }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C2 G4 N% b$ I! v4 @do; J1 `9 P0 P/ f- V
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) q$ g. p; U/ Z9 s2 }        if current = @.Destination -- else return
/ r' ~% B# H% \$ x: _        then
' k9 o$ E+ q% m0 m4 v. ~  ^6 o1 S  e                @.Destination := void;  c( y$ K, v- e
                if @.occupied then
+ u6 O# |- X4 R0 j* G- b$ F                        part := @.cont;0 U1 m2 |8 G( _( F. T. W* ?  }. D
                        @.transpOrder := void;
: q7 p8 [6 s0 w% c7 b9 J' `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) I) B( }: C) \5 r" C; D3 N                                @,root.eventcontroller.simTime);$ w4 q* Y/ d3 w
                        @.HasOrder := false;& ?# d1 |( E, o* i* G
                        @.DrivingHome := true;
2 L% ~. R1 W5 c" R                        rgManager.tryToStartTransOrder;
# h% e: \3 X* J1 ]/ ?                        if @.Destination = void" z3 Q' s3 P& I# x& Q! Z- ?! h
                        then -- no transport order for vehicle @5 @' S/ Y) O; U2 S) y
                                @.Destination :=
  b& `8 s! z+ I) o* D                                rgManager.nearestFreeStation(@,track.~);$ D% T' A( |* l, m% f* f
                                newDirection(@);   
' O$ t5 ~" R/ p( e6 a1 O                                if @.Destination /= void then" c$ E. S2 c' z# V- O' Z. E
                                        @.Destination.NumReservation :=
+ i9 `7 Y7 [" E                                        @.Destination.NumReservation + 1;
$ V# W( B; T0 X' H                                end;/ q. {) O. f4 `& y: }" t
                                @.CurrIcon := "drivingHome";8 l6 }4 s) Z) ^6 j7 X* |& z
                                @.DrivingHome := true;
8 V. Z0 y+ h7 N                        end;
  V9 o1 a4 {7 G' C                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. s! a& \1 I2 s) z( I                        part := @.transpOrder;
) G3 d& [: N# x& f8 ~5 d9 N                        part.move(@);-- load part
! _, h) l. R5 u' }; u) O9 m- {9 y4 z                        @.CurrIcon := "load";
5 e& z8 F. E5 \$ x+ c- C                        GlobalDistObj := part.globDestination;
0 H( Z* {. h, h$ Z: o) Y* S8 ^( N                        assignLObj := rgmanager.rgAssignL;
. l8 W! q$ K1 s$ r9 e                        row := assignLObj.getRowNo(GlobalDistObj);
; t7 z) A2 R- k, v9 k                        if Row = -1 then -- since 70  o2 ~$ {0 }7 O7 @
                                if lan=1 then7 m4 G" u4 b0 K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 W8 K( d3 f7 t                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ Q5 E% S  M1 W5 u9 W
                                else
- B  S6 ]1 |0 x* g& l3 m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 O7 z3 K% ?( ~+ o+ R4 o9 e' V# W                                                to_str("in docking station: \"",?.~.name,"\""));                                7 q  t% k1 Q: W/ l3 |
                                end;
  H4 H! D' W+ [1 ]; _6 C6 F                        else5 l+ f/ y8 g" J- t/ d. o
                                @.Destination := assignLObj[1,row];8 f/ @6 v+ g& v* w& I
                        end;                       
4 e' X4 e( S" y% t                        newDirection(@);1 i" W; A/ U4 ?5 D
                        @.HasOrder := true;$ J& X, g) V! z( i9 g
                end;
! C, n2 v; N% e$ g4 M" g        end;' L; h, p" D. k2 n. J
end;        -- of the method
# _% ]/ L% Z+ `- k3 L  i( Z! A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  ^+ r) f7 a" |1 U6 l# }0 t7 d: H$ I2 |. n, C5 S/ _/ W
这是AGV_putin中arrive的method。, [  ]& j4 I4 U9 U& u+ F1 b

9 L- J/ S% h+ V2 R- \# B当到达物料速度越高时,这个报警更多,/ g4 Q* R9 c' w2 j: u# _
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 A3 ?# q  U: k# Y8 m; _, x) D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; X& P! K8 @# N" m: h9 r% ~- a' e& U8 e# w
另外一个小建议,就是move,所有的move都可以这样
& i' n6 U3 w& x/ Tif not move() then debug end
* V+ b7 C5 i: @% b( p* M. u7 Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; l9 I3 {' w9 W: G* @+ a
plant simulation中的free libraries有AGV模板,
! @" E) e3 z4 E% u6 o. E+ s* {9 P里面也有案例。8 D' E7 D! U, C  B. s* V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- l+ p' ]+ ?3 s; p; J% s
3 I. v# t+ |9 A* g* _& s7 x% W. @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 a8 k: d* [6 z

! z3 s1 N' z0 T5 X+ j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , [/ \! x5 O; [+ w" ^% X6 ~
这是AGV_putin中arrive的method。$ B% L. P9 E% @6 V1 N

$ x/ [5 d  D' z当到达物料速度越高时,这个报警更多,
! w3 R+ N/ e8 p
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-4 10:18 , Processed in 0.018903 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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