设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9753|回复: 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'
+ F1 m' d& l8 U# g*/) p' ~- A9 f" i- }9 y$ |) ?( o9 h0 S
is
. s: M, T; n2 F" v3 J+ }3 C& |: ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 o0 u! }' R5 jdo4 H, a7 ^8 U  E1 |* ^+ w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B1 P  G/ a2 A* g7 B        if current = @.Destination -- else return/ u/ d4 F+ e# ]" Z; O
        then5 H! ?" m2 P% D7 d* }
                @.Destination := void;
: r/ K! ~( D# n+ z                if @.occupied then$ i: E9 C' A' m" I( X( B- p
                        part := @.cont;1 X( U4 F+ o5 Y: M' ?
                        @.transpOrder := void;% K' [. z  ^% V1 [
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, H8 |3 Q- Y: ~                                @,root.eventcontroller.simTime);% U3 d* E7 B( M2 @! ~2 u
                        @.HasOrder := false;0 K5 k5 ^$ f# o- e0 Q
                        @.DrivingHome := true;- U- ?3 w( e2 a% l' B( e+ T
                        rgManager.tryToStartTransOrder;6 Z- Z. q: ?* X9 r" |* [7 S) @
                        if @.Destination = void
+ D8 ]+ A: j- r2 z! R0 c& w                        then -- no transport order for vehicle @2 j6 ^6 V8 g* M7 Q/ z4 b
                                @.Destination :=
" e# m7 B/ j4 \) o3 P                                rgManager.nearestFreeStation(@,track.~);. `: P5 o8 V5 M& R& k
                                newDirection(@);   
( G5 D0 }, ~  `, x$ W+ ?. v                                if @.Destination /= void then
6 y8 ^/ |! F/ @2 W                                        @.Destination.NumReservation :=
0 q% ?6 h$ [' A% I                                        @.Destination.NumReservation + 1;
% E) h: ]$ t+ D% w/ k                                end;/ S- ~5 T, V3 r  w
                                @.CurrIcon := "drivingHome";
: s8 w% [+ L: e$ g( i  }; o+ n                                @.DrivingHome := true;. O6 t1 U; ]  Y
                        end;- I$ u( f- T( N# Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ t  u- w& E' I: P8 g" D3 {5 Y
                        part := @.transpOrder;
% e  @- z" w- @! L' @& r                        part.move(@);-- load part
9 Y) g: {% a! G$ B0 d5 P4 m                        @.CurrIcon := "load";; J, L" C4 Y+ S
                        GlobalDistObj := part.globDestination;
) z5 _* r5 q2 {* S                        assignLObj := rgmanager.rgAssignL;4 Z1 m6 q2 s' S6 y5 a( M/ j
                        row := assignLObj.getRowNo(GlobalDistObj);/ m0 [% P% X6 k2 F6 q) D2 u
                        if Row = -1 then -- since 70( ^, M: Z! N/ M" m( w
                                if lan=1 then
3 Z6 B% O4 K  F$ _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," N# H1 J8 j/ E% G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 I" y# j' |; P: N
                                else% W7 b; J# z6 ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, p( I$ P, M! ^7 h+ r0 Z) {                                                to_str("in docking station: \"",?.~.name,"\""));                                3 {8 x% w  R* Z8 k3 y4 R, p
                                end;" r5 M0 }" x' @* ~0 w$ G
                        else
+ N! M1 r$ M0 w5 l! B5 U                                @.Destination := assignLObj[1,row];
! M/ n1 k! @/ p2 t# D1 v                        end;                        3 W+ ^8 k, C) q
                        newDirection(@);
8 d* Z6 V" S( p4 |9 n5 x                        @.HasOrder := true;
) f1 M/ l8 y1 Z: R                end;
- W" o8 _1 y4 _: r        end;
+ g* V9 Q& _" H% P$ X2 z; _# gend;        -- of the method- q% w* N0 W9 |9 F7 r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( N& w, Y7 m9 F) Q7 r! o) s3 c9 G0 n0 p. v
这是AGV_putin中arrive的method。
# ?) g9 Y, o1 R  Y0 `
* e; l7 l5 _1 b/ ]& O% U" |) C: l当到达物料速度越高时,这个报警更多,
- d9 i: U( t" D( b/ s. f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% L5 d, ~7 I# |5 O1 j% b3 o+ d$ e程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 ?1 U: H# l& m7 G/ z) v" T& C3 ^" [- L9 B% C$ w' l7 O* \0 m
另外一个小建议,就是move,所有的move都可以这样3 r' T. W! U/ M4 E8 ^8 `( G- K0 `
if not move() then debug end0 }$ [7 t2 K0 Q; ^: L  q) H) O
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 k! E" X5 y7 f9 I& g8 q
plant simulation中的free libraries有AGV模板,
2 c0 o6 r$ M6 H+ u里面也有案例。; G5 F& k+ S; Q. t$ J' _5 M( V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" J8 K9 l. ?! o) r( i
1 n1 s! N  U# t+ P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: d% Z! Y1 l' K3 [  e
. c2 S' k- H5 g, @& v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 P* }6 E  D4 m这是AGV_putin中arrive的method。0 T3 k3 D! N) X+ ?% V) g, e, Z

+ y, h/ c3 q8 U9 M, X当到达物料速度越高时,这个报警更多,
. B( K9 u9 l. _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-22 13:09 , Processed in 0.021804 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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