设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6860|回复: 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'
2 O: V3 ^! y) q( t2 x) N' x0 w2 K*/
! m- D  c( q% Y  Mis+ Q' K# b1 z5 R! F% Y7 y/ t7 m% R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 w9 t0 q  R" Q, Gdo- T0 j& x: y) C/ ?  @, [' O
        Lan := rootfolder.Internal.Tools.AOLlanguage;
, o" \% Q. h% J# s5 ?0 t        if current = @.Destination -- else return. h: [1 g. a4 _" K3 q5 ]2 q7 g
        then
* X/ g2 }8 _5 L! B                @.Destination := void;
4 M4 y1 `: y. g% {; \, M/ i                if @.occupied then: a1 ], J/ g9 D8 p0 p( R' j
                        part := @.cont;
9 o  Z% K4 ?& f                        @.transpOrder := void;9 {0 L6 U; t9 [( {! e0 W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," L- n. t0 [" k
                                @,root.eventcontroller.simTime);. w4 P; E: ^* K8 K: n5 Z6 p, l
                        @.HasOrder := false;! u+ g9 B0 z& g  U# e8 p& n9 |7 ~
                        @.DrivingHome := true;
' x2 ?) e- O% x( A, l( n( {2 U. y: _                        rgManager.tryToStartTransOrder;4 p0 p4 s- Z- ]( y9 B/ a: T
                        if @.Destination = void; e/ V4 _$ f) M3 h
                        then -- no transport order for vehicle @
1 L! K! z/ h2 G                                @.Destination :=
& ^. a) T9 q4 a                                rgManager.nearestFreeStation(@,track.~);2 p" Y! W' g/ M  x
                                newDirection(@);   
! i5 t# S" P$ r4 B9 G# d0 U                                if @.Destination /= void then
6 O$ [9 ~9 T! _- W7 [* V                                        @.Destination.NumReservation :=
% z8 w; n2 O7 d8 R. a                                        @.Destination.NumReservation + 1;. o& H2 f# u8 V9 h1 ^
                                end;7 \9 O/ O* A3 @
                                @.CurrIcon := "drivingHome";. f: K  X: b9 _4 |
                                @.DrivingHome := true;
: j: G& w3 l; j/ w                        end;
4 _; ?0 a" K" W/ |4 E2 L  O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" e7 G/ U5 W6 A/ I# ]
                        part := @.transpOrder;
" @0 D: H% m* s. P, ^1 d% A7 k4 }  e                        part.move(@);-- load part& Y$ p/ T  z8 p% g
                        @.CurrIcon := "load";: a& P( \' \& @4 S4 |
                        GlobalDistObj := part.globDestination;0 F. Y: a( r! m4 d' ?. [
                        assignLObj := rgmanager.rgAssignL;
* R! A8 }+ c: f( M+ i- J7 Z                        row := assignLObj.getRowNo(GlobalDistObj);
% M8 r9 g7 J1 f# ^8 W! h& U! T0 n                        if Row = -1 then -- since 70
& \) I" ~. v& D& L                                if lan=1 then
( K* `( R. Y& e0 A5 g2 s" q% H                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, c# u7 s5 P4 U                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# m: w7 j' t5 H: j8 k  M' F                                else3 a( z4 v3 p  I% f- T* X( A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," f1 C& e& ?: H# c" E5 P
                                                to_str("in docking station: \"",?.~.name,"\""));                                : V2 g9 [. V/ }! x% E
                                end;8 z1 j& z$ f8 z$ H4 U* r8 J
                        else2 d9 ^' E' h* N* ?3 M* P
                                @.Destination := assignLObj[1,row];
' Y. v: P/ l& a( P& u                        end;                       
0 ^8 i+ Q3 `% Z( R, k+ H% v; a                        newDirection(@);# Z& |! o" t6 }: N( E* O
                        @.HasOrder := true;
" @* }) ^( L+ Z6 J( q& g                end;
  y- t; ^6 V% j" t1 i# l+ O        end;
7 M7 G& H$ V% A. \: Tend;        -- of the method
+ h' L: m2 y+ Z) _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# W) }+ O9 y7 W; v% e
; x) x! q- ]' c0 T: r这是AGV_putin中arrive的method。
1 D* r. w" i+ F* p
0 Z" m2 Q7 \( n% f当到达物料速度越高时,这个报警更多,$ g; }! x) L; o/ O- a+ N, i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. o: w4 x: U0 m/ d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ H" ]3 p! S& b$ O" l( T. f: ^4 g( \8 K! r  h
另外一个小建议,就是move,所有的move都可以这样( y+ O, L' ?3 L! c, x
if not move() then debug end1 Y' G. _: O. T: \/ a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 `* b8 U6 H7 i" D* g4 F5 w
plant simulation中的free libraries有AGV模板,% B* a& L3 ^; T6 _& I
里面也有案例。
$ j& @! ]. R4 g, `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 k' n: t" J+ g0 G" [# A- r) h
7 i' R* }+ u3 w/ M0 Y( d! b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; q4 s8 W) H* J7 A" U

4 R: H. [4 I! k+ o- b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' s# f* _$ W1 U- X$ x, p
这是AGV_putin中arrive的method。
! B# B% G+ R  a3 M. d" U& O4 q( y: V( a7 M3 J
当到达物料速度越高时,这个报警更多,

4 ?* Y' V9 j- K6 K, M: {; j另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-3 03:07 , Processed in 0.051539 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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