设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7042|回复: 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'& I, o) l. Y+ y; R
*/
" @3 }# q+ _3 }3 T4 _is
# q" R. {4 ]" t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  _/ T- c0 b( y( ]4 k  q
do
* c( P  |$ g6 p$ }  D/ l7 |+ z        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 H" b1 _& ?' B        if current = @.Destination -- else return
4 w6 U* k; g& u' Y, V        then: w0 H5 F/ ^! l% i# S
                @.Destination := void;4 G: Z" A: n4 v
                if @.occupied then# _: b  @/ p" C+ _
                        part := @.cont;
3 p' ~/ {6 w8 p3 r( _* n                        @.transpOrder := void;' d4 ^* L  x: X% f) W6 V. S9 H6 P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ T' a0 _8 k. T! i$ I3 m: \                                @,root.eventcontroller.simTime);, K- }( Y8 t" d! m' N. N9 f4 L( e0 c
                        @.HasOrder := false;
5 q; ^5 f$ d; l5 G- G! j                        @.DrivingHome := true;7 F1 a8 n5 P6 I5 H; ]
                        rgManager.tryToStartTransOrder;
2 j- T9 V9 @. E                        if @.Destination = void: n6 q- H5 X8 ]( }/ ?+ W, o! r' j& x/ X
                        then -- no transport order for vehicle @' o! x' \, @( G4 u: A
                                @.Destination :=
; c; B( T$ I& \4 r                                rgManager.nearestFreeStation(@,track.~);" E0 u% m5 x( \
                                newDirection(@);   
+ Q$ g2 B7 [: A* M1 t                                if @.Destination /= void then  \. K* ^3 l6 C% [" g7 v
                                        @.Destination.NumReservation :=
7 j3 _" @; V3 J( q5 R+ J$ Z% d                                        @.Destination.NumReservation + 1;
7 h% _! V; o) P; T                                end;6 v& q: }' d# b6 Z1 Q
                                @.CurrIcon := "drivingHome";; X8 j2 `+ z" o( S, d0 i
                                @.DrivingHome := true;. E5 u* V* H4 c$ e
                        end;
) p( Q5 w0 X0 ~$ e9 P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 R/ I$ g/ y6 }/ u$ P2 a8 K2 |                        part := @.transpOrder;
* h2 x! f  a5 S0 `                        part.move(@);-- load part9 Y3 G  |# B- P: u. j
                        @.CurrIcon := "load";- ~8 a) {4 I9 X0 J
                        GlobalDistObj := part.globDestination;
1 R$ r" _9 L, c5 [5 K& p. q                        assignLObj := rgmanager.rgAssignL;
3 {$ `  K* J; Y( X+ b1 S) Z                        row := assignLObj.getRowNo(GlobalDistObj);( O: L8 K: K9 U3 l- W7 U
                        if Row = -1 then -- since 70
6 o8 r& _1 m/ B' m% Q. d; Q$ _, |                                if lan=1 then
, f" o; E& s- ?7 \1 C3 O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 X: q( S: U6 {; ^4 K# |  ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));! F& k: a* n2 F
                                else
1 l; f" _: }; H4 i( |) |3 d* T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 r9 L$ U, A  i- X! |0 B6 p3 R                                                to_str("in docking station: \"",?.~.name,"\""));                                . c- g# k' W) `
                                end;
1 k! k, J( B5 d0 [1 p" e$ W& _                        else4 @6 |  ~4 e7 `" G1 q
                                @.Destination := assignLObj[1,row];
( m2 z" m# S4 D! s                        end;                       
* g0 ~" m& O& v2 _* c1 _                        newDirection(@);
% c, B: e/ n7 a                        @.HasOrder := true;5 A3 z( g" e9 k$ O* E
                end;  A/ [" ^" I  u# b4 @$ j
        end;
) z! O3 }; h; E' P$ V8 G) \1 Z6 h6 Hend;        -- of the method5 e1 m3 {  N! _+ E2 l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' l, z4 C( m3 {, `9 L7 W8 A3 p/ t$ f6 {0 ^: o/ o; {% i: {
这是AGV_putin中arrive的method。8 v+ C: x! {2 }5 ]/ s  P) e1 A( s& ~

3 y1 o+ F0 u3 F$ n" D6 A当到达物料速度越高时,这个报警更多,, Q* X. {5 E) y6 E; ]7 r' R' c0 y  F% h
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 F3 W) ?* b; a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  H' [- J" G' U3 D, r
+ ?; N: X( i* l3 l1 p+ V9 t. t
另外一个小建议,就是move,所有的move都可以这样
, P( g( G1 O5 i+ vif not move() then debug end, w/ O- t  T+ Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' b- j- x# D; F0 Z7 C1 tplant simulation中的free libraries有AGV模板,/ o/ C3 n' N5 X% F4 t! X2 m6 Q
里面也有案例。/ L2 w7 L( I+ ?( ]; w! J& h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% d3 ]% D) G8 o' E
$ l/ K7 u; N+ L: W; u( F4 B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 [& ]# c0 n% d' `9 a( k
. F( s+ ^  \; {/ Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; L, V; F8 R/ g* T- t$ P/ F, g这是AGV_putin中arrive的method。# _: k' T+ |! s0 L- F$ R
. D  O' j- Q4 C" y* b
当到达物料速度越高时,这个报警更多,
3 N( T/ i5 I' l) f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-12 23:24 , Processed in 0.022397 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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