设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8481|回复: 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'* G* p0 R( ~$ F
*/
6 y- {/ K* H+ [" B) ?$ a$ tis
* u4 m0 r  b$ V+ h        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 p" E4 f7 y( C- I" ^0 j
do4 e$ T5 F: p" d& M3 y9 k# ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# H% a7 J. q+ ?7 C        if current = @.Destination -- else return2 t  M9 w2 ]6 e5 B  E* q
        then
2 i" K- D' ^" b, ^& N8 B( [                @.Destination := void;+ Y) h+ B# |; i9 C2 B
                if @.occupied then
! o; Z% j8 _! g# M9 S                        part := @.cont;. X, R! \, O" d1 y8 `4 v& j6 t
                        @.transpOrder := void;3 J0 o. Q. ^  u9 W% n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* O/ Z- |: }: t6 C/ O) Z" X
                                @,root.eventcontroller.simTime);: `* b% r8 P1 B/ M) v
                        @.HasOrder := false;
* _, N2 V) B8 c                        @.DrivingHome := true;
' I3 w! l' c+ B9 X  ?5 {                        rgManager.tryToStartTransOrder;/ e7 g; a- c; w, D' X+ a6 h
                        if @.Destination = void
3 I; W, a5 Z$ [+ n: p$ H                        then -- no transport order for vehicle @0 e8 l6 v$ d5 n5 t2 N% ?: M
                                @.Destination :=
) z& l- K  G. p7 Z4 \1 M0 l                                rgManager.nearestFreeStation(@,track.~);: q% m% {1 G- T. d
                                newDirection(@);   - G4 v7 _7 F+ I. k1 K2 W
                                if @.Destination /= void then! W1 ^0 l2 R# M3 W0 t  M6 r
                                        @.Destination.NumReservation :=
$ j, m6 c+ m" v6 ]8 b                                        @.Destination.NumReservation + 1;! w! f9 A+ d2 ~' v1 P
                                end;
7 L' [" J2 z" J7 L                                @.CurrIcon := "drivingHome";. t9 L  A# X/ V8 @* b
                                @.DrivingHome := true;
$ ^1 B' {8 E* k8 R% D5 A                        end;
2 `9 u, f' u2 E# `: d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& b; W0 j; |; ?% ]  I7 Q5 D
                        part := @.transpOrder;& u4 ?! _0 t- r7 Y
                        part.move(@);-- load part0 S0 Z% g; K5 o, O
                        @.CurrIcon := "load";4 \) q8 {. Z+ O1 }0 [
                        GlobalDistObj := part.globDestination;5 ?/ N- r: B  ^( j4 y
                        assignLObj := rgmanager.rgAssignL;3 w, [1 N/ G# {+ b5 k3 {. l
                        row := assignLObj.getRowNo(GlobalDistObj);
8 A: i  w5 k6 M4 j* r8 O                        if Row = -1 then -- since 70/ I' Q6 L  Z, i2 @8 v( _3 a
                                if lan=1 then
- Z1 e3 W8 y- ~) R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. |1 x7 s/ R2 X) N) Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) O5 A$ [) G  t+ n+ ^. ~                                else
/ Y  n4 D' r5 B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 G$ d8 z6 c7 [1 D1 c, i3 m& W
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 h8 L7 n0 w1 p
                                end;0 I* r5 E$ C( F
                        else
$ M# A* Q! e* t                                @.Destination := assignLObj[1,row];
# i8 Y$ o1 r! i' f/ k8 X# C9 H6 \                        end;                        2 b4 D, a9 I3 C5 g6 W7 p
                        newDirection(@);: i! ?# p7 C7 f, b6 |# s
                        @.HasOrder := true;9 L8 `* j; J! P) I% f5 m
                end;% F1 [% T$ e6 [0 F# k
        end;5 h$ C* f& F1 [  j6 F5 w* i. Y
end;        -- of the method
# y& {& ?/ ]0 Z& K5 b$ K( b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ J% U/ i8 ~5 Z, n, \0 b0 @3 g% m
这是AGV_putin中arrive的method。
9 j, x" {0 F1 v& b! }: @9 k2 f4 f
# W; B8 {$ b1 U8 U当到达物料速度越高时,这个报警更多,1 r! r5 m3 j- T& v) o* n
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 X/ [' t2 `7 o
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 a! J  d4 L. P2 P. i$ X1 u$ r8 l' B
- J  ]. w, j# B
另外一个小建议,就是move,所有的move都可以这样4 u+ Q# I5 T' T* \( L4 }. |
if not move() then debug end
" ]. V; Q$ \0 f! g0 u- R( F这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; s/ U& t' j7 c0 T4 l( s/ s
plant simulation中的free libraries有AGV模板,+ s! @# I- T7 U" {/ G
里面也有案例。
. {+ V, Q' j" k( F" F# v# d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 w  ]* `% I; s* C8 M1 h; L

% C5 j' Z7 g& P4 p! U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) O7 H0 X, p6 ^# H7 q  n+ k7 Q, K

* h+ s5 v2 w2 j0 K0 p5 l3 i4 y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 z) V' e; j* s4 [5 @
这是AGV_putin中arrive的method。
+ ~# S% Z5 x3 ~$ a( B
& M: H, Q3 e$ l当到达物料速度越高时,这个报警更多,

9 W7 D) m$ G+ H8 c; _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 14:36 , Processed in 0.017315 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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