设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8352|回复: 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'+ q! ~1 ]3 P( c$ W% y& N5 J. g
*/: m0 }7 R* o' s  G
is! z( x* `- d/ c! t) P# u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C/ e) |% Y( ^# S4 k" Edo0 J  t' x, Y; V& {0 ?! @% ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ X8 N; o$ f9 _; c+ ~# @        if current = @.Destination -- else return
3 w' |: p! }+ Q0 B        then( }7 d+ d" R2 }8 ]2 G- e2 b. x
                @.Destination := void;' L$ w# G, X% }$ b' Q9 x
                if @.occupied then
" i4 [, v" i1 C                        part := @.cont;
$ x+ }1 A4 ?+ M) _+ G" E- K" |                        @.transpOrder := void;" q9 |7 J7 f) n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" n) k2 D9 i  U  m; l                                @,root.eventcontroller.simTime);
. Y: K  k( C7 `* [0 X4 _                        @.HasOrder := false;
7 B: V1 v0 T& O, }( Y                        @.DrivingHome := true;5 k' `; n! C4 V
                        rgManager.tryToStartTransOrder;  K7 F% X; j) q
                        if @.Destination = void
$ s/ t0 B+ T. V$ v( U                        then -- no transport order for vehicle @
/ U7 T0 h) p  i2 @: }+ n                                @.Destination :=
% M4 P' l: \! k3 s+ n# Q: l                                rgManager.nearestFreeStation(@,track.~);
; ^7 d# c0 g' `                                newDirection(@);   + M/ c1 T/ Y9 E3 |5 A7 X
                                if @.Destination /= void then0 S3 S- o4 p% y- J' J
                                        @.Destination.NumReservation :=3 A: C9 z# |6 G2 X9 v! Q
                                        @.Destination.NumReservation + 1;
( Q  }/ G$ n# f9 V# l) k+ w, y0 ^                                end;
. w4 t& i0 c$ t                                @.CurrIcon := "drivingHome";
0 E) R! b4 _6 h( g% h0 Y                                @.DrivingHome := true;
- r/ i0 J" y% f                        end;
' D5 ?1 Q/ P. a6 R  r( i  @, s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 H% ]- w- Q! w& y2 g* U                        part := @.transpOrder;
& ^! z2 Q& e8 x$ h- g. V: t( N5 t' x  M                        part.move(@);-- load part
' H. g0 b9 s( K$ G1 |                        @.CurrIcon := "load";6 e+ j# |, p. A
                        GlobalDistObj := part.globDestination;- Y9 I0 Q8 W/ V% F1 m4 K
                        assignLObj := rgmanager.rgAssignL;& x: ~2 v; K% j# X
                        row := assignLObj.getRowNo(GlobalDistObj);
: W( m* G3 ^7 `8 H$ [9 g* M                        if Row = -1 then -- since 70
) \  Z  a7 z& S                                if lan=1 then  P2 x$ z0 F2 O. ~1 E# u7 n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 P% L$ V; M8 O0 M8 _4 ~6 f9 P$ X                                                to_str("in der Andockstation: \"",?.~.name,"\""));( B# p- \" B( \6 D3 c1 `
                                else
9 X! q8 v( e6 }# z$ q& e: c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 k: a% j3 o9 _
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' |" v2 s; v3 ^3 S+ k# S3 d                                end;
+ ?& v& m- c0 |  M                        else
+ S  U2 w% B- [- ~) ]                                @.Destination := assignLObj[1,row];
: L( ?1 T5 h/ a+ Q% K- ]                        end;                        5 I/ C6 o( H( C, F
                        newDirection(@);6 G( O1 M% p4 i0 _8 O. a
                        @.HasOrder := true;
0 K  G0 g% ^4 A                end;
4 P! ?& V, z' N+ h4 a2 w        end;! S! s) e9 r% |# P0 V
end;        -- of the method. k- D! y" [, z6 A. x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% a4 `( c* }+ c& N$ o- S) p( B. V) e1 \: I# v( ^9 e2 F" N4 N
这是AGV_putin中arrive的method。
: y! A+ L, N: N5 d) H7 L% S6 @- L8 [  A- Y
当到达物料速度越高时,这个报警更多,7 l2 f) L$ ]  J3 V, G6 q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, X& W9 v5 Y& w7 w" J' G, h" S+ V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 q! Z% @% Q3 k" O& f8 Z
6 V$ R; {- E- V6 v; A另外一个小建议,就是move,所有的move都可以这样
0 e* m  P. v. {6 e) Qif not move() then debug end
1 ]% C* X. ], O2 U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! D; B  U4 G& a, g: j  H: h" v1 K
plant simulation中的free libraries有AGV模板,. M8 D- y' `4 R! T& p
里面也有案例。4 `8 @) D8 K: C# s% }3 a& y9 o. |9 k8 I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' s8 x+ u) w. c' k* Z! C: u
* ~% f& ?* C* b0 J- @  n
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ f4 C/ o. M" Q+ l. Z3 }+ k& a( j% W4 |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- v8 |; n0 Y% q8 v这是AGV_putin中arrive的method。! p( y. z, ]0 L/ l6 r/ j

, V7 C/ O3 ?' W- I) y当到达物料速度越高时,这个报警更多,

  k1 v- ^  H5 o% ^0 i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-29 23:54 , Processed in 0.018088 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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