设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6990|回复: 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'
9 G; n) ]. y! {3 o( l*/
6 u" d6 j; \% U' K' his: A% x! U- z) U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! I; u% B9 k8 o. d4 q/ `do8 \. v- g2 t) k! E0 I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ b# H% @% r7 q0 @5 K( L5 \) F! L        if current = @.Destination -- else return& |1 s$ ?! Z# W. k0 h, T6 ?$ {
        then
) `$ M9 ~: D* R9 ?                @.Destination := void;
4 [9 ?' I4 b5 O; F                if @.occupied then( R0 a6 ^9 m/ d9 `0 L
                        part := @.cont;
6 D+ [* E* j6 \  D3 l: w                        @.transpOrder := void;
9 ^$ J; T: t8 r7 O( R- ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& Y6 `% b) N0 x# F
                                @,root.eventcontroller.simTime);: S1 P2 f( m% L# M! W+ m
                        @.HasOrder := false;( _/ q, d  g/ R7 R
                        @.DrivingHome := true;1 l2 @( e6 B+ X. G
                        rgManager.tryToStartTransOrder;
7 J! \5 D7 s( K4 y                        if @.Destination = void. P* h& U) Q( O) l0 O
                        then -- no transport order for vehicle @
" w. d( R4 f, Z, ^: G0 N7 ]                                @.Destination :=9 Q. ]- M* M. c/ J
                                rgManager.nearestFreeStation(@,track.~);! n4 m8 N! D) z2 @7 U$ `) H2 v
                                newDirection(@);   : B2 Q" `4 U& U
                                if @.Destination /= void then, ^9 L, \/ |9 P  V7 Z) o* w
                                        @.Destination.NumReservation :=
, X4 ]" R8 m% c/ _+ V                                        @.Destination.NumReservation + 1;
3 ~  n. k8 i6 p/ a1 ^                                end;
4 L1 k: j1 g- e5 u$ \) A                                @.CurrIcon := "drivingHome";( R* V: M: @/ a, V/ D& n' }- k
                                @.DrivingHome := true;
$ w# g7 }) S6 c# Y$ z8 z                        end;( ?/ L$ e) z. d
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d+ v- S% X( C* c4 a                        part := @.transpOrder;
' x! [* V+ y+ L0 s; }9 u1 N# O                        part.move(@);-- load part$ O. c, n. k& p
                        @.CurrIcon := "load";0 k! `' A1 n6 Y) s( @  o' S
                        GlobalDistObj := part.globDestination;9 n; y9 L# t! T6 F" U
                        assignLObj := rgmanager.rgAssignL;( q. R- y  Q9 U
                        row := assignLObj.getRowNo(GlobalDistObj);1 r0 I% H5 S" h* [
                        if Row = -1 then -- since 70$ M: H& C' ?* e4 d3 ]
                                if lan=1 then3 ^0 L7 U; H5 Q" @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 b; h4 }# ?& Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 N4 f. W! w8 ~+ t                                else5 s1 c  g' c6 B1 ?* I( |" S! e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( b2 n$ `* L. Z3 s0 I$ Y, v1 ^
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* j: n3 l$ s) v. b6 W! }4 |8 r/ R                                end;
1 f( a1 T' B1 ]0 }                        else  X6 m1 E# i) [+ W8 x$ s
                                @.Destination := assignLObj[1,row];
' g5 n4 F2 v5 q2 [- N$ E; Q                        end;                       
/ H6 }9 E, |+ m1 E) m                        newDirection(@);) D+ N& e% A9 E7 ]9 a% F
                        @.HasOrder := true;0 R9 F6 S" p5 F3 c7 b% N
                end;
2 E$ P( l+ ^" ?. J, @$ }. V        end;
3 [( K2 P  p# x# uend;        -- of the method
" Q9 }: j/ c' j2 O$ j/ f% G& g# \4 u" x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 M9 Y  N$ F. u# N1 ^8 t
9 e& N0 j5 W) Y( `0 \6 h这是AGV_putin中arrive的method。' v4 E3 j- L% o/ T* x& ~" K

. p, O8 D- b3 M9 y% h当到达物料速度越高时,这个报警更多,) l$ l% E( V: E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. [0 N9 X/ c5 Y2 }" @, R0 d  G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- |, s9 P8 ], S' W, g) c- k, u0 B% v2 r: a& G" }- P5 D" G
另外一个小建议,就是move,所有的move都可以这样; ^# c  `0 W3 q. R) l
if not move() then debug end  {; C% x/ a& ?! M* n" h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, ]& ]5 C1 V: C7 z' j- pplant simulation中的free libraries有AGV模板,8 @0 ~6 ^* `# o  q9 P
里面也有案例。
6 Y+ S- V  |% P& L( ?: X5 T我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" n* J( O4 K. f/ L' X6 D3 E. ?/ ]) {' E* p3 G
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " p2 e( U3 Q) t, F
& h0 W- Z% J7 N# `' U9 l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " j* v" m* l, L. s5 o
这是AGV_putin中arrive的method。. g$ \, o, |" h. u

. k7 Q  `7 U2 X1 A当到达物料速度越高时,这个报警更多,

1 E) }4 |, S# |2 `$ A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-10 01:58 , Processed in 0.022646 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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