设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6456|回复: 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 z6 J) Z8 W+ A2 Z' m) P*/
( \# N' s/ H# mis
2 E+ {. s, h( x! a+ p. S3 T2 W3 e        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 o6 o- D6 F1 E2 z8 j6 I4 S
do1 H2 u/ i7 t/ C  g8 l9 ?; _
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 k/ ~% N9 E9 V) t& C) a8 u: j
        if current = @.Destination -- else return
; E2 l, B; U6 z& C9 s' I/ `        then" `* w, C+ c- |, A8 i
                @.Destination := void;' I0 D8 Y9 J+ Q  q2 [1 o2 R
                if @.occupied then1 x$ \" Z6 v+ e1 l6 H# L
                        part := @.cont;
% G( I3 W! [3 i  x                        @.transpOrder := void;
0 w/ L; c" g! X# e  _. c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  w/ g0 g. O, l5 S1 W) @) Y1 \                                @,root.eventcontroller.simTime);
& ^+ x" k- [2 C- J3 N3 j                        @.HasOrder := false;  G+ o0 O; ^6 c+ `+ z. `6 B, q1 e2 Q9 C
                        @.DrivingHome := true;
' {* c! A7 Q/ k$ `                        rgManager.tryToStartTransOrder;
2 `  s! M9 d: U" g2 ^                        if @.Destination = void
, L. Q1 ^/ v  @                        then -- no transport order for vehicle @
2 }- p* P' V0 W3 E8 F                                @.Destination :=  K. D# }+ k0 _" n$ s8 t* Z
                                rgManager.nearestFreeStation(@,track.~);
3 W! y) Z0 n0 g! Z                                newDirection(@);   
7 K) N# A! r, O# p1 B7 S2 I$ E                                if @.Destination /= void then
+ f( v0 o& M6 r/ t0 z: x                                        @.Destination.NumReservation :=
, ^5 @+ t: L5 K, k2 G0 I                                        @.Destination.NumReservation + 1;
- O7 M. \0 ]* b/ G. _; \6 V                                end;
! ?' G* Y# B8 ~1 f/ M# h4 V0 B                                @.CurrIcon := "drivingHome";
1 \$ \2 o7 `+ c: [                                @.DrivingHome := true;' W! e% o  `8 L- X& \/ j3 u
                        end;7 n& F7 O6 u9 C( F2 m
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) m$ s/ |5 x  D8 x
                        part := @.transpOrder;/ C! f& x' `8 [, g/ K% r! Q
                        part.move(@);-- load part
. V3 I0 T: i/ T& {$ ~* G4 P                        @.CurrIcon := "load";/ h: ~" ~/ E/ ?, L4 S8 r' \
                        GlobalDistObj := part.globDestination;
- s  Q( {* f4 c& Y' j                        assignLObj := rgmanager.rgAssignL;
3 t1 f  Z$ f, @! l( w$ E) W                        row := assignLObj.getRowNo(GlobalDistObj);" H+ U4 Q; R5 b: Q( i2 x, y8 |
                        if Row = -1 then -- since 70$ @0 M: v9 ]1 I, J/ S+ j) K8 G
                                if lan=1 then7 E/ b' D; S. W* F# V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) f) L% z1 L5 L  d* G4 S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 z/ [, C% }1 S2 k$ c% O
                                else
( ]5 e; V2 K" t3 M# O1 @                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Z# d  d2 @0 b) O8 K$ n7 w
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 K$ W: |  l. C1 b
                                end;4 J( a& X! G+ z+ v: D" C" u
                        else- z; W+ p1 A6 }; N, A) j
                                @.Destination := assignLObj[1,row];
+ s+ W* u& `$ B1 a                        end;                       
4 q* L1 y+ L. {! M" M                        newDirection(@);9 c3 d: c) G+ d7 i# t0 J+ u- l, b
                        @.HasOrder := true;+ {" U4 N+ V7 b+ t9 `
                end;
+ Q* S3 W1 w. N% V% P& ~        end;
# j" F8 L3 A, ]  X, fend;        -- of the method
8 m0 x6 o% Q& m7 [6 D2 z- y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( c3 `8 Y7 H$ \% Y% k1 f9 i; c
8 R# z8 P. z* }/ W: g1 n这是AGV_putin中arrive的method。0 S- ^" Y) i3 O! W% O1 d) E; t, |

- Z! t* v' w- q( J0 f当到达物料速度越高时,这个报警更多,
8 @& @" @2 b& `2 f9 p9 V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 q# ^7 |- t! T$ P: d. ^程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 X9 N2 N0 K9 U( e4 z6 W& ?% v
) ^% u; Q, i# k9 w0 k8 f' D' c, X另外一个小建议,就是move,所有的move都可以这样! B4 S9 @0 u. E+ l! l
if not move() then debug end
$ l& z; m3 x6 q$ q, z; Z' h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. j$ l' [2 j8 Y8 [, j- a7 Iplant simulation中的free libraries有AGV模板,
7 l* o1 f9 y& M3 P  n. F) L里面也有案例。
) |' V/ a7 @8 N  C9 H+ o我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 @. ^( d$ X1 [' [+ O
! Z0 L4 g' z; W- S
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 y; P1 N5 q. _5 e
: K0 _' ?  G1 w0 ?, K* o, g7 [
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" z& U9 f2 I/ C0 I* r& r. e这是AGV_putin中arrive的method。
/ w) I  g0 T" g, B, H+ B6 N; {% t  ^% Q7 B! s1 G# S
当到达物料速度越高时,这个报警更多,

$ i  _  D7 `9 I  j( @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-7 19:52 , Processed in 0.018491 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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