设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4630|回复: 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'% X! W# ]; u5 w3 d: e
*/
% C( o$ t- t8 D1 z0 Sis
7 s0 L1 h/ V$ z, ?# o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 b, M7 W6 u& B' A! [4 ^
do' U# d) W0 v) N1 L" ?4 x
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 p; l% t7 Q& g4 C* I3 X. I/ j3 c3 C
        if current = @.Destination -- else return
$ M$ [4 r7 J/ X, H5 j( d# o4 M        then9 s2 p% |, Z2 h' ?( h
                @.Destination := void;# l& Q1 O/ O% E: ^
                if @.occupied then
2 @, W. L3 {5 s1 d# x' M                        part := @.cont;9 F5 H/ V$ d$ H: D/ p
                        @.transpOrder := void;
$ \4 d2 N$ [* D, v2 l* f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 I2 `) z" n8 X' N- y1 G+ O
                                @,root.eventcontroller.simTime);( p9 Y6 Z$ a6 p5 s7 x* @: z% w
                        @.HasOrder := false;
2 e2 N0 y- Q  ^( [$ M: ^5 X                        @.DrivingHome := true;
- R: x; m2 p6 P- t. o) n                        rgManager.tryToStartTransOrder;
& H8 x1 S; I+ C; G0 R. A( u  u' \                        if @.Destination = void! W( d0 s( K. m! y; t; A% O
                        then -- no transport order for vehicle @) G) W. b1 x. r; d0 ?- b  c) U
                                @.Destination :=+ X1 g. Y( ~3 S
                                rgManager.nearestFreeStation(@,track.~);8 K7 @, @6 p! a: r) J
                                newDirection(@);   
# u- D; C8 U1 p! [1 S% q                                if @.Destination /= void then
# {1 e& {" C  U7 G1 D3 b                                        @.Destination.NumReservation :=/ w* l4 x+ c1 G& z" |/ u& U
                                        @.Destination.NumReservation + 1;
! Z$ c  h; J& |) Z( S0 K                                end;
; s6 A) N, {& F4 ~* y4 g                                @.CurrIcon := "drivingHome";
  E/ l* a4 r: _/ ?+ m                                @.DrivingHome := true;
6 P) r& s4 D9 x3 E5 s% z# m! c4 C                        end;
# e9 t% g0 I$ Z# U( T- y+ C& i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- g; u0 v9 E; s0 D1 {! ^                        part := @.transpOrder;9 \/ I6 K2 D- v6 W
                        part.move(@);-- load part! I" c1 L' t) \/ Y
                        @.CurrIcon := "load";
2 D4 R* l4 N6 D7 B5 f5 q                        GlobalDistObj := part.globDestination;: C: q1 T& }0 v% C- N0 Q0 t; i
                        assignLObj := rgmanager.rgAssignL;1 v3 r5 o. t) X* T" n# s& G7 u
                        row := assignLObj.getRowNo(GlobalDistObj);8 z" _) ~9 r3 ]! ?+ U4 P
                        if Row = -1 then -- since 70
' c  E, h3 g: k3 B                                if lan=1 then6 D% o8 V6 a3 _; Z: O$ D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' D. o  G9 w5 ]) N. T3 D% w) a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 n% f4 Q8 s# n$ Q# I. I
                                else- \3 i6 T$ f" f( O
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ @$ N4 w) u( f4 r2 P9 J                                                to_str("in docking station: \"",?.~.name,"\""));                                : ^" t, b2 K" j: v% x8 v
                                end;7 O3 K4 D; f% K0 {9 n! l" g
                        else* Q: [6 a2 N, G! g  A+ H
                                @.Destination := assignLObj[1,row];+ ]' \6 D- M0 b+ o8 \
                        end;                        3 Q8 W$ I+ ?$ `- n  u+ m
                        newDirection(@);9 D4 n, R6 [' s! l2 v9 Z+ ]
                        @.HasOrder := true;) |7 t$ W/ d7 Z
                end;
! s$ L" l' w4 S8 i& g% R, P        end;
, m0 h. j4 m, G' y! wend;        -- of the method
$ h4 ~5 X( ~! u: h7 X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ }; h' z& A4 f1 Y3 q% ^. t3 ^% E# ]5 y9 F- x/ w/ V
这是AGV_putin中arrive的method。
4 T! z$ I$ ~% v0 U5 f, d! g/ m. S5 P2 b3 t  C
当到达物料速度越高时,这个报警更多,
* S1 D) L/ b+ M% Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 ~' j. B6 J: e2 i4 y* L+ _$ }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 s0 ~9 d2 N) t$ u4 C# Y$ |7 J( W
3 V4 s/ B& E1 ^4 y另外一个小建议,就是move,所有的move都可以这样
$ N, ~* @% \3 J6 L6 I0 nif not move() then debug end
; B; F0 ]( W& Z& |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- Q* z; U/ o8 F0 R+ c
plant simulation中的free libraries有AGV模板,4 G' Z+ A. A; q0 h+ Z2 ~% K. G
里面也有案例。) i* B- e& ]' P8 a4 S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! ^2 ?9 m- w+ H# n$ C2 d8 ?

, [6 G7 @8 A; w# {! `9 L8 B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ @$ m: ~" a" r) @. w& g) y8 M- R0 M4 u, l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 {7 J5 F0 [& |% I. s; |
这是AGV_putin中arrive的method。  h7 v* _) {- z/ R

) x% A( x/ z9 s# ?0 T, W% \% _5 E( j当到达物料速度越高时,这个报警更多,

3 F& D9 T9 x( Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-12 20:13 , Processed in 0.021821 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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