设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5687|回复: 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'3 i( Z' @1 V3 z3 d9 E/ x9 W
*/
0 U3 D  r) h4 h1 n5 \is
$ n4 ~6 }+ u% n" a& h        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& G# Z, c: D3 G- {do5 s7 F$ k( o2 W# y
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# _: n# Q# V  ?* R  x+ i) |0 r/ y        if current = @.Destination -- else return
1 ~2 k) Z1 P8 C        then
6 H# ]/ l" ?4 A                @.Destination := void;
  ?) M. W( p) _" ^" h9 r                if @.occupied then
5 h# ]% l4 x5 w2 C% |, F                        part := @.cont;
  j# N. R& a5 i. P; n0 q) ?                        @.transpOrder := void;
- r) n* |$ Q5 m+ k- }, ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, I$ {& ?, N& N& y! l$ A& ]4 Q" H
                                @,root.eventcontroller.simTime);
. i& D* U6 F8 V" n5 F2 W8 Z2 Q                        @.HasOrder := false;! k& C8 ^) e( m% c
                        @.DrivingHome := true;1 I; F- e, \4 |( q- K- f
                        rgManager.tryToStartTransOrder;# ?* ^3 G, C8 |: l  m) V, t3 g
                        if @.Destination = void
# [- E5 G# M) _, @5 k                        then -- no transport order for vehicle @
$ x, k  n. t3 ~' j: ?                                @.Destination :=: }1 C2 x8 Y7 g$ q# g
                                rgManager.nearestFreeStation(@,track.~);
5 |/ a1 }7 d! n) E                                newDirection(@);   6 o1 \- M. e7 n% l1 F
                                if @.Destination /= void then6 @7 j' _+ n& d9 ]& f7 Q3 x
                                        @.Destination.NumReservation :=
' t& @! |9 [2 k                                        @.Destination.NumReservation + 1;
3 F  p6 q; f9 H* J+ H                                end;
- h2 `. X' N, {, u5 n- _3 _$ N                                @.CurrIcon := "drivingHome";, p/ A7 g# A) k, V
                                @.DrivingHome := true;& v0 p" }( g1 Q+ e
                        end;
  {, n' q  H- f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 D* a% R! }$ [. _7 ^, \8 ~
                        part := @.transpOrder;
. g/ D- Z. Z$ W& G; x. U                        part.move(@);-- load part
9 R$ o7 o, @. g6 v9 O$ F* b                        @.CurrIcon := "load";& H) ^1 L4 V& x* r( [1 X
                        GlobalDistObj := part.globDestination;
1 B- w' y# t2 f, O$ q                        assignLObj := rgmanager.rgAssignL;
6 a; d; u" M& g# n" Z: \                        row := assignLObj.getRowNo(GlobalDistObj);
4 Z5 G. S& [$ P, z- t                        if Row = -1 then -- since 70
2 t$ S7 h) P# B+ ~                                if lan=1 then
, }/ x: X8 m3 J' y1 \, g" B7 J- u, ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- q+ b# o: N1 \7 r0 a2 a: G" q$ H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& C% {8 Q* [' }7 l( j- q                                else- T- O6 y$ I+ J8 I, S* M
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Y( Q9 K3 \# |& P                                                to_str("in docking station: \"",?.~.name,"\""));                               
  y6 R4 @2 v; I$ N- ^                                end;- D* M/ T4 N- m* [
                        else
6 g% A- p5 B' z3 @                                @.Destination := assignLObj[1,row];
7 B# h" B" d7 U% G                        end;                       
* G8 }) f7 z% S  H4 \* G+ c                        newDirection(@);2 f; H% a5 T6 S* b
                        @.HasOrder := true;( T4 L" f: P) r6 Y* Q
                end;% U+ G# X8 `$ r
        end;5 d0 ?' t- A' b' i. @+ {: B7 Y
end;        -- of the method2 h4 @% z$ N( Z2 h- t; Y# _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 n( l0 x5 G& v0 h2 x1 e$ y8 J; L. V: \+ t7 T  R
这是AGV_putin中arrive的method。/ Y; k4 F4 h. o2 }3 c; f, R

# K1 I* q) D: q* m当到达物料速度越高时,这个报警更多,% \; p' |4 {) _/ N0 h% P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; P6 e+ r( R& P! @) ?* [0 k& `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 ~7 ^+ }1 m, V& X# @/ d( `$ t* P8 N- ]
另外一个小建议,就是move,所有的move都可以这样
2 X# x: u$ W: p. i$ N3 Nif not move() then debug end9 a" M  _/ G  c  y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) a" G" ~+ a. ?' o( H3 Z9 gplant simulation中的free libraries有AGV模板,
" _! u6 }. p7 v8 [2 L% `& N0 P% h里面也有案例。
9 b" u- o- B+ Z- I3 B我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! A- v2 Y' }1 i- @- P1 R2 u0 [, w, [9 y
% Q5 V) d5 {4 A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 }, _4 S+ F6 [, W
- W7 \3 W2 @9 W7 c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! ~. ~5 ~8 N4 _! N% T; r4 J, u6 t
这是AGV_putin中arrive的method。
; C  [; Z7 R0 q7 W9 x6 p3 ^% C- O
, v+ i, _! C* F. |- @2 N. Y当到达物料速度越高时,这个报警更多,

  U$ p3 u  k4 s0 ~4 O' w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-14 11:40 , Processed in 0.021546 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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