设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6172|回复: 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'; x: k  F2 d4 i3 k
*/
& L, l1 j6 r2 ^" ]is3 V+ I/ p6 d4 s$ H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ t2 J3 _' v1 J& O5 y( Z' odo2 X) Y0 O& I+ r. N# w
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 c1 r: d; U! J! H
        if current = @.Destination -- else return) o& l' i, f( b1 s6 t. J9 K
        then
  I/ `# i9 q$ B; S                @.Destination := void;
# O" j) d4 u% r* _                if @.occupied then5 H5 I* R9 G) K1 e' K+ v( h' k
                        part := @.cont;
5 ^* _$ V' h+ ]" }5 t* K                        @.transpOrder := void;. o9 w# V' q& q  o0 i, X+ W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# T2 f$ t" p9 b! g2 {, J  S( L2 _5 A# U
                                @,root.eventcontroller.simTime);- U7 S9 G* [3 b% {, Z
                        @.HasOrder := false;8 p6 I) g# j" R' S  j
                        @.DrivingHome := true;
& H& q" s; a( G                        rgManager.tryToStartTransOrder;
# T. K* ?9 M! s# K& S                        if @.Destination = void
0 }( b9 `" i  R1 H                        then -- no transport order for vehicle @2 m0 W* `5 x: _1 ^8 o. o
                                @.Destination :=* i% @- p# W; \  V
                                rgManager.nearestFreeStation(@,track.~);2 M8 {2 U9 }! Y7 D; F% n, ^5 f- L
                                newDirection(@);   
: T) z: |2 p7 u1 U9 i3 Q% Z7 k* e( G) f                                if @.Destination /= void then0 j& w' [5 W; A9 D" y
                                        @.Destination.NumReservation :=7 E9 J6 O$ B% Z$ j; ~6 j$ _6 M
                                        @.Destination.NumReservation + 1;
0 ]: B* t/ h; q) X; f                                end;2 P6 N2 |" [/ ]3 Z" s; |( x
                                @.CurrIcon := "drivingHome";
2 I/ e7 K8 `. z! D                                @.DrivingHome := true;" O& }4 [" L( R3 c& G5 C) b1 o
                        end;$ v# ]' E3 C; q' ?; q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) @8 d$ y/ g7 G6 e- P# b" W: ~                        part := @.transpOrder;1 y0 [- g; a4 |6 f0 f" ?; h
                        part.move(@);-- load part+ `, h* `/ A/ q/ a
                        @.CurrIcon := "load";
; Z* |6 g" P, V" w                        GlobalDistObj := part.globDestination;
. s  Z; u: ?1 r, Y, i) }1 P                        assignLObj := rgmanager.rgAssignL;/ c: o% j' w8 P" I. K0 W
                        row := assignLObj.getRowNo(GlobalDistObj);6 x# H+ }, x6 R; _$ O. }$ ~: u( I
                        if Row = -1 then -- since 700 m* m# e! ]/ `8 z) F( p. ]3 f
                                if lan=1 then( h" p$ ~& j- z5 V, I8 j, S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( }* v! ~3 G$ ]( c; H; I/ ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, b" B/ [( p0 M% f: Q! I                                else$ L" A5 u, ~/ C* `" \8 c# E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }: h) H  X$ u: Y" V( P. O                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 m: o# s$ ^- F! G                                end;: K8 `4 g1 e; O
                        else
" L7 w/ R' ?% p                                @.Destination := assignLObj[1,row];% C1 Y2 M" i- a& W5 H9 P: x7 W
                        end;                       
' {- N! F2 D% O                        newDirection(@);
7 K4 C2 i1 ]# `- t$ t8 u6 r5 [                        @.HasOrder := true;* l4 P9 i/ P0 [
                end;" o' c, Y0 p  j4 N8 D
        end;
3 h  V, @8 Q# xend;        -- of the method# t% Y. N" Q9 Q; a% _  `7 r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . B, r( l9 d+ S$ ~4 y, A4 E
* w6 a( q& g5 i
这是AGV_putin中arrive的method。( a: z: m( {/ g' Q0 Z
' a  S; N; m$ O* T7 d1 l- i6 |: v$ C
当到达物料速度越高时,这个报警更多,5 _( n! Q: I+ ?/ w
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) D6 l9 V' ?0 h( ^8 j# y: t& c" G& e程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 d. ]* d7 i0 W
' {) j( O7 R2 y/ g4 x另外一个小建议,就是move,所有的move都可以这样3 G/ j+ K9 V( y/ a
if not move() then debug end
' S: ~* l% u% H+ |' g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 R: U3 D; z8 `8 n6 [plant simulation中的free libraries有AGV模板,
( D. J+ C! @0 X里面也有案例。4 P) k+ l, k. @- S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 P4 E" K* N$ r& U, B

, t5 F6 |& u; s: x' [* D- g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; T& I4 h2 S7 ]$ e  v& A/ ~

  e; x& a: R# n8 Q' q- x6 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / ?% ]5 H' c+ h: Q8 w* }5 N! n* S% N
这是AGV_putin中arrive的method。/ p9 }0 z: n/ c5 f% j

5 t+ d1 ?" P# l1 a4 S当到达物料速度越高时,这个报警更多,

7 E0 y' X' t9 v& S& a* b) U3 h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-22 18:57 , Processed in 0.026354 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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