设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6716|回复: 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', q0 {7 Z8 L3 I6 ^5 f5 y2 Q1 P
*/
. e' e! P0 ~" i$ a7 i2 Z8 ?" xis
2 s% o7 Z6 |+ S; A& s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' }* F- u" @" I- G3 u. }1 L& bdo
' u/ a4 G+ [3 u9 r% U, F        Lan := rootfolder.Internal.Tools.AOLlanguage;
& \* [# `2 j$ ~" K2 E: i( r        if current = @.Destination -- else return; k' P4 z9 O6 ~, i; K3 ~8 m/ A
        then2 X& Z/ X% L$ z9 s
                @.Destination := void;
# Q# V7 _% n8 X3 t0 C( P' V                if @.occupied then0 {( r4 }* v, c5 i8 y# G( ~5 L1 {* @8 F7 A
                        part := @.cont;7 B9 r% ^$ n- W5 N- ~1 I
                        @.transpOrder := void;
. X1 c& q* c9 Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 J9 T: N' ^- O" A( Q% @
                                @,root.eventcontroller.simTime);4 D, z6 L: _/ F3 o1 W
                        @.HasOrder := false;
5 w$ t/ P/ ~$ o+ ?7 C                        @.DrivingHome := true;
9 t6 A/ }+ g( l% f+ x2 Q- m- q                        rgManager.tryToStartTransOrder;
, L. q4 L1 W7 p( k+ B: i, k2 Y                        if @.Destination = void3 G) A7 v& n9 ^, p- i. F
                        then -- no transport order for vehicle @
- b6 L3 X% e5 ]                                @.Destination :=8 Q. G7 u: J' M& F" J* F
                                rgManager.nearestFreeStation(@,track.~);
3 d  s* f; x. u* u                                newDirection(@);   
: d" a1 M( V9 D  s. _                                if @.Destination /= void then; n* p3 a% S$ t# W# n
                                        @.Destination.NumReservation :=
3 y+ r+ S* [, F+ q" C                                        @.Destination.NumReservation + 1;: H' _1 u- I$ l) B  K, t. p0 U
                                end;
2 U. C- p/ f. [( n                                @.CurrIcon := "drivingHome";7 r7 z0 L9 `/ U- ~% g
                                @.DrivingHome := true;$ F- h( C$ W1 j
                        end;  P' p$ H) s2 o( ~, G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( B5 D% Y2 ~8 }- D  y
                        part := @.transpOrder;5 c3 y) r/ n" N( A1 r, _* s
                        part.move(@);-- load part' V+ W: i$ q5 Y
                        @.CurrIcon := "load";
8 j' s  X! j6 n% x; y                        GlobalDistObj := part.globDestination;' e4 y3 l2 y& L8 ?
                        assignLObj := rgmanager.rgAssignL;
# h1 [4 ]" l* m" v% q" v& d$ Z                        row := assignLObj.getRowNo(GlobalDistObj);0 _, [9 \2 |3 {1 ]7 g4 _
                        if Row = -1 then -- since 70
+ w8 ]* m2 V4 E; [" P9 X/ K9 [                                if lan=1 then
) o# y# L4 W0 g5 i2 D; N                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- x! v& B8 J: x  r4 c# |; b0 X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 t' t9 Z; n. f                                else
& t+ m0 e4 _" _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 E6 `& a' x9 B' t; m# J
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! _+ U1 T/ a/ y. s8 q; D! A                                end;
. o4 L$ @/ O4 x: T! r9 a                        else. T" t( q/ l- `8 l$ z
                                @.Destination := assignLObj[1,row];) q- H3 {0 G- E, F1 ^. e
                        end;                        9 ^" C7 t# h- x$ x7 K+ \1 v2 l7 ^
                        newDirection(@);  N) K! L  x9 U( W; p
                        @.HasOrder := true;9 {: h- O) [$ [: [; Y) F( F% ^
                end;$ N9 h( k$ S6 X$ \1 t$ G
        end;3 c/ i" D8 h  ]. N' ^
end;        -- of the method
, Z+ n  |5 V, b2 n* X) c+ {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   H: H! u. ?; v  L# k
- z' ^. u5 O1 V- o4 s
这是AGV_putin中arrive的method。
. A9 J2 D, C- o2 c4 }1 G) O+ B, s; Z9 d# C( A$ N6 ?$ A; w
当到达物料速度越高时,这个报警更多,
+ Y: ?; a, X0 t* C  D' Q& t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 N. t. U$ w3 t$ _* s
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! B3 o& }7 Y( D  u. ]$ k& G
) j" r, g  c# K# [8 Q另外一个小建议,就是move,所有的move都可以这样/ K  R0 Y( W0 X
if not move() then debug end
% S/ ~: f7 \% Q# o" e- N这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- d9 U% }) j* e  i2 L/ F
plant simulation中的free libraries有AGV模板,! z( N4 b* `- m0 q1 b+ |7 T
里面也有案例。9 P0 H) l  z1 ?% X' `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% E" p2 d+ o" `
$ R, m! i0 p1 W% X( K$ J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 ?& r2 {/ `) M; L. h; g& J+ x
' ?0 i' W- M% y9 s3 T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % c5 M0 p3 M: p+ `  d6 l
这是AGV_putin中arrive的method。! ^6 O% {% l& t" b$ R

$ p: U. h; m' E; [当到达物料速度越高时,这个报警更多,

  ]9 `0 A' z6 f  \% I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-22 10:23 , Processed in 0.017003 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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