设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8242|回复: 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'1 s3 t* G- X6 N! A- A# K# O' s
*/
' ~# Z  C2 C1 \9 Y; ]4 Jis3 I  D6 E7 H* {+ R/ `, \
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ g' e) _) m5 i: l/ H* d# f6 c& \do
2 _9 y* F* H( B1 y9 ?- H% ~# Y( i        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ B2 ]' K$ V. g4 i2 a$ Z" U        if current = @.Destination -- else return
" q& g' ]9 m" y# i/ G/ F  E( A        then; h& O% f* j2 K$ c, @8 K9 L+ U
                @.Destination := void;- N% w: ?6 V4 p0 z, y1 s! f: d
                if @.occupied then; \, C" l5 G+ y/ h) o
                        part := @.cont;
& T  u5 C6 F  L$ w$ I6 d                        @.transpOrder := void;
5 m2 S' Z. o- s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ^$ I9 }  D% p& S" h
                                @,root.eventcontroller.simTime);
: O. H  I" @+ o, I% z                        @.HasOrder := false;
1 A9 ?" ~4 Y) q                        @.DrivingHome := true;
, P- F. j$ I( w2 K                        rgManager.tryToStartTransOrder;" z& b) e% M, _( K$ w. N0 d
                        if @.Destination = void) f. Q, ]2 Z$ A+ y) F
                        then -- no transport order for vehicle @
% d$ N& }  S1 S9 Y' U& U                                @.Destination :=
  @6 E0 a* u/ S7 b5 H                                rgManager.nearestFreeStation(@,track.~);
) o0 R5 X4 j3 u% Y" Q8 q! n                                newDirection(@);   
$ d+ E' K' V8 G$ D# d* f2 `( m: l: }                                if @.Destination /= void then1 l% K5 B4 V1 J( A$ j
                                        @.Destination.NumReservation :=
  J( d2 n0 q! I4 \5 c9 O                                        @.Destination.NumReservation + 1;6 I+ _+ c% H* X
                                end;
2 y% D8 k$ u1 _                                @.CurrIcon := "drivingHome";
' c( C5 s  C3 X                                @.DrivingHome := true;
( [: c1 n, Q$ Y+ }                        end;4 y5 Q& B/ n2 r8 A0 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' K7 U" T7 z1 D, P; N1 F
                        part := @.transpOrder;% x, C' A& J1 x$ ]' ?, R# N. G( q
                        part.move(@);-- load part
( H  t. X: j2 X, @& O4 V                        @.CurrIcon := "load";
4 b) M2 ?" j3 y# {  D                        GlobalDistObj := part.globDestination;
, V. d- q; C. z' S1 f                        assignLObj := rgmanager.rgAssignL;
' Q2 q$ U* E- R( M                        row := assignLObj.getRowNo(GlobalDistObj);
( c; z! z% r2 J                        if Row = -1 then -- since 70& p) y3 f0 I' q
                                if lan=1 then
) }3 E* J+ {- v' q4 o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 W7 x1 R! @( Y! F# h) c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 E% d% w  r* b6 S8 t                                else
. i" [% l/ c% w+ |: ~% ~9 ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 z+ E5 v% C) f+ B9 m) S                                                to_str("in docking station: \"",?.~.name,"\""));                               
& `6 Z+ q' f( Z# r                                end;
+ ~! I$ m" [6 y% I: R2 X                        else/ p3 o- W4 B# t8 T3 \6 u* ~! R5 |' {
                                @.Destination := assignLObj[1,row];  L4 m7 ?% N9 b9 l4 O
                        end;                       
# R  D6 K: m  Z7 ?                        newDirection(@);# |4 D+ l. Y: u7 ^
                        @.HasOrder := true;
! M( ~, ^/ x* j  B/ I                end;
0 ]" u$ ]1 f: m0 C: R" }        end;
2 v5 r/ p! E" C+ `2 g9 yend;        -- of the method
! v' s4 I; s2 g( f( s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 h' F3 y' e6 R* y0 t' c

4 O. w+ l! S9 O6 {& O. M, I% h这是AGV_putin中arrive的method。! w7 I! G1 [% r& A) q6 e! g* h

4 l% S9 \9 E) W4 j5 h当到达物料速度越高时,这个报警更多,
7 W" n% ?. \: v4 d) c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, H- v2 T1 f7 O6 `- A% y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 {6 e4 a# M2 q$ h
0 ~& I, A. b5 N4 c另外一个小建议,就是move,所有的move都可以这样* O  {) b6 f  d8 h* d
if not move() then debug end
3 ^- E3 u/ j" }- z# e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 _. T6 i- k/ m* [1 Wplant simulation中的free libraries有AGV模板,
) b1 [$ P. d4 t' w# X; |2 [里面也有案例。, `3 L) }! W$ ]5 S7 q" e5 j- q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 |' q. j" R- y) b- o8 B+ ~4 _: \/ n& o% G% K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' n  o7 Q. ~. g1 Y$ m- s* e( E
% g) f" g; j: H$ Z) K4 Q! M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ e" I- z$ ~2 A* f0 z. L: }这是AGV_putin中arrive的method。
. T3 \3 q$ q. h. y- V7 I& C4 P" }6 n. s
当到达物料速度越高时,这个报警更多,

- Z4 M3 K0 B3 a& j+ M- ^% r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-22 20:10 , Processed in 0.019918 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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