设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9301|回复: 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'
+ |8 g7 @0 G/ Q3 ~! Q5 p, v  m*/) _3 e3 i; U0 _0 d, m/ B
is
+ P% g2 a2 @" A" Q; b  i; l        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 I& ], v/ k! C4 N* j" z7 i6 x4 V* I
do
$ C) }+ W/ J- v        Lan := rootfolder.Internal.Tools.AOLlanguage;1 \- W) _7 v, F, E3 M  r
        if current = @.Destination -- else return
* k" Z2 f9 k" }2 S- A        then4 W- F3 ]; J7 n& I+ Y8 h$ e
                @.Destination := void;4 H# ]7 P3 O' b2 R% n1 ^
                if @.occupied then; o! p/ a  z( {: H& Q, B0 z
                        part := @.cont;! B, S% C; n1 i5 u! }
                        @.transpOrder := void;( ]9 K8 h% I: ^/ ], e1 o/ h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," U8 |5 }3 r! Y4 \- v# x
                                @,root.eventcontroller.simTime);6 T( ~. Y. \# R% T5 T
                        @.HasOrder := false;
" H* ~, e' z! {5 Q                        @.DrivingHome := true;
4 X5 k0 ]3 `& `! h0 ^  W                        rgManager.tryToStartTransOrder;6 y' W) u9 G# k3 S
                        if @.Destination = void
; w9 a' S# X: ^+ p4 }- q" h                        then -- no transport order for vehicle @2 i; ~4 _; ?% {7 f  w% e9 i" X
                                @.Destination :=
" A+ `1 [" Q+ W6 R' C- d! o1 H                                rgManager.nearestFreeStation(@,track.~);! C; D7 |( Z; p4 @8 ]
                                newDirection(@);   " W/ S* N7 i+ a1 G/ P$ y( Y
                                if @.Destination /= void then  e7 E$ W' I$ [/ @1 V% C
                                        @.Destination.NumReservation :=
3 F, }2 d8 Y! a' F; K                                        @.Destination.NumReservation + 1;
, z# X" a! m: a+ N, T                                end;
9 n1 \! Z: a2 h% @: L( f                                @.CurrIcon := "drivingHome";; L2 s# o* G2 N5 }3 G
                                @.DrivingHome := true;
2 z' P7 U! Y% U                        end;
, o# b' W  _5 q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, ?" Y: k/ t! s0 w  i- S, J                        part := @.transpOrder;
, q! h* O5 }7 C" i5 V& C+ I; k                        part.move(@);-- load part7 o3 l( C  O* O- N1 u# W
                        @.CurrIcon := "load";
3 v7 Q+ H( ^3 c* g% M                        GlobalDistObj := part.globDestination;, }  f& \' A+ f- p1 _, u. e
                        assignLObj := rgmanager.rgAssignL;4 D! K. X1 m3 h0 d# h
                        row := assignLObj.getRowNo(GlobalDistObj);
. R7 k8 f! F3 I                        if Row = -1 then -- since 70  {( [7 x" F! U/ y
                                if lan=1 then
& S! b1 E( f2 L6 v                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 [1 O! y$ {# |9 t  [! K, T/ A% i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  t+ \; s, z  Y3 u$ k  d- S                                else
$ R8 P) |% O& V, S4 S7 g5 q5 _! |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* }/ U8 s7 m- p6 K
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. u5 [5 a# R4 t8 v- b                                end;
: o! P, i, Q6 G- g3 \: y! b                        else
* z5 j# V7 P6 W" ~                                @.Destination := assignLObj[1,row];+ {) p3 X) {! }1 q8 {# `% `5 Z
                        end;                       
" ~6 N; W# p3 u' X3 m" f8 D                        newDirection(@);: F5 R: n. D( U
                        @.HasOrder := true;/ A/ _3 {" J8 s$ w1 V7 K
                end;
& A# w; ]* I4 E5 k        end;7 ?- g& w0 V3 p$ r7 ?3 y* v+ w+ }9 ^
end;        -- of the method# Z& [' I& B4 A4 f1 W% A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + r% ]. p. F+ `3 \1 s
) M" g1 H. Y1 o, u% i' c, R
这是AGV_putin中arrive的method。7 H( R; k+ p: X7 c, n

! J8 x9 L& L2 S* V) M) p& l4 O当到达物料速度越高时,这个报警更多,7 M0 i' d  z: T: s% X+ Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 R  m& e6 V* V  T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  f( Z7 i' r- ?( K2 K7 X0 x1 E) Y

/ i% f$ |& K4 S5 I5 i另外一个小建议,就是move,所有的move都可以这样2 h) d! v* `- c. O+ w
if not move() then debug end
' g: V  Z! e' {" [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ Q3 f) T$ I5 T" z) W6 _- e" M
plant simulation中的free libraries有AGV模板,! O3 g8 a% J8 E+ @( n/ r! a) j
里面也有案例。
; @7 \7 S4 L: n' x1 }& i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ \5 b' f7 z/ r$ Y3 y! p1 m2 [  r: P/ _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . ]; \& \8 V. g6 s
" \3 w: Q# ~5 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 o% Z8 L& O8 B
这是AGV_putin中arrive的method。
1 v2 j) j1 L- Z
  L8 G8 D9 M$ N3 m2 j* `" Y8 s, C4 n当到达物料速度越高时,这个报警更多,

7 y" x  H2 L- W! S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-23 23:45 , Processed in 0.017076 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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