设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9780|回复: 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': Z" n2 P3 w7 K* R
*/
/ g" G' R0 W4 y6 E$ D. n/ @is
, l* a' e: B- ^, y& T# \3 \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Q( r: b; k$ @
do
) @1 i7 q( k1 T* Q9 B- v6 ]        Lan := rootfolder.Internal.Tools.AOLlanguage;
- x2 y) J* i5 ~. d( Y* p        if current = @.Destination -- else return
- u6 n9 V& r. B' g0 X& C2 r# I8 Q        then% `' F- R) {& P1 \+ Y
                @.Destination := void;& h' b& ^% z/ @, j( A0 ]
                if @.occupied then
, L( @7 M" @1 t1 A. W                        part := @.cont;
& j! F( Q# q7 S* c                        @.transpOrder := void;+ W6 L' `+ a( m5 d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 V+ e8 @& G' j4 m1 ]! o( \
                                @,root.eventcontroller.simTime);
( Z+ t* S; ^. x- S- w& D                        @.HasOrder := false;
/ l& X3 z/ [4 I* b  O                        @.DrivingHome := true;( @7 W4 Y, F' F) p4 m+ {# q3 g
                        rgManager.tryToStartTransOrder;
3 W& y) l9 d. d6 T8 X" R0 N" U                        if @.Destination = void
5 u0 o) Q$ U; J/ o4 v1 S                        then -- no transport order for vehicle @. Z9 H; n  ?1 C5 ^  W! m' J( |
                                @.Destination :=! I8 F5 O+ N& G
                                rgManager.nearestFreeStation(@,track.~);* V) H! _8 `$ Y* T* ^
                                newDirection(@);   ) G% \# u8 g: n; P
                                if @.Destination /= void then/ v+ d. G( t& h6 G! Y3 ]$ Z" B& t
                                        @.Destination.NumReservation :=$ p7 C5 R* B; |+ b- v
                                        @.Destination.NumReservation + 1;
' R5 Z9 {, a' b. z. x9 E6 M                                end;
9 @: P6 L2 g8 O                                @.CurrIcon := "drivingHome";6 \( h& t; T) ]/ `% c( x' _
                                @.DrivingHome := true;; z$ E# o' ?- ^: ], n) h
                        end;
3 m% Q5 J' M# ?& G2 i" j; f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ O, _7 \) ?/ s7 |* i. S5 d" i3 U                        part := @.transpOrder;
9 W; o5 q5 C( p                        part.move(@);-- load part
. L7 l# K  z  c4 e$ E                        @.CurrIcon := "load";8 q- F, s* b9 X) E/ }
                        GlobalDistObj := part.globDestination;5 L% _& _# m/ C0 p5 q, M7 A
                        assignLObj := rgmanager.rgAssignL;
( O+ G5 |7 ]  n; F3 i0 r                        row := assignLObj.getRowNo(GlobalDistObj);
6 d; V5 \8 X& y! _$ M2 t                        if Row = -1 then -- since 70
4 `1 l. }, O# w" \* I0 i                                if lan=1 then7 @. g$ U9 e2 A3 t4 Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 J( E& n. y: g9 [. ^8 A, K                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ l$ q- [1 C) L                                else
8 U: U" N! x2 z; K; s( U; l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- [2 P0 Y& y& L9 o1 ?: W1 u                                                to_str("in docking station: \"",?.~.name,"\""));                                8 J3 v; K) W# I  k( A- j; L
                                end;8 v# u" y6 i6 ?6 [' C0 d
                        else
2 w, v: T/ P9 G) ?, T, `7 {                                @.Destination := assignLObj[1,row];
+ h" O! g, ~  k                        end;                        2 R+ k: E5 B) n" T
                        newDirection(@);
& \7 z* I% ]$ C9 M6 B4 z" f) L4 q                        @.HasOrder := true;0 r) t  q& e. L' [" t
                end;# A' L. A5 V4 e
        end;
5 w' W5 E3 @" qend;        -- of the method
& b, W" \- N. ]0 N, j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) o1 [( d6 j$ g3 s" Y7 F7 l
3 ~) H' T! @* V
这是AGV_putin中arrive的method。
0 a. t+ B: O" t6 X" e" ?7 s' Z/ h" E2 N0 r  h
当到达物料速度越高时,这个报警更多,; N; ?; ~* Q; v0 f1 f; T8 O
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& I  A, d0 Z3 n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ B3 Y' @/ t2 A8 U
/ l: U* E3 L9 T% J另外一个小建议,就是move,所有的move都可以这样
6 V& V, A5 e4 P: Dif not move() then debug end
& V; T. j+ [4 R, Z% K: q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* j9 a# k0 [/ o+ i( w/ a
plant simulation中的free libraries有AGV模板,' B. J2 w3 Q) ?/ c- m* s. }+ K
里面也有案例。/ s, O* o: Y" R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! d) ?  Z* U6 l$ `
" j. y- P* w" }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; U3 u% b* q3 V
0 {9 |9 q& O( t( `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; c; L+ q5 _! }0 b
这是AGV_putin中arrive的method。3 F+ F7 [; q' `" F& E
, d! F6 z; T: @" w2 X0 E
当到达物料速度越高时,这个报警更多,

' A: |0 ?  e  D" H另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-24 12:44 , Processed in 0.017217 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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