设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7320|回复: 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'( m& a  @  @# h5 `! e5 Z% V' K* a
*/
$ j6 ]3 ?3 |( ?' T6 G$ m; iis8 I1 d5 {' L2 z3 |5 e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; h% l& z9 _) ?/ x: p4 x  L
do9 K& D( V1 [4 ?! w
        Lan := rootfolder.Internal.Tools.AOLlanguage;: Y0 v" e8 l" v" m
        if current = @.Destination -- else return2 z- W6 E. s1 h2 S4 s
        then
# @/ A  I% {- |                @.Destination := void;
# a+ r' ]) l: @0 b# F/ `                if @.occupied then3 Z" o. B' W3 M3 E: ]: O5 _9 E8 a+ i
                        part := @.cont;, d& X! ]: ^8 H5 x; ~8 R
                        @.transpOrder := void;' X7 w/ d! ?8 U' g) D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ s6 V6 ^$ G7 _# o2 K$ {3 X: ^8 ~                                @,root.eventcontroller.simTime);7 T" y2 b# r7 I# k* d" ^
                        @.HasOrder := false;
2 Y5 K5 G5 `" ^1 ^" {8 @4 t* H                        @.DrivingHome := true;
9 ]3 }* k' C$ @3 U                        rgManager.tryToStartTransOrder;
. N! }* m3 I7 c7 }                        if @.Destination = void0 Y6 E# ]" k/ m0 N4 v( X. ]
                        then -- no transport order for vehicle @
4 _( U% S2 |3 ^! f! U3 m; {                                @.Destination :=
4 Z  e. P* K: R, a- c: g                                rgManager.nearestFreeStation(@,track.~);7 E) W& O5 y5 S' h
                                newDirection(@);   ' h  S( D5 \& O& ?7 i. I+ ]- n
                                if @.Destination /= void then
# Z/ w4 _' I: u2 \' G1 O9 y                                        @.Destination.NumReservation :=% @( y9 y$ [6 Z( D
                                        @.Destination.NumReservation + 1;
! m& \; q# |3 I: Z. E3 H. h: f                                end;
+ i4 F8 n* c$ w0 L/ q                                @.CurrIcon := "drivingHome";8 S3 Q7 q$ s3 A/ Q+ _( k; p
                                @.DrivingHome := true;
( y5 S3 W: k' h& v" z2 \                        end;: v: p% J  T  ]  @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) K% p% k0 k+ c4 w3 ^, t3 _* h                        part := @.transpOrder;
' N  d7 `( U- p3 X                        part.move(@);-- load part9 P  O) B% {; ^+ o' a! j
                        @.CurrIcon := "load";
6 e+ v* w. [& `; p: I                        GlobalDistObj := part.globDestination;
$ b1 X+ K# n% j# b. K                        assignLObj := rgmanager.rgAssignL;
/ E- K% G* m! G) U. ]: i2 Q- T                        row := assignLObj.getRowNo(GlobalDistObj);
4 _1 S0 F7 e* Q3 o  O                        if Row = -1 then -- since 70
" s* o- d- o. ~9 e4 s                                if lan=1 then
1 S, b6 C% A7 J# _( A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t7 P4 W! _0 Y% r0 V/ e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% }8 x6 J) L; B9 r' U' l
                                else2 O" e4 ]* m! ^) Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! e7 Z! H' n6 Q. K& X0 a/ [3 P                                                to_str("in docking station: \"",?.~.name,"\""));                               
( N6 x; Q& m3 l                                end;/ M; I2 o$ e+ v. S! Q  [9 Y9 {! d- ^3 _
                        else
% C. [# O4 Z) Y/ o2 X! H8 @* F/ z                                @.Destination := assignLObj[1,row];8 j1 ]( Q8 o$ R, ?5 r, B
                        end;                       
' d# b9 T; @4 Q# F( x+ s5 V                        newDirection(@);
  }3 U  q% `* o- b3 ~                        @.HasOrder := true;. h3 `# f/ |  E" m; O
                end;
! a5 t1 y4 Y. y        end;
9 c2 j  A; _, v1 N0 K! ?$ H" }& Q+ qend;        -- of the method
  D5 |, w4 W) B2 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 ^  @- q$ x, {( }1 L1 w0 G3 c% J6 }* T
这是AGV_putin中arrive的method。* f; n5 a( p9 T1 J, N

( @; D$ X0 N' V# T( y; j当到达物料速度越高时,这个报警更多,' a; i% Z  B0 R$ a' t( w6 z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- H7 r: o$ y6 H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ `4 \( P4 ^! o
; ?" `* `4 p$ g+ `
另外一个小建议,就是move,所有的move都可以这样
: j& l" Y, L* d- Hif not move() then debug end
* H# |( ~6 h9 [( T2 k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 A) O* k- L- F
plant simulation中的free libraries有AGV模板,
  ?: ?% X) T% }- `, m里面也有案例。; q9 Q8 z+ m9 I: Y2 D  K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 @8 v0 q; o% j$ F1 z  m6 e0 V/ P
, ~/ y% d! y+ T, I. f+ V, C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 x# G$ L5 I" l& M: w0 ], N
1 b0 _! W9 ?1 t1 h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + L; ^2 k; V0 ]9 T
这是AGV_putin中arrive的method。
3 p* p8 I1 {' k3 E. h. [. O. i+ ~1 n2 B2 S( V# n$ m3 ]7 j
当到达物料速度越高时,这个报警更多,
- \4 Y1 ]7 g* z; b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-3 23:52 , Processed in 0.024638 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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