设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10262|回复: 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'# d4 i8 q& \# A
*/
4 \2 E& h. B) q$ s$ Cis1 x  b' r" |# f/ x) x4 p  N
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 s- K- F7 z) Jdo5 S: M2 F3 F" s+ P3 ]& W) e* a
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ Y) ]# d) p0 R0 M# C* z
        if current = @.Destination -- else return6 _9 f# D1 F8 y3 j1 x
        then
  ]; v9 e1 Z0 W' W0 l                @.Destination := void;
5 o5 ~) `0 C1 f( y6 p9 q                if @.occupied then
0 ?* {/ m4 z% L2 ?; K                        part := @.cont;/ {1 G" L2 T; L# C' T
                        @.transpOrder := void;+ n9 w$ S" P" ?: C; {$ R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 D( P) ^$ ^3 x$ T
                                @,root.eventcontroller.simTime);
9 W# l5 ?! f7 z$ t                        @.HasOrder := false;
# B7 w+ e7 y: s7 x                        @.DrivingHome := true;! O% `  c( t. g# m
                        rgManager.tryToStartTransOrder;
3 I* Z4 x! R$ j  h7 N                        if @.Destination = void' w+ [4 n( ?- Q1 `- A
                        then -- no transport order for vehicle @
( y( A. [' N# W3 }2 y                                @.Destination :=6 `# l  e& j) l6 b: C: I% R
                                rgManager.nearestFreeStation(@,track.~);
: V+ L" s6 x' R1 I5 F' C. e                                newDirection(@);   ! K0 Z( r, t0 {
                                if @.Destination /= void then
  y" n3 L( U, j  R                                        @.Destination.NumReservation :=, q$ [" |9 `( b) k( m' I
                                        @.Destination.NumReservation + 1;
+ e- c) ?# b9 P5 k9 `6 V                                end;
( \5 n# {+ Q) I$ z" e& k                                @.CurrIcon := "drivingHome";0 |8 l7 [; m+ a! G' `
                                @.DrivingHome := true;7 r% {% n" i" S& t9 z
                        end;
' L$ b: g1 ~+ H8 [6 k1 E7 M" S2 [" D' I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 H7 g+ V! a0 ^% {& o# y
                        part := @.transpOrder;
$ P7 M1 C3 S, N- j4 ?  N! H0 B1 d6 u                        part.move(@);-- load part8 T' V4 W3 F6 z; O/ W( _
                        @.CurrIcon := "load";
+ M9 D3 X- y! q5 R! }/ w: }. |                        GlobalDistObj := part.globDestination;
/ ]$ g/ N* s4 x                        assignLObj := rgmanager.rgAssignL;- z! ]8 ?# i, Y- w$ W: {: _4 j
                        row := assignLObj.getRowNo(GlobalDistObj);
/ j; O* n" C8 ~7 I                        if Row = -1 then -- since 70+ r# q5 D+ K8 J4 C/ |
                                if lan=1 then/ g- V0 T& a/ q; H: [: q' Y/ z' P, Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* H- R8 J1 ~% e& Q. b( D; E7 P                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 O! z/ J7 p& h0 {0 @, L& O& i1 q9 Y
                                else2 I0 b9 [; \  v9 v
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  c& X% Q, R' w3 s: R, B                                                to_str("in docking station: \"",?.~.name,"\""));                                8 D: {; Q0 o7 j. T) k
                                end;  K2 A5 d  A5 ^
                        else
+ D' C0 O" K0 k                                @.Destination := assignLObj[1,row];- I$ r5 B; G7 u2 B
                        end;                        & {3 v4 o( h: B' l- Z
                        newDirection(@);
9 Z, k. `3 L: X, i                        @.HasOrder := true;: G5 e, B2 B. l7 K
                end;
" P5 A  j8 Q6 Z: a: ]0 B; }* A+ a        end;1 J* a6 [7 H/ K- M! F/ b) f
end;        -- of the method& H. H/ w& n/ b2 I8 c3 {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 V9 j) c- J# T; ]* q) _7 O, e/ T1 Q1 E
这是AGV_putin中arrive的method。2 [$ L) Z- J# N, m# d

5 y+ L9 X) B3 t0 ]7 _当到达物料速度越高时,这个报警更多,
' l: [! q% b; }/ q1 k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% S- r4 X: d; V  P0 |; m5 R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 m& v! B  ^3 R; q: G3 [  H

' S2 N9 s9 k1 u  i2 \/ G另外一个小建议,就是move,所有的move都可以这样
* ]  H+ X0 n+ ], ~0 h# r1 _1 kif not move() then debug end5 w. g7 i& E8 L4 ~! _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' e! u7 R( V/ X2 N1 V$ }plant simulation中的free libraries有AGV模板,
9 ?/ c' P5 t4 ^. @/ o; i里面也有案例。. [9 `2 H; m- q& w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* L$ o3 K2 c! R- y
" t5 H/ ?! L! A8 s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 M1 z7 r8 n' E, o: h" \8 E; }
  c. G  e; C. Z) q* n* H, S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! R) l  s7 P4 I
这是AGV_putin中arrive的method。
' ^7 K8 c! k+ n6 {3 w& W  O
: Z9 G( K1 [- }. Y  A5 V0 \, k8 L5 m当到达物料速度越高时,这个报警更多,

5 q$ i4 `. E7 b2 H1 V另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-23 04:04 , Processed in 0.015468 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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