设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8629|回复: 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'
8 o/ o. L4 f( n: |+ o  w*/  f3 ~- F8 m  X8 {9 _5 t4 Z
is" U& E  J" E5 g8 S; M- Y/ j3 u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ i% M; a5 L1 z( @; h  K
do. m/ M8 @$ H5 Y, `( b
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 A5 ?/ T" R  s
        if current = @.Destination -- else return
0 T; S3 u; V! j' Q# a        then
+ T' `+ e" O; F; F0 U                @.Destination := void;
" Z$ y( A0 }: s  D5 r& [                if @.occupied then
. M9 l+ j+ E2 d) T$ }                        part := @.cont;
! s) W( D1 E! Y# e                        @.transpOrder := void;
: k" _# e# N8 |+ X6 N$ t) C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A. `3 t: n; x1 B                                @,root.eventcontroller.simTime);$ t0 E  g5 }! Z/ V) z) J
                        @.HasOrder := false;' S9 [3 j2 q4 L( B, M
                        @.DrivingHome := true;
. Q; z3 z; [: K! X                        rgManager.tryToStartTransOrder;
2 V/ E' p+ C( D4 a/ r0 l+ p( @- b                        if @.Destination = void! E5 w2 y" Z2 |* _
                        then -- no transport order for vehicle @( K2 c* b7 @! ~, `2 e, q
                                @.Destination :=
9 t6 p2 d7 m# n& ~                                rgManager.nearestFreeStation(@,track.~);
. v. u0 R4 `+ d: d7 a8 c                                newDirection(@);   
& _1 f: L3 H8 Q                                if @.Destination /= void then
) l& k1 d3 o* O- ^' I+ u5 v3 o- g                                        @.Destination.NumReservation :=  Q# D: h6 K, S. o! S6 F9 S
                                        @.Destination.NumReservation + 1;
: ^, }3 L4 w! h% J. V3 v( H* @                                end;
# u5 W1 G5 {! N8 ~                                @.CurrIcon := "drivingHome";
: q2 x8 n) F( z5 U6 Z! a                                @.DrivingHome := true;
# V" {9 G6 o6 E' B8 u$ |                        end;
- f: @) _5 H0 \4 B. U8 o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: F$ \) q" |5 g* A/ G; [+ J" k$ Q' a
                        part := @.transpOrder;
5 i6 w9 |2 u+ P6 i  a                        part.move(@);-- load part
' S" ~' [* I" y                        @.CurrIcon := "load";: D$ F( m$ z- q/ O0 Z
                        GlobalDistObj := part.globDestination;
7 K* e2 e" |5 A0 l5 N1 Z9 t                        assignLObj := rgmanager.rgAssignL;
8 `  T- g+ O* `( o$ g4 ~7 r                        row := assignLObj.getRowNo(GlobalDistObj);
$ _9 X2 r2 N9 }; p: _  o1 z                        if Row = -1 then -- since 70) Q& g' }$ j. a! W3 g
                                if lan=1 then5 z7 y  J# D5 u
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% T2 n" B8 W$ Z" H& j# H% `( d                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ y  f& h1 }' K1 v- ?
                                else7 ^7 I; [+ l! I& g5 X& s3 S
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 y" c/ X1 _0 b& |                                                to_str("in docking station: \"",?.~.name,"\""));                                8 q" M1 B6 E; R9 P
                                end;1 M5 u" Y3 G2 \1 r8 ~" r
                        else1 f4 L. ~: l  n: C0 x
                                @.Destination := assignLObj[1,row];
) P; ~( M- h# m6 O                        end;                       
2 Z: F" Y: T' J9 h                        newDirection(@);+ m) E9 b* I. v" e9 {
                        @.HasOrder := true;
( P6 C9 R3 |0 L" j" \                end;* e: C/ Q8 h8 |4 y& G$ r. z
        end;
% {8 q. o" L3 C: @8 Dend;        -- of the method
- s' K# L) R0 |% O& R' \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % @! l7 ]& l% W6 h

- D+ w1 D: G( {1 q# S: g# w1 Z" a这是AGV_putin中arrive的method。
$ c- K4 y+ ]" k$ c# ~
9 f* c7 v/ D  L, w9 ]3 M1 l4 \当到达物料速度越高时,这个报警更多,
) }: V$ a" f8 B0 D% u- |可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; I1 j* y1 b6 m0 r0 z: ]7 M  i0 j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 W( l  r/ K$ U- k
6 x0 _1 B; b' f, J( j" L0 p  B
另外一个小建议,就是move,所有的move都可以这样+ r) D2 p- \4 X; ~3 U
if not move() then debug end
0 S8 [1 s. [; r2 m! ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( ^2 x# O1 h% x' j6 |3 cplant simulation中的free libraries有AGV模板,, B) d8 x9 ~, J6 M# l/ C) g
里面也有案例。
/ F- }+ P$ h7 R' `/ W8 m我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! y, y6 |% Q* B$ T; l

! T. T2 d# {4 i2 ?) `: S- @7 t3 |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ D! t1 o6 g2 o! ^" {

: n5 T3 Q4 Z9 W3 g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . H  k: n+ c+ Q
这是AGV_putin中arrive的method。
- H" o( }. c8 r( z. l# b# p- T* R7 }! v2 |) i1 y
当到达物料速度越高时,这个报警更多,

, H0 T3 H/ ?( b- F/ r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 01:25 , Processed in 0.014532 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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