设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6567|回复: 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'2 L8 i% Y* K, F+ `
*/* z* g5 b& b! [6 n& K
is
0 m3 A. e: @0 q9 ~  k        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 W( I. G9 e; A1 g" q9 _6 z
do
! Y1 @9 z' N: q) V        Lan := rootfolder.Internal.Tools.AOLlanguage;* W' E: n$ ^" i5 Q; c5 G
        if current = @.Destination -- else return) u) c& }4 l$ G( V# r- A
        then
, f1 g/ k) I' m% v" g. X1 b; ^: a4 t8 l                @.Destination := void;
3 k% I2 v' H( U                if @.occupied then
" J" N5 M* ~4 o/ D) u                        part := @.cont;" K( G. }# n5 x+ z+ E
                        @.transpOrder := void;1 A% N$ L8 z6 @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* \% J8 x3 J( [$ y" ~, Z: a
                                @,root.eventcontroller.simTime);
6 ~, E. {* E6 u3 Q# M                        @.HasOrder := false;
7 L5 K) l/ u" c- d; A' L. j                        @.DrivingHome := true;
9 }" v1 o, {5 h- c3 I. |                        rgManager.tryToStartTransOrder;: P1 i' J1 s2 u: O  }; b
                        if @.Destination = void+ n+ X# i, M0 Z, q
                        then -- no transport order for vehicle @) t# e2 R# f: W% \+ X8 R$ g
                                @.Destination :=
. E' O- y0 `& W: X6 h                                rgManager.nearestFreeStation(@,track.~);3 G9 [  w# w0 o8 u* f  R
                                newDirection(@);   
# S: N8 X: i9 j6 n4 @3 ~5 I! Z                                if @.Destination /= void then& `; T9 S' j  z4 z/ D5 r
                                        @.Destination.NumReservation :=( \) d% L# G# X* F
                                        @.Destination.NumReservation + 1;
) I9 t# D  d' V9 f                                end;
' I2 z* c/ ^6 \# j# {2 t                                @.CurrIcon := "drivingHome";
$ k3 y* O7 D4 {. z3 w, f4 D                                @.DrivingHome := true;8 E4 ?: y+ ]3 ^# K8 y+ [
                        end;
# G* G. e3 t* c* w* [6 N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 f4 c4 T2 o, N; c                        part := @.transpOrder;
& W8 K6 T- v& A                        part.move(@);-- load part, r2 J. U9 _1 B- v+ y& w
                        @.CurrIcon := "load";
- O  g) p# P/ D: Z; {; |0 x" G                        GlobalDistObj := part.globDestination;  \4 l, _% p2 u7 N5 |; V' s
                        assignLObj := rgmanager.rgAssignL;
; W* m7 D$ ^1 ]' X. I1 n, y                        row := assignLObj.getRowNo(GlobalDistObj);: Q) J7 z( p: i4 W9 |
                        if Row = -1 then -- since 70
8 ^  b& b. _; }2 e                                if lan=1 then
6 Y9 P$ \$ G1 d$ c$ T5 I; s' P: N4 P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! s2 J* n, S9 X1 s% ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: I  r- r% f0 U0 q                                else
4 z8 _) i" v, ^2 C0 Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 ~$ d! W* |3 p' U0 U3 Z
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 w5 I  Q1 o) Q
                                end;# L- ~4 H3 o+ ]1 p3 V
                        else
& A9 Y: L% i# ^% M$ i0 J7 _0 _2 |                                @.Destination := assignLObj[1,row];
# g8 ]0 a3 z. \; R                        end;                        / s7 N8 W2 u" ^5 ~8 H, p) P
                        newDirection(@);
: i) D% W" l1 ?9 \7 z                        @.HasOrder := true;
4 ~  q* Q! a7 l2 ?( ]/ l, d7 f                end;' P" R: L5 ?$ V) R" X
        end;$ d! T  ^$ P* q: h; x9 S9 z% x
end;        -- of the method7 J. j2 s4 Z' d2 P/ U3 Q" M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- ?( @& D0 K1 n% [1 d3 e& M3 E5 Y, O5 |0 q$ j
这是AGV_putin中arrive的method。
9 |: R$ l: Z  {$ ^# X
. x( h1 e" V1 @8 |  S7 Q! f' ?当到达物料速度越高时,这个报警更多," ~" S, {" Q! `. e" h6 H' ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- {; P2 k: s& c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, c% c* u- Q; y- z) T9 Z4 D) S! y# X' v. S! u( [7 ?* K
另外一个小建议,就是move,所有的move都可以这样
" K: }$ w( z8 J& c9 sif not move() then debug end
: V" l8 J- n" `% [+ G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 h/ l( n4 v1 |+ x/ d7 U7 w4 G
plant simulation中的free libraries有AGV模板,
: i- }8 F" W! e3 V) g里面也有案例。
, O: ^+ A) I) b" f1 f- q' v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. \9 `" s# j/ w6 z
7 G( ^& V* J# [  @* _# I) M* o9 l- ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& s/ g2 R$ }3 v( j9 Z) _8 I
: q* w, Q9 H% l8 Y- E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' s* e8 l& K, N/ l
这是AGV_putin中arrive的method。# j  f6 W9 i% V4 W' C  m+ J
& ?' k9 |8 `& X+ W  B; s0 z
当到达物料速度越高时,这个报警更多,
1 D; H0 X# d7 j( R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 09:09 , Processed in 0.019190 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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