设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4588|回复: 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'( J2 `  _' N) L  u! E# K, {# [
*/& @) Q: Q( [* X
is
+ Z2 @$ ^! c5 W1 u2 F        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 A1 O" |  F; V# f; b2 b8 Tdo$ r! E: `+ Q1 X( S# x" S' o
        Lan := rootfolder.Internal.Tools.AOLlanguage;, ~* w9 s% u7 z9 a7 t& P; K
        if current = @.Destination -- else return! G+ V! G, N( i& n
        then5 b8 w0 e; L: u/ N- K1 d' v
                @.Destination := void;# U* K6 v! s- ]6 M
                if @.occupied then3 u+ a# M& w" P9 H
                        part := @.cont;
% I6 Y3 D& N- c' F                        @.transpOrder := void;
- d  l2 Q; @2 K6 q7 \2 ~$ {                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Q+ {8 B2 m) u6 [, ]                                @,root.eventcontroller.simTime);
7 j8 J, `8 q2 q5 m4 A                        @.HasOrder := false;6 V" d: }) s- o0 M$ c' [
                        @.DrivingHome := true;- t) E* E4 }. C6 t
                        rgManager.tryToStartTransOrder;1 b' H0 h: k3 j, [* _
                        if @.Destination = void1 p  a, @4 I. b/ x4 K5 o. b
                        then -- no transport order for vehicle @% O& I$ x. i. f' ^& ]
                                @.Destination :=2 s4 m! ^' c7 e; }  q$ [0 }3 h% ?" }
                                rgManager.nearestFreeStation(@,track.~);
3 p$ Q6 P% P+ ?# S6 w' S' c$ y                                newDirection(@);   - w' b+ G) S$ d
                                if @.Destination /= void then& B# v) I, F. F9 E4 {4 c6 a7 g
                                        @.Destination.NumReservation :=' h5 q4 n& g( }+ s: x3 x3 G/ I! o$ y
                                        @.Destination.NumReservation + 1;
& j  j8 R2 A  e" |0 l/ S6 y                                end;
4 ^4 S# n6 P# a; Y$ b$ v                                @.CurrIcon := "drivingHome";
2 q& d6 T' M6 b; u6 Y' R                                @.DrivingHome := true;  ^" r' s8 X! r/ R8 X( a4 K
                        end;
' p" \0 o' g5 c0 ^- v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i% b3 A4 `" a2 T& |# I5 K; e  q; a
                        part := @.transpOrder;
( _( F$ C) }5 u8 }4 e                        part.move(@);-- load part5 Q+ C" ]% k2 _" O/ U
                        @.CurrIcon := "load";/ }- f5 R) }/ f( k
                        GlobalDistObj := part.globDestination;9 [. B; E1 }8 U* Y
                        assignLObj := rgmanager.rgAssignL;$ d' a& ]  |9 q# q9 K7 m
                        row := assignLObj.getRowNo(GlobalDistObj);) t6 t! b: ?( L( C7 C1 u. P
                        if Row = -1 then -- since 703 |/ [5 p4 K8 S8 ]5 _' m6 l
                                if lan=1 then" z$ v- F6 \0 b* x- k) J# s$ {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* m3 j" d3 g6 F; d3 L( M* c/ v                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 G* ]* b. K) {  N) I* O. y
                                else; u! d  y: q: m: _" `6 b+ ^! k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- A* U8 ^7 J9 o! e3 V0 J  p) J: j; s# V
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 C' p/ r$ [8 [# Y6 p7 V6 t
                                end;& L$ k, P% b4 e) c6 J' @
                        else
9 w* b  k6 B: N  y* S7 ^& z8 M  s2 {                                @.Destination := assignLObj[1,row];: q5 s0 i* L- o: i# s
                        end;                       
& _3 H3 y0 H: o# f7 V  n                        newDirection(@);
$ v9 @# T( c3 k0 V# v, H5 J                        @.HasOrder := true;8 g0 T6 q& c! J- V, B# I
                end;
1 L! a. I& A. D0 I: m        end;; ?* t' G! A7 E% D
end;        -- of the method
& A' [3 L  V" i4 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! N/ s( u. Z' o

. H) O- B7 G+ f/ |$ M4 k4 R这是AGV_putin中arrive的method。
; {! _0 F$ K) }) J+ y
1 B. ^" E) |; P7 ~3 ]当到达物料速度越高时,这个报警更多,
; B. J. _) e9 }* p0 c( {' T  U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& ]& B6 `+ g! Z( Z% P( z  s程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ I- k* n- ?" r) M3 O! _1 A; j
0 q+ o0 h* a4 |1 Q另外一个小建议,就是move,所有的move都可以这样3 Q7 {, r; \, j
if not move() then debug end, U7 k/ x" z2 g) W( L7 V; L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( f3 K: n9 x9 i* I
plant simulation中的free libraries有AGV模板,
% i& {* q( \/ w" ~( ^2 R里面也有案例。
5 u  I! y% ~  ?' p, ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ ?, X" Q6 Y6 J2 w6 v( p- I  V$ l+ z, A5 _& f2 f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. N+ Z  t0 B4 A! _0 H8 h. C# D
& ^0 v# {! D' ]9 \# P  Q- e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % o( @& t8 W2 `5 d7 Q! m& g  Q
这是AGV_putin中arrive的method。, N9 ~; Y# t# f5 K7 ~9 N  C" K

* }8 I2 J/ {5 L" k( L" F当到达物料速度越高时,这个报警更多,

8 ]# N! {7 j8 @0 s$ V( g! H0 Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-5 05:17 , Processed in 0.017059 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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