设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6251|回复: 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'
* ]" t/ D- I  Q6 o5 @3 ~*// R" U, U0 k7 {2 N
is2 p5 k. D7 z# p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ W0 L7 X% W" G
do' \4 X* V/ l3 D, A! {0 o2 i
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 c& s$ b( f& ~4 d2 h, _$ p1 G$ w        if current = @.Destination -- else return
0 V6 F) \4 D/ x+ a$ F3 t, u$ [        then
* W/ a$ m# E9 s                @.Destination := void;
* B- w0 z4 X: y7 N8 {# t                if @.occupied then; P6 N+ A6 J0 c5 N
                        part := @.cont;! S' d( ]" U9 g" g
                        @.transpOrder := void;. U0 K5 t0 F& _0 ~, s) b8 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, h& M1 E; W6 e) V& d
                                @,root.eventcontroller.simTime);
( n  Z/ U$ P3 K& G8 G* M4 p                        @.HasOrder := false;
% Y% N! }' G: n5 P' \+ o9 E) b+ f                        @.DrivingHome := true;3 {1 }7 Z3 j% X" g# s7 }: n
                        rgManager.tryToStartTransOrder;7 O7 e' Z% l* y% I8 N( Y; [( S
                        if @.Destination = void
/ u) N3 y9 w- n3 |                        then -- no transport order for vehicle @
+ }% j- ]8 i4 c* B                                @.Destination :=3 Z$ ^) t: S& L0 [) h
                                rgManager.nearestFreeStation(@,track.~);
# Z: X! E3 a% M- n2 `0 o, `/ G                                newDirection(@);   3 j  t4 e: O4 j& s" k. ?7 I
                                if @.Destination /= void then. h& l" F8 F0 c% l9 R
                                        @.Destination.NumReservation :=
* U8 G1 ]" ~, I6 Z" u& t                                        @.Destination.NumReservation + 1;
) H  L. u" `$ c4 u3 n/ L- G                                end;9 `0 u/ |4 r  y; M9 l9 o) I
                                @.CurrIcon := "drivingHome";
; N  D; t# |) e                                @.DrivingHome := true;
# P' H4 u' r+ s% K9 m/ `                        end;! L1 @1 ~3 z% n7 S+ K
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& s7 I4 V3 m1 d# b6 g
                        part := @.transpOrder;8 s. G- Y9 y8 U; |1 h
                        part.move(@);-- load part7 m7 R2 m& ~. p- f* D. h
                        @.CurrIcon := "load";& q- u9 E0 \( d( q1 o  B, H3 h5 C& H
                        GlobalDistObj := part.globDestination;- z' ^% F0 W" t2 p8 {1 z  X
                        assignLObj := rgmanager.rgAssignL;4 Q2 {* c, ?6 [  H( \. E5 E
                        row := assignLObj.getRowNo(GlobalDistObj);
" J0 V2 j) d& C* q" b5 Y                        if Row = -1 then -- since 70: W; H0 M  O! U
                                if lan=1 then0 ~# f  A4 R9 Q7 d* e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% a( E5 a, h/ N5 }9 F" l, c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ X/ f" e$ ^9 Y) |' M# s
                                else
4 y3 C( {0 ~0 [2 I* @2 t8 B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 l1 W/ G1 J, r+ z4 c6 c* S                                                to_str("in docking station: \"",?.~.name,"\""));                               
! |! M: z  W, G/ N" F( H% i                                end;2 E, Z9 U# ?1 ~1 d: _* Y# O7 d4 y$ m3 e
                        else* k# u6 ?1 S+ E# r  a
                                @.Destination := assignLObj[1,row];
  z" v+ d$ ]% c                        end;                        3 `! }; P, c4 c
                        newDirection(@);
1 S' L( e7 o& E% I  s4 y0 h                        @.HasOrder := true;# f2 \) i, q0 {( G- R* S5 d
                end;
5 g1 f3 ^' D. x1 b# ]# \        end;
5 E2 V. J% ^' U) \3 Mend;        -- of the method+ C) |1 Y( y3 o% u. q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 E5 D7 i/ |( A6 [

8 f1 K8 k0 b4 h; O这是AGV_putin中arrive的method。" t- r" _& T0 z/ f- ]9 G
: h2 a! d& ~  l1 h3 N
当到达物料速度越高时,这个报警更多,
  z9 f& j3 |' S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ b" ^1 Q! C# [$ G5 U" f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! E) ?' Z& N* D9 A
$ B; X0 @3 q, l. d另外一个小建议,就是move,所有的move都可以这样0 C7 ^# Z. k3 R0 _0 K6 V) x
if not move() then debug end/ K' B& c+ J# _. K$ J. E+ O
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 E4 ]5 T7 c4 f* e, J9 ?
plant simulation中的free libraries有AGV模板,
) f- ~" ~# [, p8 ~1 D" d8 `0 B( P& O里面也有案例。: s6 U' U9 A; ?9 k/ f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 _6 r0 i7 S2 Q: B
0 i# ^: G. V; \4 e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, ~4 S, r8 K0 [/ K" P5 x, ]. S! O. ~* h! |1 t! x" s  B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : u- l" n5 u2 Z/ O7 P8 W$ d; P' i
这是AGV_putin中arrive的method。
5 I1 c8 F0 C9 g2 k+ B. ^* b' d% z: n" j  D3 c* M, z2 N" I# Z
当到达物料速度越高时,这个报警更多,
" U9 e5 i/ b, O* c3 Y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-27 05:34 , Processed in 0.019334 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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