设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8134|回复: 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'
3 w5 {' M5 L5 o+ p# E9 ?% {/ y*/
5 s  y! P- I" ris. q2 G" E# q3 m. Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- M% Z. ~' m1 |% i8 W
do. H% h2 Y' x  X  {" H
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 o) F& `) g) K% x$ X
        if current = @.Destination -- else return# Q  O, a7 _; b5 D# E
        then9 J  n( C! q& t: `
                @.Destination := void;6 o( Q! x8 I) S# M; m
                if @.occupied then
3 d5 W% ~3 o, `6 i5 C& i5 n' B6 z  [                        part := @.cont;
8 w3 ~! d4 F: W" e& Y+ _                        @.transpOrder := void;
5 U: {& s+ a6 E* d0 _+ J2 w2 R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 p% l6 k- q/ o. D. f                                @,root.eventcontroller.simTime);/ n# @8 `: Q: O9 W2 q" _/ I- @
                        @.HasOrder := false;
6 s0 ?! F& e4 d- B5 E                        @.DrivingHome := true;- t, Y, E! r& p* {* `+ N/ D5 z2 T  n( ^
                        rgManager.tryToStartTransOrder;' C9 x8 g' I3 t# x( v
                        if @.Destination = void
, F2 B1 X$ q5 G/ Y. L                        then -- no transport order for vehicle @
. i4 h1 G% J9 p' b                                @.Destination :=' t) B6 G% h( i) `  V
                                rgManager.nearestFreeStation(@,track.~);
, D' u* R, _4 K$ _* Q% n                                newDirection(@);   
/ t- o3 j0 g8 m* R+ x* m( J                                if @.Destination /= void then# X1 r. D2 _! t+ Q7 C/ }
                                        @.Destination.NumReservation :=) R9 ~7 }+ O3 n" V4 a3 c! r( H; l% L
                                        @.Destination.NumReservation + 1;
( \7 j4 s! e4 w+ R& Y7 c, I                                end;
4 }3 Z2 W% |2 V* |1 C7 j! h                                @.CurrIcon := "drivingHome";  U/ N* i! B! ]3 R% s! c. B: G
                                @.DrivingHome := true;
" L; |0 N, Y) `+ Q8 E& |8 K                        end;
; V" f- {: q8 V" B9 ]! L7 n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* w$ @7 s7 T3 |6 M                        part := @.transpOrder;+ M4 E6 D, r% U4 v# W6 L3 P9 u+ w) O0 N
                        part.move(@);-- load part$ J% D4 ~) t$ b; Z8 [# G+ ^3 X
                        @.CurrIcon := "load";& I4 g5 `& `3 v" v5 v: f
                        GlobalDistObj := part.globDestination;7 D- c0 \# l( i( Y* k
                        assignLObj := rgmanager.rgAssignL;6 q, @% V: i6 U3 x; d' w, R8 ?' O
                        row := assignLObj.getRowNo(GlobalDistObj);" S( u4 h7 Q1 y4 E% E
                        if Row = -1 then -- since 70
2 h( |& u* S" ?8 q, [% S                                if lan=1 then
. q8 k/ P. U7 E  j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ^/ `' Z  x5 c) X5 `* b                                                to_str("in der Andockstation: \"",?.~.name,"\""));* h& a1 P* y' s& U0 L# G
                                else& M7 ^" l6 |  c0 G4 o& X3 ?8 ?9 U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," W( y) ?9 }& D
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 d; p0 u" z+ A, P2 w& X( ]: S
                                end;+ y' _3 s1 {& O# x
                        else) H7 H6 m( j  L; f% [2 h- o  N
                                @.Destination := assignLObj[1,row];6 X  u+ f2 H3 t6 \( C
                        end;                        * i% v- |' O3 S# ?
                        newDirection(@);, @0 y& z; @9 _$ ^; s* p( M
                        @.HasOrder := true;
. j5 c  _/ n! N6 U$ B( e; O  f                end;$ F# @! I  S# B" ]- A7 g: _5 B
        end;
" y" }7 i5 a( e+ J2 tend;        -- of the method" J  k* Q% k3 A2 Z0 S! Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ o2 `3 |* q0 n1 r0 y, C
7 y5 `! l* b9 ~这是AGV_putin中arrive的method。- l' ^: O4 W% s+ t

) K4 r# C2 V) n, K/ J& ^; p( \当到达物料速度越高时,这个报警更多,7 L* Z: k" \8 R2 h# p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 ~' |+ n- G- X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. @0 N- h7 z2 R5 W% n6 ]2 K3 b. h, f- T0 n! H) j
另外一个小建议,就是move,所有的move都可以这样, d" S0 n: t" N5 b& p( [
if not move() then debug end
! m0 Y+ g- M; w; ?. m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ q; p; Q6 q6 ~& g1 _( L; [* F! Splant simulation中的free libraries有AGV模板,  M5 _  d. ], R: ?* n
里面也有案例。8 o, n4 l" B3 q4 }1 h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. c6 C9 m3 Y* F" x- Z
# S6 B% m5 v% Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 l7 z0 L/ Q! u
1 b* B* |  v* ?) J* ~* U& U那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" w0 \+ ]+ z7 N8 S( p这是AGV_putin中arrive的method。; z6 ^( ^8 U6 s& v+ v+ I2 A
% w, N8 v* x2 ?( J3 G* E" i
当到达物料速度越高时,这个报警更多,
/ w$ Z8 T" W1 E" X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-16 15:07 , Processed in 0.016482 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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