设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8933|回复: 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'; K# z- D! I$ [
*/
. s- e* D4 k* Y, m, [3 I7 lis# O# e) R- R5 w3 K) l
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 P8 @0 T& H6 H+ Sdo
; D4 I4 ~- }8 r  U8 ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 L" G1 Y3 t1 n        if current = @.Destination -- else return
3 w. m; p  x* t' O" |% z6 S  }' ~        then
% j) i8 o8 n4 f3 G5 H& m2 M6 J3 d  Z                @.Destination := void;
# z% K( n  `+ K                if @.occupied then  p: F; m. q1 Q  R1 H; J
                        part := @.cont;% N) B0 K$ b8 y' }, x
                        @.transpOrder := void;% A9 i. n, O( e3 b. ~0 T! S. r4 g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  x7 z. |! P6 L- J' E% d
                                @,root.eventcontroller.simTime);6 `9 [; e$ ?: E3 j# B, A1 L
                        @.HasOrder := false;/ T6 E- U: y! [
                        @.DrivingHome := true;( }  ]- }' I+ f
                        rgManager.tryToStartTransOrder;
; @0 c. b0 F) v* o. Q9 _6 C/ ~                        if @.Destination = void
1 |: q* [" x- V; {) }& n( c                        then -- no transport order for vehicle @8 ^8 f+ H& q. b6 e
                                @.Destination :=- S& H9 q& _  ?4 i. p$ M$ ^" w
                                rgManager.nearestFreeStation(@,track.~);
# G: O( N9 K/ x* e# T% B# d                                newDirection(@);   
3 p1 g# Q) o" B                                if @.Destination /= void then
% K& i/ m' A( a% c                                        @.Destination.NumReservation :=- N8 \, N% _, f6 Y
                                        @.Destination.NumReservation + 1;4 O0 |/ b4 g# V2 n% Z, V7 q% B
                                end;
% Q4 A/ L7 w0 s. y  o: h                                @.CurrIcon := "drivingHome";
+ A. K& f8 O) S* }+ L0 ?                                @.DrivingHome := true;2 `. V/ o6 i0 s! C. _
                        end;7 _- ?5 m1 M. i3 F- g7 Y3 U0 U% `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. _- ]% ]" a0 z. F
                        part := @.transpOrder;
1 s7 E8 Y- H( K" h. o; K                        part.move(@);-- load part
8 _$ V$ M- E" g, @, O- D' z& o0 t                        @.CurrIcon := "load";
! F" F5 ~9 M$ m$ I" l) L                        GlobalDistObj := part.globDestination;
. F9 [' z8 M) g  l0 M) n* V                        assignLObj := rgmanager.rgAssignL;
& y- y6 u4 [! B                        row := assignLObj.getRowNo(GlobalDistObj);
$ w3 O2 j' ~; D" |* E0 d: }                        if Row = -1 then -- since 70
7 j( d( T, O# m7 Y3 ?' R                                if lan=1 then, }7 u' ?4 R$ D3 x( f. o1 b5 z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# v0 R. e3 K( |' x# F3 y- J% Z9 g                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 m3 h/ a0 d1 U. l5 ]4 B
                                else
" u) q! y* l& u) k: ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n5 P& d8 K6 H+ s                                                to_str("in docking station: \"",?.~.name,"\""));                               
' f- p- ], [4 E                                end;3 l  k4 N- d( w' N% L
                        else
" a* r2 q8 [3 @) O6 y, }                                @.Destination := assignLObj[1,row];3 l4 H: W; L( h3 f! C& c
                        end;                       
& q( R# R2 J  E1 S/ T# h. i. ^                        newDirection(@);
6 d  y! ^# R9 D3 C" K+ d                        @.HasOrder := true;
4 [7 T- C& u& m- ?                end;
" M, Y/ h) w! Y, c8 H, E4 e+ t6 t        end;( K$ G; r) L8 U, D1 ]
end;        -- of the method9 P' \- c6 p2 W  N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , C# X& \  v9 ?/ k6 M

! R) c9 X: m: b' v0 R& z' y! C这是AGV_putin中arrive的method。, D; y1 r; Q, Y& P& M
7 R( H1 `5 J. T/ I+ |
当到达物料速度越高时,这个报警更多,( a5 Y+ e4 A9 y0 J$ B. f  n( d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 `- i1 s3 X; i: y7 {3 r2 J程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ f8 s$ y5 n. h4 P7 g4 `* q8 M

0 ~; z- d! e2 D- d) g另外一个小建议,就是move,所有的move都可以这样
3 F  n9 ?4 K# i3 s: Y) ^1 V( Vif not move() then debug end1 M4 x. z% s1 n; |  R  e: M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' `  o/ H3 j/ t2 z& o8 zplant simulation中的free libraries有AGV模板,/ S( G; b# O$ x& l) x8 i' t. P
里面也有案例。
1 w/ {; t7 S" \- ^$ B) z$ T& E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 O) n4 i3 y1 o
' o  d, m; ^5 m* l# l) ^$ a
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 y/ F- E) i2 _  q" S4 O5 ^- T
% p  H+ P1 ^0 s1 b  H那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 P" i  t+ {% H) E% t% R这是AGV_putin中arrive的method。
% ~* m/ y& |, V2 L2 A8 z
/ W9 o# X( I4 B. W) d  y; s; o当到达物料速度越高时,这个报警更多,

1 ^( J# Y: [$ M) w) f4 G, b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-5 02:10 , Processed in 0.017902 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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