设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10126|回复: 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'0 a/ Q7 B4 e/ n: \- P2 g' l
*/1 \% i+ ?: y4 L" W
is7 ]" {. p3 h2 C* {
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  ^8 M6 O5 O3 ?* J% j
do& T6 t. e1 F; V5 C
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ n# l4 {+ F. s1 V4 M" Q8 B: v8 A
        if current = @.Destination -- else return
, @; B) M9 A# w& Q8 i$ e        then; N% I( J, h0 J. Y& p
                @.Destination := void;3 |  u& |; E9 ]; }
                if @.occupied then, K+ J9 q% j% t$ `) y1 k
                        part := @.cont;
/ Q3 `9 n& ~! T1 C. H2 |/ r4 j6 `                        @.transpOrder := void;, @! V) J# p! Y3 Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: f6 m3 E1 X3 p. L5 q0 H3 \( f+ j  u
                                @,root.eventcontroller.simTime);& y( B" w3 R1 S; B- t, K+ I
                        @.HasOrder := false;9 N# x; Z5 l2 ^) k" T- o
                        @.DrivingHome := true;
* g% I6 m  |; }  h; @& V                        rgManager.tryToStartTransOrder;
8 b3 m3 Y, i# ?: i                        if @.Destination = void; y& S- E5 i& X, a
                        then -- no transport order for vehicle @
2 |6 y$ O# @8 T7 r                                @.Destination :=/ r) Q; _; o$ u1 j' T
                                rgManager.nearestFreeStation(@,track.~);
+ j: Y0 x' m9 v/ O/ ~, b8 v9 R                                newDirection(@);   
& ^7 C1 i5 m) D- d  l                                if @.Destination /= void then
8 F, X$ b' }( a: z                                        @.Destination.NumReservation :=
  u9 p, V$ o' f  K& {                                        @.Destination.NumReservation + 1;
/ n7 ~$ r; r# i3 r8 H                                end;* L- d- s$ S3 d4 m4 s
                                @.CurrIcon := "drivingHome";
/ x7 [5 _; A. |8 p: z6 G                                @.DrivingHome := true;
: W2 J7 B4 j- l% ^9 V* s9 T                        end;/ G; O5 l( t) i- D2 E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* b1 N' `3 U1 \. ]& e  Z5 S                        part := @.transpOrder;
+ t! q  F3 e9 e; X$ A                        part.move(@);-- load part9 K% ]: B+ l  c! [* e6 ^
                        @.CurrIcon := "load";
8 U- h( @1 Y. G, ^                        GlobalDistObj := part.globDestination;
6 N  Y/ k/ e! Z) b5 @9 b& a                        assignLObj := rgmanager.rgAssignL;
( }5 F: m/ |8 l                        row := assignLObj.getRowNo(GlobalDistObj);
) R" o3 `4 }) t8 ^9 v                        if Row = -1 then -- since 70
  r+ \/ ?" {5 W2 y; ?2 {                                if lan=1 then3 f! a5 p# B3 ?6 U) ^/ M2 G6 _% z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! m1 y; v3 ~% S% B                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: E& p8 B" _1 D0 k) n                                else7 {! l5 T: p0 {
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 b0 c) N: d6 W6 A( q                                                to_str("in docking station: \"",?.~.name,"\""));                                4 Z' ?- A3 j/ d
                                end;/ @1 L; d. L, m* `7 k6 q2 s3 G
                        else( F+ V; z: R6 k' l4 {7 w
                                @.Destination := assignLObj[1,row];2 I  s" t) ~. |4 u1 ^
                        end;                       
) T4 k  P  T) u9 Y$ M) ^                        newDirection(@);8 Z0 R4 @! m% L1 p
                        @.HasOrder := true;
( i7 R  ^5 Y) ?4 }0 I- I6 J/ B                end;
7 [4 Q* C! c. [  C( `        end;
" o9 l8 q5 ~6 f2 B% y# f) hend;        -- of the method
* h; f+ i; W! F! f. M9 g% h! d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& L3 N+ W+ y& S+ B
  l  L* C/ B5 t/ @8 I+ Y这是AGV_putin中arrive的method。3 ?, j' F0 f/ m, _1 w# X0 i
% G$ d) Y- v3 P0 V! @# V& S$ ^
当到达物料速度越高时,这个报警更多,7 H$ T( }& |/ U5 Q2 v. J5 E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 v8 u; D' W: o, P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; f# R) y( A% M6 @* |
$ c: a- y2 i( H* m/ K: Y% g4 r/ x
另外一个小建议,就是move,所有的move都可以这样* j2 z/ v% y1 F7 z; u7 l, a
if not move() then debug end2 Y& w( n% q" Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! J7 c+ F7 I0 r# h6 ?# E$ E, Q4 N
plant simulation中的free libraries有AGV模板,* T: [2 u4 U8 i4 w  F
里面也有案例。) {2 f( E# w. U1 I2 U$ o: `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ J: k* T$ a5 @

! ]7 ^! a# w3 O我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( W+ c8 \. H, A1 Z. `% S/ J. S( B5 G6 p2 S' N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 a/ M( B, _6 Y! U/ k这是AGV_putin中arrive的method。
* G" w  z6 W8 c# r$ Y
5 W* w3 z3 A+ k当到达物料速度越高时,这个报警更多,

/ G! d% w0 L$ K3 d9 Q$ ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-14 12:37 , Processed in 0.016556 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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