设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6208|回复: 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'& k& ~, C( U2 p; V  ]5 c
*/
6 u; ^" s9 @, [' `* X' bis- F2 f9 l2 e1 T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z" B, \7 }* c( f- X) M& i3 ^1 H0 T
do' j& g3 u0 O; v! q% h+ j  g
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ \8 W, c8 c) l2 e9 g. U2 d+ P
        if current = @.Destination -- else return, _5 p0 I8 f( \+ S7 c' N5 Z, @+ Z$ R, L
        then1 ^2 s* d% t/ i+ @& L  O
                @.Destination := void;1 e2 ~2 r0 p0 B0 }  h3 q( C* m# Y; l
                if @.occupied then
9 U, |$ i! ?: z2 B. f                        part := @.cont;8 [" j8 S8 N# T) I
                        @.transpOrder := void;
& F8 k" i: L! E* y# C6 Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 R  [  ^: t: M: l
                                @,root.eventcontroller.simTime);
4 z* _  s4 O, f" J7 \8 e+ ~9 s                        @.HasOrder := false;
3 m/ z8 B! }; K* }# _6 d& I                        @.DrivingHome := true;* m5 q6 A3 p1 h! {
                        rgManager.tryToStartTransOrder;
% s/ F* {/ g& L  g6 g$ x$ ?                        if @.Destination = void  P; R$ V6 G$ }' R( S% R
                        then -- no transport order for vehicle @
- P: P! K) x. H& ^                                @.Destination :=: O  n$ m# ?( ?# Y4 k
                                rgManager.nearestFreeStation(@,track.~);# J5 X) u$ d5 j7 z
                                newDirection(@);   - f  ]& Z" {1 O
                                if @.Destination /= void then
: @" e* k8 Z. ?* n                                        @.Destination.NumReservation :=
$ k" o7 X1 k% |6 S5 ]0 k4 O                                        @.Destination.NumReservation + 1;( t3 Z4 J+ h9 o6 Q
                                end;: i* U, I. O# H4 t1 I
                                @.CurrIcon := "drivingHome";3 V) r% M8 \) P! K9 B/ Q% F+ ]
                                @.DrivingHome := true;
; M' v$ [: X! H0 W( V2 U                        end;6 a* ]* K/ P! B( z$ K& x' a2 q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' R: r0 G. |2 D8 [. q( l. H, A
                        part := @.transpOrder;
/ i5 [$ O9 _  h! `* i3 D( E+ ^                        part.move(@);-- load part
4 v+ q' g3 p$ i' D/ f# f& D                        @.CurrIcon := "load";8 [8 ~) i+ }! N; `
                        GlobalDistObj := part.globDestination;( D% V# A' u' z3 g& j1 a
                        assignLObj := rgmanager.rgAssignL;3 M+ ?" u0 |4 H# k5 v9 [6 ~
                        row := assignLObj.getRowNo(GlobalDistObj);
  ^+ d  m+ j* ]                        if Row = -1 then -- since 70
2 M; P  Z4 M; h) W4 E                                if lan=1 then* g% D' ]4 F$ p) a+ V5 O1 z/ l
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( N5 Y/ Q# P9 l9 z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. p# D  y5 v3 c- g                                else
, ^0 {1 q7 w& n                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 B' |0 f2 l) ]# [1 C# H+ o1 D                                                to_str("in docking station: \"",?.~.name,"\""));                                4 R+ F# S0 l! ?- e
                                end;
$ k0 e% I/ w- Q. }                        else
. g2 e* r1 i6 z- |3 i                                @.Destination := assignLObj[1,row];  `3 ?! k9 e8 T! V: f
                        end;                       
0 T. i$ |2 R2 h6 z  p% ~% }* I                        newDirection(@);' Z4 Y" S' L7 y
                        @.HasOrder := true;0 r& O8 L4 P/ [1 k3 G
                end;- U" r$ n4 o# g% O9 ^
        end;
$ Y8 t5 _0 L& ^' b4 L9 Gend;        -- of the method
" |4 s1 e8 L9 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % _# _, R; J6 Z7 ~9 b

3 F2 O& M" z  ]' V* ^; k, X这是AGV_putin中arrive的method。
: A* A: F8 k6 F# h
) g/ b9 c. N: Z: q" z7 D当到达物料速度越高时,这个报警更多,+ m4 S3 s) D, {- P: ?$ k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: T( K1 B& o7 e: ^7 C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 O3 P& |& \) m* U$ b( J" _
; _- X. E: a  f( v  P2 k8 y
另外一个小建议,就是move,所有的move都可以这样
' H, r) j1 F4 I' W  Q! C; ?if not move() then debug end* T, b: i8 N& C) Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 N: F% r" Q0 I. q
plant simulation中的free libraries有AGV模板,
% a' X( o+ X, H) ]里面也有案例。0 e1 N  e; G, D  T# j2 X" G% h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 V  J) g: X; a9 g6 n7 h

6 R9 U) [7 I3 H5 s) @' a2 I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * O0 v& G9 B# M, C( [, p- y- Z0 F

" n" Z/ h- A* L" W$ d" O( i  D. s那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 u/ t! ^" }: }% D0 `' _! \, J
这是AGV_putin中arrive的method。/ j$ g+ k: ]: O4 F/ k+ M

% U9 C7 Q% Q# z4 v5 r当到达物料速度越高时,这个报警更多,

  D. Q9 Q! j, T' {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-24 22:28 , Processed in 0.017063 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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