设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9654|回复: 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'$ y; ]: d* F9 a. u
*/+ w1 V6 {' j) M9 f5 b# N+ y
is8 k( |* ~% V( G' T8 ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( X3 g  c, V& d9 B7 S; Cdo0 m5 r* ?4 a9 p
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 w% w) l% v. W. \. P+ w( R9 h5 L        if current = @.Destination -- else return0 u0 M6 z5 [  a
        then/ X& s3 g- Y! y1 ^/ ?; U
                @.Destination := void;! L. h9 C4 ^8 f# @6 Y+ L7 l8 J
                if @.occupied then5 Q: w6 Q! Z$ A  p' c
                        part := @.cont;
. U" M$ w) _  k* D0 ~                        @.transpOrder := void;7 b8 r( I5 ~6 p5 E" j- W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! m2 g: N8 q, \  b
                                @,root.eventcontroller.simTime);
9 X3 K# B$ B7 J: U% g! ^# y                        @.HasOrder := false;5 `3 O0 G0 M6 P4 X0 B; c
                        @.DrivingHome := true;
& i" l  O8 r/ e0 N                        rgManager.tryToStartTransOrder;% c1 J! x, v* q7 h) `
                        if @.Destination = void$ t  I- ~$ S* I, H' ~
                        then -- no transport order for vehicle @
% y9 J0 w$ \/ L                                @.Destination :=6 r7 H/ T# e% }' H3 _; g
                                rgManager.nearestFreeStation(@,track.~);
7 S7 b# u1 h1 g9 _( d! ]* t6 M                                newDirection(@);   
  Q1 x3 R% e6 w- M0 B( T, d8 ]                                if @.Destination /= void then
. d/ H+ W/ E" O3 H3 ~, d2 Z                                        @.Destination.NumReservation :=6 w0 R- w( P0 B1 j0 K3 b* L* m
                                        @.Destination.NumReservation + 1;* U3 P! s9 E" ~# _, x
                                end;8 ^! D, m2 b* Q* I/ K& i
                                @.CurrIcon := "drivingHome";
/ i/ ?1 J5 F" N1 ^1 z6 D1 O4 r/ }/ r; I                                @.DrivingHome := true;* ?1 S  u% t* G
                        end;, B, N' J+ W  f; \, X3 X8 ^: s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% A; Z7 E( {  a  {0 E4 b                        part := @.transpOrder;" X) Q: f/ Z$ k6 F0 S6 `
                        part.move(@);-- load part( f, K0 ?4 j% a. L  [9 `
                        @.CurrIcon := "load";
: s$ ]7 ]5 c  B) d8 a                        GlobalDistObj := part.globDestination;
. Y9 Y' t! B2 n0 j                        assignLObj := rgmanager.rgAssignL;: a, ?8 W/ ~0 c
                        row := assignLObj.getRowNo(GlobalDistObj);
' T& a! i+ ~* C( k  M                        if Row = -1 then -- since 70+ Y/ r! Y; J, t' W
                                if lan=1 then
' }2 A$ i. q9 [8 ?8 f8 b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 V% b8 m$ M6 ?) g                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, |9 e2 S7 ^; F: J0 J) [                                else
0 _  X8 b5 g) j5 e6 {9 X- u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% i" j0 e; x4 q5 f                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 c1 w" ?% B& N. s                                end;
, E$ r3 f9 \) J$ ~4 f                        else
( @2 [/ x7 m1 g0 C                                @.Destination := assignLObj[1,row];
. F1 F3 G$ W8 T) S; w- o/ v                        end;                       
$ T% h" U% t: z1 b) {                        newDirection(@);% Z9 P4 t: t9 d
                        @.HasOrder := true;
7 l) Y  T* k4 Y! C" h                end;
4 ~& Q, L, B% P6 j' w/ m* ]/ _        end;- z9 N- J# p3 u( V, `: S; c
end;        -- of the method
# h* w+ q0 r, S0 D9 e; K5 J* k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) g" o3 ]/ N/ j# \" R# D! @% |! I1 y1 W
9 ]) E  v# w& G
这是AGV_putin中arrive的method。
4 i0 \' F! D4 O. ?* t! Y$ s( a/ P1 u; q* \/ R3 y2 u6 F
当到达物料速度越高时,这个报警更多,  O% a# b) \6 D+ v, d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& B" A% u0 }+ K- E' ~
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 U& n. R% r$ l" P% N
8 l9 c) I6 \' \1 P- q
另外一个小建议,就是move,所有的move都可以这样
  P) V/ m# f! k; x6 dif not move() then debug end7 F& @& ^0 @: A1 p1 W1 s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ q7 A" H5 S3 F7 W, vplant simulation中的free libraries有AGV模板,* M# m3 C5 O: x/ E; e9 t
里面也有案例。7 @  `; A4 I, Z1 i  w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! ^1 a; N! t* P$ [4 q* C
  _* f# A( E' m# Y' U; M& l9 L1 X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ q' I' \' }$ E! X$ ]# d1 t6 z( f; m* I+ M7 w1 \& q, U8 s9 M5 ^' b
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( T' x8 j3 u# D  y  ]6 D这是AGV_putin中arrive的method。, d& k0 ~2 e$ m% q( `6 `4 D
8 {& V+ i& W5 {" W% Z: r8 Q
当到达物料速度越高时,这个报警更多,

2 D$ s' ?) u2 o% K6 T( m0 E8 _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-15 00:32 , Processed in 0.016551 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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