设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7428|回复: 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': B+ L( d9 h5 ?% v  ?
*/
& k. T, H' I. c1 m: Iis' |; L; ], O+ G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 a1 c* |% Q0 L& O- d' d) Odo
. t- X' @8 m$ t) d% p3 o        Lan := rootfolder.Internal.Tools.AOLlanguage;
; H# {5 R, b# ^" V& I8 [4 s! j        if current = @.Destination -- else return
4 Q5 i$ J% F. w- Q) i/ E) _        then8 f. y0 P7 Y3 _! e
                @.Destination := void;, ^( e  ^; r" J" M
                if @.occupied then
: n, X' \1 `$ y$ w/ F                        part := @.cont;0 K# m7 D1 c6 |4 o8 L1 T& x8 p4 x& z
                        @.transpOrder := void;" d9 I  x! r. `9 x. Z# Q  K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& K/ m: G# E& n* Z" r
                                @,root.eventcontroller.simTime);" E0 \, M/ |# c. D
                        @.HasOrder := false;
5 ?5 t4 J4 z4 Z- n8 h* Y/ _; l; n. N                        @.DrivingHome := true;1 U7 f0 q* {, ~* l) `/ `6 _) b' k
                        rgManager.tryToStartTransOrder;3 Z+ ?9 x" J' [, j
                        if @.Destination = void
" _: O$ s1 g9 y( j/ r3 K' B                        then -- no transport order for vehicle @
0 q2 t8 G; `+ T1 |" m; T' f+ c: U                                @.Destination :=$ L9 Q" @4 R4 q+ }% b
                                rgManager.nearestFreeStation(@,track.~);3 p7 l/ C/ ^9 }# H. l
                                newDirection(@);   : t' h; b. ^' W( ]: M9 ^
                                if @.Destination /= void then
+ k1 i, Q5 N$ q! }! f                                        @.Destination.NumReservation :=
$ d; Q% P; Y" t: n                                        @.Destination.NumReservation + 1;
% q8 b& s% H1 u8 z8 d5 t' h                                end;
0 ?1 C" p1 B/ D" l- e4 u                                @.CurrIcon := "drivingHome";
6 _9 m2 \" r. I$ d5 Z; c0 X6 V$ P                                @.DrivingHome := true;
) l; u8 v7 C. `3 a4 K* N/ R                        end;( V! ]# q% b% [, b* k, w5 L- @7 J0 I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 H% F7 [5 ~4 y7 H* y7 \7 H5 r
                        part := @.transpOrder;9 o. U& b/ N( U& [
                        part.move(@);-- load part
4 ]3 U9 V: k5 [  j0 X' \1 t                        @.CurrIcon := "load";. ~; E. H5 a0 I0 n+ G# u( b
                        GlobalDistObj := part.globDestination;: l' b6 J$ {# O& S; }  Z. [9 D, J
                        assignLObj := rgmanager.rgAssignL;
/ t) o- s  h. @  {                        row := assignLObj.getRowNo(GlobalDistObj);
4 ^4 ~$ j7 l5 Q" I: x% }+ R                        if Row = -1 then -- since 70# N1 l* n1 V# p; H8 m3 m9 t3 b
                                if lan=1 then" N4 ]. v3 w, D! m+ G2 E9 t
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# A. e9 m; ^$ [$ |# h2 _- B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. H' o3 L, v! Y( V' R% i3 }. h
                                else
' O. {% v9 z( k  c( q6 c$ \                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ M9 \% T8 E3 e" c9 [
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. `$ w  Q+ l$ t                                end;* c4 d" k% Z# _
                        else
3 K* F+ v7 _, j/ K' v5 z* J                                @.Destination := assignLObj[1,row];; _3 K3 o% P  V( s( i" V, a  Q
                        end;                        ) _: @- }: N& l+ r3 N1 P  R  Q  ~. n
                        newDirection(@);
0 A1 A. \! f; a/ a                        @.HasOrder := true;! H. u. [5 Y% D1 q, M
                end;; l9 c/ C- [1 h- [
        end;6 {2 r& k; p& L9 a$ L: ^& g
end;        -- of the method6 Y  F8 d: V  `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 Q- r4 U& D; V- R) ?
0 o/ F9 w$ ~. }
这是AGV_putin中arrive的method。
  x4 M2 h9 k0 w: |
% q* J  a) c% M! S当到达物料速度越高时,这个报警更多,
  C# L; \- Y. p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, y6 b0 b8 j- T- I$ q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" X8 m9 e$ ?7 J* X4 l
0 c8 e+ i0 g1 z9 A
另外一个小建议,就是move,所有的move都可以这样8 _% x' \1 X1 _) J& w+ [
if not move() then debug end
0 r: X5 l- K' v3 j! c7 M: C& p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 U' \+ G6 V/ |plant simulation中的free libraries有AGV模板,; _3 m- _, r0 U7 U
里面也有案例。
8 O4 ~) [! _2 S; Z5 y. G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% ]2 f4 w3 G, `) `2 d
: s5 T, G7 Y# u( I' q# C2 b, R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  f" ]/ \  y, K. c4 I! x
3 P# F8 }7 ]& _! o3 `0 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 `* W  J5 |- z% G7 e' S4 p" h' D9 Z) F
这是AGV_putin中arrive的method。
5 G. ]5 B3 r1 F
& j7 t0 ]7 T2 B0 Q- y/ e2 K当到达物料速度越高时,这个报警更多,

3 U9 n  C) V' f" b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 21:54 , Processed in 0.018712 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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