设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6586|回复: 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'
; @1 x4 l9 O$ s- S1 {*/
; P6 y9 M0 k- q  O# g% J$ o4 \is
0 l  P4 P6 B- ]  [6 f        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# U' C; X5 l1 C' i) b7 n2 cdo
) X  @0 R# Q/ R' M9 G        Lan := rootfolder.Internal.Tools.AOLlanguage;
# L6 \" [+ P2 }& p5 p        if current = @.Destination -- else return7 G9 P8 ?* s+ P- e
        then) t3 S9 W6 |5 n7 l" Z- }
                @.Destination := void;: a+ }8 O2 s8 ^5 J' {! @& b: ]
                if @.occupied then: t8 A/ U1 e* ?1 _
                        part := @.cont;
2 R- }+ |) f, i/ ~/ f* |+ @                        @.transpOrder := void;
9 q" j/ j. Y2 W& ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 J5 y+ i0 r$ F& A$ Q; {
                                @,root.eventcontroller.simTime);
" S5 J  p5 l9 B6 S( G1 X                        @.HasOrder := false;
3 l' b3 C* ~+ y* D" X9 F' y                        @.DrivingHome := true;
: a9 `" x5 }, |' e2 u                        rgManager.tryToStartTransOrder;
! ~  @' U  L( j- R9 S$ p+ t                        if @.Destination = void
+ A. ]3 K! l# c. j8 u9 K0 N; R                        then -- no transport order for vehicle @% S+ C% Q; H2 `3 m0 d
                                @.Destination :=
0 t' Q9 v1 `" Q5 g                                rgManager.nearestFreeStation(@,track.~);
8 B$ h$ G+ X! g: C                                newDirection(@);   - A, D6 ~" j+ C8 U
                                if @.Destination /= void then- L3 ^# l0 O: q9 L, e
                                        @.Destination.NumReservation :=. {0 Z# |" O( ~8 C4 f9 M* `
                                        @.Destination.NumReservation + 1;
8 `: Q3 r) ?  n% w                                end;
) I7 H5 ]6 t. {2 f  Z1 ]                                @.CurrIcon := "drivingHome";
, c+ }& g# u+ X, ?8 {  S$ b                                @.DrivingHome := true;
3 h: ]& C7 z! j$ t1 [3 g                        end;
  X# Z% O6 O/ x! b. E3 z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 C. E" @' {# m; |( G                        part := @.transpOrder;. F! n/ z" y& k" p+ q
                        part.move(@);-- load part
# q( K2 `8 F: P9 q3 o                        @.CurrIcon := "load";) N7 s/ B/ Q- g9 h' c
                        GlobalDistObj := part.globDestination;3 q8 R/ x2 K0 f( d6 g
                        assignLObj := rgmanager.rgAssignL;
( O) q4 Y$ e4 e* ^                        row := assignLObj.getRowNo(GlobalDistObj);% y- U( [* ~; @& ^: i0 n
                        if Row = -1 then -- since 70
9 m1 c0 @2 A# g4 [                                if lan=1 then* h3 v$ B% F4 n1 x/ q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D9 j+ Z- p8 O% H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 U( v3 H6 ^! v9 O; i6 n" I3 r
                                else3 A, U4 k! e$ Y: Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ^' x& b8 t3 v! z. A, o; ~2 E: I                                                to_str("in docking station: \"",?.~.name,"\""));                                $ e: U( }- _9 I6 N% ^5 W7 K
                                end;4 t7 s& N+ H) T8 e
                        else0 L& {5 y, B: |0 @% Y; c) f# @) i
                                @.Destination := assignLObj[1,row];
4 d5 G! ?8 o( U9 C                        end;                       
6 s7 ~! a( m/ F% _: _: c  c                        newDirection(@);2 p0 s) r/ I1 @. O3 C; _2 m
                        @.HasOrder := true;
: t9 C; t6 u7 d8 J9 q                end;9 c7 M* I; z) k" h" B
        end;
. `. S" n4 Q3 |; hend;        -- of the method
3 c: [* U9 X+ Y1 T4 J7 K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 l# Z8 _  u# P; Y

) \' ?7 v; F! ]2 x) p9 `& K7 b这是AGV_putin中arrive的method。; [) d! D7 h  W: e
& [3 O( I' K3 |& b5 @2 P4 ]: a
当到达物料速度越高时,这个报警更多,, K2 c5 N- s2 |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! X8 _2 m  l: @1 X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ Z8 o7 |  T. i0 @  [' j
. M! Z. c: ~. `7 o+ H" y" E% |2 {
另外一个小建议,就是move,所有的move都可以这样
9 S) b0 J9 a# U, Qif not move() then debug end- ]0 u- A5 e$ C/ S8 T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% a6 v/ I5 h# Y( b1 \* H
plant simulation中的free libraries有AGV模板,
8 n) N9 f; C6 H: [3 [9 `里面也有案例。
0 _! U) @9 x6 e4 I我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" L: d! _3 ~9 H0 y+ n

* K- n" y3 D$ J9 z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 L& Z# p3 Z% m, f

$ e! Y" t7 p# {( k& b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * n( }. s5 ~, M( Z4 z# D
这是AGV_putin中arrive的method。
9 T5 k% b9 Z% C" p3 ^7 [
& i) z5 L5 z8 B8 i/ |9 \. S当到达物料速度越高时,这个报警更多,

# l% U+ b' K+ C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-14 10:04 , Processed in 0.018615 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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