设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9068|回复: 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'5 Q. E1 m$ l# |9 a+ A& C
*/
: s  h# A% A3 Cis
, [; ^4 ]% u0 o0 w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ r, z1 U- _" W, Zdo
! R/ ^' V8 b3 j% ^. K4 ^# r        Lan := rootfolder.Internal.Tools.AOLlanguage;
; h  |* J/ O0 ?4 @& I        if current = @.Destination -- else return
  F* o" Q- a. n! n        then
8 A4 U8 n: B2 q; H) d7 c                @.Destination := void;1 @( p- w, X7 P
                if @.occupied then0 Z* n$ x+ r# a! O
                        part := @.cont;
* p4 C' w1 G8 W2 z# n! ?" ~# t; B  U                        @.transpOrder := void;/ U8 m8 h6 l( f) O; v: _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 f0 K# S) v# X( z
                                @,root.eventcontroller.simTime);
1 A0 s2 e( o) a3 ?: z$ l6 I                        @.HasOrder := false;
/ C' V% D5 p: i+ |7 `# j9 t                        @.DrivingHome := true;
& f: P$ |& ?3 i7 Y8 g                        rgManager.tryToStartTransOrder;# e; e  @/ }2 Y5 C, _$ h& t4 u" m. b
                        if @.Destination = void$ C; W# r0 M: x* \: i
                        then -- no transport order for vehicle @
4 W! @+ A% @6 G; E% e                                @.Destination :=2 W( ^4 `7 c+ W0 _2 j1 `, I# e
                                rgManager.nearestFreeStation(@,track.~);
) `" q& O9 x- M/ s& I5 }                                newDirection(@);     u" t0 m4 S$ D+ \! W
                                if @.Destination /= void then
7 F# }( F; Y& j& A: U. ~- G+ ~8 u9 n                                        @.Destination.NumReservation :=5 _* c' D! V' I. Y& m
                                        @.Destination.NumReservation + 1;* w% p7 P  {9 s. z8 C8 i* |
                                end;" Y. b) n2 i1 k1 |  S
                                @.CurrIcon := "drivingHome";
. ]. O  s9 I8 s" d; S9 B                                @.DrivingHome := true;
! d5 O5 x9 r" g1 P8 A                        end;
! L) `) `$ B2 G1 k7 Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% _5 W& x: W: T+ X6 y
                        part := @.transpOrder;) w( d, C, O0 ]: t2 V( ^- j" _& g
                        part.move(@);-- load part8 v7 h4 l/ x* _: \
                        @.CurrIcon := "load";
% M* D" `% L! z, z$ H                        GlobalDistObj := part.globDestination;% Z& W% O: e, [5 k2 K
                        assignLObj := rgmanager.rgAssignL;
6 @& }: [& G' T9 [% h2 X                        row := assignLObj.getRowNo(GlobalDistObj);& s( T: A% o, d7 Y: U+ R! ~
                        if Row = -1 then -- since 70/ F9 z9 X2 M# \: y2 K; N) v
                                if lan=1 then+ v: u" I6 Q9 V% o) A4 t
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( c& ^6 m2 O1 o/ i" R                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 ]& J/ t- ]. }) X! K3 A, @
                                else
+ i) e  |4 X' g* |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 n/ \5 Z( `9 K                                                to_str("in docking station: \"",?.~.name,"\""));                                3 }, b5 r- @, u- K, w# o
                                end;* A7 ]$ \1 D/ Y. Y* B$ m. X
                        else
3 G# Y3 m% m" {* _% G                                @.Destination := assignLObj[1,row];
' `" R* @; j! |' q6 F                        end;                        7 \# u5 }8 y! i8 I. e6 e9 |
                        newDirection(@);
" l" j7 n) E' V" H$ D5 U! d                        @.HasOrder := true;8 W8 u' |: d! n# D/ L  w
                end;- n5 [6 X, s- q- w
        end;
; l2 s4 y& |' j0 k; }2 Gend;        -- of the method
( f& v( \* h0 m  @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % E$ c0 M9 T: F/ X* N# k
9 q' E6 B: T3 b1 s, V4 _& E6 I
这是AGV_putin中arrive的method。, y% o# I$ n8 N4 t; O& E

0 Z% _+ b9 ^/ x# L. @当到达物料速度越高时,这个报警更多,
/ S+ {$ @6 D& [( r# }, K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 d2 M4 g) d8 r1 u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% C8 \! H9 h( X' \& Y1 G
: y$ M& H6 @- B
另外一个小建议,就是move,所有的move都可以这样% G; G% R& l# w' J  L1 ~: |6 k
if not move() then debug end
& r5 x  p* T2 a3 `. n2 j) x5 A# [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ L) {9 I" i; H  F9 f
plant simulation中的free libraries有AGV模板,
6 o  C8 v' a" T# u里面也有案例。
4 R! K+ U1 Q" i6 s) ]: i, t4 ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# W6 I6 z8 e2 E4 m1 x* p: Q" w
6 J! o- K: {2 C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& X# l7 k% L2 f/ r( b* }/ L9 x8 K: u% W( h; C: k5 ]
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ y7 B( Q! k0 F! K这是AGV_putin中arrive的method。
( ]/ N0 Z1 z0 O$ }, U
3 t7 u* l: n3 R% S& n3 j) q7 _当到达物料速度越高时,这个报警更多,
3 i" |0 S3 \: x1 `; ]& n3 ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-11 21:14 , Processed in 0.016116 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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